Skip to content

Commit

Permalink
feat(new tool): JWT Generator
Browse files Browse the repository at this point in the history
Fix #1309
  • Loading branch information
sharevb committed Jan 12, 2025
1 parent 08d977b commit 791bca4
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
import { tool as base64StringConverter } from './base64-string-converter';
import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as emailNormalizer } from './email-normalizer';
import { tool as jwtGenerator } from './jwt-generator';

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

Expand Down Expand Up @@ -130,6 +131,7 @@ export const toolsByCategory: ToolCategory[] = [
otpCodeGeneratorAndValidator,
mimeTypes,
jwtParser,
jwtGenerator,
keycodeInfo,
slugifyString,
htmlWysiwygEditor,
Expand Down
29 changes: 29 additions & 0 deletions src/tools/jwt-generator/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Key } from '@vicons/tabler';
import { defineTool } from '../tool';

export const tool = defineTool({
name: 'JWT Generator',
path: '/jwt-generator',
description: 'JWT Token generator and editor',
keywords: [
'jwt',
'generator',
'editor',
'encode',
'typ',
'alg',
'iss',
'sub',
'aud',
'exp',
'nbf',
'iat',
'jti',
'json',
'web',
'token',
],
component: () => import('./jwt-generator.vue'),
icon: Key,
createdAt: new Date('2024-08-15'),
});
15 changes: 15 additions & 0 deletions src/tools/jwt-generator/jwt-generator.e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { test, expect } from '@playwright/test';

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.e2e.spec.ts

View workflow job for this annotation

GitHub Actions / ci

Member 'expect' of the import declaration should be sorted alphabetically

test.describe('Tool - Jwt generator', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/jwt-generator');
});

test('Has correct title', async ({ page }) => {
await expect(page).toHaveTitle('Jwt generator - IT Tools');
});

test('', async ({ page }) => {

Check warning on line 12 in src/tools/jwt-generator/jwt-generator.e2e.spec.ts

View workflow job for this annotation

GitHub Actions / ci

'page' is defined but never used. Allowed unused args must match /^_/u

});
});

Check failure on line 15 in src/tools/jwt-generator/jwt-generator.e2e.spec.ts

View workflow job for this annotation

GitHub Actions / ci

Newline required at end of file but not found
6 changes: 6 additions & 0 deletions src/tools/jwt-generator/jwt-generator.service.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, describe, it } from 'vitest';

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

Expected 1 empty line after import statement not followed by another import

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

'expect' is defined but never used

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

Member 'describe' of the import declaration should be sorted alphabetically

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

'describe' is defined but never used

Check failure on line 1 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

'it' is defined but never used
// import { } from './jwt-generator.service';
//
// describe('jwt-generator', () => {
//
// })

Check failure on line 6 in src/tools/jwt-generator/jwt-generator.service.test.ts

View workflow job for this annotation

GitHub Actions / ci

Newline required at end of file but not found
Empty file.
12 changes: 12 additions & 0 deletions src/tools/jwt-generator/jwt-generator.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div>
Lorem ipsum
</div>
</template>

<script setup lang="ts">

Check failure on line 7 in src/tools/jwt-generator/jwt-generator.vue

View workflow job for this annotation

GitHub Actions / ci

`<script>` is empty. Empty block is not allowed

Check failure on line 7 in src/tools/jwt-generator/jwt-generator.vue

View workflow job for this annotation

GitHub Actions / ci

'<script setup lang=ts>' should be above '<template>' on line 1
</script>

<style lang="less" scoped>
</style>

0 comments on commit 791bca4

Please sign in to comment.