-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
829 additions
and
5,892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,59 @@ | ||
{ | ||
"version": "0.0.2-alpha", | ||
"version": "0.0.14-alpha", | ||
"license": "GPL-3.0-only", | ||
"main": "dist/winter-cardano.cjs.production.min.js", | ||
"module": "dist/winter-cardano.esm.js", | ||
"typings": "dist/index.d.ts", | ||
"type": "module", | ||
"types": "./dist/index.d.ts", | ||
"typings": "./dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
"./dist", | ||
"./src" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/winter-cardano.cjs", | ||
"default": "./dist/winter-cardano.js" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"format": "prettier --log-level silent --write src/**/*.ts test/**/*.ts", | ||
"clean": "rm -r dist/*", | ||
"build": "vite build", | ||
"lint": "tsdx lint src", | ||
"format": "prettier --log-level log --write src/**/*.ts tests/**/*.ts", | ||
"test": "vitest run", | ||
"fix:lint": "eslint ./ --ext .ts --fix", | ||
"test:lint": "eslint ./ --ext .ts", | ||
"prepare": "tsdx build", | ||
"size": "size-limit", | ||
"analyze": "size-limit --why" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "tsdx lint" | ||
} | ||
"release": "npm run build && npm publish" | ||
}, | ||
"name": "winter-cardano", | ||
"author": "Zengate", | ||
"description": "TypeScript implementation of the WINTER traceability protocol for Cardano blockchain.", | ||
"size-limit": [ | ||
{ | ||
"path": "dist/winter-cardano.cjs.production.min.js", | ||
"limit": "10 KB" | ||
}, | ||
{ | ||
"path": "dist/winter-cardano.esm.js", | ||
"limit": "10 KB" | ||
} | ||
], | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "^8.2.6", | ||
"@types/node": "^20.10.7", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.18.0", | ||
"esbuild": "^0.20.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-functional": "^6.0.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
"husky": "^8.0.3", | ||
"eslint-plugin-import": "^2.29.1", | ||
"prettier": "^3.0.3", | ||
"size-limit": "^8.2.6", | ||
"tsdx": "^0.14.1", | ||
"tslib": "^2.6.1", | ||
"rollup": "^4.9.6", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"typescript": "^5.3.3", | ||
"typescript-eslint-parser": "^22.0.0", | ||
"vitest": "^0.34.2" | ||
"vite": "^5.0.12", | ||
"vite-plugin-dts": "^3.7.2", | ||
"vite-tsconfig-paths": "^4.3.1", | ||
"vitest": "^1.2.2" | ||
}, | ||
"dependencies": { | ||
"lucid-cardano": "^0.10.7" | ||
"lucid-cardano": "^0.10.7", | ||
"tsx": "^4.7.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './fee'; | ||
export * from './koios/api'; | ||
export * from './models'; | ||
export * from './events'; | ||
export * from './fee'; | ||
export * from './plutus'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './event.types'; | ||
export * from './koios.types'; | ||
export * from './plutus.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
{ | ||
"compilerOptions": { | ||
// "incremental": true, | ||
"rootDir": "./src", | ||
"strictPropertyInitialization": false, | ||
"target": "ESNext", | ||
"moduleResolution": "Node", | ||
"module": "ESNext", | ||
"declaration": true, | ||
"inlineSourceMap": false, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"strict": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"traceResolution": false, | ||
"listEmittedFiles": false, | ||
"sourceMap": true, | ||
"skipLibCheck": true, | ||
"listFiles": false, | ||
"pretty": true, | ||
"lib": ["ESNext", "DOM"], | ||
"typeRoots": ["node_modules/@types"], | ||
"baseUrl": ".", | ||
"paths": { | ||
"_test-vectors": ["./packages/_test-vectors/"] | ||
} | ||
|
||
"target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ | ||
"lib": ["ES2022", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ | ||
"module": "ES2022", /* Specify what module code is generated. */ | ||
"rootDir": "src", /* Specify the root folder within your source files. */ | ||
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ | ||
"resolveJsonModule": true, /* Enable importing .json files. */ | ||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ | ||
"declaration": false, /* 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. */ | ||
// "noEmit": true, /* Disable emitting files from a compilation. */ | ||
"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. */ | ||
"noUnusedLocals": false, | ||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": false, /* Check for class properties that are declared but not set in the constructor. */ | ||
"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
}, | ||
"compileOnSave": false, | ||
"exclude": ["**/node_modules", "**/dist", "test"] | ||
"include": [ | ||
"src/**.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { basename, extname } from 'node:path' | ||
|
||
import { defineConfig } from 'vite' | ||
import dts from 'vite-plugin-dts' | ||
import tsconfigPaths from 'vite-tsconfig-paths' | ||
// @ts-ignore | ||
import pkg from './package.json' assert { type: 'json' } | ||
|
||
const defaultExport = pkg.exports['.'].default | ||
const entryName = basename(defaultExport, extname(defaultExport)) | ||
|
||
export default defineConfig(({ mode }) => ({ | ||
build: { | ||
lib: { | ||
entry: { | ||
[entryName]: 'src/index.ts' | ||
}, | ||
formats: ['cjs', 'es'] | ||
}, | ||
rollupOptions: { | ||
external: [ | ||
...Object.keys(pkg.dependencies), // Use package.json dependencies as externals | ||
] | ||
}, | ||
sourcemap: true, | ||
minify: true | ||
}, | ||
plugins: [tsconfigPaths(), dts()], | ||
define: { | ||
'import.meta.vitest': 'undefined', | ||
}, | ||
test: { | ||
includeSource: ['src/**/*.{js,ts}'], | ||
coverage: { | ||
enabled: true, | ||
reporter: ['html', 'json', 'text'], | ||
}, | ||
}, | ||
})) |
Oops, something went wrong.