Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oss-mariner

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oss-mariner - npm Package Compare versions

Comparing version 0.2.1-alpha to 0.2.2-alpha

dist/tabLevelLoggerExample.d.ts

6

dist/dependency-details-retreiver.d.ts
export declare class DependencyDetailsRetriever {
run(
githubToken: string,
abbreviated: boolean,
outputFilePath: string,
inputFilePath: string,
outputFilePath: string,
abbreviated?: boolean
githubToken: string
): Promise<number>;
private populateRequestQueue;
}

@@ -94,3 +94,4 @@ 'use strict';

while (_) {
{ try {
{
try {
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) {return t;}

@@ -126,3 +127,4 @@ if (y = 0, t) {op = [op[0] & 2, t.value];}

f = t = 0;
} }
}
}
if (op[0] & 5) {throw op[1];}

@@ -191,9 +193,8 @@

.then(function (responseText) {
const responseJson = JSON.parse(responseText);
let responseJson = JSON.parse(responseText);
if (responseJson instanceof Object) {
const err = new Error(responseJson.message);
let err = new Error(responseJson.message);
_this.handleError(err);
return;
return;
} else if (responseJson instanceof Array) {

@@ -208,4 +209,4 @@ for (

let fundingUrl = file.html_url;
return fundingUrl;
return fundingUrl;
}

@@ -283,3 +284,3 @@ }

.then(function (responseText) {
const responseJson = JSON.parse(responseText);
let responseJson = JSON.parse(responseText);

@@ -409,6 +410,6 @@ return {

DependencyDetailsRetriever.prototype.run = function (
githubToken,
abbreviated,
outputFilePath,
inputFilePath,
outputFilePath,
abbreviated
githubToken
) {

@@ -423,5 +424,5 @@ return __awaiter(this, void 0, void 0, function () {

ownerDataCollection = new owner_data_collection_1.OwnerDataCollection(
inputFilePath,
abbreviated,
outputFilePath,
(abbreviated = false)
inputFilePath
);

@@ -432,3 +433,5 @@ this.populateRequestQueue(requestQueue, ownerDataCollection, githubToken);

case 1:
if (!nextRequest) { return [3 /*break*/, 4]; }
if (!nextRequest) {
return [3 /*break*/, 4];
}

@@ -435,0 +438,0 @@ return [

{
"name": "oss-mariner",
"version": "0.2.1-alpha",
"version": "0.2.2-alpha",
"description": "A node.js library for analyzing open source library dependencies",

@@ -5,0 +5,0 @@ "main": "dist/mariner/index.js",

@@ -7,14 +7,14 @@ # Mariner

Mariner takes an input list of dependencies, fetches details about them from GitHub,
and outputs a file containing funding information for each project owner, and a list
Mariner takes an input list of dependencies, fetches details about them from GitHub,
and outputs a file containing funding information for each project owner, and a list
of issues for each project.
NOTE: This library is in the experimental stage, so expect breaking changes
even if the version number does not indicate that.
NOTE: This library is in the experimental stage, so expect breaking changes
even if the version number does not indicate that.
## Getting Started Using Mariner
If you just want to USE Mariner, you don't need to do a git clone.
If you just want to USE Mariner, you don't need to do a git clone.
Instead, create your own new node project, and install the oss-mariner package via npm:
```npm install oss-mariner```
`npm install oss-mariner`

@@ -25,2 +25,3 @@ Mariner can be called from Javascript or from Typescript. You can see an example here:

In your code, invoke the DependencyDetailsRetriever.run() method, passing appropriate parameters:
```

@@ -36,53 +37,55 @@ const ddr = new DependencyDetailsRetriever();

The GitHub token must be a valid personal access token. It does not require any permissions beyond
the default, so when you create it you can leave all the boxes unchecked. Be careful not to
share your token with anyone. If it gets exposed, revoke it and create a replacement.
See https://github.com/settings/tokens/new for how to create a token.
The GitHub token must be a valid personal access token. It does not require any permissions beyond
the default, so when you create it you can leave all the boxes unchecked. Be careful not to
share your token with anyone. If it gets exposed, revoke it and create a replacement.
See https://github.com/settings/tokens/new for how to create a token.
The input file is a JSON file in the format:
- At the top level is a map/object, where each entry consists of a dependency URL as the key,
and the number of projects that depend on that library as the value.
- Example: "https://api.github.com/repos/spring-projects/spring-framework": 19805,
- The project count value is mostly ignored, but is used by the "abbreviated" feature.
- See exampleData/mini.json for a complete example.
The input file is a JSON file in the format:
- At the top level is a map/object, where each entry consists of a dependency URL as the key,
and the number of projects that depend on that library as the value.
- Example: "https://api.github.com/repos/spring-projects/spring-framework": 19805,
- The project count value is mostly ignored, but is used by the "abbreviated" feature.
- See exampleData/mini.json for a complete example.
The output file is a JSON file in the format:
- (We'll add a definition of the format later.
For now, you can look at exampleData/analysisOutputRaw.json after running the app)
We don't recommend using the ```abbreviated``` feature.
It will omit entries that have fewer than a hard-coded number of projects that depend on them.
- (We'll add a definition of the format later.
For now, you can look at exampleData/analysisOutputRaw.json after running the app)
We don't recommend using the `abbreviated` feature.
It will omit entries that have fewer than a hard-coded number of projects that depend on them.
## Getting Help
The [Open Source team at Indeed](https://opensource.indeedeng.io/), who can be reached at opensource@indeed.com.
The [Open Source team at Indeed](https://opensource.indeedeng.io/), who can be reached at opensource@indeed.com.
## How To Contribute
Read the Code of Conduct and Contact the Maintainers before making any changes or a PR.
If an issue doesn’t already exist that describes the change you want to make, we recommend
creating one. If an issue does exist, please comment on it saying that you are starting to
work on it, to avoid duplicating effort.
Read the Code of Conduct and Contact the Maintainers before making any changes or a PR.
If an issue doesn’t already exist that describes the change you want to make, we recommend
creating one. If an issue does exist, please comment on it saying that you are starting to
work on it, to avoid duplicating effort.
## Getting Started Developing Mariner
Clone the repository from GitHub.
Clone the repository from GitHub.
Run ```npm ci``` to install the libraries used in the project. Read more about [npm ci here.](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable)
Run `npm ci` to install the libraries used in the project. Read more about [npm ci here.](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable)
Follow the instructions in indexExample.ts to configure the input and output files.
NOTE that an example input file is included, in the exampleData directory.
Follow the instructions in indexExample.ts to configure the input and output files.
NOTE that an example input file is included, in the exampleData directory.
Run ```npm run build``` to compile the code to Javascript.
Run `npm run build` to compile the code to Javascript.
Run ```node dist/indexExample.js``` to run the example program. It requires internet access,
since it calls the GitHub API. It will take a couple minutes to complete.
Some of the output includes the word "ERROR", so don't panic.
Run `node dist/indexExample.js` to run the example program. It requires internet access,
since it calls the GitHub API. It will take a couple minutes to complete.
Some of the output includes the word "ERROR", so don't panic.
## Local testing of the npm packaging
You should have local copies of both the oss-mariner project and the project that will include it.
In the oss-mariner project, run ```npm link```. This will "publish" oss-mariner locally on your
computer. Then in the other project, run ```npm link oss-mariner```.
This will replace the public npm version of oss-mariner with your local copy.
You should have local copies of both the oss-mariner project and the project that will include it.
In the oss-mariner project, run `npm link`. This will "publish" oss-mariner locally on your
computer. Then in the other project, run `npm link oss-mariner`.
This will replace the public npm version of oss-mariner with your local copy.

@@ -96,14 +99,18 @@ ## Project Maintainers

If you are a maintainer, you can follow these steps to publish a new version of the package:
1. Be sure the version number in package.json is correct
1. Run ```npm install``` to update package-lock.json
1. Run ```npm run build``` and ```npm run lint``` to make sure there are no errors
1. Login to npm if you haven’t already: npm login
1. Do a dry run to make sure the package looks good: npm publish --dry-run
1. Publish: npm publish
1. Run `npm install` to update package-lock.json
1. Run `npm run build` and `npm run lint` to make sure there are no errors
1. Submit and merge a PR to bump the version number
1. Login to npm if you haven’t already: `npm login`
1. Do a dry run to make sure the package looks good: `npm publish --dry-run`
1. Publish: `npm publish`
1. Verify: https://www.npmjs.com/package/oss-mariner
## Code of Conduct
This project is governed by the [Contributor Covenant v 1.4.1](CODE_OF_CONDUCT.md).
This project is governed by the [Contributor Covenant v 1.4.1](CODE_OF_CONDUCT.md).
## License
This project uses the [Apache 2.0](LICENSE) license.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc