diff --git a/bin/genieacs-cwmp.ts b/bin/genieacs-cwmp.ts
index 10a1fcd..2b9d5fc 100755
--- a/bin/genieacs-cwmp.ts
+++ b/bin/genieacs-cwmp.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as config from "../lib/config";
-import * as logger from "../lib/logger";
-import * as cluster from "../lib/cluster";
-import * as server from "../lib/server";
-import * as cwmp from "../lib/cwmp";
-import * as db from "../lib/db/db";
-import * as extensions from "../lib/extensions";
+import * as config from "../lib/config.ts";
+import * as logger from "../lib/logger.ts";
+import * as cluster from "../lib/cluster.ts";
+import * as server from "../lib/server.ts";
+import * as cwmp from "../lib/cwmp.ts";
+import * as db from "../lib/db/db.ts";
+import * as extensions from "../lib/extensions.ts";
import { version as VERSION } from "../package.json";
logger.init("cwmp", VERSION);
diff --git a/bin/genieacs-ext.ts b/bin/genieacs-ext.ts
index 6f24696..bad14f0 100755
--- a/bin/genieacs-ext.ts
+++ b/bin/genieacs-ext.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { Fault } from "../lib/types";
+import { Fault } from "../lib/types.ts";
const jobs = new Set();
const fileName = process.argv[2];
diff --git a/bin/genieacs-fs.ts b/bin/genieacs-fs.ts
index 3bb68f3..49da4bb 100755
--- a/bin/genieacs-fs.ts
+++ b/bin/genieacs-fs.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as config from "../lib/config";
-import * as logger from "../lib/logger";
-import * as cluster from "../lib/cluster";
-import * as server from "../lib/server";
-import { listener } from "../lib/fs";
-import * as db from "../lib/db/db";
+import * as config from "../lib/config.ts";
+import * as logger from "../lib/logger.ts";
+import * as cluster from "../lib/cluster.ts";
+import * as server from "../lib/server.ts";
+import { listener } from "../lib/fs.ts";
+import * as db from "../lib/db/db.ts";
import { version as VERSION } from "../package.json";
logger.init("fs", VERSION);
diff --git a/bin/genieacs-nbi.ts b/bin/genieacs-nbi.ts
index a6844e0..14e9bc9 100755
--- a/bin/genieacs-nbi.ts
+++ b/bin/genieacs-nbi.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as config from "../lib/config";
-import * as logger from "../lib/logger";
-import * as cluster from "../lib/cluster";
-import * as server from "../lib/server";
-import { listener } from "../lib/nbi";
-import * as db from "../lib/db/db";
-import * as extensions from "../lib/extensions";
+import * as config from "../lib/config.ts";
+import * as logger from "../lib/logger.ts";
+import * as cluster from "../lib/cluster.ts";
+import * as server from "../lib/server.ts";
+import { listener } from "../lib/nbi.ts";
+import * as db from "../lib/db/db.ts";
+import * as extensions from "../lib/extensions.ts";
import { version as VERSION } from "../package.json";
logger.init("nbi", VERSION);
diff --git a/bin/genieacs-ui.ts b/bin/genieacs-ui.ts
index a50f173..f45d37b 100755
--- a/bin/genieacs-ui.ts
+++ b/bin/genieacs-ui.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as config from "../lib/config";
-import * as logger from "../lib/logger";
-import * as cluster from "../lib/cluster";
-import * as server from "../lib/server";
-import { listener } from "../lib/ui";
-import * as extensions from "../lib/extensions";
-import * as db from "../lib/db/db";
+import * as config from "../lib/config.ts";
+import * as logger from "../lib/logger.ts";
+import * as cluster from "../lib/cluster.ts";
+import * as server from "../lib/server.ts";
+import { listener } from "../lib/ui.ts";
+import * as extensions from "../lib/extensions.ts";
+import * as db from "../lib/db/db.ts";
import { version as VERSION } from "../package.json";
logger.init("ui", VERSION);
diff --git a/build/build.ts b/build/build.ts
index 0fbe7fb..3f16f22 100644
--- a/build/build.ts
+++ b/build/build.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import path from "path";
-import fs from "fs";
-import { createHash } from "crypto";
-import { promisify } from "util";
+import path from "node:path";
+import fs from "node:fs";
+import { createHash } from "node:crypto";
+import { promisify } from "node:util";
import * as esbuild from "esbuild";
import { optimize } from "svgo";
-import * as xmlParser from "../lib/xml-parser";
+import * as xmlParser from "../lib/xml-parser.ts";
const fsAsync = {
readdir: promisify(fs.readdir),
diff --git a/build/lint.ts b/build/lint.ts
index 8a0b53e..7449ca0 100644
--- a/build/lint.ts
+++ b/build/lint.ts
@@ -1,5 +1,5 @@
-import { exec } from "child_process";
-import { promisify } from "util";
+import { exec } from "node:child_process";
+import { promisify } from "node:util";
const execPromise = promisify(exec);
diff --git a/lib/api-functions.ts b/lib/api-functions.ts
index a0d2edc..2249fca 100644
--- a/lib/api-functions.ts
+++ b/lib/api-functions.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ObjectId } from "mongodb";
-import { collections } from "./db/db";
+import { collections } from "./db/db.ts";
import {
deleteConfig,
deleteFault as dbDeleteFault,
@@ -35,25 +16,25 @@ import {
putProvision,
putUser,
putVirtualParameter,
-} from "./ui/db";
-import * as common from "./util";
-import * as cache from "./cache";
-import { acquireLock, getToken, releaseLock } from "./lock";
+} from "./ui/db.ts";
+import * as common from "./util.ts";
+import * as cache from "./cache.ts";
+import { acquireLock, getToken, releaseLock } from "./lock.ts";
import {
getRevision,
getConfig,
getConfigExpression,
getUsers,
-} from "./ui/local-cache";
+} from "./ui/local-cache.ts";
import {
httpConnectionRequest,
udpConnectionRequest,
-} from "./connection-request";
-import { Expression, Task } from "./types";
-import { evaluate } from "./common/expression/util";
-import { hashPassword } from "./auth";
-import { flattenDevice } from "./ui/db";
-import { ResourceLockedError } from "./common/errors";
+} from "./connection-request.ts";
+import { Expression, Task } from "./types.ts";
+import { evaluate } from "./common/expression/util.ts";
+import { hashPassword } from "./auth.ts";
+import { flattenDevice } from "./ui/db.ts";
+import { ResourceLockedError } from "./common/errors.ts";
export async function connectionRequest(
deviceId: string,
diff --git a/lib/auth.ts b/lib/auth.ts
index fcab49d..6650bf0 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { createHash, randomBytes, pbkdf2 } from "crypto";
+import { createHash, randomBytes, pbkdf2 } from "node:crypto";
function parseHeaderFeilds(str: string): Record {
const res = {};
diff --git a/lib/cache.ts b/lib/cache.ts
index a619030..d8f007f 100644
--- a/lib/cache.ts
+++ b/lib/cache.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { collections } from "./db/db";
-import * as config from "./config";
+import { collections } from "./db/db.ts";
+import * as config from "./config.ts";
const CLOCK_SKEW_TOLERANCE = 30000;
const MAX_CACHE_TTL = +config.get("MAX_CACHE_TTL");
diff --git a/lib/cluster.ts b/lib/cluster.ts
index 5a74465..261af64 100644
--- a/lib/cluster.ts
+++ b/lib/cluster.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import cluster, { Worker } from "cluster";
-import { cpus } from "os";
-import * as logger from "./logger";
+import cluster, { Worker } from "node:cluster";
+import { cpus } from "node:os";
+import * as logger from "./logger.ts";
let respawnTimestamp = 0;
let crashes: number[] = [];
diff --git a/lib/common/authorizer.ts b/lib/common/authorizer.ts
index 510c771..22ec71a 100644
--- a/lib/common/authorizer.ts
+++ b/lib/common/authorizer.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { PermissionSet, Expression } from "../types";
-import { evaluate, or } from "./expression/util";
+import { PermissionSet, Expression } from "../types.ts";
+import { evaluate, or } from "./expression/util.ts";
export default class Authorizer {
private declare permissionSets: PermissionSet[];
diff --git a/lib/common/expression/bigint.ts b/lib/common/expression/bigint.ts
index cc94fb6..25c93ca 100644
--- a/lib/common/expression/bigint.ts
+++ b/lib/common/expression/bigint.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2020 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
export function and(a: bigint, b: bigint): bigint {
return a & b;
}
diff --git a/lib/common/expression/normalize.ts b/lib/common/expression/normalize.ts
index cb41c90..6dd964a 100644
--- a/lib/common/expression/normalize.ts
+++ b/lib/common/expression/normalize.ts
@@ -1,7 +1,7 @@
-import * as BI from "./bigint";
-import { Expression } from "../../types";
-import { map } from "./parser";
-import { and, evaluateCallback } from "./util";
+import * as BI from "./bigint.ts";
+import { Expression } from "../../types.ts";
+import { map } from "./parser.ts";
+import { and, evaluateCallback } from "./util.ts";
const ZERO = BI.BigInt(0);
const ONE = BI.BigInt(1);
diff --git a/lib/common/expression/parser.ts b/lib/common/expression/parser.ts
index 876e07d..d2c8634 100644
--- a/lib/common/expression/parser.ts
+++ b/lib/common/expression/parser.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import parsimmon from "parsimmon";
-import { Expression } from "../../types";
+import { Expression } from "../../types.ts";
// Turn escaped characters into real ones (e.g. "\\n" becomes "\n").
function interpretEscapes(str): string {
diff --git a/lib/common/expression/synth.ts b/lib/common/expression/synth.ts
index 6a850a6..66dc24c 100644
--- a/lib/common/expression/synth.ts
+++ b/lib/common/expression/synth.ts
@@ -1,7 +1,7 @@
import { espresso, complement, tautology } from "espresso-iisojs";
-import { Expression } from "../../types";
-import normalize from "./normalize";
-import { map, parseLikePattern } from "./parser";
+import { Expression } from "../../types.ts";
+import normalize from "./normalize.ts";
+import { map, parseLikePattern } from "./parser.ts";
type Minterm = number[];
diff --git a/lib/common/expression/util.ts b/lib/common/expression/util.ts
index f8be54e..cebd2c4 100644
--- a/lib/common/expression/util.ts
+++ b/lib/common/expression/util.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { map, mapAsync, parseLikePattern } from "./parser";
-import { Expression } from "../../types";
+import { map, mapAsync, parseLikePattern } from "./parser.ts";
+import { Expression } from "../../types.ts";
const isArray = Array.isArray;
diff --git a/lib/common/memoize.ts b/lib/common/memoize.ts
index 7a423d3..520e6cb 100644
--- a/lib/common/memoize.ts
+++ b/lib/common/memoize.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
let cache1 = new Map();
let cache2 = new Map();
const keys = new WeakMap();
diff --git a/lib/common/path-set.ts b/lib/common/path-set.ts
index 33812d8..8445e95 100644
--- a/lib/common/path-set.ts
+++ b/lib/common/path-set.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import Path from "./path";
+import Path from "./path.ts";
export default class PathSet {
private declare lengthIndex: Set[];
diff --git a/lib/common/path.ts b/lib/common/path.ts
index 93fa113..7a8ad00 100644
--- a/lib/common/path.ts
+++ b/lib/common/path.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
type Segments = (string | Alias)[];
type Alias = [Path, string][];
diff --git a/lib/config.ts b/lib/config.ts
index 633170d..568b90f 100644
--- a/lib/config.ts
+++ b/lib/config.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { resolve } from "path";
-import { readFileSync, existsSync } from "fs";
+import { resolve } from "node:path";
+import { readFileSync, existsSync } from "node:fs";
// Find project root directory
export let ROOT_DIR = resolve(__dirname, "..");
diff --git a/lib/connection-request.ts b/lib/connection-request.ts
index 66ee63e..5262a2c 100644
--- a/lib/connection-request.ts
+++ b/lib/connection-request.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as crypto from "crypto";
-import * as dgram from "dgram";
-import * as http from "http";
-import { evaluateAsync } from "./common/expression/util";
-import { Expression } from "./types";
-import * as auth from "./auth";
-import * as extensions from "./extensions";
-import * as debug from "./debug";
+import * as crypto from "node:crypto";
+import * as dgram from "node:dgram";
+import * as http from "node:http";
+import { evaluateAsync } from "./common/expression/util.ts";
+import { Expression } from "./types.ts";
+import * as auth from "./auth.ts";
+import * as extensions from "./extensions.ts";
+import * as debug from "./debug.ts";
async function extractAuth(
exp: Expression,
diff --git a/lib/cwmp.ts b/lib/cwmp.ts
index 4e5e33b..8aa9c46 100644
--- a/lib/cwmp.ts
+++ b/lib/cwmp.ts
@@ -1,38 +1,23 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as zlib from "zlib";
-import * as crypto from "crypto";
-import { Socket } from "net";
-import * as auth from "./auth";
-import * as config from "./config";
-import { generateDeviceId, once, setTimeoutPromise } from "./util";
-import * as soap from "./soap";
-import * as session from "./session";
+import * as zlib from "node:zlib";
+import * as crypto from "node:crypto";
+import { Socket } from "node:net";
+import { IncomingMessage, ServerResponse } from "node:http";
+import { pipeline, Readable } from "node:stream";
+import { promisify } from "node:util";
+import { decode, encodingExists } from "iconv-lite";
+import * as auth from "./auth.ts";
+import * as config from "./config.ts";
+import { generateDeviceId, once, setTimeoutPromise } from "./util.ts";
+import * as soap from "./soap.ts";
+import * as session from "./session.ts";
import {
evaluateAsync,
evaluate,
extractParams,
-} from "./common/expression/util";
-import * as cache from "./cache";
-import * as lock from "./lock";
-import * as localCache from "./cwmp/local-cache";
+} from "./common/expression/util.ts";
+import * as cache from "./cache.ts";
+import * as lock from "./lock.ts";
+import * as localCache from "./cwmp/local-cache.ts";
import {
clearTasks,
deleteFault,
@@ -44,11 +29,11 @@ import {
saveDevice,
saveFault,
saveOperation,
-} from "./cwmp/db";
-import * as logger from "./logger";
-import * as scheduling from "./scheduling";
-import Path from "./common/path";
-import * as extensions from "./extensions";
+} from "./cwmp/db.ts";
+import * as logger from "./logger.ts";
+import * as scheduling from "./scheduling.ts";
+import Path from "./common/path.ts";
+import * as extensions from "./extensions.ts";
import {
SessionContext,
AcsRequest,
@@ -60,15 +45,11 @@ import {
Preset,
GetRPCMethodsResponse,
CpeFault,
-} from "./types";
-import { IncomingMessage, ServerResponse } from "http";
-import { pipeline, Readable } from "stream";
-import { promisify } from "util";
-import { decode, encodingExists } from "iconv-lite";
-import { parseXmlDeclaration } from "./xml-parser";
-import * as debug from "./debug";
-import { getRequestOrigin } from "./forwarded";
-import { getSocketEndpoints } from "./server";
+} from "./types.ts";
+import { parseXmlDeclaration } from "./xml-parser.ts";
+import * as debug from "./debug.ts";
+import { getRequestOrigin } from "./forwarded.ts";
+import { getSocketEndpoints } from "./server.ts";
const gzipPromisified = promisify(zlib.gzip);
const deflatePromisified = promisify(zlib.deflate);
diff --git a/lib/cwmp/db.ts b/lib/cwmp/db.ts
index 8f558e8..916a325 100644
--- a/lib/cwmp/db.ts
+++ b/lib/cwmp/db.ts
@@ -1,16 +1,16 @@
-import { decodeTag, encodeTag, escapeRegExp } from "../util";
+import { ObjectId } from "mongodb";
+import { decodeTag, encodeTag, escapeRegExp } from "../util.ts";
import {
DeviceData,
Attributes,
SessionFault,
Task,
Operation,
-} from "../types";
-import Path from "../common/path";
-import { collections } from "../db/db";
-import { optimizeProjection } from "../db/util";
-import * as MongoTypes from "../db/types";
-import { ObjectId } from "mongodb";
+} from "../types.ts";
+import Path from "../common/path.ts";
+import { collections } from "../db/db.ts";
+import { optimizeProjection } from "../db/util.ts";
+import * as MongoTypes from "../db/types.ts";
const INVALID_PATH_SUFFIX = "__invalid";
diff --git a/lib/cwmp/local-cache.ts b/lib/cwmp/local-cache.ts
index 9ccb0b3..881147b 100644
--- a/lib/cwmp/local-cache.ts
+++ b/lib/cwmp/local-cache.ts
@@ -1,12 +1,12 @@
-import * as vm from "vm";
-import * as crypto from "crypto";
-import * as config from "../config";
-import { collections } from "../db/db";
-import { convertOldPrecondition } from "../db/util";
-import * as logger from "../logger";
-import * as scheduling from "../scheduling";
-import * as expression from "../common/expression/util";
-import { parse } from "../common/expression/parser";
+import * as vm from "node:vm";
+import * as crypto from "node:crypto";
+import * as config from "../config.ts";
+import { collections } from "../db/db.ts";
+import { convertOldPrecondition } from "../db/util.ts";
+import * as logger from "../logger.ts";
+import * as scheduling from "../scheduling.ts";
+import * as expression from "../common/expression/util.ts";
+import { parse } from "../common/expression/parser.ts";
import {
Preset,
Expression,
@@ -14,8 +14,8 @@ import {
VirtualParameters,
Files,
Config,
-} from "../types";
-import { LocalCache } from "../local-cache";
+} from "../types.ts";
+import { LocalCache } from "../local-cache.ts";
interface Snapshot {
presets: Preset[];
diff --git a/lib/db/db.ts b/lib/db/db.ts
index 4708608..90c828c 100644
--- a/lib/db/db.ts
+++ b/lib/db/db.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { MongoClient, Collection, GridFSBucket } from "mongodb";
-import { get } from "../config";
-import * as MongoTypes from "./types";
+import { get } from "../config.ts";
+import * as MongoTypes from "./types.ts";
export let filesBucket: GridFSBucket;
diff --git a/lib/db/synth.ts b/lib/db/synth.ts
index c2d3bc1..22ac4fa 100644
--- a/lib/db/synth.ts
+++ b/lib/db/synth.ts
@@ -1,16 +1,16 @@
import { Filter } from "mongodb";
import { EJSON } from "bson";
-import { parseLikePattern } from "../common/expression/parser";
-import { Expression } from "../types";
-import { decodeTag } from "../util";
+import { parseLikePattern } from "../common/expression/parser.ts";
+import { Expression } from "../types.ts";
+import { decodeTag } from "../util.ts";
import {
SynthContextBase,
likeDisjoint,
likeImplies,
Clause,
-} from "../common/expression/synth";
-import normalize from "../common/expression/normalize";
-import * as BI from "../common/expression/bigint";
+} from "../common/expression/synth.ts";
+import normalize from "../common/expression/normalize.ts";
+import * as BI from "../common/expression/bigint.ts";
type Minterm = number[];
diff --git a/lib/db/types.ts b/lib/db/types.ts
index ef4b9e8..ac9cc7e 100644
--- a/lib/db/types.ts
+++ b/lib/db/types.ts
@@ -1,5 +1,5 @@
import { ObjectId } from "mongodb";
-import { Expression, FaultStruct } from "../types";
+import { Expression, FaultStruct } from "../types.ts";
export interface Fault {
_id: string;
diff --git a/lib/db/util.ts b/lib/db/util.ts
index 23f1c47..1103259 100644
--- a/lib/db/util.ts
+++ b/lib/db/util.ts
@@ -1,5 +1,5 @@
-import { Expression } from "../types";
-import { encodeTag } from "../util";
+import { Expression } from "../types.ts";
+import { encodeTag } from "../util.ts";
// Optimize projection by removing overlaps
// This can modify the object
diff --git a/lib/debug.ts b/lib/debug.ts
index 87d89ee..52c85a6 100644
--- a/lib/debug.ts
+++ b/lib/debug.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { IncomingMessage, ServerResponse, ClientRequest } from "http";
-import { Socket } from "net";
-import { appendFileSync } from "fs";
-import { stringify } from "./common/yaml";
-import * as config from "./config";
-import { getSocketEndpoints } from "./server";
+import { IncomingMessage, ServerResponse, ClientRequest } from "node:http";
+import { Socket } from "node:net";
+import { appendFileSync } from "node:fs";
+import { stringify } from "./common/yaml.ts";
+import * as config from "./config.ts";
+import { getSocketEndpoints } from "./server.ts";
const DEBUG_FILE = "" + config.get("DEBUG_FILE");
const DEBUG_FORMAT = "" + config.get("DEBUG_FORMAT");
diff --git a/lib/default-provisions.ts b/lib/default-provisions.ts
index 0b80aea..2750918 100644
--- a/lib/default-provisions.ts
+++ b/lib/default-provisions.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import Path from "./common/path";
-import * as config from "./config";
-import * as device from "./device";
-import * as scheduling from "./scheduling";
-import { SessionContext, Declaration } from "./types";
+import Path from "./common/path.ts";
+import * as config from "./config.ts";
+import * as device from "./device.ts";
+import * as scheduling from "./scheduling.ts";
+import { SessionContext, Declaration } from "./types.ts";
const MAX_DEPTH = +config.get("MAX_DEPTH");
diff --git a/lib/device.ts b/lib/device.ts
index f850184..5e9a5a2 100644
--- a/lib/device.ts
+++ b/lib/device.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import Path from "./common/path";
+import Path from "./common/path.ts";
import {
DeviceData,
Declaration,
Clear,
AttributeTimestamps,
Attributes,
-} from "./types";
+} from "./types.ts";
const CHANGE_FLAGS = {
object: 2,
diff --git a/lib/extensions.ts b/lib/extensions.ts
index cdba512..cef7372 100644
--- a/lib/extensions.ts
+++ b/lib/extensions.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { spawn, ChildProcess } from "child_process";
-import * as crypto from "crypto";
-import * as config from "./config";
-import { Fault } from "./types";
-import { ROOT_DIR } from "./config";
-import * as logger from "./logger";
-import readline from "readline";
+import { spawn, ChildProcess } from "node:child_process";
+import * as crypto from "node:crypto";
+import readline from "node:readline";
+import * as config from "./config.ts";
+import { Fault } from "./types.ts";
+import { ROOT_DIR } from "./config.ts";
+import * as logger from "./logger.ts";
const TIMEOUT = +config.get("EXT_TIMEOUT");
diff --git a/lib/forwarded.ts b/lib/forwarded.ts
index 7c88c88..18e53ab 100644
--- a/lib/forwarded.ts
+++ b/lib/forwarded.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { IncomingMessage } from "http";
-import { TLSSocket } from "tls";
+import { IncomingMessage } from "node:http";
+import { TLSSocket } from "node:tls";
import { parseCIDR, parse, IPv6, IPv4 } from "ipaddr.js";
-import * as config from "./config";
-import { getSocketEndpoints } from "./server";
+import * as config from "./config.ts";
+import { getSocketEndpoints } from "./server.ts";
interface RequestOrigin {
localAddress: string;
diff --git a/lib/fs.ts b/lib/fs.ts
index 3a1bec9..95594b1 100644
--- a/lib/fs.ts
+++ b/lib/fs.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as url from "url";
-import { IncomingMessage, ServerResponse } from "http";
-import { PassThrough, pipeline, Readable } from "stream";
-import { createHash } from "crypto";
-import { filesBucket, collections } from "./db/db";
-import * as logger from "./logger";
-import { getRequestOrigin } from "./forwarded";
-import memoize from "./common/memoize";
+import * as url from "node:url";
+import { IncomingMessage, ServerResponse } from "node:http";
+import { PassThrough, pipeline, Readable } from "node:stream";
+import { createHash } from "node:crypto";
+import { filesBucket, collections } from "./db/db.ts";
+import * as logger from "./logger.ts";
+import { getRequestOrigin } from "./forwarded.ts";
+import memoize from "./common/memoize.ts";
const getFile = memoize(
async (
diff --git a/lib/gpn-heuristic.ts b/lib/gpn-heuristic.ts
index 1f4d680..39f0083 100644
--- a/lib/gpn-heuristic.ts
+++ b/lib/gpn-heuristic.ts
@@ -1,23 +1,4 @@
-import Path from "./common/path";
-
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
+import Path from "./common/path.ts";
const WILDCARD_MULTIPLIER = 2;
const UNDISCOVERED_DEPTH = 7;
diff --git a/lib/init.ts b/lib/init.ts
index 4d48ad1..4e7f90f 100644
--- a/lib/init.ts
+++ b/lib/init.ts
@@ -1,33 +1,14 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { getRevision, getUiConfig, getUsers } from "./ui/local-cache";
-import { generateSalt, hashPassword } from "./auth";
-import { collections } from "./db/db";
+import { getRevision, getUiConfig, getUsers } from "./ui/local-cache.ts";
+import { generateSalt, hashPassword } from "./auth.ts";
+import { collections } from "./db/db.ts";
import {
putConfig,
putPermission,
putPreset,
putProvision,
putUser,
-} from "./ui/db";
-import { del } from "./cache";
+} from "./ui/db.ts";
+import { del } from "./cache.ts";
interface Status {
users: boolean;
diff --git a/lib/instance-set.ts b/lib/instance-set.ts
index f633efc..7aca27a 100644
--- a/lib/instance-set.ts
+++ b/lib/instance-set.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
interface Instance {
[name: string]: string;
}
diff --git a/lib/local-cache.ts b/lib/local-cache.ts
index 4b87129..de54b14 100644
--- a/lib/local-cache.ts
+++ b/lib/local-cache.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { setTimeoutPromise } from "./util";
-import { get, set } from "./cache";
-import { acquireLock, releaseLock } from "./lock";
+import { setTimeoutPromise } from "./util.ts";
+import { get, set } from "./cache.ts";
+import { acquireLock, releaseLock } from "./lock.ts";
const REFRESH = 5000;
const EVICT_TIMEOUT = 120000;
diff --git a/lib/lock.ts b/lib/lock.ts
index afdd964..d1c1721 100644
--- a/lib/lock.ts
+++ b/lib/lock.ts
@@ -1,4 +1,4 @@
-import { collections } from "./db/db";
+import { collections } from "./db/db.ts";
const CLOCK_SKEW_TOLERANCE = 30000;
diff --git a/lib/logger.ts b/lib/logger.ts
index 092dc01..bbfd477 100644
--- a/lib/logger.ts
+++ b/lib/logger.ts
@@ -1,27 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as fs from "fs";
-import * as os from "os";
-
-import * as config from "./config";
-import { getRequestOrigin } from "./forwarded";
+import * as fs from "node:fs";
+import * as os from "node:os";
+import * as config from "./config.ts";
+import { getRequestOrigin } from "./forwarded.ts";
import {
SessionContext,
AcsRequest,
@@ -29,7 +9,7 @@ import {
CpeFault,
InformRequest,
Fault,
-} from "./types";
+} from "./types.ts";
const REOPEN_EVERY = 60000;
diff --git a/lib/nbi.ts b/lib/nbi.ts
index b930e62..2659bad 100644
--- a/lib/nbi.ts
+++ b/lib/nbi.ts
@@ -1,38 +1,19 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
+import * as vm from "node:vm";
+import { IncomingMessage, ServerResponse } from "node:http";
import { Collection, ObjectId } from "mongodb";
-import * as vm from "vm";
-import { getRevision, getConfig } from "./ui/local-cache";
-import { filesBucket, collections } from "./db/db";
-import { optimizeProjection } from "./db/util";
-import * as query from "./query";
-import * as apiFunctions from "./api-functions";
-import { IncomingMessage, ServerResponse } from "http";
-import * as cache from "./cache";
+import { getRevision, getConfig } from "./ui/local-cache.ts";
+import { filesBucket, collections } from "./db/db.ts";
+import { optimizeProjection } from "./db/util.ts";
+import * as query from "./query.ts";
+import * as apiFunctions from "./api-functions.ts";
+import * as cache from "./cache.ts";
import { version as VERSION } from "../package.json";
-import { ping } from "./ping";
-import * as logger from "./logger";
-import { flattenDevice } from "./ui/db";
-import { getRequestOrigin } from "./forwarded";
-import { acquireLock, releaseLock } from "./lock";
-import { ResourceLockedError } from "./common/errors";
+import { ping } from "./ping.ts";
+import * as logger from "./logger.ts";
+import { flattenDevice } from "./ui/db.ts";
+import { getRequestOrigin } from "./forwarded.ts";
+import { acquireLock, releaseLock } from "./lock.ts";
+import { ResourceLockedError } from "./common/errors.ts";
const DEVICE_TASKS_REGEX = /^\/devices\/([a-zA-Z0-9\-_%]+)\/tasks\/?$/;
const TASKS_REGEX = /^\/tasks\/([a-zA-Z0-9\-_%]+)(\/[a-zA-Z_]*)?$/;
diff --git a/lib/ping.ts b/lib/ping.ts
index 7a2270c..9dd4eb0 100644
--- a/lib/ping.ts
+++ b/lib/ping.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { platform } from "os";
-import { exec } from "child_process";
-import { domainToASCII } from "url";
+import { platform } from "node:os";
+import { exec } from "node:child_process";
+import { domainToASCII } from "node:url";
export interface PingResult {
packetsTransmitted: number;
diff --git a/lib/query.ts b/lib/query.ts
index d9055fd..3da9525 100644
--- a/lib/query.ts
+++ b/lib/query.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
function isObject(obj: any): boolean {
return Object.prototype.toString.call(obj) === "[object Object]";
}
diff --git a/lib/sandbox.ts b/lib/sandbox.ts
index 5aceb20..24437fb 100644
--- a/lib/sandbox.ts
+++ b/lib/sandbox.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as vm from "vm";
+import * as vm from "node:vm";
import seedrandom from "seedrandom";
-import * as device from "./device";
-import * as extensions from "./extensions";
-import * as logger from "./logger";
-import * as scheduling from "./scheduling";
-import Path from "./common/path";
-import { Fault, SessionContext, ScriptResult } from "./types";
+import * as device from "./device.ts";
+import * as extensions from "./extensions.ts";
+import * as logger from "./logger.ts";
+import * as scheduling from "./scheduling.ts";
+import Path from "./common/path.ts";
+import { Fault, SessionContext, ScriptResult } from "./types.ts";
// Used for throwing to exit user script and commit
const COMMIT = Symbol();
diff --git a/lib/scheduling.ts b/lib/scheduling.ts
index b2f994c..dbd92ec 100644
--- a/lib/scheduling.ts
+++ b/lib/scheduling.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as crypto from "crypto";
+import * as crypto from "node:crypto";
import * as later from "@breejs/later";
function md532(str): number {
diff --git a/lib/server.ts b/lib/server.ts
index 25b5ad2..c5254af 100644
--- a/lib/server.ts
+++ b/lib/server.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as fs from "fs";
-import * as http from "http";
-import * as https from "https";
-import { Socket } from "net";
-import * as path from "path";
-import { ROOT_DIR } from "./config";
+import * as fs from "node:fs";
+import * as http from "node:http";
+import * as https from "node:https";
+import { Socket } from "node:net";
+import * as path from "node:path";
+import { ROOT_DIR } from "./config.ts";
let server: http.Server | https.Server;
let listener: http.RequestListener;
diff --git a/lib/session.ts b/lib/session.ts
index 78dd740..3b858d6 100644
--- a/lib/session.ts
+++ b/lib/session.ts
@@ -1,31 +1,12 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as device from "./device";
-import * as sandbox from "./sandbox";
-import * as localCache from "./cwmp/local-cache";
-import * as defaultProvisions from "./default-provisions";
-import { estimateGpnCount } from "./gpn-heuristic";
-import Path from "./common/path";
-import PathSet from "./common/path-set";
-import VersionedMap from "./versioned-map";
-import InstanceSet from "./instance-set";
+import * as device from "./device.ts";
+import * as sandbox from "./sandbox.ts";
+import * as localCache from "./cwmp/local-cache.ts";
+import * as defaultProvisions from "./default-provisions.ts";
+import { estimateGpnCount } from "./gpn-heuristic.ts";
+import Path from "./common/path.ts";
+import PathSet from "./common/path-set.ts";
+import VersionedMap from "./versioned-map.ts";
+import InstanceSet from "./instance-set.ts";
import {
Attributes,
SessionContext,
@@ -57,10 +38,10 @@ import {
FactoryReset,
AddObjectResponse,
GetParameterValuesResponse,
-} from "./types";
-import { getRequestOrigin } from "./forwarded";
-import * as logger from "./logger";
-import { encodeTag } from "./util";
+} from "./types.ts";
+import { getRequestOrigin } from "./forwarded.ts";
+import * as logger from "./logger.ts";
+import { encodeTag } from "./util.ts";
const VALID_PARAM_TYPES = new Set([
"xsd:int",
diff --git a/lib/soap.ts b/lib/soap.ts
index f36579c..97bdfc6 100644
--- a/lib/soap.ts
+++ b/lib/soap.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import {
parseXml,
Element,
parseAttrs,
encodeEntities,
decodeEntities,
-} from "./xml-parser";
-import memoize from "./common/memoize";
+} from "./xml-parser.ts";
+import memoize from "./common/memoize.ts";
import { version as VERSION } from "../package.json";
import {
InformRequest,
@@ -48,8 +29,8 @@ import {
GetRPCMethodsRequest,
RequestDownloadRequest,
AcsResponse,
-} from "./types";
-import Path from "./common/path";
+} from "./types.ts";
+import Path from "./common/path.ts";
const SERVER_NAME = `GenieACS/${VERSION}`;
diff --git a/lib/types.ts b/lib/types.ts
index 90e32ee..77dd949 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import Path from "./common/path";
-import PathSet from "./common/path-set";
-import VersionedMap from "./versioned-map";
-import InstanceSet from "./instance-set";
-import { IncomingMessage, ServerResponse } from "http";
-import { Script } from "vm";
+import { IncomingMessage, ServerResponse } from "node:http";
+import { Script } from "node:vm";
+import Path from "./common/path.ts";
+import PathSet from "./common/path-set.ts";
+import VersionedMap from "./versioned-map.ts";
+import InstanceSet from "./instance-set.ts";
export type Expression = string | number | boolean | null | any[];
diff --git a/lib/ui.ts b/lib/ui.ts
index 109af29..11f4e9d 100644
--- a/lib/ui.ts
+++ b/lib/ui.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { constants } from "zlib";
+import { constants } from "node:zlib";
import Koa from "koa";
import Router from "koa-router";
import * as jwt from "jsonwebtoken";
@@ -25,17 +6,17 @@ import koaStatic from "koa-static";
import koaCompress from "koa-compress";
import koaBodyParser from "koa-bodyparser";
import koaJwt from "koa-jwt";
-import * as config from "./config";
-import api from "./ui/api";
-import Authorizer from "./common/authorizer";
-import * as logger from "./logger";
-import * as localCache from "./ui/local-cache";
-import { PermissionSet } from "./types";
-import { authLocal } from "./api-functions";
-import * as init from "./init";
+import * as config from "./config.ts";
+import api from "./ui/api.ts";
+import Authorizer from "./common/authorizer.ts";
+import * as logger from "./logger.ts";
+import * as localCache from "./ui/local-cache.ts";
+import { PermissionSet } from "./types.ts";
+import { authLocal } from "./api-functions.ts";
+import * as init from "./init.ts";
import { version as VERSION } from "../package.json";
-import memoize from "./common/memoize";
-import { APP_JS, APP_CSS, FAVICON_PNG } from "../build/assets";
+import memoize from "./common/memoize.ts";
+import { APP_JS, APP_CSS, FAVICON_PNG } from "../build/assets.ts";
declare module "koa" {
interface Request {
diff --git a/lib/ui/api.ts b/lib/ui/api.ts
index 59442e5..e372fcb 100644
--- a/lib/ui/api.ts
+++ b/lib/ui/api.ts
@@ -1,41 +1,22 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { PassThrough } from "stream";
+import { PassThrough } from "node:stream";
import Router from "koa-router";
import { ObjectId } from "mongodb";
-import * as db from "./db";
-import * as apiFunctions from "../api-functions";
-import { evaluate, and, extractParams } from "../common/expression/util";
-import { parse } from "../common/expression/parser";
-import * as logger from "../logger";
-import { getConfig } from "../ui/local-cache";
-import { Expression, Task } from "../types";
-import { generateSalt, hashPassword } from "../auth";
-import { del } from "../cache";
-import Authorizer from "../common/authorizer";
-import { ping } from "../ping";
-import { decodeTag } from "../util";
-import { stringify as yamlStringify } from "../common/yaml";
-import { ResourceLockedError } from "../common/errors";
-import { acquireLock, releaseLock } from "../lock";
-import { collections } from "../db/db";
+import * as db from "./db.ts";
+import * as apiFunctions from "../api-functions.ts";
+import { evaluate, and, extractParams } from "../common/expression/util.ts";
+import { parse } from "../common/expression/parser.ts";
+import * as logger from "../logger.ts";
+import { getConfig } from "../ui/local-cache.ts";
+import { Expression, Task } from "../types.ts";
+import { generateSalt, hashPassword } from "../auth.ts";
+import { del } from "../cache.ts";
+import Authorizer from "../common/authorizer.ts";
+import { ping } from "../ping.ts";
+import { decodeTag } from "../util.ts";
+import { stringify as yamlStringify } from "../common/yaml.ts";
+import { ResourceLockedError } from "../common/errors.ts";
+import { acquireLock, releaseLock } from "../lock.ts";
+import { collections } from "../db/db.ts";
const router = new Router();
export default router;
diff --git a/lib/ui/db.ts b/lib/ui/db.ts
index cf9e9cb..46abfcd 100644
--- a/lib/ui/db.ts
+++ b/lib/ui/db.ts
@@ -1,33 +1,14 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { encodeTag } from "../util";
-import { evaluate } from "../common/expression/util";
-import { Expression, Fault, Task } from "../types";
-import { collections, filesBucket } from "../db/db";
-import { convertOldPrecondition, optimizeProjection } from "../db/util";
-import * as MongoTypes from "../db/types";
-import { parse, parseList, stringify } from "../common/expression/parser";
-import { toMongoQuery } from "../db/synth";
+import { Script } from "node:vm";
+import { Readable } from "node:stream";
import { Collection, ObjectId, WithoutId } from "mongodb";
-import { Script } from "vm";
-import { Readable } from "stream";
+import { encodeTag } from "../util.ts";
+import { evaluate } from "../common/expression/util.ts";
+import { Expression, Fault, Task } from "../types.ts";
+import { collections, filesBucket } from "../db/db.ts";
+import { convertOldPrecondition, optimizeProjection } from "../db/util.ts";
+import * as MongoTypes from "../db/types.ts";
+import { parse, parseList, stringify } from "../common/expression/parser.ts";
+import { toMongoQuery } from "../db/synth.ts";
function processDeviceProjection(
projection: Record,
diff --git a/lib/ui/local-cache.ts b/lib/ui/local-cache.ts
index 2f7f271..a2ea6b9 100644
--- a/lib/ui/local-cache.ts
+++ b/lib/ui/local-cache.ts
@@ -1,10 +1,10 @@
-import * as crypto from "crypto";
-import * as config from "../config";
-import { collections } from "../db/db";
-import * as expression from "../common/expression/util";
-import { parse } from "../common/expression/parser";
-import { Expression, Users, Permissions, Config, UiConfig } from "../types";
-import { LocalCache } from "../local-cache";
+import * as crypto from "node:crypto";
+import * as config from "../config.ts";
+import { collections } from "../db/db.ts";
+import * as expression from "../common/expression/util.ts";
+import { parse } from "../common/expression/parser.ts";
+import { Expression, Users, Permissions, Config, UiConfig } from "../types.ts";
+import { LocalCache } from "../local-cache.ts";
interface Snapshot {
permissions: Permissions;
diff --git a/lib/util.ts b/lib/util.ts
index 5756514..4b06da1 100644
--- a/lib/util.ts
+++ b/lib/util.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { EventEmitter } from "events";
+import { EventEmitter } from "node:events";
export function generateDeviceId(
deviceIdStruct: Record,
diff --git a/lib/versioned-map.ts b/lib/versioned-map.ts
index 362fabc..2babcf6 100644
--- a/lib/versioned-map.ts
+++ b/lib/versioned-map.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
const NONEXISTENT = Symbol();
const UNDEFINED = undefined;
diff --git a/lib/xml-parser.ts b/lib/xml-parser.ts
index ea63a48..decda12 100644
--- a/lib/xml-parser.ts
+++ b/lib/xml-parser.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
const CHAR_SINGLE_QUOTE = 39;
const CHAR_DOUBLE_QUOTE = 34;
const CHAR_LESS_THAN = 60;
diff --git a/test/auth.ts b/test/auth.ts
index e04c57d..1b17104 100644
--- a/test/auth.ts
+++ b/test/auth.ts
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert";
-import { randomBytes } from "crypto";
-import * as auth from "../lib/auth";
+import { randomBytes } from "node:crypto";
+import * as auth from "../lib/auth.ts";
void test("digest", () => {
const username = "test";
diff --git a/test/db.ts b/test/db.ts
index 4226baa..ff6524a 100644
--- a/test/db.ts
+++ b/test/db.ts
@@ -2,9 +2,9 @@ import test from "node:test";
import assert from "node:assert";
import { EJSON } from "bson";
import { Filter } from "mongodb";
-import { stringify, parse } from "../lib/common/expression/parser";
-import { convertOldPrecondition } from "../lib/db/util";
-import { toMongoQuery } from "../lib/db/synth";
+import { stringify, parse } from "../lib/common/expression/parser.ts";
+import { convertOldPrecondition } from "../lib/db/util.ts";
+import { toMongoQuery } from "../lib/db/synth.ts";
void test("convertOldPrecondition", () => {
const tests = [
diff --git a/test/device.ts b/test/device.ts
index e606e7a..6109f7a 100644
--- a/test/device.ts
+++ b/test/device.ts
@@ -1,10 +1,10 @@
import test from "node:test";
import assert from "node:assert";
-import Path from "../lib/common/path";
-import * as device from "../lib/device";
-import PathSet from "../lib/common/path-set";
-import VersionedMap from "../lib/versioned-map";
-import { Attributes } from "../lib/types";
+import Path from "../lib/common/path.ts";
+import * as device from "../lib/device.ts";
+import PathSet from "../lib/common/path-set.ts";
+import VersionedMap from "../lib/versioned-map.ts";
+import { Attributes } from "../lib/types.ts";
void test("getAliasDeclarations", () => {
const path = Path.parse("a.[aa:10,bb.[aaa:100].cc:1].b");
diff --git a/test/path-set.ts b/test/path-set.ts
index 48dfafc..18a941e 100644
--- a/test/path-set.ts
+++ b/test/path-set.ts
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert";
-import Path from "../lib/common/path";
-import PathSet from "../lib/common/path-set";
+import Path from "../lib/common/path.ts";
+import PathSet from "../lib/common/path-set.ts";
void test("depth", () => {
const pathSet = new PathSet();
diff --git a/test/path.ts b/test/path.ts
index 70e1087..0e503ac 100644
--- a/test/path.ts
+++ b/test/path.ts
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert";
-import Path from "../lib/common/path";
+import Path from "../lib/common/path.ts";
void test("parse", () => {
assert.throws(() => Path.parse("."));
diff --git a/test/ping.ts b/test/ping.ts
index b6472a7..66819e9 100644
--- a/test/ping.ts
+++ b/test/ping.ts
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert";
-import { parsePing } from "../lib/ping";
+import { parsePing } from "../lib/ping.ts";
void test("linux Case-1", () => {
const platform = "linux";
diff --git a/test/synth.ts b/test/synth.ts
index 306a04c..2506672 100644
--- a/test/synth.ts
+++ b/test/synth.ts
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert";
-import { minimize, unionDiff } from "../lib/common/expression/synth";
-import { parse, stringify } from "../lib/common/expression/parser";
import initSqlJs from "sql.js/dist/sql-asm.js";
+import { minimize, unionDiff } from "../lib/common/expression/synth.ts";
+import { parse, stringify } from "../lib/common/expression/parser.ts";
const STRING_VALUES = [null, "", "a", "ab", "ab10", "ab-10"];
const DECIMAL_VALUES = [null, 0, -10, 10];
diff --git a/test/util.ts b/test/util.ts
index 3ac06ac..f4aaef9 100644
--- a/test/util.ts
+++ b/test/util.ts
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert";
-import * as common from "../lib/util";
+import * as common from "../lib/util.ts";
void test("generateDeviceId", () => {
const space = [" ", "%20"];
diff --git a/test/xml-parser.ts b/test/xml-parser.ts
index cba9bb7..e652685 100644
--- a/test/xml-parser.ts
+++ b/test/xml-parser.ts
@@ -4,7 +4,7 @@ import {
parseXmlDeclaration,
decodeEntities,
parseXml,
-} from "../lib/xml-parser";
+} from "../lib/xml-parser.ts";
void test("parseXmlDeclaration", () => {
const buf = Buffer.from(
diff --git a/test/yaml.ts b/test/yaml.ts
index 48e4197..1ed56b8 100644
--- a/test/yaml.ts
+++ b/test/yaml.ts
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert";
import * as yaml from "yaml";
-import { stringify } from "../lib/common/yaml";
+import { stringify } from "../lib/common/yaml.ts";
import testCases from "./yaml-tests.json";
diff --git a/tsconfig.json b/tsconfig.json
index 8f55e01..c6c5e5f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,7 +9,9 @@
"alwaysStrict": true,
"noImplicitReturns": true,
"strictFunctionTypes": true,
- "isolatedModules": true
+ "isolatedModules": true,
+ "noEmit": true,
+ "allowImportingTsExtensions": true
},
"include": [
"./bin/*.ts",
diff --git a/ui/admin-menu.ts b/ui/admin-menu.ts
index 755b312..5f4da6a 100644
--- a/ui/admin-menu.ts
+++ b/ui/admin-menu.ts
@@ -1,24 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import m from "mithril";
-import { ClosureComponent, Component } from "mithril";
+import m, { ClosureComponent, Component } from "mithril";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/app.ts b/ui/app.ts
index 632c482..1cc04b6 100644
--- a/ui/app.ts
+++ b/ui/app.ts
@@ -1,43 +1,24 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { RouteResolver } from "mithril";
-import layout from "./layout";
-import * as store from "./store";
-import * as wizardPage from "./wizard-page";
-import * as loginPage from "./login-page";
-import * as overviewPage from "./overview-page";
-import * as devicesPage from "./devices-page";
-import * as devicePage from "./device-page";
-import * as errorPage from "./error-page";
-import * as faultsPage from "./faults-page";
-import * as presetsPage from "./presets-page";
-import * as provisionsPage from "./provisions-page";
-import * as virtualParametersPage from "./virtual-parameters-page";
-import * as filesPage from "./files-page";
-import * as configPage from "./config-page";
-import * as permissionsPage from "./permissions-page";
-import * as usersPage from "./users-page";
-import Authorizer from "../lib//common/authorizer";
-import * as notifications from "./notifications";
-import { contextifyComponent } from "./components";
-import { PermissionSet, UiConfig } from "../lib/types";
+import layout from "./layout.ts";
+import * as store from "./store.ts";
+import * as wizardPage from "./wizard-page.ts";
+import * as loginPage from "./login-page.ts";
+import * as overviewPage from "./overview-page.ts";
+import * as devicesPage from "./devices-page.ts";
+import * as devicePage from "./device-page.ts";
+import * as errorPage from "./error-page.ts";
+import * as faultsPage from "./faults-page.ts";
+import * as presetsPage from "./presets-page.ts";
+import * as provisionsPage from "./provisions-page.ts";
+import * as virtualParametersPage from "./virtual-parameters-page.ts";
+import * as filesPage from "./files-page.ts";
+import * as configPage from "./config-page.ts";
+import * as permissionsPage from "./permissions-page.ts";
+import * as usersPage from "./users-page.ts";
+import Authorizer from "../lib//common/authorizer.ts";
+import * as notifications from "./notifications.ts";
+import { contextifyComponent } from "./components.ts";
+import { PermissionSet, UiConfig } from "../lib/types.ts";
declare global {
interface Window {
diff --git a/ui/autocomplete-compnent.ts b/ui/autocomplete-compnent.ts
index b07e145..607457b 100644
--- a/ui/autocomplete-compnent.ts
+++ b/ui/autocomplete-compnent.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
type AutocompleteCallback = (
value: string,
callback: (suggestions: { value: string; tip?: string }[]) => void,
diff --git a/ui/change-password-component.ts b/ui/change-password-component.ts
index 52ce03e..9122199 100644
--- a/ui/change-password-component.ts
+++ b/ui/change-password-component.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { VnodeDOM, ClosureComponent } from "mithril";
-import * as notifications from "./notifications";
-import { changePassword } from "./store";
-import { m } from "./components";
+import * as notifications from "./notifications.ts";
+import { changePassword } from "./store.ts";
+import { m } from "./components.ts";
interface Attrs {
noAuth?: boolean;
diff --git a/ui/code-editor-component.ts b/ui/code-editor-component.ts
index 226f825..a21266b 100644
--- a/ui/code-editor-component.ts
+++ b/ui/code-editor-component.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { Editor } from "codemirror";
import { ClosureComponent } from "mithril";
-import { m } from "./components";
-import { codeMirror } from "./dynamic-loader";
+import { m } from "./components.ts";
+import { codeMirror } from "./dynamic-loader.ts";
interface Attrs {
id: string;
diff --git a/ui/components.ts b/ui/components.ts
index d236c29..22b557a 100644
--- a/ui/components.ts
+++ b/ui/components.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, {
Static,
Attributes,
@@ -26,20 +7,20 @@ import m, {
ClosureComponent,
Vnode,
} from "mithril";
-import parameter from "./components/parameter";
-import parameterList from "./components/parameter-list";
-import parameterTable from "./components/parameter-table";
-import overviewDot from "./components/overview-dot";
-import container from "./components/container";
-import summonButton from "./components/summon-button";
-import deviceFaults from "./components/device-faults";
-import allParameters from "./components/all-parameters";
-import deviceActions from "./components/device-actions";
-import tags from "./components/tags";
-import ping from "./components/ping";
-import deviceLink from "./components/device-link";
-import longTextComponent from "./long-text-component";
-import loading from "./components/loading";
+import parameter from "./components/parameter.ts";
+import parameterList from "./components/parameter-list.ts";
+import parameterTable from "./components/parameter-table.ts";
+import overviewDot from "./components/overview-dot.ts";
+import container from "./components/container.ts";
+import summonButton from "./components/summon-button.ts";
+import deviceFaults from "./components/device-faults.ts";
+import allParameters from "./components/all-parameters.ts";
+import deviceActions from "./components/device-actions.ts";
+import tags from "./components/tags.ts";
+import ping from "./components/ping.ts";
+import deviceLink from "./components/device-link.ts";
+import longTextComponent from "./long-text-component.ts";
+import loading from "./components/loading.ts";
const comps = {
parameter,
diff --git a/ui/components/all-parameters.ts b/ui/components/all-parameters.ts
index 4c56f59..f2f7cf2 100644
--- a/ui/components/all-parameters.ts
+++ b/ui/components/all-parameters.ts
@@ -1,32 +1,13 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent } from "mithril";
-import { m } from "../components";
-import * as taskQueue from "../task-queue";
-import { parse } from "../../lib/common/expression/parser";
-import memoize from "../../lib/common/memoize";
-import { getIcon } from "../icons";
-import { QueryResponse, evaluateExpression } from "../store";
-import debounce from "../../lib/common/debounce";
-import { Expression } from "../../lib/types";
-import { FlatDevice } from "../../lib/ui/db";
+import { m } from "../components.ts";
+import * as taskQueue from "../task-queue.ts";
+import { parse } from "../../lib/common/expression/parser.ts";
+import memoize from "../../lib/common/memoize.ts";
+import { getIcon } from "../icons.ts";
+import { QueryResponse, evaluateExpression } from "../store.ts";
+import debounce from "../../lib/common/debounce.ts";
+import { Expression } from "../../lib/types.ts";
+import { FlatDevice } from "../../lib/ui/db.ts";
const memoizedParse = memoize(parse);
diff --git a/ui/components/container.ts b/ui/components/container.ts
index 4e89536..f3d38dc 100644
--- a/ui/components/container.ts
+++ b/ui/components/container.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { Attributes, ClosureComponent } from "mithril";
-import { map } from "../../lib/common/expression/parser";
-import memoize from "../../lib/common/memoize";
-import { Expression } from "../../lib/types";
-import { m } from "../components";
-import { evaluateExpression, getTimestamp } from "../store";
-import { FlatDevice } from "../../lib/ui/db";
+import { map } from "../../lib/common/expression/parser.ts";
+import memoize from "../../lib/common/memoize.ts";
+import { Expression } from "../../lib/types.ts";
+import { m } from "../components.ts";
+import { evaluateExpression, getTimestamp } from "../store.ts";
+import { FlatDevice } from "../../lib/ui/db.ts";
const evaluateAttributes = memoize(
(
diff --git a/ui/components/device-actions.ts b/ui/components/device-actions.ts
index a017e5a..cc94ce4 100644
--- a/ui/components/device-actions.ts
+++ b/ui/components/device-actions.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "../components";
-import * as taskQueue from "../task-queue";
-import * as notifications from "../notifications";
-import * as store from "../store";
+import { m } from "../components.ts";
+import * as taskQueue from "../task-queue.ts";
+import * as notifications from "../notifications.ts";
+import * as store from "../store.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/components/device-faults.ts b/ui/components/device-faults.ts
index a195fde..70ba62d 100644
--- a/ui/components/device-faults.ts
+++ b/ui/components/device-faults.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "../components";
-import * as store from "../store";
-import * as notifications from "../notifications";
-import { getIcon } from "../icons";
-import { stringify } from "../../lib/common/yaml";
+import { m } from "../components.ts";
+import * as store from "../store.ts";
+import * as notifications from "../notifications.ts";
+import { getIcon } from "../icons.ts";
+import { stringify } from "../../lib/common/yaml.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/components/device-link.ts b/ui/components/device-link.ts
index 0045c37..0062740 100644
--- a/ui/components/device-link.ts
+++ b/ui/components/device-link.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "../components";
-import { evaluateExpression } from "../store";
+import { m } from "../components.ts";
+import { evaluateExpression } from "../store.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/components/loading.ts b/ui/components/loading.ts
index dcabcca..671b068 100644
--- a/ui/components/loading.ts
+++ b/ui/components/loading.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2021 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { VnodeDOM, ClosureComponent, Component } from "mithril";
const component: ClosureComponent = (): Component => {
diff --git a/ui/components/overview-dot.ts b/ui/components/overview-dot.ts
index 98c0c28..5f35ec2 100644
--- a/ui/components/overview-dot.ts
+++ b/ui/components/overview-dot.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "../components";
-import config from "../config";
-import { evaluateExpression } from "../store";
+import { m } from "../components.ts";
+import config from "../config.ts";
+import { evaluateExpression } from "../store.ts";
const CHARTS = config.ui.overview.charts;
diff --git a/ui/components/parameter-list.ts b/ui/components/parameter-list.ts
index 800dbbf..43ca00a 100644
--- a/ui/components/parameter-list.ts
+++ b/ui/components/parameter-list.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, VnodeDOM } from "mithril";
-import { m } from "../components";
-import { QueryResponse, evaluateExpression } from "../store";
-import { FlatDevice } from "../../lib/ui/db";
-import { Expression } from "../../lib/types";
+import { m } from "../components.ts";
+import { QueryResponse, evaluateExpression } from "../store.ts";
+import { FlatDevice } from "../../lib/ui/db.ts";
+import { Expression } from "../../lib/types.ts";
interface Attrs {
device: FlatDevice;
diff --git a/ui/components/parameter-table.ts b/ui/components/parameter-table.ts
index 277392b..2ef1a5a 100644
--- a/ui/components/parameter-table.ts
+++ b/ui/components/parameter-table.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent } from "mithril";
-import { m } from "../components";
-import * as taskQueue from "../task-queue";
-import { QueryResponse, evaluateExpression } from "../store";
-import * as expressionParser from "../../lib/common/expression/parser";
-import { getIcon } from "../icons";
-import { FlatDevice } from "../../lib/ui/db";
-import { Expression } from "../../lib/types";
+import { m } from "../components.ts";
+import * as taskQueue from "../task-queue.ts";
+import { QueryResponse, evaluateExpression } from "../store.ts";
+import * as expressionParser from "../../lib/common/expression/parser.ts";
+import { getIcon } from "../icons.ts";
+import { FlatDevice } from "../../lib/ui/db.ts";
+import { Expression } from "../../lib/types.ts";
interface Attrs {
device: FlatDevice;
diff --git a/ui/components/parameter.ts b/ui/components/parameter.ts
index 82c7d9b..629f335 100644
--- a/ui/components/parameter.ts
+++ b/ui/components/parameter.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, VnodeDOM } from "mithril";
-import { m } from "../components";
-import * as taskQueue from "../task-queue";
-import * as store from "../store";
-import { evaluate } from "../../lib/common/expression/util";
-import memoize from "../../lib/common/memoize";
-import timeAgo from "../timeago";
-import { getIcon } from "../icons";
+import { m } from "../components.ts";
+import * as taskQueue from "../task-queue.ts";
+import * as store from "../store.ts";
+import { evaluate } from "../../lib/common/expression/util.ts";
+import memoize from "../../lib/common/memoize.ts";
+import timeAgo from "../timeago.ts";
+import { getIcon } from "../icons.ts";
const evaluateParam = memoize((exp, obj, now: number) => {
let timestamp = now;
diff --git a/ui/components/ping.ts b/ui/components/ping.ts
index 0cb519f..a5c3636 100644
--- a/ui/components/ping.ts
+++ b/ui/components/ping.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, VnodeDOM } from "mithril";
-import { m } from "../components";
-import * as store from "../store";
+import { m } from "../components.ts";
+import * as store from "../store.ts";
const REFRESH_INTERVAL = 3000;
diff --git a/ui/components/summon-button.ts b/ui/components/summon-button.ts
index 208c4e9..7c6653e 100644
--- a/ui/components/summon-button.ts
+++ b/ui/components/summon-button.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "../components";
-import * as taskQueue from "../task-queue";
-import * as store from "../store";
-import * as notifications from "../notifications";
+import { m } from "../components.ts";
+import * as taskQueue from "../task-queue.ts";
+import * as store from "../store.ts";
+import * as notifications from "../notifications.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/components/tags.ts b/ui/components/tags.ts
index 39445dd..15a5ee1 100644
--- a/ui/components/tags.ts
+++ b/ui/components/tags.ts
@@ -1,30 +1,11 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent } from "mithril";
-import { m } from "../components";
-import * as notifications from "../notifications";
-import * as store from "../store";
-import { getIcon } from "../icons";
-import { decodeTag } from "../../lib/util";
-import { Expression } from "../../lib/types";
-import { FlatDevice } from "../../lib/ui/db";
+import { m } from "../components.ts";
+import * as notifications from "../notifications.ts";
+import * as store from "../store.ts";
+import { getIcon } from "../icons.ts";
+import { decodeTag } from "../../lib/util.ts";
+import { Expression } from "../../lib/types.ts";
+import { FlatDevice } from "../../lib/ui/db.ts";
interface Attrs {
device: FlatDevice;
diff --git a/ui/config-functions.ts b/ui/config-functions.ts
index 8569f7e..69561d8 100644
--- a/ui/config-functions.ts
+++ b/ui/config-functions.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
interface Config {
_id: string;
value: string;
diff --git a/ui/config-page.ts b/ui/config-page.ts
index 4406931..4a143dc 100644
--- a/ui/config-page.ts
+++ b/ui/config-page.ts
@@ -1,32 +1,13 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { m } from "./components";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import putFormComponent from "./put-form-component";
-import uiConfigComponent from "./ui-config-component";
-import * as overlay from "./overlay";
-import { parse, stringify } from "../lib/common/expression/parser";
-import { loadCodeMirror, loadYaml } from "./dynamic-loader";
import { ClosureComponent, Component, Children } from "mithril";
-import { getIcon } from "./icons";
+import { m } from "./components.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import putFormComponent from "./put-form-component.ts";
+import uiConfigComponent from "./ui-config-component.ts";
+import * as overlay from "./overlay.ts";
+import { parse, stringify } from "../lib/common/expression/parser.ts";
+import { loadCodeMirror, loadYaml } from "./dynamic-loader.ts";
+import { getIcon } from "./icons.ts";
const attributes = [
{ id: "_id", label: "Key" },
diff --git a/ui/config.ts b/ui/config.ts
index b3ab39b..08f8660 100644
--- a/ui/config.ts
+++ b/ui/config.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
export default window.clientConfig;
export const configSnapshot = window.configSnapshot;
export const genieacsVersion = window.genieacsVersion;
diff --git a/ui/css/app.css b/ui/css/app.css
index 8ab98f9..4ee3f61 100644
--- a/ui/css/app.css
+++ b/ui/css/app.css
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
@import "normalize.css";
@import "codemirror/lib/codemirror.css";
diff --git a/ui/datalist.ts b/ui/datalist.ts
index 56ce8d6..7d69189 100644
--- a/ui/datalist.ts
+++ b/ui/datalist.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2021 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component, Vnode } from "mithril";
const elements: Map = new Map();
diff --git a/ui/device-page.ts b/ui/device-page.ts
index b82f1e4..998c3c0 100644
--- a/ui/device-page.ts
+++ b/ui/device-page.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import * as store from "./store";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import * as store from "./store.ts";
export function init(
args: Record,
diff --git a/ui/devices-page.ts b/ui/devices-page.ts
index 034d11f..a7c697b 100644
--- a/ui/devices-page.ts
+++ b/ui/devices-page.ts
@@ -1,34 +1,15 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import indexTableComponent from "./index-table-component";
-import filterComponent from "./filter-component";
-import * as store from "./store";
-import { queueTask, stageDownload } from "./task-queue";
-import * as notifications from "./notifications";
-import { parse, stringify, map } from "../lib/common/expression/parser";
-import { evaluate, extractParams } from "../lib/common/expression/util";
-import memoize from "../lib/common/memoize";
-import * as smartQuery from "./smart-query";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import indexTableComponent from "./index-table-component.ts";
+import filterComponent from "./filter-component.ts";
+import * as store from "./store.ts";
+import { queueTask, stageDownload } from "./task-queue.ts";
+import * as notifications from "./notifications.ts";
+import { parse, stringify, map } from "../lib/common/expression/parser.ts";
+import { evaluate, extractParams } from "../lib/common/expression/util.ts";
+import memoize from "../lib/common/memoize.ts";
+import * as smartQuery from "./smart-query.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/drawer-component.ts b/ui/drawer-component.ts
index 7070568..743b809 100644
--- a/ui/drawer-component.ts
+++ b/ui/drawer-component.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, {
Children,
Child,
@@ -24,9 +5,9 @@ import m, {
Component,
VnodeDOM,
} from "mithril";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import { getIcon } from "./icons";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import { getIcon } from "./icons.ts";
import {
clear,
commit,
@@ -36,7 +17,7 @@ import {
QueueTask,
queueTask,
StageTask,
-} from "./task-queue";
+} from "./task-queue.ts";
const invalid: WeakSet = new WeakSet();
diff --git a/ui/dynamic-loader.ts b/ui/dynamic-loader.ts
index 1068aff..9ea97e0 100644
--- a/ui/dynamic-loader.ts
+++ b/ui/dynamic-loader.ts
@@ -1,23 +1,4 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as notifications from "./notifications";
+import * as notifications from "./notifications.ts";
export let codeMirror: typeof import("codemirror");
export let yaml: typeof import("yaml");
diff --git a/ui/error-page.ts b/ui/error-page.ts
index c8a3ffd..a8e6547 100644
--- a/ui/error-page.ts
+++ b/ui/error-page.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "./components";
+import { m } from "./components.ts";
export const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/faults-page.ts b/ui/faults-page.ts
index ceced47..8bb99d6 100644
--- a/ui/faults-page.ts
+++ b/ui/faults-page.ts
@@ -1,33 +1,14 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import indexTableComponent from "./index-table-component";
-import filterComponent from "./filter-component";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
-import { stringify as yamlStringify } from "../lib/common/yaml";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import indexTableComponent from "./index-table-component.ts";
+import filterComponent from "./filter-component.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
+import { stringify as yamlStringify } from "../lib/common/yaml.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/files-page.ts b/ui/files-page.ts
index 931116a..db7bc5f 100644
--- a/ui/files-page.ts
+++ b/ui/files-page.ts
@@ -1,34 +1,15 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import filterComponent from "./filter-component";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import * as overlay from "./overlay";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import filterComponent from "./filter-component.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import * as overlay from "./overlay.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/filter-component.ts b/ui/filter-component.ts
index 3db2f44..a432c2d 100644
--- a/ui/filter-component.ts
+++ b/ui/filter-component.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent } from "mithril";
-import { parse, stringify, map } from "../lib/common/expression/parser";
-import memoize from "../lib/common/memoize";
-import Autocomplete from "./autocomplete-compnent";
-import * as smartQuery from "./smart-query";
-import { validQuery } from "../lib/db/synth";
-import { Expression } from "../lib/types";
+import { parse, stringify, map } from "../lib/common/expression/parser.ts";
+import memoize from "../lib/common/memoize.ts";
+import Autocomplete from "./autocomplete-compnent.ts";
+import * as smartQuery from "./smart-query.ts";
+import { validQuery } from "../lib/db/synth.ts";
+import { Expression } from "../lib/types.ts";
const getAutocomplete = memoize((resource) => {
const labels = smartQuery.getLabels(resource);
diff --git a/ui/icons.ts b/ui/icons.ts
index e594a2c..7800636 100644
--- a/ui/icons.ts
+++ b/ui/icons.ts
@@ -1,25 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { Children } from "mithril";
-import m from "mithril";
-import { ICONS_SVG } from "../build/assets";
+import m, { Children } from "mithril";
+import { ICONS_SVG } from "../build/assets.ts";
export function getIcon(name: string): Children {
return m(
diff --git a/ui/index-table-component.ts b/ui/index-table-component.ts
index cfffe2d..a64c1f3 100644
--- a/ui/index-table-component.ts
+++ b/ui/index-table-component.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import { getIcon } from "./icons";
-import debounce from "../lib/common/debounce";
+import { m } from "./components.ts";
+import { getIcon } from "./icons.ts";
+import debounce from "../lib/common/debounce.ts";
interface Attribute {
id?: string;
diff --git a/ui/layout.ts b/ui/layout.ts
index 43ac4da..7a42cfc 100644
--- a/ui/layout.ts
+++ b/ui/layout.ts
@@ -1,31 +1,12 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component } from "mithril";
-import menu from "./menu";
-import drawerComponent from "./drawer-component";
-import userMenu from "./user-menu";
-import adminMenu from "./admin-menu";
-import * as overlay from "./overlay";
+import menu from "./menu.ts";
+import drawerComponent from "./drawer-component.ts";
+import userMenu from "./user-menu.ts";
+import adminMenu from "./admin-menu.ts";
+import * as overlay from "./overlay.ts";
import { version as VERSION } from "../package.json";
-import datalist from "./datalist";
-import { LOGO_SVG } from "../build/assets";
+import datalist from "./datalist.ts";
+import { LOGO_SVG } from "../build/assets.ts";
const adminPages = [
"presets",
diff --git a/ui/login-page.ts b/ui/login-page.ts
index 42d0f86..2c47cbe 100644
--- a/ui/login-page.ts
+++ b/ui/login-page.ts
@@ -1,28 +1,9 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import * as overlay from "./overlay";
-import changePasswordComponent from "./change-password-component";
+import { m } from "./components.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import * as overlay from "./overlay.ts";
+import changePasswordComponent from "./change-password-component.ts";
export function init(
args: Record,
diff --git a/ui/long-text-component.ts b/ui/long-text-component.ts
index f4c2a88..6033328 100644
--- a/ui/long-text-component.ts
+++ b/ui/long-text-component.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component } from "mithril";
-import * as overlay from "./overlay";
+import * as overlay from "./overlay.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/menu.ts b/ui/menu.ts
index f080090..f181b19 100644
--- a/ui/menu.ts
+++ b/ui/menu.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component } from "mithril";
const component: ClosureComponent = (): Component => {
diff --git a/ui/notifications.ts b/ui/notifications.ts
index 3691cbf..adcde4b 100644
--- a/ui/notifications.ts
+++ b/ui/notifications.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m from "mithril";
interface Notification {
diff --git a/ui/overlay.ts b/ui/overlay.ts
index 591d9c6..d595fc4 100644
--- a/ui/overlay.ts
+++ b/ui/overlay.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { Children } from "mithril";
type OverlayCallback = () => Children;
diff --git a/ui/overview-page.ts b/ui/overview-page.ts
index 21bb50c..b150210 100644
--- a/ui/overview-page.ts
+++ b/ui/overview-page.ts
@@ -1,27 +1,8 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import * as store from "./store";
-import pieChartComponent from "./pie-chart-component";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import * as store from "./store.ts";
+import pieChartComponent from "./pie-chart-component.ts";
const GROUPS = config.ui.overview.groups || {};
const CHARTS = {};
diff --git a/ui/permissions-page.ts b/ui/permissions-page.ts
index b63996f..fcc7268 100644
--- a/ui/permissions-page.ts
+++ b/ui/permissions-page.ts
@@ -1,34 +1,15 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { m } from "./components";
-import config from "./config";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import * as overlay from "./overlay";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
-import filterComponent from "./filter-component";
import { Children, ClosureComponent, Component } from "mithril";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import * as overlay from "./overlay.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
+import filterComponent from "./filter-component.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/pie-chart-component.ts b/ui/pie-chart-component.ts
index f0398b7..e53d791 100644
--- a/ui/pie-chart-component.ts
+++ b/ui/pie-chart-component.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import { stringify } from "../lib/common/expression/parser";
-import memoize from "../lib/common/memoize";
+import { m } from "./components.ts";
+import { stringify } from "../lib/common/expression/parser.ts";
+import memoize from "../lib/common/memoize.ts";
const memoizedStringify = memoize(stringify);
diff --git a/ui/presets-page.ts b/ui/presets-page.ts
index 62b9a7b..c10c34b 100644
--- a/ui/presets-page.ts
+++ b/ui/presets-page.ts
@@ -1,34 +1,15 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children, Vnode } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import filterComponent from "./filter-component";
-import * as overlay from "./overlay";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import memoize from "../lib/common/memoize";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import filterComponent from "./filter-component.ts";
+import * as overlay from "./overlay.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import memoize from "../lib/common/memoize.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/provisions-page.ts b/ui/provisions-page.ts
index 681b14d..73308c0 100644
--- a/ui/provisions-page.ts
+++ b/ui/provisions-page.ts
@@ -1,35 +1,16 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import filterComponent from "./filter-component";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import * as overlay from "./overlay";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
-import { loadCodeMirror } from "./dynamic-loader";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import filterComponent from "./filter-component.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import * as overlay from "./overlay.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
+import { loadCodeMirror } from "./dynamic-loader.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/put-form-component.ts b/ui/put-form-component.ts
index 1a147da..16c3b0d 100644
--- a/ui/put-form-component.ts
+++ b/ui/put-form-component.ts
@@ -1,26 +1,7 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { VnodeDOM, ClosureComponent, Children } from "mithril";
-import { m } from "./components";
-import codeEditorComponent from "./code-editor-component";
-import { getDatalistId } from "./datalist";
+import { m } from "./components.ts";
+import codeEditorComponent from "./code-editor-component.ts";
+import { getDatalistId } from "./datalist.ts";
const singular = {
presets: "preset",
diff --git a/ui/smart-query.ts b/ui/smart-query.ts
index 3fa1747..61a1e5f 100644
--- a/ui/smart-query.ts
+++ b/ui/smart-query.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import config from "./config";
-import { Expression } from "../lib/types";
-import { encodeTag } from "../lib/util";
+import config from "./config.ts";
+import { Expression } from "../lib/types.ts";
+import { encodeTag } from "../lib/util.ts";
const resources = {
devices: {},
diff --git a/ui/store.ts b/ui/store.ts
index 60de2f1..10d89ec 100644
--- a/ui/store.ts
+++ b/ui/store.ts
@@ -1,32 +1,13 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m from "mithril";
-import { stringify } from "../lib/common/expression/parser";
-import { or, and, evaluate } from "../lib/common/expression/util";
-import memoize from "../lib/common/memoize";
-import { Expression, Task } from "../lib/types";
-import * as notifications from "./notifications";
-import { configSnapshot, genieacsVersion } from "./config";
-import { QueueTask } from "./task-queue";
-import { PingResult } from "../lib/ping";
-import { unionDiff, covers } from "../lib/common/expression/synth";
+import { stringify } from "../lib/common/expression/parser.ts";
+import { or, and, evaluate } from "../lib/common/expression/util.ts";
+import memoize from "../lib/common/memoize.ts";
+import { Expression, Task } from "../lib/types.ts";
+import * as notifications from "./notifications.ts";
+import { configSnapshot, genieacsVersion } from "./config.ts";
+import { QueueTask } from "./task-queue.ts";
+import { PingResult } from "../lib/ping.ts";
+import { unionDiff, covers } from "../lib/common/expression/synth.ts";
const memoizedStringify = memoize(stringify);
const memoizedEvaluate = memoize(evaluate);
diff --git a/ui/task-queue.ts b/ui/task-queue.ts
index ae4b580..83cfbc1 100644
--- a/ui/task-queue.ts
+++ b/ui/task-queue.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import * as store from "./store";
-import { Task } from "../lib/types";
-import * as notifications from "./notifications";
+import * as store from "./store.ts";
+import { Task } from "../lib/types.ts";
+import * as notifications from "./notifications.ts";
export interface QueueTask extends Task {
status?: string;
diff --git a/ui/timeago.ts b/ui/timeago.ts
index adabeba..d0999c0 100644
--- a/ui/timeago.ts
+++ b/ui/timeago.ts
@@ -1,22 +1,3 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
const UNITS = {
year: 12 * 30 * 24 * 60 * 60 * 1000,
month: 30 * 24 * 60 * 60 * 1000,
diff --git a/ui/ui-config-component.ts b/ui/ui-config-component.ts
index 01afb1e..363bb51 100644
--- a/ui/ui-config-component.ts
+++ b/ui/ui-config-component.ts
@@ -1,29 +1,10 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent } from "mithril";
-import { m } from "./components";
-import * as store from "./store";
-import { yaml } from "./dynamic-loader";
-import * as configFunctions from "./config-functions";
-import codeEditorComponent from "./code-editor-component";
-import { parse } from "../lib/common/expression/parser";
+import { m } from "./components.ts";
+import * as store from "./store.ts";
+import { yaml } from "./dynamic-loader.ts";
+import * as configFunctions from "./config-functions.ts";
+import codeEditorComponent from "./code-editor-component.ts";
+import { parse } from "../lib/common/expression/parser.ts";
function putActionHandler(prefix: string[], dataYaml: string): Promise {
return new Promise((resolve, reject) => {
diff --git a/ui/user-menu.ts b/ui/user-menu.ts
index 9e4ed1a..9bcf7f3 100644
--- a/ui/user-menu.ts
+++ b/ui/user-menu.ts
@@ -1,25 +1,6 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component } from "mithril";
-import * as store from "./store";
-import * as notifications from "./notifications";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
const component: ClosureComponent = (): Component => {
return {
diff --git a/ui/users-page.ts b/ui/users-page.ts
index 1b471f1..8d5b90d 100644
--- a/ui/users-page.ts
+++ b/ui/users-page.ts
@@ -1,35 +1,16 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
-import { m } from "./components";
-import config from "./config";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import * as overlay from "./overlay";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
-import filterComponent from "./filter-component";
-import changePasswordComponent from "./change-password-component";
import { Children, ClosureComponent, Component } from "mithril";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import * as overlay from "./overlay.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
+import filterComponent from "./filter-component.ts";
+import changePasswordComponent from "./change-password-component.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/virtual-parameters-page.ts b/ui/virtual-parameters-page.ts
index 929a45a..46cbec2 100644
--- a/ui/virtual-parameters-page.ts
+++ b/ui/virtual-parameters-page.ts
@@ -1,35 +1,16 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import { ClosureComponent, Component, Children } from "mithril";
-import { m } from "./components";
-import config from "./config";
-import filterComponent from "./filter-component";
-import * as store from "./store";
-import * as notifications from "./notifications";
-import memoize from "../lib/common/memoize";
-import putFormComponent from "./put-form-component";
-import indexTableComponent from "./index-table-component";
-import * as overlay from "./overlay";
-import * as smartQuery from "./smart-query";
-import { map, parse, stringify } from "../lib/common/expression/parser";
-import { loadCodeMirror } from "./dynamic-loader";
+import { m } from "./components.ts";
+import config from "./config.ts";
+import filterComponent from "./filter-component.ts";
+import * as store from "./store.ts";
+import * as notifications from "./notifications.ts";
+import memoize from "../lib/common/memoize.ts";
+import putFormComponent from "./put-form-component.ts";
+import indexTableComponent from "./index-table-component.ts";
+import * as overlay from "./overlay.ts";
+import * as smartQuery from "./smart-query.ts";
+import { map, parse, stringify } from "../lib/common/expression/parser.ts";
+import { loadCodeMirror } from "./dynamic-loader.ts";
const PAGE_SIZE = config.ui.pageSize || 10;
diff --git a/ui/wizard-page.ts b/ui/wizard-page.ts
index 389870d..ec90022 100644
--- a/ui/wizard-page.ts
+++ b/ui/wizard-page.ts
@@ -1,24 +1,5 @@
-/**
- * Copyright 2013-2019 GenieACS Inc.
- *
- * This file is part of GenieACS.
- *
- * GenieACS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * GenieACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with GenieACS. If not, see .
- */
-
import m, { ClosureComponent, Component } from "mithril";
-import * as notifications from "./notifications";
+import * as notifications from "./notifications.ts";
export async function init(): Promise> {
return m.request({ url: "init" });