Compare commits

..
Author SHA1 Message Date
sharevb 729a10c68e feat(ui): add c-monaco-editor to ui lib 2024-04-07 23:15:34 +02:00
ShareVB 9c9b0d5ac0 chore(github workflows): ci and e2e tests: try updating to node 20 2024-04-07 21:35:17 +02:00
sharevb c49ff00c31 feat(new tool): Docker Compose Validator
New tool to validate docker-compose.yml files against Docker Compose Specification
Fix part of #540
2024-04-07 21:35:02 +02:00
40 changed files with 736 additions and 1226 deletions

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve our tools
title: '[BUG] '
labels: bug
assignees: CorentinTh
---
**Which tool is impacted?**
Example: the token generator
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Configuration (please complete the following information):**
- Device: [e.g. iPhone6, ]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
-48
View File
@@ -1,48 +0,0 @@
name: 🐞 Bug Report
description: File a bug report.
labels: ['bug', 'triage']
assignees:
- CorentinTh
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen? If you have a screenshot, you can paste it here.
placeholder: Tell us what you see!
value: 'A bug happened!'
validations:
required: true
- type: textarea
id: version
attributes:
label: System information
description: What is you environment? You can use the `npx envinfo --system --browsers` command to get this information.
validations:
required: true
- type: dropdown
id: app-type
attributes:
label: Where did you encounter the bug?
options:
- Public app (it-tools.tech)
- A self hosted
- Other (installations, docker, etc.)
validations:
required: true
-1
View File
@@ -1 +0,0 @@
blank_issues_enabled: false
@@ -1,56 +0,0 @@
name: 🚀 New feature proposal
description: Propose a new feature/enhancement or tool idea for IT-Tools
labels: ['enhancement', 'triage']
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: dropdown
id: request-type
attributes:
label: What type of request is this?
options:
- New tool idea
- New feature for an existing tool
- Deployment or CI/CD improvement
- Self-hosting improvement
- Other
validations:
required: true
- type: textarea
id: feature-description
attributes:
label: Clear and concise description of the feature you are proposing
description: A clear and concise description of what the feature is.
placeholder: 'Example: a token generator tool'
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Is their example of this tool in the wild?
description: Provide link to already existing tool (like websites, apps, cli, ...) or npm packages that could be used or provide inspiration for the feature.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Any other context or screenshots about the feature request here.
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check the feature is not already implemented in the project.
required: true
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
- label: Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).
required: true
@@ -0,0 +1,19 @@
---
name: New tool request
about: Suggest a new tool idea
title: '[NEW TOOL]'
labels: new tool
assignees: CorentinTh
---
**What tool do you want?**
Example: a token generator
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Is their example of this tool in the wild?**
Provide link to already existing tool or npm packages if any exists
**Additional context**
Add any other context about the feature request here.
+13
View File
@@ -0,0 +1,13 @@
---
name: Other request
about: Any request that does not concern a tool creation, a new feature request on a tool or a bug
title: '[OTHER] '
labels:
assignees: CorentinTh
---
**Describe the solution you'd like**
A clear and concise description of what you want.
**Additional context**
Add any other context about the feature request here.
@@ -0,0 +1,13 @@
---
name: Tool improvement
about: Improvement on an existing tool
title: '[TOOL IMPROVEMENT]'
labels: enhancement
assignees: CorentinTh
---
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context about the feature request here.
+69
View File
@@ -0,0 +1,69 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
node-version: 16
cache: 'pnpm'
- name: Install dependencies
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
node-version: 16
cache: 'pnpm'
- name: Install dependencies
-83
View File
@@ -2,51 +2,9 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## Version 2024.05.13-a0bc346
### Features
- **i18n**: added German translation (#1038) (2c2fb21)
- **new tool**: Outlook Safelink Decoder (#911) (d3b32cc)
- **new tool**: ascii art generator (#886) (fe349ad)
- **i18n**: get locales on build (#880) (dc04615)
- **i18n**: added vi tools translations (#876) (079aa21)
- **i18n**: added zh tools translations (#874) (9c6b122)
- **i18n**: added missing locale files in tools (#863) (7f5fa00)
- **i18n**: added vietnamese language (#859) (1334bff)
- **i18n**: added spanish language (#854) (85b50bb)
- **i18n**: added portuguese language (#813) (c65ffb6)
- **i18n**: added ukrainian language (#827) (693f362)
- **new-tool**: yaml formater (#779) (fc06f01)
- **new-tool**: added unicode conversion utilities (#858) (c46207f)
### Bug fixes
- **language**: English language cleanup (#1036) (221ddfa)
- **url-encoder, validation**: typo in validation of url-encoder.vue #1024 (cb5b462)
- **integer base converter**: support bigint (#872) (9eac9cb)
- **bcrypt tool**: allow salt rounds up to 100 (#987) (23f82d9)
### Refactoring
- **lint**: removed extra semi (33e5294)
- **auto-imports**: regen auto imports (1242842)
- **home**: lightened tool cards (#882) (a07806c)
- **home**: removed n-grid to prevent layout shift (#881) (10e56b3)
- **i18n**: added locales per tool (#861) (95698cb)
### Chores
- **issues**: prevent empty issues (#1078) (a0bc346)
- **issues**: removed old issue templates (#1077) (5a7b0f9)
- **node**: upgraded node version in CI workflows (b59942a)
- **version**: release 2024.05.10-33e5294 (38d5687)
- **issues**: improved issues template (2852c30)
- **issues**: improved bug issue template (#1046) (a799234)
### Documentation
- **changelog**: update changelog for 2024.05.10-33e5294 (9dfd347)
## Version 2023.12.21-5ed3693
### Features
- **i18n**: improve chinese i18n (#757) (2e56641)
- **i18n**: add tooltip and favoriteButton i18n (#756) (a1037cf)
- **i18n**: add Chinese translation base (#718) (8f99eb6)
@@ -54,7 +12,6 @@ All notable changes to this project will be documented in this file. See [standa
- **new tool**: numeronym generator (#729) (e07e2ae)
### Bug fixes
- **jwt-parser**: jwt claim array support (#799) (5ed3693)
- **camera-recorder**: stop camera on navigation (#782) (80e46c9)
- **doc**: updated create new tool command in readme (#762) (7a70dbb)
@@ -63,7 +20,6 @@ All notable changes to this project will be documented in this file. See [standa
- **eta**: corrected example (#737) (821cbea)
### Refactoring
- **about, i18n**: improved i18n dx with markdown (#753) (bd3edcb)
- **token, i18n**: complete fr translation (#752) (de1ee69)
- **uuid generator**: uuid version picker (#751) (38586ca)
@@ -73,7 +29,6 @@ All notable changes to this project will be documented in this file. See [standa
- **bcrypt**: fix input label align (#721) (093ff31)
### Chores
- **deps**: switched from oui to oui-data for mac address lookup (#693) (0fe9a20)
- **deps**: update unocss monorepo to ^0.57.0 (#638) (2e396d8)
- **docker**: added armv7 plateform for docker releases (#722) (fe1de8c)
@@ -81,23 +36,19 @@ All notable changes to this project will be documented in this file. See [standa
## Version 2023.11.02-7d94e11
### Features
- **i18n**: language selector (#710) (e86fd96)
### Bug fixes
- **dockerfile**: revert replacement of nginx image with non-privileged one (#716) (7d94e11)
- **encryption**: alert on decryption error (#711) (02b0d0d)
### Refactoring
- **math-evaluator**: improved description (e87f4b1)
- **math-evaluator**: improved search and UX (#713) (58de897)
## Version 2023.11.01-e164afb
### Features
- **command-palette**: clear prompt on palette close (#708) (d013696)
- **command-palette**: added about page in command palette (99b1eb9)
- **new tool**: random MAC address generator (#657) (cc3425d)
@@ -116,13 +67,11 @@ All notable changes to this project will be documented in this file. See [standa
- **new tool**: text diff and comparator (#588) (81bfe57)
### Bug fixes
- **deps**: fix issue on slugify (#593) (#673) (720201a)
- **deps**: update dependency monaco-editor to ^0.43.0 (#620) (e371ef7)
- **deps**: update dependency sql-formatter to v13 (#606) (c7d4562)
### Refactoring
- **ui**: better ui demo preview menu (#664) (015c673)
- **color-converter**: improved color-converter UX (#701) (abb8335)
- **docker**: improved docker config (#700) (020e9cb)
@@ -139,7 +88,6 @@ All notable changes to this project will be documented in this file. See [standa
- **bcrypt**: fix typo (#604) (e18bae1)
### Chores
- **deps**: clean unused dependencies (#709) (e164afb)
- **deps**: update docker/setup-qemu-action action to v3 (#627) (4365226)
- **deps**: update docker/setup-buildx-action action to v3 (#626) (57ecda1)
@@ -154,23 +102,19 @@ All notable changes to this project will be documented in this file. See [standa
- **deps**: update dependency typescript to ~5.2.0 (#587) (f3e14fc)
### Doc
- **readme**: added contributors list (#622) (557b304)
- **hosting**: added cloudron in the other hosting solutions section (#589) (06c3547)
## Version 2023.08.21-6f93cba
### Features
- **copy**: support legacy copy to clipboard for older browser (#581) (6f93cba)
- **new tool**: string obfuscator (#575) (c58d6e3)
### Bug fixes
- **deps**: update dependency sql-formatter to v12 (#520) (2bcb77a)
### Chores
- **deps**: switched to fucking typescript v5 (#501) (76b2761)
- **deps**: update dependency @antfu/eslint-config to ^0.40.0 (#552) (6ff9a01)
- **deps**: update dependency prettier to v3 (#564) (a2b9b15)
@@ -180,7 +124,6 @@ All notable changes to this project will be documented in this file. See [standa
## Version 2023.08.16-9bd4ad4
### Features
- **Case Converter**: Add lowercase and uppercase (#534) (7b6232a)
- **new tool**: emoji picker (#551) (93f7cf0)
- **ui**: added c-select in the ui lib (#550) (dfa1ba8)
@@ -201,7 +144,6 @@ All notable changes to this project will be documented in this file. See [standa
- **base64-string-converter**: switch to encode and decode url safe base64 strings (#392) (0b20f1c)
### Bug fixes
- **deps**: update dependency uuid to v9 (#566) (5e12991)
- **deps**: update dependency mathjs to v11 (#519) (7924456)
- **deps**: update dependency @vueuse/router to v10 (#516) (ea0f27c)
@@ -221,7 +163,6 @@ All notable changes to this project will be documented in this file. See [standa
- **ipv4-converter**: removed readonly on input (7aed9c5)
### Refactoring
- **navbar**: consistent spacing in navbar buttons (#507) (30f88fc)
- **ui**: remove n-text (#506) (72c98a3)
- **ui**: replaced some n-input to c-input (#505) (05ea545)
@@ -234,7 +175,6 @@ All notable changes to this project will be documented in this file. See [standa
- **ui**: replaced some n-input with c-input-text (f7fc779)
### Chores
- **deps**: update dependency vitest to ^0.34.0 (#562) (9bd4ad4)
- **deps**: update dependency node to v18.17.1 (#560) (65a9474)
- **deps**: update dependency unocss to ^0.55.0 (#561) (85cc7a8)
@@ -275,58 +215,47 @@ All notable changes to this project will be documented in this file. See [standa
- **lint**: switched to a better lint config (33c9b66)
### Refacor
- **transformers**: use monospace font for JSON and SQL text areas (#476) (ba4876d)
### Documentation
- **ide**: updated vscode extensions settings (#472) (847323c)
### Chors
- **deps**: updated vueuse dependency version (8515c24)
## Version 2023.05.14-77f2efc
### Features
- **list-converter**: a small converter who deals with column based data and do some stuff with it (#387) (83a7b3b)
- **new tool**: phone parser and normalizer (ce3150c)
### Bug fixes
- **phone-parser**: use default country code (a43c546)
- **home**: prevent weird blue border on card (3f6c8f0)
### Refactoring
- **ui**: replaced some n-input with c-input-text (77f2efc)
### Chores
- **issues**: updated new tool request issue template (edae4c6)
### Ui-lib
- **new-component**: added text input component in the c-lib (aad8d84)
- **button**: size variants (401f13f)
## Version 2023.04.23-92bd835
### Features
- **ui-lib**: demo pages for c-lib components (92bd835)
- **new-tool**: diff of two json objects (362f2fa)
- **ipv4-range-expander**: expands a given IPv4 start and end address to a valid IPv4 subnet (#366) (df989e2)
- **date converter**: auto focus main input (6d22025)
### Bug fixes
- **ts**: cleaned legacy typechecking warning (e88c1d5)
- **mac-address-lookup**: added copy handler on button click (c311e38)
### Refactoring
- **ui-lib**: prevent c-button to shrink (61ece23)
- **ui**: replaced naive ui cards with custom ones (f080933)
- **clean**: removed unused lodash import (bb32513)
@@ -336,60 +265,48 @@ All notable changes to this project will be documented in this file. See [standa
## Version 2023.04.14-dbad773
### Features
- **new-tool**: http status codes (8355bd2)
### Refactoring
- **uuid-generator**: prevent NaN in quantity (6fb4994)
### Chores
- **release**: create a github release on new version (dbad773)
- **version**: reset CHANGELOG content to support new format (85cb0ff)
## Version 2023.04.14-f9b77b7
### Features
- **new-tool**: http status codes (8355bd2)
### Refactoring
- **uuid-generator**: prevent NaN in quantity (6fb4994)
### Chores
- **release**: create a github release on new version (f9b77b7)
- **version**: reset CHANGELOG content to support new format (85cb0ff)
## Version 2023.04.14-2f0d239
### Features
- **new-tool**: http status codes (8355bd2)
### Refactoring
- **uuid-generator**: prevent NaN in quantity (6fb4994)
### Chores
- **release**: create a github release on new version (2f0d239)
- **version**: reset CHANGELOG content to support new format (85cb0ff)
## Version 2023.04.14-474cae4
### Features
- **new-tool**: http status codes (8355bd2)
### Refactoring
- **uuid-generator**: prevent NaN in quantity (6fb4994)
### Chores
- **release**: create a github release on new version (474cae4)
- **version**: reset CHANGELOG content to support new format (85cb0ff)
+1 -3
View File
@@ -50,6 +50,7 @@ declare module '@vue/runtime-core' {
'CModal.demo': typeof import('./src/ui/c-modal/c-modal.demo.vue')['default']
CModalValue: typeof import('./src/ui/c-modal-value/c-modal-value.vue')['default']
'CModalValue.demo': typeof import('./src/ui/c-modal-value/c-modal-value.demo.vue')['default']
CMonacoEditor: typeof import('./src/ui/c-monaco-editor/c-monaco-editor.vue')['default']
CollapsibleToolMenu: typeof import('./src/components/CollapsibleToolMenu.vue')['default']
ColorConverter: typeof import('./src/tools/color-converter/color-converter.vue')['default']
ColoredCard: typeof import('./src/components/ColoredCard.vue')['default']
@@ -144,9 +145,7 @@ declare module '@vue/runtime-core' {
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSlider: typeof import('naive-ui')['NSlider']
NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch']
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
@@ -161,7 +160,6 @@ declare module '@vue/runtime-core' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default']
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
-455
View File
@@ -1,455 +0,0 @@
'404':
notFound: 404 Nicht gefunden
sorry: Entschuldigung, diese Seite scheint nicht zu existieren
maybe: >-
Vielleicht macht der Cache etwas Seltsames. Mit einem erzwungenen Neuladen
versuchen?
backHome: Zurück zur Startseite
home:
categories:
newestTools: Neueste Tools
favoriteTools: Deine Lieblingstools
allTools: Alle Tools
subtitle: Praktische Tools für Entwickler
toggleMenu: Menü umschalten
home: Startseite
uiLib: UI-Bibliothek
support: Unterstütze die Entwicklung von IT-Tools
buyMeACoffee: Kauf mir einen Kaffee
follow:
title: Magst du IT-Tools?
p1: Gib uns einen Stern auf
githubRepository: IT-Tools GitHub-Repository
p2: oder folge uns auf
twitterAccount: IT-Tools Twitter-Konto
thankYou: Vielen Dank!
nav:
github: GitHub-Repository
githubRepository: IT-Tools GitHub-Repository
twitter: Twitter-Konto
twitterAccount: IT-Tools Twitter-Konto
about: Über IT-Tools
aboutLabel: Über
darkMode: Dunkelmodus
lightMode: Hellmodus
mode: Wechseln zwischen dunklem/hellem Modus
about:
content: >
# Über IT-Tools
Diese wunderbare Website, erstellt mit ❤ von [Corentin
Thomasset](https://github.com/CorentinTh), sammelt nützliche Tools für
Entwickler und Menschen, die in der IT arbeiten. Wenn du sie nützlich
findest, teile sie gerne mit Personen, von denen du denkst, dass sie sie
ebenfalls nützlich finden könnten, und vergiss nicht, sie in deiner
Lesezeichenleiste zu speichern!
IT-Tools ist Open Source (unter der MIT-Lizenz) und kostenlos und wird es
immer sein, aber es kostet mich Geld, die Website zu hosten und den
Domainnamen zu erneuern. Wenn du meine Arbeit unterstützen möchtest und mich
ermutigen möchtest, mehr Tools hinzuzufügen, überlege bitte, mich durch
[Sponsoring](https://www.buymeacoffee.com/cthmsst) zu unterstützen.
## Technologien
IT-Tools wurde mit Vue.js (Vue 3) und der Naive UI-Komponentenbibliothek
erstellt und wird von Vercel gehostet und kontinuierlich bereitgestellt. In
einigen Tools werden Drittanbieter-Open-Source-Bibliotheken verwendet. Du
findest die vollständige Liste in der
[package.json](https://github.com/CorentinTh/it-tools/blob/main/package.json)-Datei
des Repositorys.
## Einen Fehler gefunden? Ein Tool fehlt?
Wenn du ein Tool benötigst, das hier noch nicht vorhanden ist, und du
denkst, dass es nützlich sein könnte, bist du herzlich eingeladen, einen
Feature-Request im
[Issues-Bereich](https://github.com/CorentinTh/it-tools/issues/new/choose)
im GitHub-Repository einzureichen.
Und wenn du einen Fehler gefunden hast oder etwas nicht wie erwartet
funktioniert, melde bitte einen Fehler im
[Issues-Bereich](https://github.com/CorentinTh/it-tools/issues/new/choose)
im GitHub-Repository.
favoriteButton:
remove: Aus Favoriten entfernen
add: Zu Favoriten hinzufügen
toolCard:
new: Neu
search:
label: Suche
tools:
categories:
favorite-tools: Deine Lieblingstools
crypto: Krypto
converter: Konverter
web: Web
images and videos: Bilder & Videos
development: Entwicklung
network: Netzwerk
math: Mathematik
measurement: Messung
text: Text
data: Daten
password-strength-analyser:
title: Passwortstärken-Analysator
description: >-
Ermittle die Stärke deines Passworts mit diesem Client-seitigen
Passwortstärken-Analysator und Tool zur Schätzung der Knackzeit.
chronometer:
title: Chronometer
description: >-
Überwache die Dauer einer Sache. Im Grunde ein Chronometer mit einfachen
Chronometerfunktionen.
token-generator:
title: Token-Generator
description: >-
Generiere eine zufällige Zeichenfolge mit den von dir gewünschten Zeichen,
Groß- oder Kleinbuchstaben, Zahlen und/oder Symbolen.
uppercase: Großbuchstaben (ABC...)
lowercase: Kleinbuchstaben (abc...)
numbers: Zahlen (123...)
symbols: Symbole (!-;...)
length: Länge
tokenPlaceholder: Der Token ...
copied: Token in die Zwischenablage kopiert
button:
copy: Kopieren
refresh: Aktualisieren
percentage-calculator:
title: Prozentrechner
description: >-
Berechne einfach Prozentsätze von einem Wert zu einem anderen Wert oder
von einem Prozentsatz zu einem Wert.
svg-placeholder-generator:
title: SVG-Platzhalter-Generator
description: >-
Generiere SVG-Bilder, die als Platzhalter in deinen Anwendungen verwendet
werden können.
json-to-csv:
title: JSON zu CSV
description: Konvertiere JSON mit automatischer Headererkennung in CSV.
camera-recorder:
title: Kamera-Rekorder
description: Mache ein Foto oder nimm ein Video von deiner Webcam oder Kamera auf.
keycode-info:
title: Keycode-Info
description: >-
Finde den JavaScript-Keycode, den Code, den Standort und die Modifikatoren
einer beliebigen gedrückten Taste.
emoji-picker:
title: Emoji-Picker
description: >-
Einfaches Kopieren und Einfügen von Emojis. Erhalte außerdem den Unicode-
und Codepunkt-Wert jedes Emojis.
color-converter:
title: Farbkonverter
description: >-
Konvertiere Farben zwischen den verschiedenen Formaten (Hex, RGB, HSL und
CSS-Name).
bcrypt:
title: Bcrypt
description: >-
Hashen und Vergleichen von Strings mit bcrypt. Bcrypt ist eine auf der
Blowfish-Chiffre basierende Hash-Funktion.
crontab-generator:
title: Crontab-Generator
description: >-
Überprüfe und generiere Crontab und erhalte die menschenlesbare
Beschreibung des Cron-Zeitplans.
http-status-codes:
title: HTTP-Statuscodes
description: Liste aller HTTP-Statuscodes, ihrer Namen und ihrer Bedeutung.
sql-prettify:
title: SQL verschönern und formatieren
description: >-
Formatiere und verschönere deine SQL-Abfragen online (unterstützt
verschiedene SQL-Dialekte).
benchmark-builder:
title: Benchmark-Builder
description: >-
Vergleiche ganz einfach die Ausführungszeit von Aufgaben mit diesem sehr
einfachen Online-Benchmark-Builder.
git-memo:
title: Git-Spickzettel
description: >-
Git ist eine dezentrale Versionsverwaltungssoftware. Mit diesem
Spickzettel hast du schnellen Zugriff auf die gängigsten Git-Befehle.
slugify-string:
title: Slugify String
description: Mache einen String URL-, Dateinamen- und ID-sicher.
encryption:
title: Text verschlüsseln / entschlüsseln
description: >-
Verschlüssele und entschlüssele Klartext mithilfe von Kryptoalgorithmen
wie AES, TripleDES, Rabbit oder RC4.
random-port-generator:
title: Zufälliger Port-Generator
description: >-
Generiere zufällige Portnummern außerhalb des Bereichs der "bekannten"
Ports (0-1023).
yaml-prettify:
title: YAML verschönern und formatieren
description: Verschönere deinen YAML-String in ein menschenlesbares Format.
eta-calculator:
title: ETA-Rechner
description: >-
Ein ETA (Estimated Time of Arrival)-Rechner, um die ungefähre Endzeit
einer Aufgabe zu erfahren, z. B. den Zeitpunkt des Endes eines Downloads.
roman-numeral-converter:
title: Römische Zahlen Konverter
description: >-
Konvertiere römische Zahlen in Dezimalzahlen und Dezimalzahlen in römische
Zahlen.
hmac-generator:
title: HMAC-Generator
description: >-
Berechnet einen hashbasierten Nachrichtenauthentifizierungscode (HMAC)
unter Verwendung eines geheimen Schlüssels und deiner bevorzugten
Hash-Funktion.
bip39-generator:
title: BIP39-Passphrasengenerator
description: >-
Generiere BIP39-Passphrasen aus vorhandener oder zufälliger Mnemonik oder
erhalte die Mnemonik aus der Passphrase.
base64-file-converter:
title: Base64-Dateikonverter
description: Konvertiere Strings, Dateien oder Bilder in ihre Base64-Repräsentation.
list-converter:
title: Listenkonverter
description: >-
Dieses Tool kann spaltenbasierte Daten verarbeiten und verschiedene
Änderungen (transponieren, Präfix und Suffix hinzufügen, Liste umkehren,
Liste sortieren, Werte in Kleinbuchstaben umwandeln, Werte abschneiden)
auf jede Zeile anwenden.
base64-string-converter:
title: Base64-String-Encoder/Decoder
description: Codiere und decodiere Strings einfach in ihre Base64-Repräsentation.
toml-to-yaml:
title: TOML zu YAML
description: Parse und konvertiere TOML zu YAML.
math-evaluator:
title: Mathematischer Auswerter
description: >-
Ein Taschenrechner zum Auswerten mathematischer Ausdrücke. Du kannst
Funktionen wie sqrt, cos, sin, abs usw. verwenden.
json-to-yaml-converter:
title: JSON zu YAML
description: Konvertiere JSON einfach in YAML mit diesem Live-Online-Konverter.
url-parser:
title: URL-Parser
description: >-
Parse eine URL-Zeichenfolge, um alle verschiedenen Teile (Protokoll,
Ursprung, Parameter, Port, Benutzername-Passwort usw.) zu erhalten.
iban-validator-and-parser:
title: IBAN-Validator und -Parser
description: >-
Validiere und parse IBAN-Nummern. Überprüfe, ob die IBAN gültig ist, und
erhalte das Land, BBAN, ob es sich um eine QR-IBAN handelt und das
IBAN-freundliche Format.
user-agent-parser:
title: User-Agent-Parser
description: >-
Erkenne und parse Browser, Engine, Betriebssystem, CPU und
Gerätetyp/-modell aus einer User-Agent-Zeichenfolge.
numeronym-generator:
title: Numeronym-Generator
description: >-
Ein Numeronym ist ein Wort, bei dem eine Zahl verwendet wird, um eine
Abkürzung zu bilden. Zum Beispiel ist "i18n" ein Numeronym für
"internationalization", wobei 18 für die Anzahl der Buchstaben zwischen
dem ersten "i" und dem letzten "n" im Wort steht.
case-converter:
title: Fall-Konverter
description: >-
Ändere den Fall eines Strings und wähle zwischen verschiedenen Formaten
aus.
html-entities:
title: HTML-Entity-Escape
description: >-
Escape oder unescape HTML-Entitäten (ersetze <, >, &, " und ' durch ihre
HTML-Version).
json-prettify:
title: JSON verschönern und formatieren
description: Verschönere deinen JSON-String in ein menschenlesbares Format.
docker-run-to-docker-compose-converter:
title: Docker run zu Docker compose Konverter
description: Wandle docker run-Befehle in docker-compose-Dateien um!
mac-address-lookup:
title: MAC-Adressensuche
description: Finde den Anbieter und Hersteller eines Geräts anhand seiner MAC-Adresse.
mime-types:
title: MIME-Typen
description: Konvertiere MIME-Typen in Erweiterungen und umgekehrt.
toml-to-json:
title: TOML zu JSON
description: Parse und konvertiere TOML zu JSON.
lorem-ipsum-generator:
title: Lorem Ipsum Generator
description: >-
Lorem Ipsum ist ein Platzhaltertext, der häufig verwendet wird, um die
visuelle Form eines Dokuments oder einer Schriftart ohne Verwendung von
bedeutendem Inhalt zu demonstrieren.
qrcode-generator:
title: QR-Code-Generator
description: >-
Generiere und downloade QR-Codes für eine URL oder einfach einen Text und
passe die Hintergrund- und Vordergrundfarben an.
wifi-qrcode-generator:
title: WLAN-QR-Code-Generator
description: >-
Generiere und lade QR-Codes für schnelle Verbindungen zu WLAN-Netzwerken
herunter.
xml-formatter:
title: XML-Formatter
description: Verschönere deinen XML-String in ein menschenlesbares Format.
temperature-converter:
title: Temperaturkonverter
description: >-
Temperaturgradumrechnungen für Kelvin, Celsius, Fahrenheit, Rankine,
Delisle, Newton, Réaumur und Rømer.
chmod-calculator:
title: Chmod-Rechner
description: >-
Berechne deine Chmod-Berechtigungen und -Befehle mit diesem
Online-Chmod-Rechner.
rsa-key-pair-generator:
title: RSA-Schlüsselpaar-Generator
description: Generiere neue zufällige RSA-Private- und Public-Key-PEM-Zertifikate.
html-wysiwyg-editor:
title: HTML-WYSIWYG-Editor
description: >-
Online-HTML-Editor mit funktionsreichem WYSIWYG-Editor, erhalte sofort den
Quellcode des Inhalts.
yaml-to-toml:
title: YAML zu TOML
description: Parse und konvertiere YAML zu TOML.
mac-address-generator:
title: MAC-Adressen-Generator
description: >-
Gebe die Menge und das Präfix ein. MAC-Adressen werden in deiner gewählten
Schreibweise (Groß- oder Kleinbuchstaben) generiert.
json-diff:
title: JSON-Unterschied
description: Vergleiche zwei JSON-Objekte und erhalte die Unterschiede zwischen ihnen.
jwt-parser:
title: JWT-Parser
description: >-
Parse und decodiere deinen JSON-Web-Token (JWT) und zeige dessen Inhalt
an.
date-converter:
title: Datum-Uhrzeit-Konverter
description: Konvertiere Datum und Uhrzeit in verschiedene Formate.
phone-parser-and-formatter:
title: Telefonnummer-Parser und -Formatter
description: >-
Parse, validiere und formatiere Telefonnummern. Erhalte Informationen zur
Telefonnummer, wie z. B. die Landesvorwahl, den Typ usw.
ipv4-subnet-calculator:
title: IPv4-Subnetzrechner
description: >-
Parse deine IPv4-CIDR-Blöcke und erhalte alle Informationen, die du über
dein Subnetz benötigst.
og-meta-generator:
title: Open Graph Meta-Generator
description: Generiere Open Graph- und Social-HTML-Metatags für deine Website.
ipv6-ula-generator:
title: IPv6-ULA-Generator
description: >-
Generiere deine eigenen lokalen, nicht routbaren IP-Adressen in deinem
Netzwerk gemäß RFC4193.
hash-text:
title: Text hashen
description: >-
Hashe einen Text-String mit der von dir benötigten Funktion: MD5, SHA1,
SHA256, SHA224, SHA512, SHA384, SHA3 oder RIPEMD160
json-to-toml:
title: JSON zu TOML
description: Parse und konvertiere JSON zu TOML.
device-information:
title: Geräteinformationen
description: >-
Informationen zu deinem aktuellen Gerät (Bildschirmgröße, Pixelverhältnis,
Benutzeragent, ...) erhalten.
pdf-signature-checker:
title: PDF-Signaturprüfer
description: >-
Überprüfe die Signaturen einer PDF-Datei. Eine signierte PDF-Datei enthält
eine oder mehrere Signaturen, die verwendet werden können, um
festzustellen, ob der Inhalt der Datei seit dem Zeitpunkt der Signierung
geändert wurde.
json-minify:
title: JSON minifizieren
description: >-
Minifiziere und komprimiere dein JSON, indem unnötige Leerzeichen entfernt
werden.
ulid-generator:
title: ULID-Generator
description: >-
Generiere zufällige Universally Unique Lexicographically Sortable
Identifier (ULID).
string-obfuscator:
title: String-Verschleierer
description: >-
Verschleiere einen String (wie ein Secret, eine IBAN oder ein Token), um
ihn weitergeben zu können und identifizierbar zu machen, ohne seinen
Inhalt preiszugeben.
base-converter:
title: Ganzzahl-Basiskonverter
description: >-
Konvertiere Zahlen zwischen verschiedenen Basen (Dezimal, Hexadezimal,
Binär, Oktal, Base64, ...).
yaml-to-json-converter:
title: YAML zu JSON
description: Konvertiere YAML einfach in JSON mit diesem Live-Online-Konverter.
uuid-generator:
title: UUID-Generator
description: >-
Ein Universally Unique Identifier (UUID) ist eine 128-Bit-Nummer, die zur
Identifizierung von Informationen in Computersystemen verwendet wird. Die
Anzahl der möglichen UUIDs beträgt 16^32, was 2^128 oder etwa 3,4x10^38
entspricht (was ziemlich viel ist!).
ipv4-address-converter:
title: IPv4-Adresskonverter
description: >-
Konvertiere eine IP-Adresse in Dezimal, Binär, Hexadezimal oder sogar in
IPv6.
text-statistics:
title: Textstatistiken
description: >-
Informationen zu einem Text erhalten, wie die Anzahl der Zeichen, die
Anzahl der Wörter, die Größe usw.
text-to-nato-alphabet:
title: Text zu NATO-Alphabet
description: >-
Wandle Text in das NATO-Phonetik-Alphabet für die mündliche Übermittlung
um.
basic-auth-generator:
title: Basic-Auth-Generator
description: >-
Generiere einen Base64-Basic-Auth-Header aus einem Benutzernamen und einem
Passwort.
text-to-unicode:
title: Text zu Unicode
description: Parse und konvertiere Text in Unicode und umgekehrt.
ipv4-range-expander:
title: IPv4-Bereichserweiterer
description: >-
Bei Angabe einer Start- und End-IPv4-Adresse berechnet dieses Tool ein
gültiges IPv4-Netzwerk mit seiner CIDR-Notation.
text-diff:
title: Textunterschied
description: Vergleiche zwei Texte und sieh die Unterschiede zwischen ihnen.
otp-generator:
title: OTP-Code-Generator
description: >-
Generiere und validiere zeitbasierte OTPs (Einmalpasswörter) für
Multi-Faktor-Authentifizierung.
url-encoder:
title: Kodieren/Decodieren von URL-formatierten Zeichenfolgen
description: >-
Kodiere zum URL-kodierten Format (auch als "prozentkodiert" bekannt) oder
decodiere es.
text-to-binary:
title: Text zu ASCII-Binär
description: Konvertiere Text in seine ASCII-Binärrepräsentation und umgekehrt.
+45 -45
View File
@@ -7,7 +7,7 @@ home:
toggleMenu: 'Toggle menu'
home: Home
uiLib: 'UI Lib'
support: 'Support IT-Tools development'
support: 'Support IT Tools development'
buyMeACoffee: 'Buy me a coffee'
follow:
title: 'You like it-tools?'
@@ -15,7 +15,7 @@ home:
githubRepository: 'IT-Tools GitHub repository'
p2: 'or follow us on'
twitterAccount: 'IT-Tools Twitter account'
thankYou: 'Thank you!'
thankYou: 'Thank you !'
nav:
github: 'GitHub repository'
githubRepository: 'IT-Tools GitHub repository'
@@ -72,7 +72,7 @@ tools:
password-strength-analyser:
title: Password strength analyser
description: Discover the strength of your password with this client-side-only password strength analyser and crack time estimation tool.
description: Discover the strength of your password with this client side only password strength analyser and crack time estimation tool.
chronometer:
title: Chronometer
@@ -98,7 +98,7 @@ tools:
svg-placeholder-generator:
title: SVG placeholder generator
description: Generate svg images to use as a placeholder in your applications.
description: Generate svg images to use as placeholder in your applications.
json-to-csv:
title: JSON to CSV
@@ -126,11 +126,11 @@ tools:
crontab-generator:
title: Crontab generator
description: Validate and generate crontab and get the human-readable description of the cron schedule.
description: Validate and generate crontab and get the human readable description of the cron schedule.
http-status-codes:
title: HTTP status codes
description: The list of all HTTP status codes, their name, and their meaning.
description: The list of all HTTP status codes their name and their meaning.
sql-prettify:
title: SQL prettify and format
@@ -142,7 +142,7 @@ tools:
git-memo:
title: Git cheatsheet
description: Git is a decentralized version management software. With this cheatsheet, you will have quick access to the most common git commands.
description: Git is a decentralized version management software. With this cheatsheet you will have a quick access to the most common git commands.
slugify-string:
title: Slugify string
@@ -150,7 +150,7 @@ tools:
encryption:
title: Encrypt / decrypt text
description: Encrypt clear text and decrypt ciphertext using crypto algorithms like AES, TripleDES, Rabbit or RC4.
description: Encrypt and decrypt text clear text using crypto algorithm like AES, TripleDES, Rabbit or RC4.
random-port-generator:
title: Random port generator
@@ -158,11 +158,11 @@ tools:
yaml-prettify:
title: YAML prettify and format
description: Prettify your YAML string into a friendly, human-readable format.
description: Prettify your YAML string to a human friendly readable format.
eta-calculator:
title: ETA calculator
description: An ETA (Estimated Time of Arrival) calculator to determine the approximate end time of a task, for example, the end time and duration of a file download.
description: An ETA (Estimated Time of Arrival) calculator to know the approximate end time of a task, for example the moment of ending of a download.
roman-numeral-converter:
title: Roman numeral converter
@@ -174,11 +174,11 @@ tools:
bip39-generator:
title: BIP39 passphrase generator
description: Generate a BIP39 passphrase from an existing or random mnemonic, or get the mnemonic from the passphrase.
description: Generate BIP39 passphrase from existing or random mnemonic, or get the mnemonic from the passphrase.
base64-file-converter:
title: Base64 file converter
description: Convert a string, file, or image into its base64 representation.
description: Convert string, files or images into a it\'s base64 representation.
list-converter:
title: List converter
@@ -186,7 +186,7 @@ tools:
base64-string-converter:
title: Base64 string encoder/decoder
description: Simply encode and decode strings into their base64 representation.
description: Simply encode and decode string into a their base64 representation.
toml-to-yaml:
title: TOML to YAML
@@ -198,15 +198,15 @@ tools:
json-to-yaml-converter:
title: JSON to YAML converter
description: Simply convert JSON to YAML with this online live converter.
description: Simply convert JSON to YAML with this live online converter.
url-parser:
title: URL parser
description: Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...)
title: Url parser
description: Parse an url string to get all the different parts (protocol, origin, params, port, username-password, ...)
iban-validator-and-parser:
title: IBAN validator and parser
description: Validate and parse IBAN numbers. Check if an IBAN is valid and get the country, BBAN, if it is a QR-IBAN and the IBAN friendly format.
description: Validate and parse IBAN numbers. Check if IBAN is valid and get the country, BBAN, if it is a QR-IBAN and the IBAN friendly format.
user-agent-parser:
title: User-agent parser
@@ -218,27 +218,27 @@ tools:
case-converter:
title: Case converter
description: Transform the case of a string and choose between different formats
description: Change the case of a string and chose between different formats
html-entities:
title: Escape HTML entities
description: Escape or unescape HTML entities (replace characters like <,>, &, " and \' with their HTML version)
title: Escape html entities
description: Escape or unescape html entities (replace <,>, &, " and \' to their html version)
json-prettify:
title: JSON prettify and format
description: Prettify your JSON string into a friendly, human-readable format.
description: Prettify your JSON string to a human friendly readable format.
docker-run-to-docker-compose-converter:
title: Docker run to Docker compose converter
description: Transforms "docker run" commands into docker-compose files!
description: Turns docker run commands into docker-compose files!
mac-address-lookup:
title: MAC address lookup
description: Find the vendor and manufacturer of a device by its MAC address.
mime-types:
title: MIME types
description: Convert MIME types to file extensions and vice-versa.
title: Mime types
description: Convert mime types to extensions and vice-versa.
toml-to-json:
title: TOML to JSON
@@ -250,19 +250,19 @@ tools:
qrcode-generator:
title: QR Code generator
description: Generate and download a QR code for a URL (or just plain text), and customize the background and foreground colors.
description: Generate and download QR-code for an url or just a text and customize the background and foreground colors.
wifi-qrcode-generator:
title: WiFi QR Code generator
description: Generate and download QR codes for quick connections to WiFi networks.
description: Generate and download QR-codes for quick connections to WiFi networks.
xml-formatter:
title: XML formatter
description: Prettify your XML string into a friendly, human-readable format.
description: Prettify your XML string to a human friendly readable format.
temperature-converter:
title: Temperature converter
description: Degrees temperature conversions for Kelvin, Celsius, Fahrenheit, Rankine, Delisle, Newton, Réaumur, and Rømer.
description: Temperature degrees conversions for Kelvin, Celsius, Fahrenheit, Rankine, Delisle, Newton, Réaumur and Rømer.
chmod-calculator:
title: Chmod calculator
@@ -270,11 +270,11 @@ tools:
rsa-key-pair-generator:
title: RSA key pair generator
description: Generate a new random RSA private and public pem certificate key pair.
description: Generate new random RSA private and public key pem certificates.
html-wysiwyg-editor:
title: HTML WYSIWYG editor
description: Online, feature-rich WYSIWYG HTML editor which generates the source code of the content immediately.
description: Online HTML editor with feature-rich WYSIWYG editor, get the source code of the content immediately.
yaml-to-toml:
title: YAML to TOML
@@ -302,15 +302,15 @@ tools:
ipv4-subnet-calculator:
title: IPv4 subnet calculator
description: Parse your IPv4 CIDR blocks and get all the info you need about your subnet.
description: Parse your IPv4 CIDR blocks and get all the info you need about your sub network.
og-meta-generator:
title: Open graph meta generator
description: Generate open-graph and socials HTML meta tags for your website.
description: Generate open-graph and socials html meta tags for your website.
ipv6-ula-generator:
title: IPv6 ULA generator
description: Generate your own local, non-routable IP addresses for your network according to RFC4193.
description: Generate your own local, non-routable IP addresses on your network according to RFC4193.
hash-text:
title: Hash text
@@ -330,7 +330,7 @@ tools:
json-minify:
title: JSON minify
description: Minify and compress your JSON by removing unnecessary whitespace.
description: Minify and compress your JSON by removing unnecessary white spaces.
ulid-generator:
title: ULID generator
@@ -342,31 +342,31 @@ tools:
base-converter:
title: Integer base converter
description: Convert a number between different bases (decimal, hexadecimal, binary, octal, base64, ...)
description: Convert number between different bases (decimal, hexadecimal, binary, octal, base64, ...)
yaml-to-json-converter:
title: YAML to JSON converter
description: Simply convert YAML to JSON with this online live converter.
description: Simply convert YAML to JSON with this live online converter.
uuid-generator:
title: UUIDs generator
description: A Universally Unique Identifier (UUID) is a 128-bit number used to identify information in computer systems. The number of possible UUIDs is 16^32, which is 2^128 or about 3.4x10^38 (which is a lot!).
ipv4-address-converter:
title: IPv4 address converter
description: Convert an IP address into decimal, binary, hexadecimal, or even an IPv6 representation of it.
title: Ipv4 address converter
description: Convert an ip address into decimal, binary, hexadecimal or event in ipv6
text-statistics:
title: Text statistics
description: Get information about a text, the number of characters, the number of words, its size in bytes, ...
description: Get information about a text, the amount of characters, the amount of words, it\'s size, ...
text-to-nato-alphabet:
title: Text to NATO alphabet
description: Transform text into the NATO phonetic alphabet for oral transmission.
description: Transform text into NATO phonetic alphabet for oral transmission.
basic-auth-generator:
title: Basic auth generator
description: Generate a base64 basic auth header from a username and password.
description: Generate a base64 basic auth header from an username and a password.
text-to-unicode:
title: Text to Unicode
@@ -374,7 +374,7 @@ tools:
ipv4-range-expander:
title: IPv4 range expander
description: Given a start and an end IPv4 address, this tool calculates a valid IPv4 subnet along with its CIDR notation.
description: Given a start and an end IPv4 address this tool calculates a valid IPv4 network with its CIDR notation.
text-diff:
title: Text diff
@@ -385,9 +385,9 @@ tools:
description: Generate and validate time-based OTP (one time password) for multi-factor authentication.
url-encoder:
title: Encode/decode URL-formatted strings
description: Encode text to URL-encoded format (also known as "percent-encoded"), or decode from it.
title: Encode/decode url formatted strings
description: Encode to url-encoded format (also known as "percent-encoded") or decode from it.
text-to-binary:
title: Text to ASCII binary
description: Convert text to its ASCII binary representation and vice-versa.
description: Convert text to its ASCII binary representation and vice versa.
+4 -6
View File
@@ -1,6 +1,6 @@
{
"name": "it-tools",
"version": "2024.5.13-a0bc346",
"version": "2023.12.21-5ed3693",
"description": "Collection of handy online tools for developers, with great UX. ",
"keywords": [
"productivity",
@@ -35,6 +35,7 @@
"release": "node ./scripts/release.mjs"
},
"dependencies": {
"@guolao/vue-monaco-editor": "^1.4.1",
"@it-tools/bip39": "^0.0.4",
"@it-tools/oggen": "^1.3.0",
"@sindresorhus/slugify": "^2.2.1",
@@ -49,9 +50,9 @@
"@vueuse/router": "^10.0.0",
"bcryptjs": "^2.4.3",
"change-case": "^4.1.2",
"chinesegen": "^0.3.3",
"colord": "^2.9.3",
"composerize-ts": "^0.6.2",
"composeverter": "^1.7.2",
"country-code-lookup": "^0.1.0",
"cron-validator": "^1.3.1",
"cronstrue": "^2.26.0",
@@ -65,12 +66,10 @@
"highlight.js": "^11.7.0",
"iarna-toml-esm": "^3.0.5",
"ibantools": "^4.3.3",
"js-base64": "^3.7.6",
"json5": "^2.2.3",
"jwt-decode": "^3.1.2",
"libphonenumber-js": "^1.10.28",
"lodash": "^4.17.21",
"lorem-ipsum-japanese": "^1.0.1",
"marked": "^10.0.0",
"mathjs": "^11.9.1",
"mime-types": "^2.1.35",
@@ -140,6 +139,5 @@
"vitest": "^0.34.0",
"workbox-window": "^7.0.0",
"zx": "^7.2.1"
},
"packageManager": "pnpm@8.15.3"
}
}
+73 -53
View File
@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
'@guolao/vue-monaco-editor':
specifier: ^1.4.1
version: 1.5.1(monaco-editor@0.43.0)(vue@3.3.4)
'@it-tools/bip39':
specifier: ^0.0.4
version: 0.0.4
@@ -47,15 +50,15 @@ dependencies:
change-case:
specifier: ^4.1.2
version: 4.1.2
chinesegen:
specifier: ^0.3.3
version: 0.3.3
colord:
specifier: ^2.9.3
version: 2.9.3
composerize-ts:
specifier: ^0.6.2
version: 0.6.2
composeverter:
specifier: ^1.7.2
version: 1.7.2
country-code-lookup:
specifier: ^0.1.0
version: 0.1.0
@@ -95,9 +98,6 @@ dependencies:
ibantools:
specifier: ^4.3.3
version: 4.3.3
js-base64:
specifier: ^3.7.6
version: 3.7.7
json5:
specifier: ^2.2.3
version: 2.2.3
@@ -110,9 +110,6 @@ dependencies:
lodash:
specifier: ^4.17.21
version: 4.17.21
lorem-ipsum-japanese:
specifier: ^1.0.1
version: 1.0.1
marked:
specifier: ^10.0.0
version: 10.0.0
@@ -2159,6 +2156,22 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@guolao/vue-monaco-editor@1.5.1(monaco-editor@0.43.0)(vue@3.3.4):
resolution: {integrity: sha512-nhbQHDAwsxrdH/yitcrBgAkN8Cae0IEiYe/M3LWK8bSJRfapkbMyfTHE6Gcxsxa/6efSUZAPDo8dJWBDx5GZyA==}
peerDependencies:
'@vue/composition-api': ^1.7.1
monaco-editor: '>=0.43.0'
vue: ^2.6.14 || >=3.0.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
dependencies:
'@monaco-editor/loader': 1.4.0(monaco-editor@0.43.0)
monaco-editor: 0.43.0
vue: 3.3.4
vue-demi: 0.14.7(vue@3.3.4)
dev: false
/@humanwhocodes/config-array@0.11.10:
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
@@ -2426,6 +2439,15 @@ packages:
resolution: {integrity: sha512-mrC4y8n88BYvgcgzq9bvTlDgFyi2zuvzmPilRvRc3Uz1iIvq8mDhxJ0rHKFUNzPEScpDvJdIujqiDrulMqiudA==}
dev: true
/@monaco-editor/loader@1.4.0(monaco-editor@0.43.0):
resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==}
peerDependencies:
monaco-editor: '>= 0.21.0 < 1'
dependencies:
monaco-editor: 0.43.0
state-local: 1.0.7
dev: false
/@nodelib/fs.scandir@2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -3360,7 +3382,7 @@ packages:
dependencies:
'@unhead/dom': 0.5.1
'@unhead/schema': 0.5.1
'@vueuse/shared': 10.11.0(vue@3.3.4)
'@vueuse/shared': 10.9.0(vue@3.3.4)
unhead: 0.5.1
vue: 3.3.4
transitivePeerDependencies:
@@ -3993,19 +4015,19 @@ packages:
- vue
dev: false
/@vueuse/shared@10.11.0(vue@3.3.4):
resolution: {integrity: sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==}
/@vueuse/shared@10.3.0(vue@3.3.4):
resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==}
dependencies:
vue-demi: 0.14.8(vue@3.3.4)
vue-demi: 0.14.5(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: false
/@vueuse/shared@10.3.0(vue@3.3.4):
resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==}
/@vueuse/shared@10.9.0(vue@3.3.4):
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
dependencies:
vue-demi: 0.14.5(vue@3.3.4)
vue-demi: 0.14.7(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -4060,6 +4082,14 @@ packages:
- supports-color
dev: true
/ajv-errors@3.0.0(ajv@8.12.0):
resolution: {integrity: sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==}
peerDependencies:
ajv: ^8.0.1
dependencies:
ajv: 8.12.0
dev: false
/ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
dependencies:
@@ -4076,7 +4106,6 @@ packages:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
uri-js: 4.4.1
dev: true
/ansi-colors@4.1.3:
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
@@ -4453,13 +4482,6 @@ packages:
resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==}
dev: true
/chinesegen@0.3.3:
resolution: {integrity: sha512-iwWTX4sPT8BwYaZr3SFr4D1tkToc1SXQ90AwnW8prCcGhv2nrOW38LStV27HtbHPUYTEhYbfG1KHoXRtqVBUFg==}
hasBin: true
dependencies:
minimist: 1.2.8
dev: false
/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
engines: {node: '>= 8.10.0'}
@@ -4576,6 +4598,15 @@ packages:
yamljs: 0.3.0
dev: false
/composeverter@1.7.2:
resolution: {integrity: sha512-gRSCkSU8wJQvmTHQ23wBd2gCdUsns95k3lL7YszZBu5EyA3eac46mI7nVgvk1pZTM0mOmj/E5yurtdYkuVNZRA==}
dependencies:
ajv: 8.12.0
ajv-errors: 3.0.0(ajv@8.12.0)
core-js: 2.6.12
yaml: 1.10.2
dev: false
/concat-map@0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
@@ -4629,6 +4660,12 @@ packages:
browserslist: 4.22.1
dev: true
/core-js@2.6.12:
resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==}
deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
requiresBuild: true
dev: false
/country-code-lookup@0.1.0:
resolution: {integrity: sha512-IOI66HEG+8bXfWPy+sTzuN7161vmDZOHg1wgIPFf3WfD73FeLajnn6C+fnxOIa9RL1WRBDMXQQWW/FOaOYaQ3w==}
dev: false
@@ -6488,10 +6525,6 @@ packages:
hasBin: true
dev: true
/js-base64@3.7.7:
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
dev: false
/js-beautify@1.14.6:
resolution: {integrity: sha512-GfofQY5zDp+cuHc+gsEXKPpNw2KbPddreEo35O6jT6i0RVK6LhsoYBhq5TvK4/n74wnA0QbK8gGd+jUZwTMKJw==}
engines: {node: '>=10'}
@@ -6591,7 +6624,6 @@ packages:
/json-schema-traverse@1.0.0:
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
dev: true
/json-schema@0.4.0:
resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
@@ -6733,13 +6765,6 @@ packages:
is-unicode-supported: 0.1.0
dev: true
/lorem-ipsum-japanese@1.0.1:
resolution: {integrity: sha512-lL4XsigcYfSIsuUmHuoLB4wa71teS7XCx5tDgyZh6SoQmtwn0NTTMM54F69hy5aT8dkExH41hKmmOh1cET6I/w==}
hasBin: true
dependencies:
optimist: 0.3.7
dev: false
/loupe@2.3.6:
resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==}
dependencies:
@@ -6952,6 +6977,7 @@ packages:
/minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
dev: true
/mlly@1.4.0:
resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==}
@@ -7198,12 +7224,6 @@ packages:
is-wsl: 2.2.0
dev: true
/optimist@0.3.7:
resolution: {integrity: sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==}
dependencies:
wordwrap: 0.0.3
dev: false
/optionator@0.9.3:
resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==}
engines: {node: '>= 0.8.0'}
@@ -7698,7 +7718,6 @@ packages:
/punycode@2.3.0:
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
engines: {node: '>=6'}
dev: true
/punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
@@ -7846,7 +7865,6 @@ packages:
/require-from-string@2.0.2:
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
dev: true
/require-main-filename@2.0.0:
resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==}
@@ -8228,6 +8246,10 @@ packages:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
dev: true
/state-local@1.0.7:
resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==}
dev: false
/std-env@3.3.3:
resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==}
dev: true
@@ -8945,7 +8967,6 @@ packages:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:
punycode: 2.3.0
dev: true
/url-parse@1.5.10:
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
@@ -9183,8 +9204,8 @@ packages:
vue: 3.3.4
dev: false
/vue-demi@0.14.8(vue@3.3.4):
resolution: {integrity: sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==}
/vue-demi@0.14.7(vue@3.3.4):
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
@@ -9396,11 +9417,6 @@ packages:
stackback: 0.0.2
dev: true
/wordwrap@0.0.3:
resolution: {integrity: sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==}
engines: {node: '>=0.4.0'}
dev: false
/workbox-background-sync@7.0.0:
resolution: {integrity: sha512-S+m1+84gjdueM+jIKZ+I0Lx0BDHkk5Nu6a3kTVxP4fdj3gKouRNmhO8H290ybnJTOPfBDtTMXSQA/QLTvr7PeA==}
dependencies:
@@ -9479,7 +9495,6 @@ packages:
/workbox-google-analytics@7.0.0:
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
dependencies:
workbox-background-sync: 7.0.0
workbox-core: 7.0.0
@@ -9617,6 +9632,11 @@ packages:
yaml: 2.2.1
dev: true
/yaml@1.10.2:
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
dev: false
/yaml@2.2.1:
resolution: {integrity: sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==}
engines: {node: '>= 14'}
+1 -1
View File
@@ -48,7 +48,7 @@ const output = computed(() => transformer.value(input.value));
monospace
/>
<div overflow-auto>
<div>
<div mb-5px>
{{ outputLabel }}
</div>
+19 -72
View File
@@ -1,13 +1,8 @@
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
import { extension as getExtensionFromMime } from 'mime-types';
import type { Ref } from 'vue';
import _ from 'lodash';
export {
getMimeTypeFromBase64,
getMimeTypeFromExtension, getExtensionFromMimeType,
useDownloadFileFromBase64, useDownloadFileFromBase64Refs,
previewImageFromBase64,
};
export { getMimeTypeFromBase64, useDownloadFileFromBase64 };
const commonMimeTypesSignatures = {
'JVBERi0': 'application/pdf',
@@ -41,78 +36,30 @@ function getFileExtensionFromMimeType({
defaultExtension?: string
}) {
if (mimeType) {
return getExtensionFromMimeType(mimeType) ?? defaultExtension;
return getExtensionFromMime(mimeType) ?? defaultExtension;
}
return defaultExtension;
}
function downloadFromBase64({ sourceValue, filename, extension, fileMimeType }:
{ sourceValue: string; filename?: string; extension?: string; fileMimeType?: string }) {
if (sourceValue === '') {
throw new Error('Base64 string is empty');
}
const defaultExtension = extension ?? 'txt';
const { mimeType } = getMimeTypeFromBase64({ base64String: sourceValue });
let base64String = sourceValue;
if (!mimeType) {
const targetMimeType = fileMimeType ?? getMimeTypeFromExtension(defaultExtension);
base64String = `data:${targetMimeType};base64,${sourceValue}`;
}
const cleanExtension = extension ?? getFileExtensionFromMimeType(
{ mimeType, defaultExtension });
let cleanFileName = filename ?? `file.${cleanExtension}`;
if (extension && !cleanFileName.endsWith(`.${extension}`)) {
cleanFileName = `${cleanFileName}.${cleanExtension}`;
}
const a = document.createElement('a');
a.href = base64String;
a.download = cleanFileName;
a.click();
}
function useDownloadFileFromBase64(
{ source, filename, extension, fileMimeType }:
{ source: Ref<string>; filename?: string; extension?: string; fileMimeType?: string }) {
function useDownloadFileFromBase64({ source, filename }: { source: Ref<string>; filename?: string }) {
return {
download() {
downloadFromBase64({ sourceValue: source.value, filename, extension, fileMimeType });
if (source.value === '') {
throw new Error('Base64 string is empty');
}
const { mimeType } = getMimeTypeFromBase64({ base64String: source.value });
const base64String = mimeType
? source.value
: `data:text/plain;base64,${source.value}`;
const cleanFileName = filename ?? `file.${getFileExtensionFromMimeType({ mimeType })}`;
const a = document.createElement('a');
a.href = base64String;
a.download = cleanFileName;
a.click();
},
};
}
function useDownloadFileFromBase64Refs(
{ source, filename, extension }:
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
return {
download() {
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
},
};
}
function previewImageFromBase64(base64String: string): HTMLImageElement {
if (base64String === '') {
throw new Error('Base64 string is empty');
}
const img = document.createElement('img');
img.src = base64String;
const container = document.createElement('div');
container.appendChild(img);
const previewContainer = document.getElementById('previewContainer');
if (previewContainer) {
previewContainer.innerHTML = '';
previewContainer.appendChild(container);
}
else {
throw new Error('Preview container element not found');
}
return img;
}
+1 -32
View File
@@ -1,8 +1,7 @@
import { useRouteQuery } from '@vueuse/router';
import { computed } from 'vue';
import { useStorage } from '@vueuse/core';
export { useQueryParam, useQueryParamOrStorage };
export { useQueryParam };
const transformers = {
number: {
@@ -17,12 +16,6 @@ const transformers = {
fromQuery: (value: string) => value.toLowerCase() === 'true',
toQuery: (value: boolean) => (value ? 'true' : 'false'),
},
object: {
fromQuery: (value: string) => {
return JSON.parse(value);
},
toQuery: (value: object) => JSON.stringify(value),
},
};
function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue: T }) {
@@ -40,27 +33,3 @@ function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue:
},
});
}
function useQueryParamOrStorage<T>({ name, storageName, defaultValue }: { name: string; storageName: string; defaultValue: T }) {
const type = typeof defaultValue;
const transformer = transformers[type as keyof typeof transformers] ?? transformers.string;
const storageRef = useStorage(storageName, defaultValue);
const proxyDefaultValue = transformer.toQuery(defaultValue as never);
const proxy = useRouteQuery(name, proxyDefaultValue);
const r = ref(defaultValue);
watch(r,
(value) => {
proxy.value = transformer.toQuery(value as never);
storageRef.value = value as never;
},
{ deep: true });
r.value = (proxy.value && proxy.value !== proxyDefaultValue
? transformer.fromQuery(proxy.value) as unknown as T
: storageRef.value as T) as never;
return r;
}
+7
View File
@@ -2,6 +2,9 @@ import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { createHead } from '@vueuse/head';
import { install as VueMonacoEditorPlugin, loader } from '@guolao/vue-monaco-editor';
import * as monaco from 'monaco-editor';
import { registerSW } from 'virtual:pwa-register';
import { plausible } from './plugins/plausible.plugin';
@@ -13,10 +16,14 @@ import App from './App.vue';
import router from './router';
import { i18nPlugin } from './plugins/i18n.plugin';
// loaded monaco-editor from `node_modules`
loader.config({ monaco });
registerSW();
const app = createApp(App);
app.use(VueMonacoEditorPlugin);
app.use(createPinia());
app.use(createHead());
app.use(i18nPlugin);
@@ -3,7 +3,6 @@ const { availableLocales, locale } = useI18n();
const localesLong: Record<string, string> = {
en: 'English',
de: 'Deutsch',
es: 'Español',
fr: 'Français',
pt: 'Português',
@@ -2,19 +2,12 @@
import { useBase64 } from '@vueuse/core';
import type { Ref } from 'vue';
import { useCopy } from '@/composable/copy';
import { getExtensionFromMimeType, getMimeTypeFromBase64, previewImageFromBase64, useDownloadFileFromBase64Refs } from '@/composable/downloadBase64';
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
import { useValidation } from '@/composable/validation';
import { isValidBase64 } from '@/utils/base64';
const fileName = ref('file');
const fileExtension = ref('');
const base64Input = ref('');
const { download } = useDownloadFileFromBase64Refs(
{
source: base64Input,
filename: fileName,
extension: fileExtension,
});
const { download } = useDownloadFileFromBase64({ source: base64Input });
const base64InputValidation = useValidation({
source: base64Input,
rules: [
@@ -25,35 +18,6 @@ const base64InputValidation = useValidation({
],
});
watch(
base64Input,
(newValue, _) => {
const { mimeType } = getMimeTypeFromBase64({ base64String: newValue });
if (mimeType) {
fileExtension.value = getExtensionFromMimeType(mimeType) || fileExtension.value;
}
},
);
function previewImage() {
if (!base64InputValidation.isValid) {
return;
}
try {
const image = previewImageFromBase64(base64Input.value);
image.style.maxWidth = '100%';
image.style.maxHeight = '400px';
const previewContainer = document.getElementById('previewContainer');
if (previewContainer) {
previewContainer.innerHTML = '';
previewContainer.appendChild(image);
}
}
catch (_) {
//
}
}
function downloadFile() {
if (!base64InputValidation.isValid) {
return;
@@ -80,24 +44,6 @@ async function onUpload(file: File) {
<template>
<c-card title="Base64 to file">
<n-grid cols="3" x-gap="12">
<n-gi span="2">
<c-input-text
v-model:value="fileName"
label="File Name"
placeholder="Download filename"
mb-2
/>
</n-gi>
<n-gi>
<c-input-text
v-model:value="fileExtension"
label="Extension"
placeholder="Extension"
mb-2
/>
</n-gi>
</n-grid>
<c-input-text
v-model:value="base64Input"
multiline
@@ -107,14 +53,7 @@ async function onUpload(file: File) {
mb-2
/>
<div flex justify-center py-2>
<div id="previewContainer" />
</div>
<div flex justify-center gap-3>
<c-button :disabled="base64Input === '' || !base64InputValidation.isValid" @click="previewImage()">
Preview image
</c-button>
<div flex justify-center>
<c-button :disabled="base64Input === '' || !base64InputValidation.isValid" @click="downloadFile()">
Download file
</c-button>
+1 -1
View File
@@ -28,7 +28,7 @@ const compareMatch = computed(() => compareSync(compareString.value, compareHash
mb-2
/>
<n-form-item label="Salt count: " label-placement="left" label-width="120">
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="100" :min="0" w-full />
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="10" :min="0" w-full />
</n-form-item>
<c-input-text :value="hashed" readonly text-center />
+19
View File
@@ -0,0 +1,19 @@
declare module 'composeverter' {
interface Configuration {
expandVolumes?: boolean;
expandPorts?: boolean;
indent?: number;
}
interface DockerComposeValidatioError {
line?: number;
message: string;
helpLink?: string;
}
export function validateDockerComposeToCommonSpec(content: string): DockerComposeValidatioError[];
export function migrateFromV2xToV3x(content: string, configuration?: Configuration = null): string;
export function migrateFromV3xToV2x(content: string, configuration?: Configuration = null): string;
export function migrateFromV1ToV2x(content: string, configuration?: Configuration = null): string;
export function migrateToCommonSpec(content: string, configuration?: Configuration = null): string;
export function migrateFromV2xToV3x(content: string, configuration?: Configuration = null): string;
export function getDockerComposeSchemaWithoutFormats(): object;
}
@@ -0,0 +1,70 @@
<script setup lang="ts">
import {
validateDockerComposeToCommonSpec,
} from 'composeverter';
const dockerCompose = ref(
`version: '3.3'
services:
nginx:
ports:
- '80:80'
volumes:
- '/var/run/docker.sock:/tmp/docker.sock:ro'
restart: always
logging:
options:
max-size: 1g
image: nginx`,
);
const conversionResult = computed(() => {
try {
return validateDockerComposeToCommonSpec(dockerCompose.value);
}
catch (e: any) {
return e.toString().split('\n').map((err: string) => ({ line: -1, message: err, helpLink: '' }));
}
});
const errors = computed(() => conversionResult.value);
const MONACO_EDITOR_OPTIONS = {
automaticLayout: true,
formatOnType: true,
formatOnPaste: true,
};
</script>
<template>
<div>
<c-label label="Paste your Docker Compose file content:">
<div relative w-full>
<c-monaco-editor
v-model:value="dockerCompose"
theme="vs-dark"
language="yaml"
height="250px"
:options="MONACO_EDITOR_OPTIONS"
/>
</div>
</c-label>
<div v-if="errors.length > 0">
<n-alert title="The following errors occured" type="error" mt-5>
<ul>
<li v-for="(message, index) of errors" :key="index">
{{ message.message }} (<n-a v-if="message.helpLink" target="_blank" rel="noreferer noopener">
See Docker Compose help
</n-a>)
</li>
</ul>
</n-alert>
</div>
<div v-else>
<n-alert type="success" mt-5>
Validation successful!
</n-alert>
</div>
</div>
</template>
@@ -0,0 +1,12 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Docker Compose Validator',
path: '/docker-compose-validator',
description: 'Validate Docker Compose files against CommonSpec schema',
keywords: ['docker', 'compose', 'validator', 'commonspec'],
component: () => import('./docker-compose-validator.vue'),
icon: BrandDocker,
createdAt: new Date('2024-01-25'),
});
+2
View File
@@ -6,6 +6,7 @@ import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as textToUnicode } from './text-to-unicode';
import { tool as safelinkDecoder } from './safelink-decoder';
import { tool as dockerComposeValidator } from './docker-compose-validator';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -146,6 +147,7 @@ export const toolsByCategory: ToolCategory[] = [
sqlPrettify,
chmodCalculator,
dockerRunToDockerComposeConverter,
dockerComposeValidator,
xmlFormatter,
yamlViewer,
],
@@ -11,9 +11,6 @@ describe('integer-base-converter', () => {
expect(convertBase({ value: '10100101', fromBase: 2, toBase: 16 })).toEqual('a5');
expect(convertBase({ value: '192654', fromBase: 10, toBase: 8 })).toEqual('570216');
expect(convertBase({ value: 'zz', fromBase: 64, toBase: 10 })).toEqual('2275');
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 16 })).toEqual('20010db8000085a300000000ac1f8908');
expect(convertBase({ value: '20010db8000085a300000000ac1f8908', fromBase: 16, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
});
});
});
@@ -5,16 +5,16 @@ export function convertBase({ value, fromBase, toBase }: { value: string; fromBa
let decValue = value
.split('')
.reverse()
.reduce((carry: bigint, digit: string, index: number) => {
.reduce((carry: number, digit: string, index: number) => {
if (!fromRange.includes(digit)) {
throw new Error(`Invalid digit "${digit}" for base ${fromBase}.`);
}
return (carry += BigInt(fromRange.indexOf(digit)) * BigInt(fromBase) ** BigInt(index));
}, 0n);
return (carry += fromRange.indexOf(digit) * fromBase ** index);
}, 0);
let newValue = '';
while (decValue > 0) {
newValue = toRange[Number(decValue % BigInt(toBase))] + newValue;
decValue = (decValue - (decValue % BigInt(toBase))) / BigInt(toBase);
newValue = toRange[decValue % toBase] + newValue;
decValue = (decValue - (decValue % toBase)) / toBase;
}
return newValue || '0';
}
+2 -2
View File
@@ -39,7 +39,7 @@ const validation = useValidation({
{{ section.title }}
</th>
<tr v-for="{ claim, claimDescription, friendlyValue, value } in decodedJWT[section.key]" :key="claim + value">
<td class="claims" style="vertical-align: top;">
<td class="claims">
<span font-bold>
{{ claim }}
</span>
@@ -47,7 +47,7 @@ const validation = useValidation({
({{ claimDescription }})
</span>
</td>
<td style="word-wrap: break-word;word-break: break-all;">
<td>
<span>{{ value }}</span>
<span v-if="friendlyValue" ml-2 op-70>
({{ friendlyValue }})
-7
View File
@@ -1,7 +0,0 @@
declare module 'chinesegen' {
export default function lorem(config: {
count: number,
}): {
text: string
};
}
@@ -1,39 +1,185 @@
import _ from 'lodash';
import loremIpsumJapanese from 'lorem-ipsum-japanese';
import chinesegen from 'chinesegen';
import languageLorems from './lorem-ipsum.i18n.json';
import { randFromArray } from '@/utils/random';
const vocabulary = [
'a',
'ac',
'accumsan',
'ad',
'adipiscing',
'aenean',
'aliquam',
'aliquet',
'amet',
'ante',
'aptent',
'arcu',
'at',
'auctor',
'bibendum',
'blandit',
'class',
'commodo',
'condimentum',
'congue',
'consectetur',
'consequat',
'conubia',
'convallis',
'cras',
'cubilia',
'cum',
'curabitur',
'curae',
'dapibus',
'diam',
'dictum',
'dictumst',
'dignissim',
'dolor',
'donec',
'dui',
'duis',
'egestas',
'eget',
'eleifend',
'elementum',
'elit',
'enim',
'erat',
'eros',
'est',
'et',
'etiam',
'eu',
'euismod',
'facilisi',
'faucibus',
'felis',
'fermentum',
'feugiat',
'fringilla',
'fusce',
'gravida',
'habitant',
'habitasse',
'hac',
'hendrerit',
'himenaeos',
'iaculis',
'id',
'imperdiet',
'in',
'inceptos',
'integer',
'interdum',
'ipsum',
'justo',
'lacinia',
'lacus',
'laoreet',
'lectus',
'leo',
'ligula',
'litora',
'lobortis',
'lorem',
'luctus',
'maecenas',
'magna',
'magnis',
'malesuada',
'massa',
'mattis',
'mauris',
'metus',
'mi',
'molestie',
'mollis',
'montes',
'morbi',
'mus',
'nam',
'nascetur',
'natoque',
'nec',
'neque',
'netus',
'nisi',
'nisl',
'non',
'nostra',
'nulla',
'nullam',
'nunc',
'odio',
'orci',
'ornare',
'parturient',
'pellentesque',
'penatibus',
'per',
'pharetra',
'phasellus',
'placerat',
'platea',
'porta',
'porttitor',
'posuere',
'potenti',
'praesent',
'pretium',
'primis',
'proin',
'pulvinar',
'purus',
'quam',
'quis',
'quisque',
'rhoncus',
'ridiculus',
'risus',
'rutrum',
'sagittis',
'sapien',
'scelerisque',
'sed',
'sem',
'semper',
'senectus',
'sit',
'sociis',
'sociosqu',
'sodales',
'sollicitudin',
'suscipit',
'suspendisse',
'taciti',
'tellus',
'tempor',
'tempus',
'tincidunt',
'torquent',
'tortor',
'turpis',
'ullamcorper',
'ultrices',
'ultricies',
'urna',
'varius',
'vehicula',
'vel',
'velit',
'venenatis',
'vestibulum',
'vitae',
'vivamus',
'viverra',
'volutpat',
'vulputate',
];
const firstSentence = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
export function getSupportedLanguages() {
return _.union(
_.flatten(_.chain(languageLorems).map(l => l.languages).value()),
['Japanese', 'Chinese'])
.sort();
}
function generateSentence(language: string, length: number) {
if (language === 'Japanese') {
return loremIpsumJapanese({
count: length,
units: 'words',
});
}
if (language === 'Chinese') {
return chinesegen({ count: length }).text;
}
if (language === 'Emoticon') {
const loremIcons = _.find(languageLorems, ({ languages }) => languages.includes(language))?.loremIpsum || '';
const iconsChars = [...loremIcons];
return Array.from({ length })
.map(() => randFromArray(iconsChars))
.join(' ');
}
const vocabulary = _.find(languageLorems, ({ languages }) => languages.includes(language))?.loremIpsum?.split(' ') || [];
function generateSentence(length: number) {
const sentence = Array.from({ length })
.map(() => randFromArray(vocabulary))
.join(' ');
@@ -47,17 +193,15 @@ export function generateLoremIpsum({
wordCount = 10,
startWithLoremIpsum = true,
asHTML = false,
language = 'English',
}: {
paragraphCount?: number
sentencePerParagraph?: number
wordCount?: number
startWithLoremIpsum?: boolean
asHTML?: boolean
language?: string
}) {
const paragraphs = Array.from({ length: paragraphCount }).map(() =>
Array.from({ length: sentencePerParagraph }).map(() => generateSentence(language, wordCount)),
Array.from({ length: sentencePerParagraph }).map(() => generateSentence(wordCount)),
);
if (startWithLoremIpsum) {
@@ -1,26 +1,21 @@
<script setup lang="ts">
import { generateLoremIpsum, getSupportedLanguages } from './lorem-ipsum-generator.service';
import { computedRefreshable } from '@/composable/computedRefreshable';
import { generateLoremIpsum } from './lorem-ipsum-generator.service';
import { useCopy } from '@/composable/copy';
import { useQueryParamOrStorage } from '@/composable/queryParams';
import { randIntFromInterval } from '@/utils/random';
const paragraphs = useStorage('lorem:paragraphs', 1);
const sentences = useStorage('lorem:sentences', [3, 8]);
const words = useStorage('lorem:words', [8, 15]);
const paragraphs = ref(1);
const sentences = ref([3, 8]);
const words = ref([8, 15]);
const startWithLoremIpsum = ref(true);
const asHTML = ref(false);
const language = useQueryParamOrStorage({ defaultValue: 'English', storageName: 'lorem:lang', name: 'lang' });
const supportedLanguages = getSupportedLanguages();
const [loremIpsumText, refreshLoremIpsum] = computedRefreshable(() =>
const loremIpsumText = computed(() =>
generateLoremIpsum({
paragraphCount: paragraphs.value,
asHTML: asHTML.value,
sentencePerParagraph: randIntFromInterval(sentences.value[0], sentences.value[1]),
wordCount: randIntFromInterval(words.value[0], words.value[1]),
startWithLoremIpsum: startWithLoremIpsum.value,
language: language.value,
}),
);
const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to the clipboard' });
@@ -28,13 +23,6 @@ const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to
<template>
<c-card>
<c-select
v-model:value="language"
searchable
label="Language:"
:options="Object.values(supportedLanguages)"
mb-2
/>
<n-form-item label="Paragraphs" :show-feedback="false" label-width="200" label-placement="left">
<n-slider v-model:value="paragraphs" :step="1" :min="1" :max="20" />
</n-form-item>
@@ -53,13 +41,10 @@ const { copy } = useCopy({ source: loremIpsumText, text: 'Lorem ipsum copied to
<c-input-text :value="loremIpsumText" multiline placeholder="Your lorem ipsum..." readonly mt-5 rows="5" />
<div mt-5 flex justify-center gap-3>
<div mt-5 flex justify-center>
<c-button autofocus @click="copy()">
Copy
</c-button>
<c-button @click="refreshLoremIpsum">
Refresh
</c-button>
</div>
</c-card>
</template>
@@ -1,6 +0,0 @@
declare module 'lorem-ipsum-japanese' {
export default function lorem(config: {
count: number,
units: 'words' | 'sentences' | 'paragraphs',
}): string;
}
@@ -1,208 +0,0 @@
[
{
"languages": [
"English",
"Latin"
],
"loremIpsum": "Lorem ipsum dolor sit amet, unum corrumpit ea mei, has latine instructior no, simul choro senserit at qui! In eam copiosae efficiendi, vis iuvaret nominati cu. In mel possit tincidunt! Has in vidisse convenire. Vis deleniti rationibus definiebas ea, autem partem vim id?"
},
{
"languages": [
"Czech"
],
"loremIpsum": "Lorem ipsum dolor šit amét, šůmmo mundi eloquenťíam eum id? Malis aliquam vix cu, quodsi dólorum id vim, te mučiús cétero čompreheňsám sěd. Nó accumsán mentitum antiopam nam! Nóstro ornatus sčriptorem neč ex, ešt ťe štet ornatůs. Íllům aúďire iracundia siť aň, pri próbo copiósae ťempoříbús ex. Dúo cu ludúš nošter!"
},
{
"languages": [
"Norwegian",
"Danish"
],
"loremIpsum": "Lørem ipsum dolør sit amet, eæ hinc cibo feugåit nec. Mel ei mødo copiosae partiendo. Inermis fuisset perfecto duo ut. Sumo elabøraret quo et, usu tempor luptatum måndamus ei, læbore habemus åd per."
},
{
"languages": [
"French"
],
"loremIpsum": "Lorém ïpsum dolôr sït àmet, êî môdûs possîm eleçtram eum. Pérîculis intêllegebat at per, êâ nam êros âudiam, fabulas opôrtéat rèfërrëntûr mél éx. Të ius grâeco scribéntur, ëa adhuc posïdônium est? Côrporà volùptatum ad nam, mël fêrri lêgimùs êligendi în, nè his vidissé insolêns! Qùî màlîs tôllit periçulîs tè, quô eï summo çommune aççusàta?"
},
{
"languages": [
"Hungarian"
],
"loremIpsum": "Lorém ipsum dolör sit amet, omnes nüllam tamqűam ád quo, sit ut brute iisqüe voluptatibus! An seá fastidíi delicata indoctum? Ius éi dictá platönem, seá cú odiö dolőr iüvaret? Eos út férri hómerő élőquentíám, quót prodesset te his. Id pri alií nöstér cónsequüntúr, íűvaret eripuit hendrerít vim íd, in möllís laoreet antiopam est."
},
{
"languages": [
"Icelandic"
],
"loremIpsum": "Lorem ipsum dolör sít amet, cu officiis accómmodare vix. Agam menandri per an! Eí fugit clíÞæ ubiqúe sed. Congue nónúmes ius ei! Cum Þe ímpeÞus appellæntur."
},
{
"languages": [
"Italian"
],
"loremIpsum": "Lórem ipsum dòlór sìt amét, dúo dòlòrès dèleniti deterrùissét ad. His sumo constituàm adversaríum ne, quí labòrès appellàntùr té, mei harum refòrmidans íd? Dùò et gràeco lucìliùs, qui ne álìi reprimiqúè? Erat àccusamus nèc cú, cum éi novúm reprimique. His póssim òblìque id, eu ést nisl fugit referrèntúr, salutandi ássentior mèì eu?"
},
{
"languages": [
"Old English"
],
"loremIpsum": "Lorem ipsum dolor sīt æmēt, ād mei soleÞ ignoÞā putent, sāle ināni cū pri, ērǣnt corpora nēglegentur quī eu. Ēu ċūm sāƿċÞūs ārġumentūm eloquenÞiǣm. Usu ne assum libris! Purto proȝatūs scripÞōrem ius īn. Et mea nominavi fæcilisis, ludūs vīÞǣe eūm ad. Diċām discerē ei vēl. Vide prāeseƿt īd qūi?"
},
{
"languages": [
"Polish"
],
"loremIpsum": "Lorem ipsum dolor sit amet, sea ut illud trąctątos, harum civibus ęa męi? Ut usu graecis nomińavi śalutatus. Impedit opórteat ćum et, laudem łabóre cu sit? Nec causaę diceret te, vim zril diśseńtiunt ćoncłudaturque te!"
},
{
"languages": [
"Portuguese"
],
"loremIpsum": "Lõrém ipsúm dolôr sit amet, pro çongue libris deserunt in, ut débet putent máiéstãtis eós? Mei àt odio sáépê? Cu sít viderer deniqué, dícat tritani eu mel, láóreét nónumes definitiónes pri eá! Bõnorúm inimiçus vulputáte ut vis? Nisl volumus et mél, quod iudíco inçórruptê vis et."
},
{
"languages": [
"Spanish"
],
"loremIpsum": "Lórem ipsum dolor sit amét, soñet iudicabit quaeréñdum no vis, pro eu modús admodúm suscipit, ea rebum equídem temporibús nám. Eu sed delicata temporibus, et élit illud vel, et mundi deleniti est. Té has accumsan vituperatoribus, vís nisl deseruisse ád. ¿Cúm elítr reprimiqué signiferumque ne, an habémus advérsarium ius, pri ádhuc exerci iñvenire id? Eum cu facilis recteque."
},
{
"languages": [
"Swedish"
],
"loremIpsum": "Lorem ipsum dölor sit amet, ei duö alia wisi impetus, än ubique referrentur necessitatibus duo. Reque ömnes persius hæs an, æn vel vidisse denique! Sit sæepe recteque æt, nemore euripidis ex vix, inimicus consetetur per no? Nam id delenit persecuti, ad næm tota eleifend?"
},
{
"languages": [
"Turkish"
],
"loremIpsum": "Lorem ıpşûm dolor sît amet, əa ullum voceňt façilisi ňəç. Duo fuğît übiquə quaeque ňe, in cum clita laudem vıtuperata. Scribentur complectıtur an sed, ıus mınim molestie iudîcabit ea? Pri eî ûnum posse meliuş, primis timeam eam at. Ut laudem librîs latinə ius, vım əx iîsqüe accûmsan pöşıdoňîum, id sed dicta vidissə convenıre. Vietnamese Lorem ipsưm dôlor sit ămet, quot recusăbo definitionem no usu, ornatus honestâtis id mel? Eă purtơ idque sit. Nam ưllum animâl minimum te, vel ei ancillăê expêtênda! Êt vis postea officiis iracunđia, sit dôctus ăpeiriăn principes nơ?"
},
{
"languages": [
"Yugoslavian"
],
"loremIpsum": "Duo te đžico oblique, ex vel eligendži čonšequat. Đžicta urbanitas ex mea. An meis virtute euripiđžiš vis, ius elit voluptaria cu, ut quo quis dečore exerci. Ei per munere impedit ćontentiones, sonet labitur est eu. Đuis tation eirmođž quo in, ne unum nullam aliquip eum?"
},
{
"languages": [
"Lëtzebuergesch"
],
"loremIpsum": "Dé d'Loft Säiten heemlech wär, zwé gutt fest fu? Dem ze d'Liewen schéinste, vu och drun schéinste. Ke méi Monn Noper, Räis gefällt prächteg fu méi, Lann Mier ugedon op déi? No Kaffi genuch hie, op geet Mecht derbei all, Gaas Engel wou op. Si hin Heck gréng schéinen, Monn Gart weisen rem wa. Wäit keen hirem vun mä, as Heck d'Liewen hie, am keen gebotzt vun?"
},
{
"languages": [
"Russian"
],
"loremIpsum": "Лорем ипсум долор сит амет, нец не постеа медиоцритатем, модус абхорреант диссентиет при цу, ет идяуе убияуе пробатус при. Вис пауло репудиандае ад, еуисмод яуаерендум детерруиссет при еу? Денияуе дефинитионем яуо ин, оффициис торяуатос при еа, нам чоро ехплицари витуперата не. Миним алияуид пхилосопхиа сед те. Яуи алии вереар елояуентиам ат, ад вим яуодси оффициис. Но яуо алияуам."
},
{
"languages": [
"Greek"
],
"loremIpsum": "Λορεμ ιπσθμ δολορ σιτ αμετ, τε jθστο πετεντιθμ ασσεντιορ σεδ, ηισ ιν ταντασ qθαεστιο cορρθμπιτ. Cθμ ιν δισcερε νολθισσε ποσιδονιθμ. Δολορεσ δελεcτθσ σενσιβθσ μει νε! Περ ετ μαγνα ιθδιcο θβιqθε, οδιο δοcενδι σαλθτατθσ θτ περ, ει προ ερρεμ vιταε οβλιqθε. Τε εστ σολθτα σαλθτανδι cονσθλατθ, αν προ ταλε ιντερεσσετ. Εσσε σολθτα εα vιμ."
},
{
"languages": [
"Armenian"
],
"loremIpsum": "լոռեմ իպսում դոլոռ սիթ ամեթ, լոռեմ պլաթոնեմ հիս եթ? ին ուռբանիթաս եֆֆիծիանթուռ սիթ. քուեմ ոֆֆիծիիս ադ ծում. մել ան սիմուլ եռուդիթի դոծենդի, նե մել պուռթո ադիպիսծինգ, դուո եու եռանթ իուդիծո. սեդ նե բոնոռում պռոբաթուս վուլպութաթե, նո վոլումուս պլաթոնեմ ռեֆոռմիդանս վիխ! հաս եթ եսսենթ."
},
{
"languages": [
"Georgian"
],
"loremIpsum": "ლორემ იფსუმ დოლორ სით ამეთ, ჰას ფერთინახ ადოლესცენს ად! მოვეთ დოლორუმ ინვენირე ფრო ათ. ათ ალია ცონთენთიონეს ნამ, ან ჰის ყუოთ ირაცუნდია? ყუოთ სუმმო ერრორიბუს ნამ უთ."
},
{
"languages": [
"Hindi"
],
"loremIpsum": "७हल समजते भोगोलिक ढांचामात्रुभाषा! अथवा चिदंश अधिकार बिन्दुओमे सादगि सभिसमज अमितकुमार उपयोगकर्ता संभव. बिन्दुओ उपयोगकर्ता बहुत प्रति. कर्य किएलोग बिन्दुओ हिंदी. उपलब्ध अंग्रेजी होगा लक्षण प्रदान निर्देश बेंगलूर सादगि पडता? खरिदने संपुर्ण शीघ्र वर्ष अतित संपुर्ण यन्त्रालय प्रोत्साहित पहोच। किया प्राण एसलिये प्राप्त!"
},
{
"languages": [
"Korean"
],
"loremIpsum": "가부동수인 때에는 부결된 것으로 본다. 자유민주적 기본질서에 입각한 평화적 통일 정책을 수립하고 이를 추진한다. 다만. 국민경제의 발전을 위한 중요정책의 수립에 관하여 대통령의 자문에 응하기 위하여 국민경제자문회의를 둘 수 있다. 방황하였으며, 곳이 가지에 열락의 낙원을 봄바람을 물방아 역사를 힘있다. 듣기만 불러 공자는 것이다, 미인을 구하지 것은 못할 스며들어 위하여서, 곧 무엇을 보배를 있으며. 있으며. 할지니. 풀이 있으며."
},
{
"languages": [
"Arabic"
],
"loremIpsum": "فقد مسرح سقوط بريطانيا-فرنسا بل. ثم وعلى شموليةً إيو. كلّ في الوراء الأثنان, عل أخذ الأولية الخارجية. جيما وكسبت التاريخ، قبل إذ, هذه تم السبب التحالف باستحداث, به، من عُقر بالفشل الإتحاد. مدينة بمباركة لمّ ٣٠, كلّ إستعمل الفرنسية ويكيبيديا لم, عن قام المشترك للسيطرة"
},
{
"languages": [
"Hebrew"
],
"loremIpsum": "רבה אל ספורט מונחים שינויים. דת אחר החלל דפים אנתרופולוגיה. יידיש מאמרשיחהצפה ויש אם, של לוח ומהימנה האנציקלופדיה. אם ביולי קישורים תנך, לראות רוסית האטמוספירה תנך על, ארץ המלצת בהשחתה לחשבון מה. בה מדעי הבאים ואלקטרוניקה חפש, קלאסיים לימודים מלא אם, מחליטה אחרונים היסטוריה אל מתן."
},
{
"languages": [
"L33tspeak"
],
"loremIpsum": "534r(h r35ul7. 17 +h3, Ph13LD, 4u70m471(4lly 1n y0:. 1n 937 g0t0 3ng|335h,, t3H 1n70 1iNx Wh0 +o, pHor d1|23c73d 937 +o. 1T 250m (ra//1z h1gh-qu4|17y 0u7. 70 4rE h34d3r L0Ok1NG."
},
{
"languages": [
"Morse code"
],
"loremIpsum": "·--- ·--· --··· -- -·- --- -··· ··-· --·· -· ·-- -·-· -··- ·· -- ··- ····· ··--··"
},
{
"languages": [
"Emoticon"
],
"loremIpsum": "👋🏻👋🏼👋🏽👋🏾👋🏿🤚🏻🤚🏼🤚🏽🤚🏾🤚🏿🖐🏻🖐🏼🖐🏽🖐🏾🖐🏿🖖🏻🖖🏼🖖🏽🖖🏾🖖🏿👌🏻👌🏼👌🏽👌🏾🤌🤌🏽🤌🏾🤌🏿🤏🏻🤏🏼🤏🏽🤏🏾🤏🏿🤞🏻🤞🏼🤞🏽🤞🏾🤞🏿🤟🏻🤟🏼🤟🏽🤟🏾🤟🏿🤘🏻🤘🏼🤘🏽🤘🏾🤘🏿🤙🏼🤙🤙🤙🏿👈🏻👈🏼👈🏽👈🏾👈🏿👉🏻👉🏼👉🏽👉🏾👉🏿👆🏻👆🏼👆🏽👆🏾👆🏿🖕🏻🖕🏼🖕🏽🖕🏾🖕🏿👇🏻👇🏼👇👇🏾👇👍🏻👍🏼👍🏽👍🏾👍🏿👎🏻👎🏼👎🏽👎🏾👎🏿👊🏻👊🏼👊🏽👊🏾👊🏿🤛🏻🤛🏼🤛🏽🤛🏾🤛🏿🤜🏻🤜🏼🤜🤜🏾🤜🏿👏👏🏼👏🏽👏🏾👏🏿🙌🏻🙌🏼🙌🏽🙌🏾🙌🏿👐🏻👐🏼👐🏽👐🏾👐🏿🤲🏻🤲🏼🤲🏽🤲🏾🤲🏿🙏🏻🙏🏼🙏🙏🏾🙏🏿💅🏻💅💅🏽💅🏾💅🏿🤳🏻🤳🏼🤳🏽🤳🏾🤳🏿💪🏻💪🏼💪🏽💪🏾💪🏿🦵🏻🦵🏼🦵🏽🦵🏾🦶🏼🦶🏽🦶🏾🦶👂🏻👂🏼👂🏽👂🏾👂🦻🏻🦻🏼🦻🏽🦻🏾🦻🏿👃🏻👃🏼👃🏽👃🏾👃🏿👶🏻👶🏼👶🏽👶🏾👶🏿🧒🏻🧒🏼🧒🏽🧒🏾🧒👦🏻👦🏼👦🏽👦🏾👦🏿👧👧🏼👧🏽👧🏾👧🏿🧑🏻🧑🏼🧑🏽🧑🏾🧑🏿👱🏻👱🏼👱🏽👱🏾👱🏿👨🏻👨🏼👨🏽👨🏾👨🧔🏻🧔🏼🧔🏽🧔🏾🧔🏿👩🏻👩👩🏽👩🏾👩🏿🧓🏻🧓🏼🧓🏽🧓🏾🧓🏿👴🏻👴🏼👴🏽👴🏾👴🏿👵🏻👵🏼👵🏽👵🏾👵🙍🏻🙍🏼🙍🏽🙍🏾🙍🏿🙎🏻🙎🏼🙎🙎🏾🙎🏿🙅🏻🙅🏼🙅🏽🙅🏾🙅🏿🙆🏻🙆🏼🙆🏽🙆🏾🙆🏿💁🏻💁🏼💁🏽💁🏾💁🙋🏻🙋🏼🙋🏽🙋🏾🙋🏿🧏🏻🧏🏼🧏🏽🧏🧏🏿🙇🏻🙇🏼🙇🏽🙇🏾🙇🏿🤦🏻🤦🏼🤦🏽🤦🏾🤦🏿🤷🏻🤷🏼🤷🏽🤷🏾🤷👮🏻👮🏼👮🏽👮🏾👮🏿🕵🏻🕵🏼🕵🏽🕵🏾🕵💂🏻💂🏼💂🏽💂🏾💂🏿🥷🏻🥷🏼🥷🏽🥷🏾🥷🏿👷🏻👷🏼👷🏽👷🏾👷🤴🏻🤴🏼🤴🏽🤴🏾🤴🏿👸🏻👸🏼👸🏽👸🏾👸🏿👳👳🏼👳🏽👳🏾👳🏿👲🏻👲🏼👲🏽👲🏾👲🏿🧕🏻🧕🏼🧕🏽🧕🏾🧕🤵🏻🤵🏼🤵🏽🤵🏾🤵🏿👰🏻👰🏼👰🏽👰🏾👰🏿🤰🏻🤰🤰🏽🤰🏾🤰🏿🤱🏻🤱🏼🤱🏽🤱🏾🤱🏿👼🏻👼🏼👼🏽👼🏾👼🎅🏻🎅🏼🎅🏽🎅🏾🎅🏿🤶🏻🤶🏼🤶🏽🤶🏾🤶🏿🦸🏻🦸🏼🦸🦸🏾🦸🏿🦹🏻🦹🏼🦹🏽🦹🏾🦹🏿🧙🏻🧙🏼🧙🏽🧙🏾🧙🧚🏻🧚🏼🧚🏽🧚🏾🧚🏿🧛🏻🧛🏼🧛🏽🧛🏾🧛🏿🧜🏻🧜🏼🧜🏽🧜🧜🏿🧝🏻🧝🏼🧝🏽🧝🏾🧝🏿💆🏻💆🏼💆🏽💆🏾💆💇🏻💇🏼💇🏽💇🏾💇🏿🚶🏻🚶🏼🚶🏽🚶🏾🚶🏿🧍🏻🧍🏼🧍🏽🧍🏾🧍🧎🏻🧎🏼🧎🏽🧎🏾🧎🏿🏃🏻🏃🏼🏃🏽🏃🏾🏃💃🏻💃🏼💃🏽💃🏾💃🏿🕺🏻🕺🏼🕺🏽🕺🏾🕺🏿🕴🏻🕴🏼🕴🏽🕴🏾🕴🏿🧖🧖🏼🧖🏽🧖🏾🧖🏿🧗🏻🧗🏼🧗🏽🧗🏾🧗🏿🏇🏻🏇🏼🏇🏽🏇🏾🏇🏿🏂🏻🏂🏼🏂🏽🏂🏾🏂🏿🏌🏻🏌🏼🏌🏽🏌🏾🏌🏿🏄🏻🏄🏼🏄🏽🏄🏾🏄🏿🚣🏻🚣🏼🚣🏽🚣🏾🚣🏿🏊🏻🏊🏼🏊🏽🏊🏾🏊🏿🏋🏻🏋🏼🏋🏽🏋🏾🏋🏿🚴🏻🚴🏼🚴🏽🚴🏾🚴🏿🚵🏻🚵🏼🚵🏽🚵🏾🚵🏿🤸🏻🤸🏼🤸🏾🤸🏿🤽🏻🤽🏼🤽🏽🤽🏾🤽🏿🤾🏻🤾🏼🤾🏽🤾🏾🤾🏿🤹🏻🤹🏼🤹🏽🤹🏾🤹🏿🧘🏻🧘🏼🧘🏽🧘🏾🧘🏿🛀🏻🛀🏼🛀🏽🛀🏾🛀🏿🛌🏻🛌🏼🛌🏽🛌🏾🛌🏿👭🏻👭🏼👭🏽👭🏾👭🏿👫🏻👫🏼👫🏽👫🏾👫🏿👬🏻👬🏼👬🏽👬🏾👬🏿💏🏻💏🏽💏🏾💏🏿💑🏼💑🏽💑🏾💑🏿#️⃣0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣✋🏻✋🏼✋🏽✋🏾✋🏿✌🏻✌🏼✌✌☝🏻☝🏼☝🏽✊🏻✊🏼✊🏽✊🏾✊🏿✍🏻✍🏼✍🏽✍🏾✍🏿⛹🏻⛹🏼⛹🏽⛹🏾⛹🏿😀😃😄😁😆😅🤣😂🙂🙃😉😊😇🥰😍🤩😘😗😚😙🥲😋😛😜🤪😝🤑🤗🤭🤫🤔🤐🤨😐😑😶😏😒🙄😬🤥😌😔😪🤤😴😷🤒🤕🤢🤮🤧🥵🥶🥴😵🤯🤠🥳🥸😎🤓🧐😕😟🙁😮😯😲😳🥺😦😧😨😰😥😢😭😱😖😣😞😓😩😫🥱😤😡😠🤬😈👿💀💩🤡👹👺👻👽👾🤖😺😸😹😻😼😽🙀😿Line truncated
},
{
"languages": [
"Esperanto"
],
"loremIpsum": "Tuj nu vic' reala, kombi kvanto kontraŭe ut hop, sat ro responde multekosta alternativa. Is devus eksterna antaŭelemento nun, sat peti plus alimaniere am, il minca makro ligfinaĵo muo. Da solstariva tutampleksa mia, faka gardi per do. Trudi prepoziciaĵo sed ol, e cia cento ferio kontraŭi."
},
{
"languages": [
"Interlingua"
],
"loremIpsum": "Sed da russo initialmente principalmente, cadeva introductori duo in, via il contos tempore publicava. Infra traduction finalmente sed al, ha russo commun hereditage sed. Es regno libere international del, via tu sine summarios. Tu ultra vocabulario pro, prime westeuropee tu via. Maximo gymnasios pro da. Unidirectional immediatemente uso le."
},
{
"languages": [
"Quenya"
],
"loremIpsum": "Óla caila estel at. Tólë engë arandur tin ep, us lauta amaurëa náhanemnam tur. Ya ainu cuilë nén, vëaner caimassë nir be. Hui oa turúva amaurëa hlonítë, wilwarin ambarenya nú úil. Sívë nurtalom hat nú, lëo telpë metta laira nó, venë andamunda tál má."
},
{
"languages": [
"Slovio"
],
"loremIpsum": "Leto kuharju so kai. Takak probudijm vi moi. Bil oliv gladju celuvajt es, on mne imenim drugica politikju. Dva maluo svadit ja, iz moi rusju gvorijt lubovijm. Bil no tonkju prekrasju, li cxai razlicxju uzx. Sxkol vnimanie roditelis da vse. Imajsx dolaris ku din, perv idijte cxistju bi din."
},
{
"languages": [
"Sona"
],
"loremIpsum": "On ino pekaba kayosama, bia je denda ikibani, udara pecin ade in. Cai visu purojen universita pe, sun ta cebi ugoba. Ne ipe udara giuma gadio. Co tonni adusinyo izo, mi sir zoro fuga amulio. Zu ika gase finyuri, udara mendi ni vin. Teka panni nefida on via, inri mendi sangenci sen ni, sun ne suko agama kenda. Zi ila veca lire kini, zina para ubeni cai ne."
},
{
"languages": [
"Tokipona"
],
"loremIpsum": "a ijo kute pona waso, suwi mije sijelo wan ni, mun taso sina linja ko. ale jaki lawa en, ijo mi conj sike pimeja, seli pilin kepeken oko ni. li suno unpa lukin ike. conj lukin a oko, anu a olin sijelo. ike toki taso lawa ko. lipu wawa wan mu."
},
{
"languages": [
"Volapük"
],
"loremIpsum": "Frutidol gitavan mutaragran pö tum. Dis nu plekols sümon, vom posä sasenanis us. Nemol-li palelifükons simulans tü cem, kälälolsöd posä zänodü at bod. Els di dotolsöv neodols yulo, kol jutedans laka lemiko of, ye yeb blunedolsöd edasevoy. Päsätükons vomes tum pö, prodi sepülön velna-li deg kü, dil it lecenolsöd leklära taläntis."
},
{
"languages": [
"Thai"
],
"loremIpsum": "แอปเปิล เชฟโปรเจคท์ ฟีด คอร์ป อ่วมแพนดาพะเรอเจ็ต ฮาโลวีนทับซ้อนรีเสิร์ช สเตชัน เอ็นทรานซ์คอรัปชั่นแคร็กเกอร์ สี่แยกล็อบบี้ซิมพันธกิจ แคปซูเอี๋ยสตรอว์เบอร์รี นิรันดร์สมิติเวชดาวน์ สป็อต แทงโก้วาริชศาสตร์ ออร์แกนิค เซ็นเตอร์โอเพ่นแฟรนไชส์ราเมน บร็อกโคลีแมคเคอเรลบูติค ตัวเองสต๊อก โค้ชคอนแทคอพาร์ทเมนต์ เหมยแครกเกอร์รีโมต แอพพริคอทออเดอร์หลวงตาคลิป อัตลักษณ์ฟรุตบ๊อบ วิดีโอแอโรบิค วาไรตี้เยอบีราแคมป์สถาปัตย์ บอมบ์ตุ๊กตุ๊กผลไม้พิซซ่าอัลมอนด์ ตุ๊กช็อค สไลด์ดยุค ทัวร์ เคลียร์มือถือลามะ เทวาธิราชแบล็กวีเจ แบรนด์แอ็คชั่น โกะ ล็อตฮ็อตวัคค์ ลอร์ดฟินิกซ์ยังไงฮวงจุ้ยฟินิกซ์ โอเลี้ยงคาปูชิโนโปรเจ็ค ความหมายปิกอัพมิวสิค คอมเมนท์ฟีดสมิติเวช รีไทร์ท็อปบู๊ท โมจิพิซซ่าซิง ลีกเพลซน็อก ลาเต้ แพ็ค ดีกรี สเปคดีพาร์ทเมนต์ แคร์ตื้บ หมวยรามเทพธัมโมคีตกวี สเตอริโอป๋อหลอจอหงวน พฤหัสรูบิคปูอัดริคเตอร์ พาร์ทเนอร์รีทัช มาร์ชไอติม ม้าหินอ่อน ฮีโร่ บาร์บี้ ทับซ้อนโมเดิร์นคาร์โก้สปอต ลิมูซีนมาร์เก็ตติ้ง ฮัมถูกต้องโปรดิวเซอร์แอดมิชชั่น พาสเจอร์ไรส์โบ้ยเกสต์เฮาส์ บร็อกโคลีนรีแพทย์ ความหมายว่ะสมาพันธ์ แหววเอสเพรสโซอพาร์ทเมนท์ มั้ยนิวส์ สต๊อคท็อปบู๊ท ไนน์เทวาระโงก แบคโฮช็อปชัตเตอร์ ตอกย้ำฮ็อตด็อกตัวตนอัลตราแซ็ก ปอดแหก คอนเซ็ปต์ม้งเวเฟอร์ ซูฮกสเก็ตช์ กีวีวิดีโอ ทัวริสต์ เซรามิก ม้าหินอ่อน แมกกาซีนฟรุตสปอตแชมปิยอง วีเจ สเก็ตช์แฟล็ตแพกเกจกุนซือ แดนเซอร์ไหร่ รันเวย์ปาสกาลโบ้ย ฟีเวอร์มาร์เก็ตคอนเทนเนอร์รัม ฟีเวอร์ เซฟตี้ดีกรี สไตรค์สามช่าดาวน์ โมเดิร์นเทค จิตพิสัย อัลมอนด์ ทิปวโรกาส นายแบบแอลมอนด์วอลล์ แทคติค โอยัวะดาวน์ใช้งานแทงกั๊ก สเตชันฟรุต ริกเตอร์คาราโอเกะ ปาสกาลอิกัวนา ฮัลโหล ไฮบริด พาสปอร์ต แจม ยนตรกรรม มอคค่าเซ็นทรัลซาร์ดีน จูเนียร์ต่อยอดฟอยล์ อัลมอนด์สะบึมวาไรตี้ เทคนิค ดูน่าสนใจขึ้นมากกว่าภาพนิ่ง"
}
]
@@ -20,7 +20,7 @@ export function createToken({
withLowercase ? 'abcdefghijklmopqrstuvwxyz' : '',
withNumbers ? '0123456789' : '',
withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : '',
].join('');
].join(''); ;
return shuffleString(allAlphabet.repeat(length)).substring(0, length);
}
+1 -1
View File
@@ -23,7 +23,7 @@ const decodeInput = ref('Hello%20world%20%3A)');
const decodeOutput = computed(() => withDefaultOnError(() => decodeURIComponent(decodeInput.value), ''));
const decodeValidation = useValidation({
source: decodeInput,
source: encodeInput,
rules: [
{
validator: value => isNotThrowing(() => decodeURIComponent(value)),
+124
View File
@@ -0,0 +1,124 @@
<script setup lang="ts">
import * as monacoEditor from 'monaco-editor';
import type { MonacoEditor } from '@guolao/vue-monaco-editor';
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import JsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
import CssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker';
import HtmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker';
import TsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';
import { useStyleStore } from '@/stores/style.store';
const props = withDefaults(defineProps<EditorProps>(), {
theme: 'vs',
options: () => ({}),
overrideServices: () => ({}),
saveViewState: true,
width: '100%',
height: '100%',
});
const emits = defineEmits<{
(e: 'update:value', value: string | undefined): void
(e: 'beforeMount', monaco: MonacoEditor): void
(e: 'mount', editor: monacoEditor.editor.IStandaloneCodeEditor, monaco: MonacoEditor): void
(e: 'change', value: string | undefined, event: monacoEditor.editor.IModelContentChangedEvent): void
(e: 'validate', markers: monacoEditor.editor.IMarker[]): void
}>();
interface MonacoEnvironment {
getWorker(_: any, label: string): Worker
}
// eslint-disable-next-line @typescript-eslint/no-namespace
declare module globalThis {
let MonacoEnvironment: MonacoEnvironment;
}
const value = useVModel(props, 'value', emits);
globalThis.MonacoEnvironment = {
getWorker(_: any, label: string) {
if (label === 'json') {
return new JsonWorker();
}
if (label === 'css' || label === 'scss' || label === 'less') {
return new CssWorker();
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return new HtmlWorker();
}
if (label === 'typescript' || label === 'javascript') {
return new TsWorker();
}
return new EditorWorker();
},
};
export interface EditorProps {
defaultValue?: string
defaultPath?: string
defaultLanguage?: string
value?: string
language?: string
path?: string
/* === */
theme: 'vs' | string
line?: number
options?: monacoEditor.editor.IStandaloneEditorConstructionOptions
overrideServices?: monacoEditor.editor.IEditorOverrideServices
saveViewState?: boolean
/* === */
width?: number | string
height?: number | string
className?: string
}
monacoEditor.editor.defineTheme('it-tools-dark', {
base: 'vs-dark',
inherit: true,
rules: [],
colors: {
'editor.background': '#00000000',
},
});
monacoEditor.editor.defineTheme('it-tools-light', {
base: 'vs',
inherit: true,
rules: [],
colors: {
'editor.background': '#00000000',
},
});
const styleStore = useStyleStore();
watch(
() => styleStore.isDarkTheme,
isDarkTheme => monacoEditor.editor.setTheme(isDarkTheme ? 'it-tools-dark' : 'it-tools-light'),
{ immediate: true },
);
const attrs = useAttrs();
const inheritedAttrs = { ...attrs, ...props };
</script>
<script lang="ts">
export default {
inheritAttrs: false,
};
</script>
<template>
<vue-monaco-editor
v-bind="inheritedAttrs"
v-model:value="value"
@before-mount="(monaco: MonacoEditor) => emits('beforeMount', monaco)"
@mount="(editor: monacoEditor.editor.IStandaloneCodeEditor, monaco: MonacoEditor) => emits('mount', editor, monaco)"
@change="(value: string | undefined, event: monacoEditor.editor.IModelContentChangedEvent) => emits('change', value, event)"
@validate="(markers: monacoEditor.editor.IMarker[]) => emits('validate', markers)"
/>
</template>
+6 -7
View File
@@ -38,8 +38,7 @@ describe('base64 utils', () => {
it('should throw for incorrect base64 string', () => {
expect(() => base64ToText('a')).to.throw('Incorrect base64 string');
// should not really be false because trimming of space is now implied
// expect(() => base64ToText(' ')).to.throw('Incorrect base64 string');
expect(() => base64ToText(' ')).to.throw('Incorrect base64 string');
expect(() => base64ToText('é')).to.throw('Incorrect base64 string');
// missing final '='
expect(() => base64ToText('bG9yZW0gaXBzdW0')).to.throw('Incorrect base64 string');
@@ -57,17 +56,17 @@ describe('base64 utils', () => {
it('should return false for incorrect base64 string', () => {
expect(isValidBase64('a')).to.eql(false);
expect(isValidBase64(' ')).to.eql(false);
expect(isValidBase64('é')).to.eql(false);
expect(isValidBase64('data:text/plain;notbase64,YQ==')).to.eql(false);
// missing final '='
expect(isValidBase64('bG9yZW0gaXBzdW0')).to.eql(false);
});
it('should return true for untrimmed correct base64 string', () => {
expect(isValidBase64('bG9yZW0gaXBzdW0= ')).to.eql(true);
expect(isValidBase64(' LTE=')).to.eql(true);
expect(isValidBase64(' YQ== ')).to.eql(true);
expect(isValidBase64(' ')).to.eql(true);
it('should return false for untrimmed correct base64 string', () => {
expect(isValidBase64('bG9yZW0gaXBzdW0= ')).to.eql(false);
expect(isValidBase64(' LTE=')).to.eql(false);
expect(isValidBase64(' YQ== ')).to.eql(false);
});
});
+4 -7
View File
@@ -1,9 +1,7 @@
import { Base64 } from 'js-base64';
export { textToBase64, base64ToText, isValidBase64, removePotentialDataAndMimePrefix };
function textToBase64(str: string, { makeUrlSafe = false }: { makeUrlSafe?: boolean } = {}) {
const encoded = Base64.encode(str);
const encoded = window.btoa(str);
return makeUrlSafe ? makeUriSafe(encoded) : encoded;
}
@@ -18,7 +16,7 @@ function base64ToText(str: string, { makeUrlSafe = false }: { makeUrlSafe?: bool
}
try {
return Base64.decode(cleanStr);
return window.atob(cleanStr);
}
catch (_) {
throw new Error('Incorrect base64 string');
@@ -36,11 +34,10 @@ function isValidBase64(str: string, { makeUrlSafe = false }: { makeUrlSafe?: boo
}
try {
const reEncodedBase64 = Base64.fromUint8Array(Base64.toUint8Array(cleanStr));
if (makeUrlSafe) {
return removePotentialPadding(reEncodedBase64) === cleanStr;
return removePotentialPadding(window.btoa(window.atob(cleanStr))) === cleanStr;
}
return reEncodedBase64 === cleanStr.replace(/\s/g, '');
return window.btoa(window.atob(cleanStr)) === cleanStr;
}
catch (err) {
return false;