diff --git a/.fleet/run.json b/.fleet/run.json
new file mode 100644
index 0000000..bef6011
--- /dev/null
+++ b/.fleet/run.json
@@ -0,0 +1,3 @@
+{
+ "configurations": []
+}
diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml
index b5a1e85..1fa330b 100644
--- a/.github/workflows/deno.yml
+++ b/.github/workflows/deno.yml
@@ -1,11 +1,3 @@
-# This workflow uses actions that are not certified by GitHub.
-# They are provided by a third-party and are governed by
-# separate terms of service, privacy policy, and support
-# documentation.
-
-# This workflow will install Deno then run `deno lint` and `deno test`.
-# For more information see: https://github.com/denoland/setup-deno
-
name: Deno
on:
@@ -39,5 +31,5 @@ jobs:
run: deno lint
- name: Run tests
- run: deno compile -A -c tsconfig.json index.ts
+ run: deno compile -A index.ts
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 7cb3675..6d81f80 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -18,9 +18,9 @@ jobs:
deno-version: v1.x
- name: Build
run: |
- deno compile -A -c tsconfig.json -o bin/quicksubmit-linux index.ts
- deno compile -A -c tsconfig.json -o bin/quicksubmit-win.exe --target x86_64-pc-windows-msvc index.ts
- deno compile -A -c tsconfig.json -o bin/quicksubmit-macos --target x86_64-apple-darwin index.ts
+ deno compile -A -o bin/quicksubmit-linux index.ts
+ deno compile -A -o bin/quicksubmit-win.exe --target x86_64-pc-windows-msvc index.ts
+ deno compile -A -o bin/quicksubmit-macos --target x86_64-apple-darwin index.ts
- name: Upload Linux binaries to release
uses: svenstaro/upload-release-action@v2
with:
diff --git a/README.md b/README.md
index 3cfb3a4..773715a 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# quickSubmit
+[![Deno](https://github.com/boomzero/quicksubmit/actions/workflows/deno.yml/badge.svg)](https://github.com/boomzero/quicksubmit/actions/workflows/deno.yml)
+[![Publish](https://github.com/boomzero/quicksubmit/actions/workflows/publish.yml/badge.svg)](https://github.com/boomzero/quicksubmit/actions/workflows/publish.yml)
+
Submit Code to XMOJ.
diff --git a/deno.json b/deno.json
new file mode 100644
index 0000000..f1cea33
--- /dev/null
+++ b/deno.json
@@ -0,0 +1,8 @@
+{
+ "compilerOptions": {
+ "lib": ["ESNext", "dom"],
+ "strict": false,
+ "jsx": "react-jsx",
+ "allowJs": true
+ }
+}
diff --git a/deno.lock b/deno.lock
index f32ffb1..ebc4b27 100644
--- a/deno.lock
+++ b/deno.lock
@@ -2259,5 +2259,16 @@
}
}
},
- "remote": {}
+ "remote": {},
+ "workspace": {
+ "packageJson": {
+ "dependencies": [
+ "npm:@types/crypto-js@^4.2.1",
+ "npm:@types/jsdom@^21.1.6",
+ "npm:commander@^11.1.0",
+ "npm:crypto-js@^4.2.0",
+ "npm:jsdom@^23.0.1"
+ ]
+ }
+ }
}
diff --git a/index.ts b/index.ts
index f4327e8..c84b97b 100644
--- a/index.ts
+++ b/index.ts
@@ -1,3 +1,21 @@
+/*
+ * quickSubmit
+ * Copyright (C) 2023-2024 boomzero
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
import { Command } from "commander";
import { JSDOM } from "jsdom";
import MD5 from "crypto-js/md5.js";
@@ -257,9 +275,11 @@ program
const rid: string = dom.window.document.querySelector(
`tr.oddrow:nth-child(1) > td:nth-child(2)`,
).innerHTML;
- //let rst:string = dom.window.document.querySelector('tr.oddrow:nth-child(1) > td:nth-child(5) > a:nth-child(1)').innerHTML;
console.log(`Submitted ${file} to problem ${rPID}!`);
console.log(`Submission ID: ${rid}`);
+ console.log(
+ `Submission URL: \u001b]8;;https://www.xmoj.tech/reinfo.php?sid=${rid}\u001b\\https://www.xmoj.tech/reinfo.php?sid=${rid}\u001b]8;;\u001b\\`,
+ );
const logoutReq = await fetch("https://www.xmoj.tech/logout.php", {
"credentials": "include",
"headers": {
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..e4e990d
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,437 @@
+{
+ "name": "quicksubmit",
+ "version": "1.4.3",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "quicksubmit",
+ "version": "1.4.3",
+ "license": "GPL-3.0-or-later",
+ "dependencies": {
+ "@types/crypto-js": "^4.2.1",
+ "@types/jsdom": "^21.1.6",
+ "commander": "^11.1.0",
+ "crypto-js": "^4.2.0",
+ "jsdom": "^23.0.1"
+ },
+ "peerDependencies": {
+ "typescript": "^5.3.3"
+ }
+ },
+ "node_modules/.deno/@types+node@18.16.19/node_modules/@types/node": {
+ "version": "18.16.19",
+ "license": "MIT"
+ },
+ "node_modules/@types/crypto-js": {
+ "version": "4.2.1",
+ "license": "MIT"
+ },
+ "node_modules/@types/jsdom": {
+ "version": "21.1.6",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "resolved": "node_modules/.deno/@types+node@18.16.19/node_modules/@types/node",
+ "link": true
+ },
+ "node_modules/@types/tough-cookie": {
+ "version": "4.0.5",
+ "license": "MIT"
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "license": "MIT"
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "11.1.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/crypto-js": {
+ "version": "4.2.0",
+ "license": "MIT"
+ },
+ "node_modules/cssstyle": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "rrweb-cssom": "^0.6.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/data-urls": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-mimetype": "^4.0.0",
+ "whatwg-url": "^14.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decimal.js": {
+ "version": "10.4.3",
+ "license": "MIT"
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/html-encoding-sniffer": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-encoding": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/http-proxy-agent": {
+ "version": "7.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-potential-custom-element-name": {
+ "version": "1.0.1",
+ "license": "MIT"
+ },
+ "node_modules/jsdom": {
+ "version": "23.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "cssstyle": "^3.0.0",
+ "data-urls": "^5.0.0",
+ "decimal.js": "^10.4.3",
+ "form-data": "^4.0.0",
+ "html-encoding-sniffer": "^4.0.0",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.2",
+ "is-potential-custom-element-name": "^1.0.1",
+ "nwsapi": "^2.2.7",
+ "parse5": "^7.1.2",
+ "rrweb-cssom": "^0.6.0",
+ "saxes": "^6.0.0",
+ "symbol-tree": "^3.2.4",
+ "tough-cookie": "^4.1.3",
+ "w3c-xmlserializer": "^5.0.0",
+ "webidl-conversions": "^7.0.0",
+ "whatwg-encoding": "^3.1.1",
+ "whatwg-mimetype": "^4.0.0",
+ "whatwg-url": "^14.0.0",
+ "ws": "^8.14.2",
+ "xml-name-validator": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "canvas": "^2.11.2"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "license": "MIT"
+ },
+ "node_modules/nwsapi": {
+ "version": "2.2.7",
+ "license": "MIT"
+ },
+ "node_modules/parse5": {
+ "version": "7.1.2",
+ "license": "MIT",
+ "dependencies": {
+ "entities": "^4.4.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/psl": {
+ "version": "1.9.0",
+ "license": "MIT"
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/querystringify": {
+ "version": "2.2.0",
+ "license": "MIT"
+ },
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "license": "MIT"
+ },
+ "node_modules/rrweb-cssom": {
+ "version": "0.6.0",
+ "license": "MIT"
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "license": "MIT"
+ },
+ "node_modules/saxes": {
+ "version": "6.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "xmlchars": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=v12.22.7"
+ }
+ },
+ "node_modules/symbol-tree": {
+ "version": "3.2.4",
+ "license": "MIT"
+ },
+ "node_modules/tough-cookie": {
+ "version": "4.1.3",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.2.0",
+ "url-parse": "^1.5.3"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.3.3",
+ "license": "Apache-2.0",
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "0.2.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/url-parse": {
+ "version": "1.5.10",
+ "license": "MIT",
+ "dependencies": {
+ "querystringify": "^2.1.1",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "node_modules/w3c-xmlserializer": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "xml-name-validator": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-encoding": {
+ "version": "3.1.1",
+ "license": "MIT",
+ "dependencies": {
+ "iconv-lite": "0.6.3"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/whatwg-mimetype": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "14.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "^5.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.15.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xml-name-validator": {
+ "version": "5.0.0",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/xmlchars": {
+ "version": "2.2.0",
+ "license": "MIT"
+ }
+ }
+}
diff --git a/package.json b/package.json
index 2439d60..b022cff 100644
--- a/package.json
+++ b/package.json
@@ -17,8 +17,8 @@
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "check": "deno check index.ts -c tsconfig.json",
- "build": "deno compile -A -c tsconfig.json index.ts"
+ "check": "deno check index.ts",
+ "build": "deno compile -A index.ts"
},
"repository": {
"type": "git",