Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/net/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MIT License & © Jared Wray

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
339 changes: 339 additions & 0 deletions packages/net/README.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions packages/net/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "@cacheable/net",
"version": "1.0.0",
"description": "High Performance Network Caching for Node.js with fetch, request, http 1.1, and http 2 support",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaredwray/cacheable.git",
"directory": "packages/cacheable"
},
"author": "Jared Wray <me@jaredwray.com>",
"license": "MIT",
"private": false,
"scripts": {
"build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
"prepublish": "pnpm build",
"test": "xo --fix && vitest run --coverage",
"test:ci": "xo && vitest run --coverage",
"clean": "rimraf ./dist ./coverage ./node_modules"
},
"devDependencies": {
"@faker-js/faker": "^9.9.0",
"@types/eslint": "^9.6.1",
"@types/node": "^24.1.0",
"@vitest/coverage-v8": "^3.2.4",
"rimraf": "^6.0.1",
"tsup": "^8.5.0",
"typescript": "^5.8.3",
"vitest": "^3.2.4",
"xo": "^1.2.1"
},
"dependencies": {
"cacheable": "workspace:^",
"undici": "^7.13.0"
},
"keywords": [
"cacheable",
"http caching",
"fetch caching",
"request caching",
"http 1.1 caching",
"http 2 caching",
"dns caching",
"whois caching",
"high performance",
"layer 1 caching",
"layer 2 caching",
"distributed caching",
"keyv",
"expiration",
"CacheableMemory",
"distributed sync",
"secondary store",
"primary store",
"cache statistics",
"layered caching",
"fault tolerant",
"in-memory cache",
"distributed cache",
"lru",
"multi-tier cache"
],
"files": [
"dist",
"LICENSE"
]
}
Empty file added packages/net/src/index.ts
Empty file.
4 changes: 4 additions & 0 deletions packages/net/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

import {describe, test, expect} from 'vitest';
import {faker} from '@faker-js/faker';

26 changes: 26 additions & 0 deletions packages/net/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"baseUrl": "./src", /* Specify the base directory to resolve non-relative module names. */

/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */

/* Interop Constraints */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */

/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */

/* Completeness */
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
"lib": [
"ESNext", "DOM"
]
}
}
17 changes: 17 additions & 0 deletions packages/net/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {defineConfig} from 'vitest/config';

export default defineConfig({
test: {
slowTestThreshold: 750,
coverage: {
reporter: ['json', 'text', 'lcov'],
exclude: [
'test',
'src/cacheable-item-types.ts',
'vitest.config.ts',
'dist',
'node_modules',
],
},
},
});
Loading