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

@replit/clui-gql

Package Overview
Dependencies
Maintainers
7
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replit/clui-gql - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

forEach.d.ts

2

index.d.ts
export { default as toCommand } from './toCommand';
export { default as parseArgs } from './parseArgs';
export { default as visit } from './visit';
export { default as forEach } from './forEach';
export * from './types';

@@ -7,4 +7,4 @@ "use strict";

exports.parseArgs = parseArgs_1.default;
var visit_1 = require("./visit");
exports.visit = visit_1.default;
var forEach_1 = require("./forEach");
exports.forEach = forEach_1.default;
//# sourceMappingURL=index.js.map
{
"name": "@replit/clui-gql",
"version": "0.0.6",
"version": "0.0.7",
"description": "A utility to transform GraphQL introspection type into a CLUI command",

@@ -5,0 +5,0 @@ "author": "moudy@repl.it",

@@ -24,18 +24,2 @@ "use strict";

};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -73,6 +57,6 @@ var parseValue = function (options) {

try {
for (var _b = __values(Object.entries(options.command.args)), _c = _b.next(); !_c.done; _c = _b.next()) {
var _d = __read(_c.value, 2), key = _d[0], arg = _d[1];
var value = options.args[key];
delete extra[key];
for (var _b = __values(Object.values(options.command.args)), _c = _b.next(); !_c.done; _c = _b.next()) {
var arg = _c.value;
var value = options.args[arg.name];
delete extra[arg.name];
if (value === undefined) {

@@ -79,0 +63,0 @@ if (arg.required) {

@@ -13,6 +13,6 @@ # CLUI GraphQL

To create a tree of CLUI commands call `toCommand` and then `visit` eash command to defined a run function.
To create a tree of CLUI commands call `toCommand` and then call `forEach` to defined a run function for each command.
```jsx
import { toCommand, visit } from '@replit/clui-gql';
import { toCommand, forEach } from '@replit/clui-gql';
import { introspectionFromSchema } from 'graphql';

@@ -58,3 +58,3 @@ import schema from './your-graphql-schema';

// Define some application specific behavior for when a command is `run`
visit(root, (command) => {
forEach(root, ({ command }) => {
if (command.outputType !== 'YourOutputTypes') {

@@ -61,0 +61,0 @@ // If command does not match an output type you may want do something differeny.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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