@neo4j-cypher/query-tools 2.0.0-next.30 → 2.0.0-next.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/package.json +2 -2
- package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
- package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.test.js +6 -6
- package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.test.js.map +1 -1
- package/dist/cjs/src/data-transforms/cypher-type-names.d.ts +1 -1
- package/dist/cjs/src/data-transforms/cypher-type-names.js +3 -3
- package/dist/cjs/src/data-transforms/cypher-type-names.js.map +1 -1
- package/dist/cjs/src/data-transforms/record-to-string.d.ts +1 -1
- package/dist/cjs/src/data-transforms/record-to-string.js +8 -8
- package/dist/cjs/src/data-transforms/record-to-string.js.map +1 -1
- package/dist/cjs/src/index.d.ts +17 -17
- package/dist/cjs/src/index.js +15 -15
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/integration-tests/pollingIntegrationTests.test.js +7 -7
- package/dist/cjs/src/integration-tests/pollingIntegrationTests.test.js.map +1 -1
- package/dist/cjs/src/neo4jConnection.d.ts +1 -1
- package/dist/cjs/src/queries/dataSummary.d.ts +1 -1
- package/dist/cjs/src/queries/databases.d.ts +1 -1
- package/dist/cjs/src/queries/databases.js +2 -2
- package/dist/cjs/src/queries/databases.js.map +1 -1
- package/dist/cjs/src/queries/functions.js +3 -3
- package/dist/cjs/src/queries/functions.js.map +1 -1
- package/dist/cjs/src/queries/graphSchema.d.ts +1 -1
- package/dist/cjs/src/queries/procedures.d.ts +1 -1
- package/dist/cjs/src/queries/procedures.js +3 -3
- package/dist/cjs/src/queries/procedures.js.map +1 -1
- package/dist/cjs/src/queries/version.d.ts +1 -1
- package/dist/cjs/src/result-transformers/graph-result-transformer.d.ts +1 -1
- package/dist/cjs/src/result-transformers/graph-result-transformer.js +2 -2
- package/dist/cjs/src/result-transformers/graph-result-transformer.js.map +1 -1
- package/dist/cjs/src/schemaPoller.d.ts +3 -3
- package/dist/cjs/src/schemaPoller.js +15 -15
- package/dist/cjs/src/schemaPoller.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/package.json +2 -2
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.test.js +1 -1
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.test.js.map +1 -1
- package/dist/esm/src/data-transforms/cypher-type-names.d.ts +1 -1
- package/dist/esm/src/data-transforms/cypher-type-names.js +1 -1
- package/dist/esm/src/data-transforms/cypher-type-names.js.map +1 -1
- package/dist/esm/src/data-transforms/record-to-string.d.ts +1 -1
- package/dist/esm/src/data-transforms/record-to-string.js +2 -2
- package/dist/esm/src/data-transforms/record-to-string.js.map +1 -1
- package/dist/esm/src/index.d.ts +17 -17
- package/dist/esm/src/index.js +9 -9
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/integration-tests/pollingIntegrationTests.test.js +2 -2
- package/dist/esm/src/integration-tests/pollingIntegrationTests.test.js.map +1 -1
- package/dist/esm/src/neo4jConnection.d.ts +1 -1
- package/dist/esm/src/queries/dataSummary.d.ts +1 -1
- package/dist/esm/src/queries/databases.d.ts +1 -1
- package/dist/esm/src/queries/databases.js +1 -1
- package/dist/esm/src/queries/databases.js.map +1 -1
- package/dist/esm/src/queries/functions.js +1 -1
- package/dist/esm/src/queries/functions.js.map +1 -1
- package/dist/esm/src/queries/graphSchema.d.ts +1 -1
- package/dist/esm/src/queries/procedures.d.ts +1 -1
- package/dist/esm/src/queries/procedures.js +1 -1
- package/dist/esm/src/queries/procedures.js.map +1 -1
- package/dist/esm/src/queries/version.d.ts +1 -1
- package/dist/esm/src/result-transformers/graph-result-transformer.d.ts +1 -1
- package/dist/esm/src/result-transformers/graph-result-transformer.js +1 -1
- package/dist/esm/src/result-transformers/graph-result-transformer.js.map +1 -1
- package/dist/esm/src/schemaPoller.d.ts +3 -3
- package/dist/esm/src/schemaPoller.js +4 -4
- package/dist/esm/src/schemaPoller.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
- package/dist/types/src/data-transforms/cypher-type-names.d.ts +1 -1
- package/dist/types/src/data-transforms/record-to-string.d.ts +1 -1
- package/dist/types/src/index.d.ts +17 -17
- package/dist/types/src/neo4jConnection.d.ts +1 -1
- package/dist/types/src/queries/dataSummary.d.ts +1 -1
- package/dist/types/src/queries/databases.d.ts +1 -1
- package/dist/types/src/queries/graphSchema.d.ts +1 -1
- package/dist/types/src/queries/procedures.d.ts +1 -1
- package/dist/types/src/queries/version.d.ts +1 -1
- package/dist/types/src/result-transformers/graph-result-transformer.d.ts +1 -1
- package/dist/types/src/schemaPoller.d.ts +3 -3
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/cypher-execution/extract-unique-nodes-and-relationships.test.ts +1 -1
- package/src/cypher-execution/extract-unique-nodes-and-relationships.ts +1 -1
- package/src/data-transforms/cypher-type-names.ts +2 -2
- package/src/data-transforms/record-to-string.ts +3 -3
- package/src/index.ts +20 -17
- package/src/integration-tests/pollingIntegrationTests.test.ts +2 -2
- package/src/neo4jConnection.ts +1 -1
- package/src/queries/dataSummary.ts +1 -1
- package/src/queries/databases.ts +1 -1
- package/src/queries/functions.ts +4 -1
- package/src/queries/graphSchema.ts +1 -1
- package/src/queries/procedures.ts +2 -2
- package/src/queries/version.ts +1 -1
- package/src/result-transformers/graph-result-transformer.ts +1 -1
- package/src/schemaPoller.ts +4 -4
- package/tsconfig.json +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-cypher/query-tools",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.31",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/neo4j/cypher-language-support/issues"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"ajv": "^8.12.0",
|
|
27
27
|
"neo4j-driver": "6.0.1",
|
|
28
|
-
"@neo4j-cypher/language-support": "2.0.0-next.
|
|
28
|
+
"@neo4j-cypher/language-support": "2.0.0-next.31"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testcontainers/neo4j": "^11.5.1"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "concurrently 'npm:build-esm' 'npm:build-commonjs' 'npm:build-types'",
|
|
39
39
|
"build-esm": "tsc --module esnext --outDir dist/esm",
|
|
40
|
-
"build-commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
40
|
+
"build-commonjs": "tsc --module commonjs --moduleResolution node --outDir dist/cjs",
|
|
41
41
|
"build-types": "tsc --emitDeclarationOnly --outDir dist/types",
|
|
42
42
|
"dev": "concurrently 'npm:build-esm -- --watch' 'npm:build-commonjs -- --watch'",
|
|
43
43
|
"clean": "rm -rf {dist,tsconfig.tsbuildinfo}",
|
|
@@ -2,7 +2,7 @@ import type { Record } from 'neo4j-driver';
|
|
|
2
2
|
import { Node, Path, PathSegment, Relationship } from 'neo4j-driver';
|
|
3
3
|
|
|
4
4
|
import { describe, expect, test } from 'vitest';
|
|
5
|
-
import { extractUniqueNodesAndRels } from './extract-unique-nodes-and-relationships';
|
|
5
|
+
import { extractUniqueNodesAndRels } from './extract-unique-nodes-and-relationships.js';
|
|
6
6
|
|
|
7
7
|
describe('extractNodesAndRels', () => {
|
|
8
8
|
test('should map bolt records with a path to nodes and relationships', () => {
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
Relationship,
|
|
8
8
|
} from 'neo4j-driver';
|
|
9
9
|
import { isNode, isPath, isRelationship } from 'neo4j-driver';
|
|
10
|
-
import { CypherProperty } from '../types/cypher-data-types';
|
|
10
|
+
import { CypherProperty } from '../types/cypher-data-types.js';
|
|
11
11
|
|
|
12
12
|
export type Properties = RecordShape<string, CypherProperty>;
|
|
13
13
|
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
import type {
|
|
17
17
|
CypherDataType,
|
|
18
18
|
CypherProperty,
|
|
19
|
-
} from '../types/cypher-data-types';
|
|
19
|
+
} from '../types/cypher-data-types.js';
|
|
20
20
|
import {
|
|
21
21
|
isCypherBasicPropertyType,
|
|
22
22
|
isInt8Array,
|
|
23
|
-
} from '../types/cypher-data-types';
|
|
23
|
+
} from '../types/cypher-data-types.js';
|
|
24
24
|
|
|
25
25
|
type CypherPropertyName =
|
|
26
26
|
| 'Float'
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
import type {
|
|
14
14
|
CypherDataType,
|
|
15
15
|
CypherProperty,
|
|
16
|
-
} from '../types/cypher-data-types';
|
|
16
|
+
} from '../types/cypher-data-types.js';
|
|
17
17
|
import {
|
|
18
18
|
isCypherPropertyType,
|
|
19
19
|
isCypherTemporalType,
|
|
20
20
|
isInt8Array,
|
|
21
|
-
} from '../types/cypher-data-types';
|
|
22
|
-
import { formatFloat } from './format-float';
|
|
21
|
+
} from '../types/cypher-data-types.js';
|
|
22
|
+
import { formatFloat } from './format-float.js';
|
|
23
23
|
|
|
24
24
|
export const spacialFormat = (p: Point): string => {
|
|
25
25
|
const zString = p.z !== undefined ? `, z:${formatFloat(p.z)}` : '';
|
package/src/index.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
export { FRIENDLY_ERROR_MESSAGES } from './connectionErrorHandler';
|
|
2
|
-
export type { ConnectionError } from './connectionErrorHandler';
|
|
3
|
-
export * from './cypher-execution/extract-unique-nodes-and-relationships';
|
|
4
|
-
export * from './cypher-execution/query-result';
|
|
5
|
-
export type { Neo4jType } from './cypher-execution/query-result';
|
|
1
|
+
export { FRIENDLY_ERROR_MESSAGES } from './connectionErrorHandler.js';
|
|
2
|
+
export type { ConnectionError } from './connectionErrorHandler.js';
|
|
3
|
+
export * from './cypher-execution/extract-unique-nodes-and-relationships.js';
|
|
4
|
+
export * from './cypher-execution/query-result.js';
|
|
5
|
+
export type { Neo4jType } from './cypher-execution/query-result.js';
|
|
6
6
|
export {
|
|
7
7
|
getCypherTypeName,
|
|
8
8
|
getPropertyTypeDisplayName,
|
|
9
|
-
} from './data-transforms/cypher-type-names';
|
|
10
|
-
export type { CypherDataTypeName } from './data-transforms/cypher-type-names';
|
|
11
|
-
export * from './data-transforms/record-to-string';
|
|
12
|
-
export * from './types/cypher-data-types';
|
|
9
|
+
} from './data-transforms/cypher-type-names.js';
|
|
10
|
+
export type { CypherDataTypeName } from './data-transforms/cypher-type-names.js';
|
|
11
|
+
export * from './data-transforms/record-to-string.js';
|
|
12
|
+
export * from './types/cypher-data-types.js';
|
|
13
13
|
export type {
|
|
14
14
|
ConnectedMetadataPoller as CypherMetadataPoller,
|
|
15
15
|
DisconnectedMetadataPoller as EmptyMetadataPoller,
|
|
16
16
|
MetadataPoller,
|
|
17
|
-
} from './metadataPoller';
|
|
18
|
-
export type {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export type {
|
|
23
|
-
export
|
|
24
|
-
export {
|
|
17
|
+
} from './metadataPoller.js';
|
|
18
|
+
export type {
|
|
19
|
+
Neo4jConnection,
|
|
20
|
+
QueryResultWithLimit,
|
|
21
|
+
} from './neo4jConnection.js';
|
|
22
|
+
export type { Database } from './queries/databases.js';
|
|
23
|
+
export { graphResultTransformer } from './result-transformers/graph-result-transformer.js';
|
|
24
|
+
export { Neo4jSchemaPoller } from './schemaPoller.js';
|
|
25
|
+
export type { ConnnectionResult } from './schemaPoller.js';
|
|
26
|
+
export type { CypherDataType } from './types/cypher-data-types.js';
|
|
27
|
+
export { getVersion } from './queries/version.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { auth, Driver, driver, Session } from 'neo4j-driver';
|
|
2
|
-
import { createAndStartTestContainer } from './setupTestContainer';
|
|
2
|
+
import { createAndStartTestContainer } from './setupTestContainer.js';
|
|
3
3
|
import { StartedNeo4jContainer } from '@testcontainers/neo4j';
|
|
4
4
|
import {
|
|
5
5
|
extractRelationshipsWithNamedNodes,
|
|
6
6
|
GraphSchema,
|
|
7
7
|
validateGraphSchema,
|
|
8
|
-
} from '../queries/graphSchema';
|
|
8
|
+
} from '../queries/graphSchema.js';
|
|
9
9
|
|
|
10
10
|
describe('Polling integration', () => {
|
|
11
11
|
let session: Session;
|
package/src/neo4jConnection.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from 'neo4j-driver';
|
|
9
9
|
import { version } from '../package.json';
|
|
10
10
|
import { Database } from './queries/databases.js';
|
|
11
|
-
import { ExecuteQueryArgs, QueryType } from './types/sdkTypes';
|
|
11
|
+
import { ExecuteQueryArgs, QueryType } from './types/sdkTypes.js';
|
|
12
12
|
|
|
13
13
|
const METADATA_BASE = {
|
|
14
14
|
app: 'neo4j-sdk',
|
package/src/queries/databases.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CypherVersion } from '@neo4j-cypher/language-support';
|
|
2
2
|
import { resultTransformers } from 'neo4j-driver';
|
|
3
|
-
import { ExecuteQueryArgs, DbType } from '../types/sdkTypes';
|
|
3
|
+
import { ExecuteQueryArgs, DbType } from '../types/sdkTypes.js';
|
|
4
4
|
|
|
5
5
|
export type DatabaseStatus =
|
|
6
6
|
| 'online'
|
package/src/queries/functions.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CypherVersion, Neo4jFunction } from '@neo4j-cypher/language-support';
|
|
2
2
|
import Ajv, { JSONSchemaType } from 'ajv';
|
|
3
3
|
import { resultTransformers } from 'neo4j-driver';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
cleanType,
|
|
6
|
+
cleanTypeDescription,
|
|
7
|
+
} from '../data-transforms/clean-type.js';
|
|
5
8
|
import type { ExecuteQueryArgs } from '../types/sdkTypes.js';
|
|
6
9
|
|
|
7
10
|
type ListFunctionArgs = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CypherVersion, Neo4jProcedure } from '@neo4j-cypher/language-support';
|
|
2
2
|
import Ajv, { JSONSchemaType } from 'ajv';
|
|
3
3
|
import { resultTransformers } from 'neo4j-driver';
|
|
4
|
-
import { cleanTypeDescription } from '../data-transforms/clean-type';
|
|
5
|
-
import type { ExecuteQueryArgs } from '../types/sdkTypes';
|
|
4
|
+
import { cleanTypeDescription } from '../data-transforms/clean-type.js';
|
|
5
|
+
import type { ExecuteQueryArgs } from '../types/sdkTypes.js';
|
|
6
6
|
|
|
7
7
|
type ListProcedureArgs = {
|
|
8
8
|
executableByMe: boolean;
|
package/src/queries/version.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
DeduplicatedNodesAndRels,
|
|
10
10
|
extractUniqueNodesAndRels,
|
|
11
|
-
} from '../cypher-execution/extract-unique-nodes-and-relationships';
|
|
11
|
+
} from '../cypher-execution/extract-unique-nodes-and-relationships.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Result type for graph queries that includes deduplicated nodes and relationships
|
package/src/schemaPoller.ts
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
FRIENDLY_ERROR_MESSAGES,
|
|
6
6
|
getConnectionError,
|
|
7
7
|
isRetriableNeo4jError,
|
|
8
|
-
} from './connectionErrorHandler';
|
|
8
|
+
} from './connectionErrorHandler.js';
|
|
9
9
|
import {
|
|
10
10
|
ConnectedMetadataPoller,
|
|
11
11
|
DisconnectedMetadataPoller,
|
|
12
12
|
MetadataPoller,
|
|
13
|
-
} from './metadataPoller';
|
|
14
|
-
import { Neo4jConnection } from './neo4jConnection';
|
|
13
|
+
} from './metadataPoller.js';
|
|
14
|
+
import { Neo4jConnection } from './neo4jConnection.js';
|
|
15
15
|
import { listDatabases } from './queries/databases.js';
|
|
16
|
-
import { getVersion } from './queries/version';
|
|
16
|
+
import { getVersion } from './queries/version.js';
|
|
17
17
|
|
|
18
18
|
export type ConnnectionResult = {
|
|
19
19
|
success: boolean;
|