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

amplience-graphql-codegen-common

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplience-graphql-codegen-common - npm Package Compare versions

Comparing version 0.1.8 to 0.2.0

10

dist/index.d.ts
import * as graphql from 'graphql';
import { FieldDefinitionNode, TypeDefinitionNode, DirectiveNode, ValueNode, ObjectValueNode, DefinitionNode, ObjectTypeDefinitionNode, TypeNode } from 'graphql';
import { FieldDefinitionNode, TypeDefinitionNode, ValueNode, DirectiveNode, ObjectValueNode, DefinitionNode, ObjectTypeDefinitionNode, TypeNode } from 'graphql';
declare const hasDirective: (symbol: FieldDefinitionNode | TypeDefinitionNode, name: string) => boolean | undefined;
declare const maybeDirective: (symbol: FieldDefinitionNode | TypeDefinitionNode, name: string) => DirectiveNode | undefined;
declare const maybeDirective: (symbol: FieldDefinitionNode | TypeDefinitionNode, name: string) => graphql.ConstDirectiveNode | undefined;
declare const maybeDirectiveValue: <T extends ValueNode>(directive: DirectiveNode, argument: string) => T | undefined;

@@ -10,3 +10,3 @@ declare const maybeFieldValue: <T extends ValueNode>(node: ObjectValueNode, field: string) => T | undefined;

declare const typeName: (type: TypeNode) => string;
declare const switchArray: <T>(type: TypeNode, { ifArray, other }: {
declare const switchArray: <T>(type: TypeNode, { ifArray, other, }: {
ifArray: (subType: TypeNode) => T;

@@ -20,2 +20,4 @@ other: (type: TypeNode) => T;

declare const combinations: (array: string[]) => string[][];
declare type Ensure<T extends {}, K extends keyof T> = T & Record<K, NonNullable<T[K]>>;
declare const hasProperty: <T extends {}, K extends keyof T>(prop: K) => (obj: T) => obj is Ensure<T, K>;

@@ -25,2 +27,2 @@ declare const schemaPrepend: graphql.DocumentNode;

export { combinations, hasDirective, ifNotEmpty, ifValue, isObjectTypeDefinitionNode, isValue, maybeDirective, maybeDirectiveValue, maybeFieldValue, schemaPrepend, switchArray, typeName, typeUri };
export { Ensure, combinations, hasDirective, hasProperty, ifNotEmpty, ifValue, isObjectTypeDefinitionNode, isValue, maybeDirective, maybeDirectiveValue, maybeFieldValue, schemaPrepend, switchArray, typeName, typeUri };

8

dist/index.js

@@ -25,2 +25,3 @@ "use strict";

hasDirective: () => hasDirective,
hasProperty: () => hasProperty,
ifNotEmpty: () => ifNotEmpty,

@@ -68,2 +69,4 @@ ifValue: () => ifValue,

return typeName(type.type);
default:
throw new Error(type.kind);
}

@@ -90,2 +93,3 @@ };

};
var hasProperty = (prop) => (obj) => Boolean(obj[prop]);

@@ -113,3 +117,2 @@ // src/index.ts

enum ValidationLevel {
SLOT
CONTENT_TYPE

@@ -131,2 +134,4 @@ HIERARCHY

) on OBJECT
directive @icon(url: String!) on OBJECT
`;

@@ -138,2 +143,3 @@ var typeUri = (type, schemaHost) => `${schemaHost}/${(0, import_change_case.paramCase)(type.name.value)}`;

hasDirective,
hasProperty,
ifNotEmpty,

@@ -140,0 +146,0 @@ ifValue,

{
"name": "amplience-graphql-codegen-common",
"author": "Lab Digital",
"version": "0.1.6",
"version": "0.1.8",
"private": false,

@@ -13,5 +13,2 @@ "license": "MIT",

],
"publishConfig": {
"directory": "dist"
},
"engines": {

@@ -28,3 +25,3 @@ "node": ">=16"

"change-case": "^4.1.2",
"graphql": "^15.6.0",
"graphql": "^16.5.0",
"graphql-tag": "^2.12.6"

@@ -31,0 +28,0 @@ },

{
"name": "amplience-graphql-codegen-common",
"author": "Lab Digital",
"version": "0.1.8",
"version": "0.2.0",
"private": false,

@@ -24,6 +24,6 @@ "license": "MIT",

"change-case": "^4.1.2",
"graphql": "^15.6.0",
"graphql": "^16.5.0",
"graphql-tag": "^2.12.6"
},
"gitHead": "4e2063ba1f4317c8f5895a07cfeac747abfa7e4a"
"gitHead": "b074ad9bbd2473ec1943b12ee46d8b7ce2e62928"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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