Compare commits
15 Commits
6ade51fb73
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| bb473027af | |||
| da3e56d9dc | |||
| 2f1567e802 | |||
| d83a908db6 | |||
| 96cbac2702 | |||
| 1d788671c6 | |||
| e7458c49f0 | |||
| 2ec6e1c107 | |||
| 3c2300c09e | |||
| 69ab9893d3 | |||
| dbff163b6b | |||
| 2fa6acea3a | |||
| 8809c583d0 | |||
| f211e35517 | |||
| 76ccb2290e |
22
.drone.yml
22
.drone.yml
@@ -4,13 +4,20 @@ name: gitea_token
|
|||||||
get:
|
get:
|
||||||
path: odit-git-bot
|
path: odit-git-bot
|
||||||
name: apikey
|
name: apikey
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: ci_token
|
||||||
|
get:
|
||||||
|
path: odit-ci-bot
|
||||||
|
name: apikey
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: build
|
name: build:tag
|
||||||
steps:
|
steps:
|
||||||
- name: run build
|
- name: run build
|
||||||
depends_on: ["clone"]
|
|
||||||
image: node:15.11.0-alpine3.13
|
image: node:15.11.0-alpine3.13
|
||||||
commands:
|
commands:
|
||||||
- apk add git zip -f
|
- apk add git zip -f
|
||||||
@@ -18,8 +25,7 @@ steps:
|
|||||||
- yarn build
|
- yarn build
|
||||||
- mkdir out
|
- mkdir out
|
||||||
- zip -r out/dist.zip dist
|
- zip -r out/dist.zip dist
|
||||||
- name: gitea_release
|
- name: gitea add packages to build
|
||||||
depends_on: ["run build"]
|
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
@@ -33,8 +39,12 @@ steps:
|
|||||||
- sha512
|
- sha512
|
||||||
- adler32
|
- adler32
|
||||||
- crc32
|
- crc32
|
||||||
when:
|
- name: trigger electron build
|
||||||
event: tag
|
image: idcooldi/drone-webhook
|
||||||
|
settings:
|
||||||
|
urls: https://ci.odit.services/api/repos/lfk/scanclient-electron/builds?SOURCE_TAG=${DRONE_TAG}
|
||||||
|
bearer:
|
||||||
|
from_secret: ci_token
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
57
licenses.md
57
licenses.md
@@ -1,31 +1,3 @@
|
|||||||
# validator
|
|
||||||
**Author**: Chris O'Hara <cohara87@gmail.com>
|
|
||||||
**Repo**: https://github.com/chriso/validator.js
|
|
||||||
**License**: MIT
|
|
||||||
**Description**: String validation and sanitization
|
|
||||||
## License Text
|
|
||||||
Copyright (c) 2018 Chris O'Hara <cohara87@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
# @odit/license-exporter
|
# @odit/license-exporter
|
||||||
**Author**: ODIT.Services
|
**Author**: ODIT.Services
|
||||||
**Repo**: https://git.odit.services/odit/license-exporter
|
**Repo**: https://git.odit.services/odit/license-exporter
|
||||||
@@ -250,6 +222,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# release-it
|
||||||
|
**Author**: Lars Kappert
|
||||||
|
**Repo**: https://github.com/release-it/release-it
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Generic CLI tool to automate versioning and package publishing related tasks.
|
||||||
|
## License Text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2018 Lars Kappert
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
# svelte
|
# svelte
|
||||||
**Author**: Rich Harris
|
**Author**: Rich Harris
|
||||||
**Repo**: https://github.com/sveltejs/svelte
|
**Repo**: https://github.com/sveltejs/svelte
|
||||||
|
|||||||
25
package.json
25
package.json
@@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@lfk/scanclient",
|
"name": "@lfk/scanclient",
|
||||||
"version": "0.0.0",
|
"version": "0.1.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte",
|
"format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"license:export": "license-exporter --markdown && git stage licenses.md"
|
"license:export": "license-exporter --markdown && git stage licenses.md",
|
||||||
|
"release": "release-it --only-version"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@odit/license-exporter": "^0.0.11",
|
"@odit/license-exporter": "^0.0.11",
|
||||||
@@ -18,13 +19,29 @@
|
|||||||
"husky": "^5.1.3",
|
"husky": "^5.1.3",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"prettier-plugin-svelte": "^2.2.0",
|
"prettier-plugin-svelte": "^2.2.0",
|
||||||
|
"release-it": "^14.5.1",
|
||||||
"svelte": "^3.35.0",
|
"svelte": "^3.35.0",
|
||||||
"svelte-i18n": "^3.3.7",
|
"svelte-i18n": "^3.3.7",
|
||||||
"svelte-preprocess": "^4.6.9",
|
"svelte-preprocess": "^4.6.9",
|
||||||
"vite": "^2.1.2",
|
"vite": "^2.1.2",
|
||||||
"vite-plugin-windicss": "^0.9.2"
|
"vite-plugin-windicss": "^0.9.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"release-it": {
|
||||||
"validator": "^13.5.2"
|
"git": {
|
||||||
|
"commit": true,
|
||||||
|
"requireCleanWorkingDir": false,
|
||||||
|
"commitMessage": "🚀Bumped version to ${version}",
|
||||||
|
"requireBranch": "dev",
|
||||||
|
"push": false,
|
||||||
|
"tag": true,
|
||||||
|
"tagName": null,
|
||||||
|
"tagAnnotation": "${version}"
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"publish": false
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script>
|
<script>
|
||||||
import isURL from "validator/lib/isURL";
|
|
||||||
import isUUID from "validator/lib/isUUID";
|
|
||||||
import { apikey, lang, stationinfo, api_endpoint } from "./store.js";
|
import { apikey, lang, stationinfo, api_endpoint } from "./store.js";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { _, locale } from "svelte-i18n";
|
import { _, locale } from "svelte-i18n";
|
||||||
@@ -12,7 +10,30 @@
|
|||||||
token?.length === 44 &&
|
token?.length === 44 &&
|
||||||
token.split(".")[0].length === 7 &&
|
token.split(".")[0].length === 7 &&
|
||||||
isUUID(token.split(".")[1]);
|
isUUID(token.split(".")[1]);
|
||||||
$: isEndpointValid = isURL(api_endpoint_input);
|
$: isEndpointValid = validURL(api_endpoint_input);
|
||||||
|
function validURL(str) {
|
||||||
|
var pattern = new RegExp(
|
||||||
|
"^(https?:\\/\\/)?" + // protocol
|
||||||
|
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name
|
||||||
|
"((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
|
||||||
|
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
|
||||||
|
"(\\?[;&a-z\\d%_.~+=-]*)?" + // query string
|
||||||
|
"(\\#[-a-z\\d_]*)?$",
|
||||||
|
"i"
|
||||||
|
); // fragment locator
|
||||||
|
return !!pattern.test(str);
|
||||||
|
}
|
||||||
|
function isUUID(uuid) {
|
||||||
|
let s = "" + uuid;
|
||||||
|
|
||||||
|
s = s.match(
|
||||||
|
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
||||||
|
);
|
||||||
|
if (s === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full flex flex-wrap">
|
<div class="w-full flex flex-wrap">
|
||||||
|
|||||||
Reference in New Issue
Block a user