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

snakepipe

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snakepipe - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

dist/src/common.d.ts

9

dist/package.json
{
"name": "snakepipe",
"version": "0.1.2",
"version": "0.1.3",
"description": "A node implementation of the rust snakepipe crate",
"main": "index.js",
"main": "dist/src/lib.js",
"types": "dist/src/lib.d.ts",
"bin": {
"snakepipe-node": "./bin.js"
},
"files": ["dist"],
"files": [
"dist"
],
"scripts": {

@@ -11,0 +14,0 @@ "build": "rm -rf ./dist && tsc",

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.makeWriteLine = exports.parseGameState = exports.formatVersionToDisplay = exports.version = void 0;
exports.makeWriteLine = exports.parseGameState = exports.parseGameStateFromAsyncIterator = exports.makeLineIterator = exports.formatVersionToDisplay = exports.version = void 0;
const node_readline_1 = __importDefault(require("node:readline"));

@@ -27,11 +27,16 @@ const node_process_1 = require("node:process");

}
async function parseGameState() {
const readStdin = node_readline_1.default.createInterface({ input: node_process_1.stdin });
const stdinIterator = readStdin[Symbol.asyncIterator]();
const options = schemas_1.initOptionsSchema.parse(JSON.parse((await stdinIterator.next()).value));
exports.makeLineIterator = makeLineIterator;
async function parseGameStateFromAsyncIterator(stream) {
const options = schemas_1.initOptionsSchema.parse(JSON.parse((await stream.next()).value));
return {
options,
lines: makeLineIterator(stdinIterator),
lines: makeLineIterator(stream),
};
}
exports.parseGameStateFromAsyncIterator = parseGameStateFromAsyncIterator;
async function parseGameState() {
const readStdin = node_readline_1.default.createInterface({ input: node_process_1.stdin });
const stdinIterator = readStdin[Symbol.asyncIterator]();
return parseGameStateFromAsyncIterator(stdinIterator);
}
exports.parseGameState = parseGameState;

@@ -38,0 +43,0 @@ function makeWriteLine(stdout) {

{
"name": "snakepipe",
"version": "0.1.2",
"version": "0.1.3",
"description": "A node implementation of the rust snakepipe crate",
"main": "index.js",
"main": "dist/src/lib.js",
"types": "dist/src/lib.d.ts",
"bin": {
"snakepipe-node": "./bin.js"
},
"files": ["dist"],
"files": [
"dist"
],
"scripts": {

@@ -11,0 +14,0 @@ "build": "rm -rf ./dist && tsc",

# snake-pipe-node
[![npm](https://img.shields.io/npm/v/snakepipe?color=blue)](https://www.npmjs.com/package/snakepipe)
A partial node implementation of my rust cli [topheman/snake-pipe-rust](https://github.com/topheman/snake-pipe-rust).

@@ -35,4 +37,12 @@

## Usage as a library
```
npm install snakepipe
```
See example of usage on [topheman/snake-pipe-rust](https://github.com/topheman/snake-pipe-rust/tree/master/node-helpers/dev-server-sse/index.ts).
## Known bugs
- tty issue when piping from `snakepipe gamestate` [#1](https://github.com/topheman/snake-pipe-node/issues/1)
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