Gathering detailed insights and metrics for @har-sdk/core
Gathering detailed insights and metrics for @har-sdk/core
Gathering detailed insights and metrics for @har-sdk/core
Gathering detailed insights and metrics for @har-sdk/core
npm install @har-sdk/core
Typescript
Module System
Node Version
NPM Version
82.2
Supply Chain
91.4
Quality
78.1
Maintenance
100
Vulnerability
99.6
License
@har-sdk/oas@2.10.0
Published on 07 Oct 2024
@har-sdk/postman@2.4.6
Published on 22 Aug 2024
@har-sdk/oas@2.9.3
Published on 22 Aug 2024
@har-sdk/oas@2.9.2
Published on 14 Aug 2024
@har-sdk/openapi-sampler@2.2.1
Published on 14 Aug 2024
@har-sdk/oas@2.9.1
Published on 22 Apr 2024
TypeScript (98.02%)
JavaScript (1.94%)
Shell (0.04%)
Total Downloads
125,040
Last Day
534
Last Week
3,470
Last Month
16,466
Last Year
104,606
11 Stars
142 Commits
5 Forks
16 Watching
10 Branches
25 Contributors
Minified
Minified + Gzipped
Latest Version
1.4.5
Package Id
@har-sdk/core@1.4.5
Unpacked Size
104.79 kB
Size
24.72 kB
File Count
105
NPM Version
8.19.3
Node Version
18.14.1
Publised On
23 Feb 2023
Cumulative downloads
Total Downloads
Last day
-17.6%
534
Compared to previous day
Last week
-20.9%
3,470
Compared to previous week
Last month
5.3%
16,466
Compared to previous month
Last year
805.1%
104,606
Compared to previous year
3
1
The base package can be used to import specification files (i.e. HAR, OAS and Postman Collection) and detect their type.
1npm i --save @har-sdk/core
To import a specification you just need to create an instance of SpecImporter
and call its import
method passing the data file. The importer performs syntactic analysis and parses a provided file.
1import { SpecImporter } from '@har-sdk/core'; 2 3const result = await new SpecImporter().import(sourceAsString); 4console.log(result); 5// { 6// type: 'postman', 7// format: 'json', 8// doc: { 9// info: { 10// name: 'Postman Sample', 11// schema: 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' 12// }, 13// item: [ 14// // ... 15// ] 16// }, 17// name: 'Postman Sample.json' 18// }
To configure the list of importers, you can pass them as an array to the constructor.
1import { SpecImporter, HarImporter } from '@har-sdk/core'; 2 3const explorer = new SpecImporter([new HarImporter()]);
To extend an explorer by adding a new custom importer, you can easily implement an Importer
interface.
1import { Importer, Doc, Spec, Importer } from '@har-sdk/core'; 2 3class RamlImporter implements Importer<'raml'> { 4 get type(): 'raml' { 5 return 'raml'; 6 } 7 8 async import(content: string): Promise<Spec<'raml'>> { 9 // your code 10 11 return { 12 // other fields 13 type: this.type, 14 format: 'yaml' 15 }; 16 } 17}
The package also contains a set of useful utilities like normalizeUrl
:
1import { normalizeUrl } from '@har-sdk/core'; 2 3normalizeUrl('HTTP://example.COM////foo////dummy/../bar/?'); // http://example.com/foo/bar
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 21/22 approved changesets -- score normalized to 9
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More