chore: coverage badge and CI
fix: remove logs fix: examples fix: exmaples fix: examples fix: exmaples fix: lib
fix: remove logs fix: examples fix: exmaples fix: examples fix: exmaples fix: lib
name: blockfrost-js
name: blockfrost-js-CIcko
on: [push]
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn run lint
- run: yarn run type-check
- run: PROJECT_ID=${{ secrets.PROJECT_ID }} PROJECT_ID_IPFS=${{ secrets.PROJECT_ID_IPFS }} yarn run test
- run: yarn run build
- run: yarn lint
- run: yarn type-check
- run: yarn test
- run: yarn build
- run: yarn coverage-ci
 [](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js)  <img src="https://github.com/blockfrost/blockfrost-js/blob/master/packages/blockfrost-js/docs/badge-coverage.svg" /> <a href="https://fivebinaries.com/"><img src="https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square" /></a>
 [](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js)  <img src="https://github.com/blockfrost/blockfrost-js/blob/master/packages/blockfrost-js/coverage-badge.svg" /> <a href="https://fivebinaries.com/"><img src="https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square" /></a>
<img src="https://blockfrost.io/images/logo.svg" width="250" align="right" height="90">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="116" height="20" role="img" aria-label="Coverage: 91.84%"><title>Coverage: 91.84%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="116" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="53" height="20" fill="#4c1"/><rect width="116" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="885" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">91.84%</text><text x="885" y="140" transform="scale(.1)" fill="#fff" textLength="430">91.84%</text></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="116" height="20" role="img" aria-label="Coverage: 92.34%"><title>Coverage: 92.34%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="116" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="53" height="20" fill="#4c1"/><rect width="116" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="885" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">92.34%</text><text x="885" y="140" transform="scale(.1)" fill="#fff" textLength="430">92.34%</text></g></svg>
\ No newline at end of file
"declaration": true,
"importHelpers": true,
"module": "commonjs",
"outDir": "lib",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true,
},
"include": ["src/**/*"]
}
cacheKey: 8
"@blockfrost/blockfrost-js@file:../../lib::locator=%40blockfrost%2Fexample-basic%40workspace%3A.":
version: 5.1.0
resolution: "@blockfrost/blockfrost-js@file:../../lib#../../lib::hash=1dc031&locator=%40blockfrost%2Fexample-basic%40workspace%3A."
version: 5.1.1
resolution: "@blockfrost/blockfrost-js@file:../../lib#../../lib::hash=f46d94&locator=%40blockfrost%2Fexample-basic%40workspace%3A."
dependencies:
"@blockfrost/openapi": ^0.1.45
"@blockfrost/blockfrost-utils": 2.0.0
"@blockfrost/openapi": 0.1.49
"@emurgo/cardano-serialization-lib-nodejs": ^10.2.0
"@emurgo/cip14-js": 3.0.1
bottleneck: ^2.19.5
form-data: ^4.0.0
got: ^11.8.5
checksum: b32db57553de1a486d0e8e4ddd8a2f2e3f5a80fda53c7c1f0a3c3b4d39d11288d4f95ae793da3aebc48aa2da618032b99509471e75f70984ee25c4841354d7ab
checksum: 5421474b2bedaf70e5e6c872677dedb0649ac69e65bec0a8f87aae5b15367241ac5237ab842776a87d8b52da9f5ecf5d4b4d9528ca45b260e390353b1c4f28cc
languageName: node
linkType: hard
"@blockfrost/blockfrost-utils@npm:2.0.0":
version: 2.0.0
resolution: "@blockfrost/blockfrost-utils@npm:2.0.0"
dependencies:
"@emurgo/cardano-serialization-lib-nodejs": ^11.0.5
bech32: ^2.0.0
yaml: ^2.1.1
checksum: 51e613d14e792a957e339bfcf0e428127e659a199a4a6a3deff41751155befb1869c3d6da29afab11a2bd431dfa4839b0e812e8c38eb89b1584661a092bf8885
languageName: node
linkType: hard
languageName: unknown
linkType: soft
"@blockfrost/openapi@npm:^0.1.45":
"@blockfrost/openapi@npm:0.1.49":
version: 0.1.49
resolution: "@blockfrost/openapi@npm:0.1.49"
dependencies:
languageName: node
linkType: hard
"@emurgo/cardano-serialization-lib-nodejs@npm:^11.0.5":
version: 11.1.1
resolution: "@emurgo/cardano-serialization-lib-nodejs@npm:11.1.1"
checksum: c63b5fa4b75714c042b3a689c71f24b2b4812502236b0e82c55230e84804a5fbe63558bfd0911aa52e59aed535ef7259669edec93259e2f5438fa92684276b1d
languageName: node
linkType: hard
"@emurgo/cip14-js@npm:3.0.1":
version: 3.0.1
resolution: "@emurgo/cip14-js@npm:3.0.1"
languageName: node
linkType: hard
"bech32@npm:2.0.0":
"bech32@npm:2.0.0, bech32@npm:^2.0.0":
version: 2.0.0
resolution: "bech32@npm:2.0.0"
checksum: fa15acb270b59aa496734a01f9155677b478987b773bf701f465858bf1606c6a970085babd43d71ce61895f1baa594cb41a2cd1394bd2c6698f03cc2d811300e
languageName: node
linkType: hard
"yaml@npm:^2.1.3":
"yaml@npm:^2.1.1, yaml@npm:^2.1.3":
version: 2.1.3
resolution: "yaml@npm:2.1.3"
checksum: 91316062324a93f9cb547469092392e7d004ff8f70c40fecb420f042a4870b2181557350da56c92f07bd44b8f7a252b0be26e6ade1f548e1f4351bdd01c9d3c7
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true,
},
"include": ["src/**/*"]
}
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true,
},
"include": ["src/**/*"]
}
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"target": "es2017"
"target": "es2017",
"skipLibCheck": true,
},
"include": ["src/**/*"]
}
"docs": "yarn typedoc ./src/index.ts --theme ./node_modules/typedoc-github-wiki-theme/dist",
"lint": "eslint ./src/**/*.ts",
"prepublishOnly": "yarn build",
"test": "vitest",
"test": "vitest --silent",
"type-check": "tsc --project ./tsconfig.types.json",
"coverage": "vitest run --coverage"
"make-badge": "make-coverage-badge --output-path='./coverage-badge.svg'",
"coverage": "vitest run --coverage --silent && make-badge",
"coverage-ci": "vitest run --coverage --silent"
},
"dependencies": {
"@blockfrost/blockfrost-utils": "2.0.0",
import { getLimiter } from './utils/limiter';
// must be require, import would include package.json to the output dir together with "src" dir breaking dir hierarchy
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../package.json');
const packageJson = require('./package.json');
class BlockFrostAPI {
apiUrl: string;
import { getInstance } from './utils/got';
import { getLimiter } from './utils/limiter';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../package.json');
const packageJson = require('./package.json');
class BlockFrostIPFS {
apiUrl: string;
afterEach(() => server.resetHandlers());
test('IPFS flow', async () => {
console.log('bbbbbbb');
console.log('aaa', `${__dirname}/../../fixtures/ipfs/img.svg`);
const addedObject = await IPFS.add(
`${__dirname}/../../fixtures/ipfs/img.svg`,
);
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"rootDir": "src",
},
"lib": ["es2015"],
"include": ["./src/**/*", "./test/index.d.ts"],
"include": ["./src/**/*", "./test/index.d.ts", "../package.json"],
"exclude": ["./src/types/OpenApi.ts", "node_modules"]
}
testTimeout: 5000,
mockReset: true,
coverage: {
reporter: ['json-summary'],
include: ['src'],
},
include: ['./test/tests/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
A flaky test run was discovering this and we seemingly had forgotten to add this schema when introducing the IgnoredInitTx constructor.
Fixes #348
Fixes #347
Fixes #412
Fixes #347
Fixes #348
Fixes #347
From https://github.com/input-output-hk/ouroboros-network at ff2331f0d254944f7c375078e6a3eb8e4f8770db
From https://github.com/input-output-hk/ouroboros-network at ff2331f0d254944f7c375078e6a3eb8e4f8770db
Fixes #347
Fixes #347
Fixes #347