+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tools/energy-computer/index.ts b/src/tools/energy-computer/index.ts
new file mode 100644
index 00000000..25d0cc1b
--- /dev/null
+++ b/src/tools/energy-computer/index.ts
@@ -0,0 +1,12 @@
+import { Engine } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Energy Consumption and Expense Computer',
+ path: '/energy-computer',
+ description: 'Compute energy consumption and expense',
+ keywords: ['energy', 'expense', 'watt', 'kwh', 'computer'],
+ component: () => import('./energy-computer.vue'),
+ icon: Engine,
+ createdAt: new Date('2024-08-15'),
+});
diff --git a/src/tools/index.ts b/src/tools/index.ts
index ed728e8e..cbba0f35 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -4,9 +4,9 @@ import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as jsonEditor } from './json-editor';
import { tool as liveCode } from './live-code';
import { tool as emailNormalizer } from './email-normalizer';
+import { tool as energyComputer } from './energy-computer';
import { tool as peerShare } from './peer-share';
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 xmlToJson } from './xml-to-json';
@@ -177,7 +177,12 @@ export const toolsByCategory: ToolCategory[] = [
},
{
name: 'Measurement',
- components: [chronometer, temperatureConverter, benchmarkBuilder],
+ components: [
+ chronometer,
+ temperatureConverter,
+ benchmarkBuilder,
+ energyComputer,
+ ],
},
{
name: 'Text',
diff --git a/src/tools/json-editor/json-editor-vue.d.ts b/src/tools/json-editor/json-editor-vue.d.ts
new file mode 100644
index 00000000..01b4ea89
--- /dev/null
+++ b/src/tools/json-editor/json-editor-vue.d.ts
@@ -0,0 +1,3 @@
+declare module 'json-editor-vue'{
+
+}
\ No newline at end of file
diff --git a/src/tools/list-converter/list-converter.e2e.spec.ts b/src/tools/list-converter/list-converter.e2e.spec.ts
index ed2b7108..d71bf827 100644
--- a/src/tools/list-converter/list-converter.e2e.spec.ts
+++ b/src/tools/list-converter/list-converter.e2e.spec.ts
@@ -21,7 +21,7 @@ test.describe('Tool - List converter', () => {
expect(result.trim()).toEqual('1, 2, 3, 4, 5');
});
- test('Duplicates should be removed, list should be sorted and prefix and suffix list items', async ({ page }) => {
+ test('Duplicates should be removed items', async ({ page }) => {
await page.getByTestId('input').fill(`1
2
2
@@ -30,10 +30,7 @@ test.describe('Tool - List converter', () => {
3
5`);
await page.getByTestId('removeDuplicates').check();
- await page.getByTestId('itemPrefix').fill('\'');
- await page.getByTestId('itemSuffix').fill('\'');
-
const result = await page.getByTestId('area-content').innerText();
- expect(result.trim()).toEqual('\'1\', \'2\', \'4\', \'3\', \'5\'');
+ expect(result.trim()).toEqual('1, 2, 4, 3, 5');
});
});
diff --git a/src/tools/otp-code-generator-and-validator/otp.service.test.ts b/src/tools/otp-code-generator-and-validator/otp.service.test.ts
index b0e9327d..75a98f9f 100644
--- a/src/tools/otp-code-generator-and-validator/otp.service.test.ts
+++ b/src/tools/otp-code-generator-and-validator/otp.service.test.ts
@@ -108,7 +108,7 @@ describe('otp functions', () => {
describe('buildKeyUri', () => {
it('build a key uri string', () => {
expect(buildKeyUri({ secret: 'JBSWY3DPEHPK3PXP' })).to.eql(
- 'otpauth://totp/godev-run:demo-user?issuer=godev-run&secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&period=30',
+ 'otpauth://totp/godev.run:demo-user?issuer=godev.run&secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&period=30',
);
expect(
diff --git a/src/tools/otp-code-generator-and-validator/otp.service.ts b/src/tools/otp-code-generator-and-validator/otp.service.ts
index 534ffd7c..d64642a3 100644
--- a/src/tools/otp-code-generator-and-validator/otp.service.ts
+++ b/src/tools/otp-code-generator-and-validator/otp.service.ts
@@ -107,7 +107,7 @@ function verifyTOTP({
function buildKeyUri({
secret,
- app = 'GoDev.Run',
+ app = 'godev.run',
account = 'demo-user',
algorithm = 'SHA1',
digits = 6,
diff --git a/src/tools/text-to-binary/text-to-binary.e2e.spec.ts b/src/tools/text-to-binary/text-to-binary.e2e.spec.ts
index eef5f719..9f371a31 100644
--- a/src/tools/text-to-binary/text-to-binary.e2e.spec.ts
+++ b/src/tools/text-to-binary/text-to-binary.e2e.spec.ts
@@ -13,11 +13,11 @@ test.describe('Tool - Text to ASCII binary', () => {
await page.getByTestId('text-to-binary-input').fill('godev.run');
const binary = await page.getByTestId('text-to-binary-output').inputValue();
- expect(binary).toEqual('01101001 01110100 00101101 01110100 01101111 01101111 01101100 01110011');
+ expect(binary).toEqual('01100111 01101111 01100100 01100101 01110110 00101110 01110010 01110101 01101110');
});
test('Binary to text conversion', async ({ page }) => {
- await page.getByTestId('binary-to-text-input').fill('01101001 01110100 00101101 01110100 01101111 01101111 01101100 01110011');
+ await page.getByTestId('binary-to-text-input').fill('01100111 01101111 01100100 01100101 01110110 00101110 01110010 01110101 01101110');
const text = await page.getByTestId('binary-to-text-output').inputValue();
expect(text).toEqual('godev.run');
diff --git a/src/tools/text-to-unicode/text-to-unicode.e2e.spec.ts b/src/tools/text-to-unicode/text-to-unicode.e2e.spec.ts
index e70a96d1..c429c73e 100644
--- a/src/tools/text-to-unicode/text-to-unicode.e2e.spec.ts
+++ b/src/tools/text-to-unicode/text-to-unicode.e2e.spec.ts
@@ -13,11 +13,11 @@ test.describe('Tool - Text to Unicode', () => {
await page.getByTestId('text-to-unicode-input').fill('godev.run');
const unicode = await page.getByTestId('text-to-unicode-output').inputValue();
- expect(unicode).toEqual('it-tools');
+ expect(unicode).toEqual('godev.run');
});
test('Unicode to text conversion', async ({ page }) => {
- await page.getByTestId('unicode-to-text-input').fill('it-tools');
+ await page.getByTestId('unicode-to-text-input').fill('godev.run');
const text = await page.getByTestId('unicode-to-text-output').inputValue();
expect(text).toEqual('godev.run');