commit cbec2e1968e0ebf0e268369b101058fdffb5528b Author: admin Date: Wed Aug 20 21:44:48 2025 +0200 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4c6c48 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.vscode +.idea +dist +node_modules diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..fc59ab5 --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.vscode +.idea +node_modules +src +.gitignore +tsconfig.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6d92e36 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,30 @@ +{ + "name": "@apihub24/repository", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@apihub24/repository", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "typescript": "^5.9.2" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..dc28fe2 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "@apihub24/repository", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "types": "./dist/index.d.ts", + "scripts": { + "build": "tsc" + }, + "devDependencies": { + "typescript": "^5.9.2" + }, + "keywords": [], + "author": { + "email": "markusmorgenstern87@outlook.de", + "name": "Markus Morgenstern", + "url": "https://git.apihub24.de/" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..5ed29eb --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export * from "./repository"; diff --git a/src/repository.ts b/src/repository.ts new file mode 100644 index 0000000..c2bdda8 --- /dev/null +++ b/src/repository.ts @@ -0,0 +1,5 @@ +export interface Repository { + getBy(filter: (model: TModel) => boolean): Promise; + save(models: TModel[]): Promise; + deleteBy(filter: (model: TModel) => boolean): Promise; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..99c400b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "nodenext", + "moduleResolution": "nodenext", + "resolvePackageJsonExports": true, + "esModuleInterop": true, + "isolatedModules": true, + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2023", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": true, + "forceConsistentCasingInFileNames": true, + "noImplicitAny": false, + "strictBindCallApply": false, + "noFallthroughCasesInSwitch": false + }, + "include": ["./src"] +}