Skip to content

Commit 0d9f6aa

Browse files
committed
feat(new tool): jq/JSONPath tester
Fix CorentinTh#273 and CorentinTh#672
1 parent 318fb6e commit 0d9f6aa

File tree

6 files changed

+202
-18
lines changed

6 files changed

+202
-18
lines changed

components.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ declare module '@vue/runtime-core' {
107107
Ipv4RangeExpander: typeof import('./src/tools/ipv4-range-expander/ipv4-range-expander.vue')['default']
108108
Ipv4SubnetCalculator: typeof import('./src/tools/ipv4-subnet-calculator/ipv4-subnet-calculator.vue')['default']
109109
Ipv6UlaGenerator: typeof import('./src/tools/ipv6-ula-generator/ipv6-ula-generator.vue')['default']
110+
JqTester: typeof import('./src/tools/jq-tester/jq-tester.vue')['default']
110111
JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default']
111112
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
112113
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
@@ -133,18 +134,16 @@ declare module '@vue/runtime-core' {
133134
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
134135
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
135136
NEllipsis: typeof import('naive-ui')['NEllipsis']
136-
NForm: typeof import('naive-ui')['NForm']
137-
NFormItem: typeof import('naive-ui')['NFormItem']
138137
NH1: typeof import('naive-ui')['NH1']
139138
NH3: typeof import('naive-ui')['NH3']
140139
NIcon: typeof import('naive-ui')['NIcon']
141-
NInputNumber: typeof import('naive-ui')['NInputNumber']
142140
NLayout: typeof import('naive-ui')['NLayout']
143141
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
144142
NMenu: typeof import('naive-ui')['NMenu']
143+
NRadio: typeof import('naive-ui')['NRadio']
144+
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
145145
NScrollbar: typeof import('naive-ui')['NScrollbar']
146-
NSlider: typeof import('naive-ui')['NSlider']
147-
NSwitch: typeof import('naive-ui')['NSwitch']
146+
NSpace: typeof import('naive-ui')['NSpace']
148147
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
149148
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
150149
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@tiptap/starter-kit": "2.1.6",
4343
"@tiptap/vue-3": "2.0.3",
4444
"@types/figlet": "^1.5.8",
45+
"@types/jsonpath": "^0.2.4",
4546
"@vicons/material": "^0.12.0",
4647
"@vicons/tabler": "^0.12.0",
4748
"@vueuse/core": "^10.3.0",
@@ -65,8 +66,10 @@
6566
"highlight.js": "^11.7.0",
6667
"iarna-toml-esm": "^3.0.5",
6768
"ibantools": "^4.3.3",
69+
"jq-wasm": "^0.0.9",
6870
"js-base64": "^3.7.6",
6971
"json5": "^2.2.3",
72+
"jsonpath": "^1.1.1",
7073
"jwt-decode": "^3.1.2",
7174
"libphonenumber-js": "^1.10.28",
7275
"lodash": "^4.17.21",

pnpm-lock.yaml

Lines changed: 98 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tools/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
22
import { tool as base64StringConverter } from './base64-string-converter';
33
import { tool as basicAuthGenerator } from './basic-auth-generator';
44
import { tool as emailNormalizer } from './email-normalizer';
5+
import { tool as jqTester } from './jq-tester';
56

67
import { tool as asciiTextDrawer } from './ascii-text-drawer';
78

@@ -154,6 +155,7 @@ export const toolsByCategory: ToolCategory[] = [
154155
xmlFormatter,
155156
yamlViewer,
156157
emailNormalizer,
158+
jqTester,
157159
],
158160
},
159161
{

src/tools/jq-tester/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Braces } from '@vicons/tabler';
2+
import { defineTool } from '../tool';
3+
4+
export const tool = defineTool({
5+
name: 'Jq/JSONPath Tester',
6+
path: '/jq-tester',
7+
description: 'Test jq/JSONPath expression against a JSON content',
8+
keywords: ['jq', 'json', 'tester', 'jsonpath'],
9+
component: () => import('./jq-tester.vue'),
10+
icon: Braces,
11+
createdAt: new Date('2024-08-15'),
12+
});

0 commit comments

Comments
 (0)