Socket
Socket
Sign inDemoInstall

@neo4j/introspector

Package Overview
Dependencies
14
Maintainers
7
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

dist/utils/escape-label.d.ts

2

dist/classes/Relationship.d.ts
import type Property from "./Property";
declare type Path = {
type Path = {
fromTypeId: string;

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

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

const clean_type_name_1 = __importDefault(require("./utils/clean-type-name"));
const escape_label_1 = require("./utils/escape-label");
const node_key_1 = __importDefault(require("./utils/node-key"));

@@ -90,4 +91,5 @@ async function toNeo4jStruct(sessionFactory) {

});
const escapedType = (0, escape_label_1.escapeLabel)((0, clean_type_name_1.default)(relType));
const relationshipsRes = await conSession.readTransaction((tx) => tx.run(`
MATCH (n)-[r${relType}]->(m)
MATCH (n)-[r:${escapedType}]->(m)
WITH n, r, m LIMIT 100

@@ -94,0 +96,0 @@ WITH DISTINCT labels(n) AS from, labels(m) AS to

import type { Directive } from "./types";
import type { NodeField } from "./NodeField";
declare type NodeType = "type" | "interface";
type NodeType = "type" | "interface";
export declare class GraphQLNode {

@@ -5,0 +5,0 @@ type: NodeType;

@@ -1,6 +0,6 @@

export declare type Direction = "IN" | "OUT";
export type Direction = "IN" | "OUT";
export interface Directive {
toString(): string;
}
export declare type ExcludeOperation = "CREATE" | "READ" | "UPDATE" | "DELETE";
export type ExcludeOperation = "CREATE" | "READ" | "UPDATE" | "DELETE";
//# sourceMappingURL=types.d.ts.map

@@ -27,8 +27,9 @@ "use strict";

function inferRelationshipFieldName(relType, fromType, toType, direction) {
const sanitizedRelType = relType.replaceAll(/[\s/()\\`]/g, "");
if (direction === "OUT") {
return (0, camelcase_1.default)(relType + (0, pluralize_1.default)(toType));
return (0, camelcase_1.default)(sanitizedRelType + (0, pluralize_1.default)(toType));
}
return (0, camelcase_1.default)((0, pluralize_1.default)(fromType) + relType);
return (0, camelcase_1.default)((0, pluralize_1.default)(fromType) + sanitizedRelType);
}
exports.default = inferRelationshipFieldName;
//# sourceMappingURL=generate-relationship-field-name.js.map
import type Node from "./classes/Node";
import type Relationship from "./classes/Relationship";
export declare type Neo4jStruct = {
export type Neo4jStruct = {
nodes: Record<string, Node>;
relationships: Record<string, Relationship>;
};
export declare type PropertyRecord = {
export type PropertyRecord = {
propertyName: string;

@@ -12,8 +12,8 @@ propertyTypes: string[];

};
export declare type NodeMap = {
export type NodeMap = {
[key: string]: Node;
};
export declare type RelationshipMap = {
export type RelationshipMap = {
[key: string]: Relationship;
};
//# sourceMappingURL=types.d.ts.map
{
"name": "@neo4j/introspector",
"version": "1.0.2",
"version": "1.0.3",
"description": "Introspect a Neo4j database model/schema",

@@ -36,9 +36,9 @@ "keywords": [

"devDependencies": {
"@neo4j/graphql": "^3.8.0",
"@types/jest": "29.0.2",
"@types/node": "16.11.59",
"@neo4j/graphql": "^3.16.0",
"@types/jest": "29.4.0",
"@types/node": "18.11.17",
"@types/pluralize": "0.0.29",
"jest": ">=28.0.0 <29.0.0-0",
"ts-jest": "28.0.8",
"typescript": "4.8.3"
"jest": "29.4.1",
"ts-jest": "29.0.5",
"typescript": "4.9.5"
},

@@ -45,0 +45,0 @@ "dependencies": {

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc