Skip to content

Commit

Permalink
dont publish tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romanzy313 committed Dec 6, 2023
1 parent 38df26c commit 79d9472
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 29 deletions.
6 changes: 5 additions & 1 deletion examples/elysiajs-htmx/plugins/staticPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
import { NotFoundError, Elysia } from 'elysia';

import { readdir, stat } from 'fs/promises';
Expand Down Expand Up @@ -151,7 +153,9 @@ export const staticPlugin = async <Prefix extends string = '/prefix'>(
)
)
app
.onError(() => {})
.onError(() => {
//
})
.get(`${prefix}/*`, async ({ params }) => {
const file = `${assets}/${(params as any)['*']}`;

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@romanzy/otp",
"description": "Simple and powerful way to implement your own OTP workflows",
"version": "0.7.0",
"version": "0.7.1",
"exports": {
".": "./dist/index.js",
"./helpers": "./dist/helpers.js",
Expand All @@ -25,7 +25,7 @@
"test:publish": "pnpm prepublishOnly && pnpm pack",
"prepublishOnly": "pnpm clean && pnpm prettier && pnpm lint && pnpm test && pnpm build",
"clean": "rimraf -rf ./dist && rimraf -rf ./types && rimraf -rf ./*-*.tgz",
"format": "pnpm clean && pnpm prettier && pnpm lint",
"format": "pnpm prettier && pnpm lint",
"lint": "eslint . --ext .ts --fix",
"lint:dry": "eslint . --ext .ts",
"prettier": "prettier --config .prettierrc 'src/**/*.ts' --write",
Expand Down
1 change: 0 additions & 1 deletion src/storage/UnstorageAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { OtpError } from '../OtpError';
import memoryDriver from 'unstorage/drivers/memory';
import { UnstorageAdapter } from './UnstorageAdapter';
import { Driver } from 'unstorage';
import { MemoryStorage } from './MemoryStorage';

let driver: Driver;
let service: OtpService;
Expand Down
23 changes: 0 additions & 23 deletions src/storage/UnstorageAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,3 @@ export class UnstorageAdapter implements OtpStorage {
await this.driver.removeItem!(key, {});
}
}

// old impl below:

// import type { Storage } from 'unstorage';
// export class UnstorageConnector implements OtpStorage {
// constructor(private Storage: Storage) {
// // if (!driver.setItem)
// // throw new Error(`Driver ${driver.name} does not su`);
// }
// set(key: string, value: string, ttl: number): Promise<void> {
// return this.Storage.setItem(key, value, {
// ttl,
// });
// }
// get(key: string): Promise<string | null> {
// return this.Storage.getItem(key).then((val) =>
// val === null ? null : val.toString()
// );
// }
// invalidate(key: string): Promise<void> {
// return this.Storage.removeItem(key);
// }
// }
1 change: 0 additions & 1 deletion src/utils/encryptor.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { describe, it, expect } from 'vitest';
import { makeCustomEncryptor, makeSubtleEncryptor } from './encryptor';
import crypto from 'crypto';
describe('encryption', () => {
it('works', () => {
const e = makeCustomEncryptor('0'.repeat(32), 'aes-256-gcm');
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
"strict": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "types", "src/**/*.spec.ts"]
"exclude": [
"node_modules",
"dist",
"types",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

0 comments on commit 79d9472

Please sign in to comment.