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

@ndn/cat

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndn/cat - npm Package Compare versions

Comparing version 0.0.20200909 to 0.0.20210203

lib/util_browser.js

11

lib/get-segmented_browser.js

@@ -0,1 +1,2 @@

import { __importDefault, __importStar } from "tslib";
import { closeUplinks } from "@ndn/cli-common";

@@ -5,5 +6,5 @@ import { Name } from "@ndn/packet";

import { discoverVersion, fetch } from "@ndn/segmented-object";
import stdout from "stdout-stream";
import { segmentNumConvention, versionConvention } from "./common-args_browser.js";
const discoverVersionChoices = ["none", "cbp", "rdr"];
import _cjsDefaultImport0 from "stdout-stream"; const stdout = __importDefault(_cjsDefaultImport0).default;
import { segmentNumConvention, versionConvention } from "./util_browser.js";
const discoverVersionChoices = { none: true, cbp: true, rdr: true };
async function main(args) {

@@ -24,3 +25,3 @@ let name = new Name(args.name);

}
await fetch.toStream(name, stdout, { segmentNumConvention });
await fetch(name, { segmentNumConvention }).pipe(stdout);
}

@@ -41,3 +42,3 @@ export class GetSegmentedCommand {

.option("ver", {
choices: discoverVersionChoices,
choices: Object.keys(discoverVersionChoices),
default: "rdr",

@@ -44,0 +45,0 @@ desc: ["version discovery method",

@@ -1,4 +0,2 @@

import { createRequire } from "module";
const require = createRequire(import.meta.url);
const { __importDefault } = require("tslib");
import { __importDefault, __importStar } from "tslib";
import { closeUplinks } from "@ndn/cli-common";

@@ -8,5 +6,5 @@ import { Name } from "@ndn/packet";

import { discoverVersion, fetch } from "@ndn/segmented-object";
const stdout = __importDefault(require("stdout-stream")).default;
import { segmentNumConvention, versionConvention } from "./common-args_node.js";
const discoverVersionChoices = ["none", "cbp", "rdr"];
import _cjsDefaultImport0 from "stdout-stream"; const stdout = __importDefault(_cjsDefaultImport0).default;
import { segmentNumConvention, versionConvention } from "./util_node.js";
const discoverVersionChoices = { none: true, cbp: true, rdr: true };
async function main(args) {

@@ -27,3 +25,3 @@ let name = new Name(args.name);

}
await fetch.toStream(name, stdout, { segmentNumConvention });
await fetch(name, { segmentNumConvention }).pipe(stdout);
}

@@ -44,3 +42,3 @@ export class GetSegmentedCommand {

.option("ver", {
choices: discoverVersionChoices,
choices: Object.keys(discoverVersionChoices),
default: "rdr",

@@ -47,0 +45,0 @@ desc: ["version discovery method",

@@ -1,4 +0,9 @@

import { Arguments, Argv, CommandModule } from "yargs";
import { CommonArgs } from "./common-args";
declare type DiscoverVersionChoice = "none" | "cbp" | "rdr";
import type { Arguments, Argv, CommandModule } from "yargs";
import { CommonArgs } from "./util";
declare const discoverVersionChoices: {
none: boolean;
cbp: boolean;
rdr: boolean;
};
declare type DiscoverVersionChoice = keyof typeof discoverVersionChoices;
interface Args extends CommonArgs {

@@ -5,0 +10,0 @@ name: string;

import yargs from "yargs";
import { applyCommonArgs } from "./common-args_browser.js";
// @ts-expect-error
import { hideBin } from "yargs/helpers";
import { GetSegmentedCommand } from "./get-segmented_browser.js";
import { PutSegmentedCommand } from "./put-segmented_browser.js";
yargs
import { applyCommonArgs } from "./util_browser.js";
yargs()
.scriptName("ndncat")

@@ -16,2 +18,2 @@ .option("convention1", {

.demandCommand()
.parse();
.parse(hideBin(process.argv));

@@ -1,9 +0,8 @@

import { createRequire } from "module";
const require = createRequire(import.meta.url);
const { __importDefault } = require("tslib");
const yargs = __importDefault(require("yargs")).default;
import { applyCommonArgs } from "./common-args_node.js";
import yargs from "yargs";
// @ts-expect-error
import { hideBin } from "yargs/helpers";
import { GetSegmentedCommand } from "./get-segmented_node.js";
import { PutSegmentedCommand } from "./put-segmented_node.js";
yargs
import { applyCommonArgs } from "./util_node.js";
yargs()
.scriptName("ndncat")

@@ -19,2 +18,2 @@ .option("convention1", {

.demandCommand()
.parse();
.parse(hideBin(process.argv));
import { serveMetadata } from "@ndn/rdr";
import { FileChunkSource, serve, serveVersioned, StreamChunkSource } from "@ndn/segmented-object";
import { segmentNumConvention, signer, versionConvention } from "./common-args_browser.js";
import { segmentNumConvention, signer, versionConvention } from "./util_browser.js";
function main({ name, rdr, ver, file, "chunk-size": chunkSize }) {

@@ -5,0 +5,0 @@ const serveFunc = ver === "none" ? serve : serveVersioned;

import { serveMetadata } from "@ndn/rdr";
import { FileChunkSource, serve, serveVersioned, StreamChunkSource } from "@ndn/segmented-object";
import { segmentNumConvention, signer, versionConvention } from "./common-args_node.js";
import { segmentNumConvention, signer, versionConvention } from "./util_node.js";
function main({ name, rdr, ver, file, "chunk-size": chunkSize }) {

@@ -5,0 +5,0 @@ const serveFunc = ver === "none" ? serve : serveVersioned;

@@ -1,3 +0,3 @@

import { Arguments, Argv, CommandModule } from "yargs";
import { CommonArgs } from "./common-args";
import type { Arguments, Argv, CommandModule } from "yargs";
import { CommonArgs } from "./util";
interface Args extends CommonArgs {

@@ -4,0 +4,0 @@ name: string;

{
"name": "@ndn/cat",
"version": "0.0.20200909",
"version": "0.0.20210203",
"description": "NDNts: ndncat - netcat for NDN",

@@ -25,13 +25,13 @@ "keywords": [

"dependencies": {
"@ndn/cli-common": "0.0.20200909",
"@ndn/naming-convention1": "0.0.20200909",
"@ndn/naming-convention2": "0.0.20200909",
"@ndn/packet": "0.0.20200909",
"@ndn/rdr": "0.0.20200909",
"@ndn/segmented-object": "0.0.20200909",
"@ndn/cli-common": "0.0.20210203",
"@ndn/naming-convention1": "0.0.20210203",
"@ndn/naming-convention2": "0.0.20210203",
"@ndn/packet": "0.0.20210203",
"@ndn/rdr": "0.0.20210203",
"@ndn/segmented-object": "0.0.20210203",
"hard-rejection": "^2.1.0",
"stdout-stream": "^1.4.1",
"tslib": "^2.0.1",
"yargs": "^15.4.1"
"tslib": "^2.1.0",
"yargs": "^16.2.0"
}
}

@@ -34,3 +34,3 @@ # @ndn/cat

```sh
```bash
dd if=/dev/urandom of=/tmp/1.bin bs=1M count=1

@@ -37,0 +37,0 @@

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