@graphty/graph-io 0.3.47 → 0.3.48
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/dist/chunks/{approximations-wWjCRzKj.js → approximations-C2riR4NT.js} +2 -2
- package/dist/chunks/{approximations-wWjCRzKj.js.map → approximations-C2riR4NT.js.map} +1 -1
- package/dist/chunks/{block-DiGq58c3.js → block-Cu22ewuS.js} +92 -21
- package/dist/chunks/block-Cu22ewuS.js.map +1 -0
- package/dist/chunks/{choose--jM0yYCo.js → choose-Cdx6Enl2.js} +3 -3
- package/dist/chunks/{choose--jM0yYCo.js.map → choose-Cdx6Enl2.js.map} +1 -1
- package/dist/chunks/codes-CV_Bhcyi.js +153 -0
- package/dist/chunks/codes-CV_Bhcyi.js.map +1 -0
- package/dist/chunks/{constants-BKwqelYD.js → constants-D0LqcsLJ.js} +2 -2
- package/dist/chunks/{constants-BKwqelYD.js.map → constants-D0LqcsLJ.js.map} +1 -1
- package/dist/chunks/context-cgmmOxZ2.js +663 -0
- package/dist/chunks/context-cgmmOxZ2.js.map +1 -0
- package/dist/chunks/credentials-BiQsnMTb.js +347 -0
- package/dist/chunks/credentials-BiQsnMTb.js.map +1 -0
- package/dist/chunks/cx-export-BEeF6ymo.js +259 -0
- package/dist/chunks/cx-export-BEeF6ymo.js.map +1 -0
- package/dist/chunks/descriptor-BJ-W0Jd-.js +137 -0
- package/dist/chunks/descriptor-BJ-W0Jd-.js.map +1 -0
- package/dist/chunks/descriptor-C-YDhtsn.js +48 -0
- package/dist/chunks/descriptor-C-YDhtsn.js.map +1 -0
- package/dist/chunks/{emit-CwU8cUmG.js → emit-CD8xnY8s.js} +70 -10
- package/dist/chunks/emit-CD8xnY8s.js.map +1 -0
- package/dist/chunks/{escape-CgzxiYPg.js → escape-DH2Egt-l.js} +12 -12
- package/dist/chunks/{escape-CgzxiYPg.js.map → escape-DH2Egt-l.js.map} +1 -1
- package/dist/chunks/{export-BvqAXCKh.js → export-CZ7VRm4I.js} +53 -1443
- package/dist/chunks/export-CZ7VRm4I.js.map +1 -0
- package/dist/chunks/{exporter-DndFlGSa.js → exporter-BIdaoIgh.js} +7 -6
- package/dist/chunks/{exporter-DndFlGSa.js.map → exporter-BIdaoIgh.js.map} +1 -1
- package/dist/chunks/{exporter-CJgfhF-l.js → exporter-ChjL5fmP.js} +8 -7
- package/dist/chunks/{exporter-CJgfhF-l.js.map → exporter-ChjL5fmP.js.map} +1 -1
- package/dist/chunks/{exporter--Mk9gXCJ.js → exporter-Dcw7Ldtq.js} +6 -4
- package/dist/chunks/{exporter--Mk9gXCJ.js.map → exporter-Dcw7Ldtq.js.map} +1 -1
- package/dist/chunks/exporter-DtVU80Fa.js +1008 -0
- package/dist/chunks/exporter-DtVU80Fa.js.map +1 -0
- package/dist/chunks/{exporter-CrDWIyiq.js → exporter-bxxjOrDZ.js} +11 -9
- package/dist/chunks/{exporter-CrDWIyiq.js.map → exporter-bxxjOrDZ.js.map} +1 -1
- package/dist/chunks/format-BMS-1Nxb.js +64 -0
- package/dist/chunks/format-BMS-1Nxb.js.map +1 -0
- package/dist/chunks/{generic-Dq1ntt9q.js → generic-CP6YD34u.js} +4 -4
- package/dist/chunks/{generic-Dq1ntt9q.js.map → generic-CP6YD34u.js.map} +1 -1
- package/dist/chunks/{importer-DiZRmOQG.js → importer-B87_fmVx.js} +13 -17
- package/dist/chunks/importer-B87_fmVx.js.map +1 -0
- package/dist/chunks/{importer-BSvfrX_h.js → importer-Bji2MeWr.js} +18 -1014
- package/dist/chunks/importer-Bji2MeWr.js.map +1 -0
- package/dist/chunks/{importer-COTK9Tsl.js → importer-CB_zV5_L.js} +14 -11
- package/dist/chunks/importer-CB_zV5_L.js.map +1 -0
- package/dist/chunks/{importer-e6LGpqHB.js → importer-CVT-JyDE.js} +12 -9
- package/dist/chunks/importer-CVT-JyDE.js.map +1 -0
- package/dist/chunks/{importer-yh_aBCU6.js → importer-Cyy6UseH.js} +7 -6
- package/dist/chunks/{importer-yh_aBCU6.js.map → importer-Cyy6UseH.js.map} +1 -1
- package/dist/chunks/{importer-iFYPEKaJ.js → importer-DPZDN40-.js} +14 -10
- package/dist/chunks/{importer-iFYPEKaJ.js.map → importer-DPZDN40-.js.map} +1 -1
- package/dist/chunks/{importer-CMmeMWlC.js → importer-e3huMZbm.js} +8 -260
- package/dist/chunks/importer-e3huMZbm.js.map +1 -0
- package/dist/chunks/input-Ccg9I22A.js +1397 -0
- package/dist/chunks/input-Ccg9I22A.js.map +1 -0
- package/dist/chunks/{json-elements-DJZRZ6jd.js → json-elements-By172SVq.js} +4 -4
- package/dist/chunks/{json-elements-DJZRZ6jd.js.map → json-elements-By172SVq.js.map} +1 -1
- package/dist/chunks/{lexicon-CT69Kd87.js → lexicon-u2SI5xcx.js} +19 -5
- package/dist/chunks/lexicon-u2SI5xcx.js.map +1 -0
- package/dist/chunks/{ontology-export-G4MqRdux.js → ontology-export-BwgMyuF0.js} +4 -3
- package/dist/chunks/{ontology-export-G4MqRdux.js.map → ontology-export-BwgMyuF0.js.map} +1 -1
- package/dist/chunks/{records-CiaWZrFH.js → records-Cgvxz-Vx.js} +2 -2
- package/dist/chunks/{records-CiaWZrFH.js.map → records-Cgvxz-Vx.js.map} +1 -1
- package/dist/chunks/{format-BpQBx8MZ.js → report-CgdsL9Hb.js} +72 -129
- package/dist/chunks/report-CgdsL9Hb.js.map +1 -0
- package/dist/chunks/sigv4-LkAzsLAu.js +247 -0
- package/dist/chunks/sigv4-LkAzsLAu.js.map +1 -0
- package/dist/chunks/{styles-BQnsga7p.js → styles-CaABMoO1.js} +76 -43
- package/dist/chunks/styles-CaABMoO1.js.map +1 -0
- package/dist/chunks/{styles-D3fRphrO.js → styles-P_gmFAOi.js} +101 -21
- package/dist/chunks/styles-P_gmFAOi.js.map +1 -0
- package/dist/chunks/{styles-yed-BF5x3_Y5.js → styles-yed-Cs1nmrjn.js} +60 -20
- package/dist/chunks/styles-yed-Cs1nmrjn.js.map +1 -0
- package/dist/chunks/{text-CzJNFOS9.js → text-BuKQVMz2.js} +2 -2
- package/dist/chunks/{text-CzJNFOS9.js.map → text-BuKQVMz2.js.map} +1 -1
- package/dist/chunks/{writer-DMKvthQE.js → writer-DvHTl36J.js} +5 -4
- package/dist/chunks/writer-DvHTl36J.js.map +1 -0
- package/dist/csv.js +7 -5
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +5 -4
- package/dist/cx.js.map +1 -1
- package/dist/cx2.js +2 -2
- package/dist/cys.js +1 -1
- package/dist/dot.js +2 -2
- package/dist/gexf.js +7 -5
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +16 -13
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +1181 -224
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +3 -3
- package/dist/json.js +1 -1
- package/dist/neo4j.js +6 -4
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +1 -1
- package/dist/pajek.js +1 -1
- package/dist/sources-cypher.d.ts +1 -0
- package/dist/sources-cypher.js +1236 -0
- package/dist/sources-cypher.js.map +1 -0
- package/dist/sources-ndex.d.ts +1 -0
- package/dist/sources-ndex.js +278 -0
- package/dist/sources-ndex.js.map +1 -0
- package/dist/sources-rest.d.ts +1 -0
- package/dist/sources-rest.js +1367 -0
- package/dist/sources-rest.js.map +1 -0
- package/dist/src/common/report.d.ts +6 -3
- package/dist/src/common/report.d.ts.map +1 -1
- package/dist/src/common/report.js +15 -9
- package/dist/src/common/report.js.map +1 -1
- package/dist/src/formats/cx/styles.d.ts.map +1 -1
- package/dist/src/formats/cx/styles.js +1 -0
- package/dist/src/formats/cx/styles.js.map +1 -1
- package/dist/src/formats/dot/styles.d.ts.map +1 -1
- package/dist/src/formats/dot/styles.js +3 -1
- package/dist/src/formats/dot/styles.js.map +1 -1
- package/dist/src/formats/gexf/styles.d.ts +29 -12
- package/dist/src/formats/gexf/styles.d.ts.map +1 -1
- package/dist/src/formats/gexf/styles.js +160 -31
- package/dist/src/formats/gexf/styles.js.map +1 -1
- package/dist/src/formats/gml/styles.d.ts.map +1 -1
- package/dist/src/formats/gml/styles.js +5 -4
- package/dist/src/formats/gml/styles.js.map +1 -1
- package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-plain.js +3 -3
- package/dist/src/formats/graphml/styles-plain.js.map +1 -1
- package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-yed.js +89 -19
- package/dist/src/formats/graphml/styles-yed.js.map +1 -1
- package/dist/src/formats/pajek/styles.d.ts.map +1 -1
- package/dist/src/formats/pajek/styles.js +1 -0
- package/dist/src/formats/pajek/styles.js.map +1 -1
- package/dist/src/formats/xgmml/styles.d.ts.map +1 -1
- package/dist/src/formats/xgmml/styles.js +1 -0
- package/dist/src/formats/xgmml/styles.js.map +1 -1
- package/dist/src/index.d.ts +8 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/registry.d.ts +173 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +196 -1
- package/dist/src/registry.js.map +1 -1
- package/dist/src/sources/builtins.d.ts +11 -0
- package/dist/src/sources/builtins.d.ts.map +1 -0
- package/dist/src/sources/builtins.js +47 -0
- package/dist/src/sources/builtins.js.map +1 -0
- package/dist/src/sources/codes.d.ts +230 -0
- package/dist/src/sources/codes.d.ts.map +1 -0
- package/dist/src/sources/codes.js +58 -0
- package/dist/src/sources/codes.js.map +1 -0
- package/dist/src/sources/context.d.ts +112 -0
- package/dist/src/sources/context.d.ts.map +1 -0
- package/dist/src/sources/context.js +739 -0
- package/dist/src/sources/context.js.map +1 -0
- package/dist/src/sources/credentials.d.ts +179 -0
- package/dist/src/sources/credentials.d.ts.map +1 -0
- package/dist/src/sources/credentials.js +301 -0
- package/dist/src/sources/credentials.js.map +1 -0
- package/dist/src/sources/cypher/descriptor.d.ts +21 -0
- package/dist/src/sources/cypher/descriptor.d.ts.map +1 -0
- package/dist/src/sources/cypher/descriptor.js +119 -0
- package/dist/src/sources/cypher/descriptor.js.map +1 -0
- package/dist/src/sources/cypher/flatten.d.ts +72 -0
- package/dist/src/sources/cypher/flatten.d.ts.map +1 -0
- package/dist/src/sources/cypher/flatten.js +279 -0
- package/dist/src/sources/cypher/flatten.js.map +1 -0
- package/dist/src/sources/cypher/index.d.ts +33 -0
- package/dist/src/sources/cypher/index.d.ts.map +1 -0
- package/dist/src/sources/cypher/index.js +405 -0
- package/dist/src/sources/cypher/index.js.map +1 -0
- package/dist/src/sources/cypher/params.d.ts +40 -0
- package/dist/src/sources/cypher/params.d.ts.map +1 -0
- package/dist/src/sources/cypher/params.js +6 -0
- package/dist/src/sources/cypher/params.js.map +1 -0
- package/dist/src/sources/cypher/profiles.d.ts +44 -0
- package/dist/src/sources/cypher/profiles.d.ts.map +1 -0
- package/dist/src/sources/cypher/profiles.js +61 -0
- package/dist/src/sources/cypher/profiles.js.map +1 -0
- package/dist/src/sources/cypher/query-builder.d.ts +106 -0
- package/dist/src/sources/cypher/query-builder.d.ts.map +1 -0
- package/dist/src/sources/cypher/query-builder.js +236 -0
- package/dist/src/sources/cypher/query-builder.js.map +1 -0
- package/dist/src/sources/cypher/transports/bolt.d.ts +21 -0
- package/dist/src/sources/cypher/transports/bolt.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/bolt.js +185 -0
- package/dist/src/sources/cypher/transports/bolt.js.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.d.ts +15 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.js +38 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.js.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-https.d.ts +31 -0
- package/dist/src/sources/cypher/transports/neptune-https.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-https.js +104 -0
- package/dist/src/sources/cypher/transports/neptune-https.js.map +1 -0
- package/dist/src/sources/cypher/transports/query-api.d.ts +14 -0
- package/dist/src/sources/cypher/transports/query-api.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/query-api.js +80 -0
- package/dist/src/sources/cypher/transports/query-api.js.map +1 -0
- package/dist/src/sources/cypher/transports/transport.d.ts +78 -0
- package/dist/src/sources/cypher/transports/transport.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/transport.js +77 -0
- package/dist/src/sources/cypher/transports/transport.js.map +1 -0
- package/dist/src/sources/cypher/types-map.d.ts +91 -0
- package/dist/src/sources/cypher/types-map.d.ts.map +1 -0
- package/dist/src/sources/cypher/types-map.js +306 -0
- package/dist/src/sources/cypher/types-map.js.map +1 -0
- package/dist/src/sources/define.d.ts +47 -0
- package/dist/src/sources/define.d.ts.map +1 -0
- package/dist/src/sources/define.js +173 -0
- package/dist/src/sources/define.js.map +1 -0
- package/dist/src/sources/fail.d.ts +33 -0
- package/dist/src/sources/fail.d.ts.map +1 -0
- package/dist/src/sources/fail.js +49 -0
- package/dist/src/sources/fail.js.map +1 -0
- package/dist/src/sources/ids.d.ts +64 -0
- package/dist/src/sources/ids.d.ts.map +1 -0
- package/dist/src/sources/ids.js +64 -0
- package/dist/src/sources/ids.js.map +1 -0
- package/dist/src/sources/ndex/client.d.ts +31 -0
- package/dist/src/sources/ndex/client.d.ts.map +1 -0
- package/dist/src/sources/ndex/client.js +90 -0
- package/dist/src/sources/ndex/client.js.map +1 -0
- package/dist/src/sources/ndex/descriptor.d.ts +10 -0
- package/dist/src/sources/ndex/descriptor.d.ts.map +1 -0
- package/dist/src/sources/ndex/descriptor.js +55 -0
- package/dist/src/sources/ndex/descriptor.js.map +1 -0
- package/dist/src/sources/ndex/expand.d.ts +20 -0
- package/dist/src/sources/ndex/expand.d.ts.map +1 -0
- package/dist/src/sources/ndex/expand.js +87 -0
- package/dist/src/sources/ndex/expand.js.map +1 -0
- package/dist/src/sources/ndex/index.d.ts +25 -0
- package/dist/src/sources/ndex/index.d.ts.map +1 -0
- package/dist/src/sources/ndex/index.js +191 -0
- package/dist/src/sources/ndex/index.js.map +1 -0
- package/dist/src/sources/ndex/params.d.ts +17 -0
- package/dist/src/sources/ndex/params.d.ts.map +1 -0
- package/dist/src/sources/ndex/params.js +6 -0
- package/dist/src/sources/ndex/params.js.map +1 -0
- package/dist/src/sources/ndex/share-url.d.ts +40 -0
- package/dist/src/sources/ndex/share-url.d.ts.map +1 -0
- package/dist/src/sources/ndex/share-url.js +64 -0
- package/dist/src/sources/ndex/share-url.js.map +1 -0
- package/dist/src/sources/params.d.ts +28 -0
- package/dist/src/sources/params.d.ts.map +1 -0
- package/dist/src/sources/params.js +6 -0
- package/dist/src/sources/params.js.map +1 -0
- package/dist/src/sources/registry.d.ts +118 -0
- package/dist/src/sources/registry.d.ts.map +1 -0
- package/dist/src/sources/registry.js +193 -0
- package/dist/src/sources/registry.js.map +1 -0
- package/dist/src/sources/rest/descriptor.d.ts +16 -0
- package/dist/src/sources/rest/descriptor.d.ts.map +1 -0
- package/dist/src/sources/rest/descriptor.js +71 -0
- package/dist/src/sources/rest/descriptor.js.map +1 -0
- package/dist/src/sources/rest/index.d.ts +14 -0
- package/dist/src/sources/rest/index.d.ts.map +1 -0
- package/dist/src/sources/rest/index.js +13 -0
- package/dist/src/sources/rest/index.js.map +1 -0
- package/dist/src/sources/rest/mapping.d.ts +30 -0
- package/dist/src/sources/rest/mapping.d.ts.map +1 -0
- package/dist/src/sources/rest/mapping.js +362 -0
- package/dist/src/sources/rest/mapping.js.map +1 -0
- package/dist/src/sources/rest/openalex.d.ts +27 -0
- package/dist/src/sources/rest/openalex.d.ts.map +1 -0
- package/dist/src/sources/rest/openalex.js +269 -0
- package/dist/src/sources/rest/openalex.js.map +1 -0
- package/dist/src/sources/rest/paging.d.ts +53 -0
- package/dist/src/sources/rest/paging.d.ts.map +1 -0
- package/dist/src/sources/rest/paging.js +138 -0
- package/dist/src/sources/rest/paging.js.map +1 -0
- package/dist/src/sources/rest/params.d.ts +216 -0
- package/dist/src/sources/rest/params.d.ts.map +1 -0
- package/dist/src/sources/rest/params.js +7 -0
- package/dist/src/sources/rest/params.js.map +1 -0
- package/dist/src/sources/rest/records.d.ts +41 -0
- package/dist/src/sources/rest/records.d.ts.map +1 -0
- package/dist/src/sources/rest/records.js +240 -0
- package/dist/src/sources/rest/records.js.map +1 -0
- package/dist/src/sources/rest/samples/deps-dev.d.ts +10 -0
- package/dist/src/sources/rest/samples/deps-dev.d.ts.map +1 -0
- package/dist/src/sources/rest/samples/deps-dev.js +47 -0
- package/dist/src/sources/rest/samples/deps-dev.js.map +1 -0
- package/dist/src/sources/rest/samples/string.d.ts +9 -0
- package/dist/src/sources/rest/samples/string.d.ts.map +1 -0
- package/dist/src/sources/rest/samples/string.js +42 -0
- package/dist/src/sources/rest/samples/string.js.map +1 -0
- package/dist/src/sources/rest/selectors.d.ts +41 -0
- package/dist/src/sources/rest/selectors.d.ts.map +1 -0
- package/dist/src/sources/rest/selectors.js +81 -0
- package/dist/src/sources/rest/selectors.js.map +1 -0
- package/dist/src/sources/rest/source.d.ts +67 -0
- package/dist/src/sources/rest/source.d.ts.map +1 -0
- package/dist/src/sources/rest/source.js +635 -0
- package/dist/src/sources/rest/source.js.map +1 -0
- package/dist/src/sources/rest/templates.d.ts +38 -0
- package/dist/src/sources/rest/templates.d.ts.map +1 -0
- package/dist/src/sources/rest/templates.js +125 -0
- package/dist/src/sources/rest/templates.js.map +1 -0
- package/dist/src/sources/run.d.ts +93 -0
- package/dist/src/sources/run.d.ts.map +1 -0
- package/dist/src/sources/run.js +673 -0
- package/dist/src/sources/run.js.map +1 -0
- package/dist/src/sources/sha256.d.ts +12 -0
- package/dist/src/sources/sha256.d.ts.map +1 -0
- package/dist/src/sources/sha256.js +95 -0
- package/dist/src/sources/sha256.js.map +1 -0
- package/dist/src/sources/sigv4.d.ts +24 -0
- package/dist/src/sources/sigv4.d.ts.map +1 -0
- package/dist/src/sources/sigv4.js +182 -0
- package/dist/src/sources/sigv4.js.map +1 -0
- package/dist/src/sources/testing.d.ts +96 -0
- package/dist/src/sources/testing.d.ts.map +1 -0
- package/dist/src/sources/testing.js +138 -0
- package/dist/src/sources/testing.js.map +1 -0
- package/dist/src/sources/types.d.ts +665 -0
- package/dist/src/sources/types.d.ts.map +1 -0
- package/dist/src/sources/types.js +10 -0
- package/dist/src/sources/types.js.map +1 -0
- package/dist/src/styles/canon/enums.d.ts.map +1 -1
- package/dist/src/styles/canon/enums.js +1 -0
- package/dist/src/styles/canon/enums.js.map +1 -1
- package/dist/src/styles/cyjs/cascade.d.ts.map +1 -1
- package/dist/src/styles/cyjs/cascade.js +68 -2
- package/dist/src/styles/cyjs/cascade.js.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.js +2 -0
- package/dist/src/styles/cyjs/defaults-table.js.map +1 -1
- package/dist/src/styles/cyjs/emit.d.ts.map +1 -1
- package/dist/src/styles/cyjs/emit.js +18 -7
- package/dist/src/styles/cyjs/emit.js.map +1 -1
- package/dist/src/styles/cyjs/mappers.d.ts +4 -1
- package/dist/src/styles/cyjs/mappers.d.ts.map +1 -1
- package/dist/src/styles/cyjs/mappers.js +2 -0
- package/dist/src/styles/cyjs/mappers.js.map +1 -1
- package/dist/src/styles/cytoscape/emit.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/emit.js +59 -7
- package/dist/src/styles/cytoscape/emit.js.map +1 -1
- package/dist/src/styles/cytoscape/lexicon.d.ts +6 -0
- package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/lexicon.js +26 -2
- package/dist/src/styles/cytoscape/lexicon.js.map +1 -1
- package/dist/src/styles/cytoscape/resolve.d.ts +4 -1
- package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/resolve.js +10 -6
- package/dist/src/styles/cytoscape/resolve.js.map +1 -1
- package/dist/src/styles/cytoscape/translate.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/translate.js +10 -10
- package/dist/src/styles/cytoscape/translate.js.map +1 -1
- package/dist/src/styles/defaults.d.ts +30 -0
- package/dist/src/styles/defaults.d.ts.map +1 -1
- package/dist/src/styles/defaults.js +45 -4
- package/dist/src/styles/defaults.js.map +1 -1
- package/dist/src/styles/io/block.d.ts.map +1 -1
- package/dist/src/styles/io/block.js +9 -0
- package/dist/src/styles/io/block.js.map +1 -1
- package/dist/src/styles/io/writer.d.ts.map +1 -1
- package/dist/src/styles/io/writer.js +7 -3
- package/dist/src/styles/io/writer.js.map +1 -1
- package/dist/src/styles/plan/resolve.d.ts +2 -1
- package/dist/src/styles/plan/resolve.d.ts.map +1 -1
- package/dist/src/styles/plan/resolve.js +13 -2
- package/dist/src/styles/plan/resolve.js.map +1 -1
- package/dist/src/styles/types.d.ts +19 -2
- package/dist/src/styles/types.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.js +15 -1
- package/dist/src/styles/vocabulary.js.map +1 -1
- package/dist/src/types.d.ts +19 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/styles.js +11 -11
- package/dist/xgmml.js +3 -3
- package/docs/samples/people.json +6 -0
- package/package.json +29 -4
- package/src/common/report.ts +27 -7
- package/src/formats/cx/styles.ts +1 -0
- package/src/formats/dot/styles.ts +3 -1
- package/src/formats/gexf/styles.ts +185 -37
- package/src/formats/gml/styles.ts +5 -4
- package/src/formats/graphml/styles-plain.ts +3 -9
- package/src/formats/graphml/styles-yed.ts +93 -20
- package/src/formats/pajek/styles.ts +1 -0
- package/src/formats/xgmml/styles.ts +1 -0
- package/src/index.ts +90 -0
- package/src/registry.ts +326 -1
- package/src/sources/builtins.ts +56 -0
- package/src/sources/codes.ts +235 -0
- package/src/sources/context.ts +893 -0
- package/src/sources/credentials.ts +409 -0
- package/src/sources/cypher/descriptor.ts +125 -0
- package/src/sources/cypher/flatten.ts +323 -0
- package/src/sources/cypher/index.ts +498 -0
- package/src/sources/cypher/params.ts +41 -0
- package/src/sources/cypher/profiles.ts +78 -0
- package/src/sources/cypher/query-builder.ts +294 -0
- package/src/sources/cypher/transports/bolt.ts +228 -0
- package/src/sources/cypher/transports/neptune-analytics.ts +41 -0
- package/src/sources/cypher/transports/neptune-https.ts +122 -0
- package/src/sources/cypher/transports/query-api.ts +100 -0
- package/src/sources/cypher/transports/transport.ts +139 -0
- package/src/sources/cypher/types-map.ts +418 -0
- package/src/sources/define.ts +195 -0
- package/src/sources/fail.ts +70 -0
- package/src/sources/ids.ts +74 -0
- package/src/sources/ndex/client.ts +102 -0
- package/src/sources/ndex/descriptor.ts +64 -0
- package/src/sources/ndex/expand.ts +100 -0
- package/src/sources/ndex/index.ts +235 -0
- package/src/sources/ndex/params.ts +17 -0
- package/src/sources/ndex/share-url.ts +84 -0
- package/src/sources/params.ts +29 -0
- package/src/sources/registry.ts +325 -0
- package/src/sources/rest/descriptor.ts +74 -0
- package/src/sources/rest/index.ts +22 -0
- package/src/sources/rest/mapping.ts +401 -0
- package/src/sources/rest/openalex.ts +288 -0
- package/src/sources/rest/paging.ts +180 -0
- package/src/sources/rest/params.ts +243 -0
- package/src/sources/rest/records.ts +289 -0
- package/src/sources/rest/samples/deps-dev.ts +49 -0
- package/src/sources/rest/samples/string.ts +44 -0
- package/src/sources/rest/selectors.ts +91 -0
- package/src/sources/rest/source.ts +760 -0
- package/src/sources/rest/templates.ts +151 -0
- package/src/sources/run.ts +793 -0
- package/src/sources/sha256.ts +99 -0
- package/src/sources/sigv4.ts +207 -0
- package/src/sources/testing.ts +210 -0
- package/src/sources/types.ts +741 -0
- package/src/styles/canon/enums.ts +1 -0
- package/src/styles/cyjs/cascade.ts +81 -2
- package/src/styles/cyjs/defaults-table.ts +2 -0
- package/src/styles/cyjs/emit.ts +18 -7
- package/src/styles/cyjs/mappers.ts +6 -1
- package/src/styles/cytoscape/emit.ts +61 -7
- package/src/styles/cytoscape/lexicon.ts +28 -2
- package/src/styles/cytoscape/resolve.ts +22 -6
- package/src/styles/cytoscape/translate.ts +11 -11
- package/src/styles/defaults.ts +93 -4
- package/src/styles/io/block.ts +10 -0
- package/src/styles/io/writer.ts +8 -3
- package/src/styles/plan/resolve.ts +14 -2
- package/src/styles/types.ts +28 -2
- package/src/styles/vocabulary.ts +15 -1
- package/src/types.ts +19 -5
- package/dist/chunks/block-DiGq58c3.js.map +0 -1
- package/dist/chunks/emit-CwU8cUmG.js.map +0 -1
- package/dist/chunks/export-BvqAXCKh.js.map +0 -1
- package/dist/chunks/format-BpQBx8MZ.js.map +0 -1
- package/dist/chunks/importer-BSvfrX_h.js.map +0 -1
- package/dist/chunks/importer-CMmeMWlC.js.map +0 -1
- package/dist/chunks/importer-COTK9Tsl.js.map +0 -1
- package/dist/chunks/importer-DiZRmOQG.js.map +0 -1
- package/dist/chunks/importer-e6LGpqHB.js.map +0 -1
- package/dist/chunks/lexicon-CT69Kd87.js.map +0 -1
- package/dist/chunks/styles-BQnsga7p.js.map +0 -1
- package/dist/chunks/styles-D3fRphrO.js.map +0 -1
- package/dist/chunks/styles-yed-BF5x3_Y5.js.map +0 -1
- package/dist/chunks/writer-DMKvthQE.js.map +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one result flattener of the Cypher source (design section 5): every node and relationship a
|
|
3
|
+
* result holds -- in a column, a path, a list or a map -- is collected once by its element id, and
|
|
4
|
+
* written to the sink as nodes (labels in the `labels` column, as the neo4j CSV importer has them)
|
|
5
|
+
* and directed edges (type in `type`, element id in `id`). A result of scalars only is
|
|
6
|
+
* E_SOURCE_NOT_A_GRAPH.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { type ColumnDecl, type GraphSink, INVALID_INDEX, type NodeId } from "@graphty/graph-format";
|
|
10
|
+
|
|
11
|
+
import { throwIfAborted } from "../../common/input.js";
|
|
12
|
+
import { type ImportReportBuilder } from "../../common/report.js";
|
|
13
|
+
import { failOn } from "../fail.js";
|
|
14
|
+
import { SOURCE_DEGREE_ATTR } from "../ids.js";
|
|
15
|
+
import { GraphNode, GraphRel } from "./types-map.js";
|
|
16
|
+
|
|
17
|
+
/** One query's result, every value already mapped. */
|
|
18
|
+
export interface QueryResult {
|
|
19
|
+
/** The column names. */
|
|
20
|
+
readonly fields: readonly string[];
|
|
21
|
+
/** The rows, one value per column. */
|
|
22
|
+
readonly rows: readonly (readonly unknown[])[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The column names the neo4j CSV importer gives labels and types; spelled here so the Cypher chunk does not load it. */
|
|
26
|
+
const LABELS_COLUMN = "labels";
|
|
27
|
+
const TYPE_COLUMN = "type";
|
|
28
|
+
|
|
29
|
+
/** The labels column, as the neo4j CSV importer declares it. */
|
|
30
|
+
const LABELS_DECL: ColumnDecl = {
|
|
31
|
+
name: LABELS_COLUMN,
|
|
32
|
+
dtype: "list",
|
|
33
|
+
itemDtype: "dict",
|
|
34
|
+
nullable: true,
|
|
35
|
+
role: "labels",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** The relationship type column. */
|
|
39
|
+
const TYPE_DECL: ColumnDecl = { name: TYPE_COLUMN, dtype: "dict", nullable: true, role: "kind" };
|
|
40
|
+
|
|
41
|
+
/** The edge id column. */
|
|
42
|
+
const EDGE_ID_DECL: ColumnDecl = { name: "id", dtype: "string", nullable: true, role: "id" };
|
|
43
|
+
|
|
44
|
+
/** The nodes, relationships and degree hints of one or more results, each once. */
|
|
45
|
+
export class Collector {
|
|
46
|
+
readonly nodes = new Map<string, GraphNode>();
|
|
47
|
+
readonly rels = new Map<string, GraphRel>();
|
|
48
|
+
/** Degree hints by the id expression's value, as text. */
|
|
49
|
+
readonly degrees = new Map<string, number>();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Collect a result.
|
|
53
|
+
* @param result - the result
|
|
54
|
+
* @param hints - whether its `key` / `degree` / `degrees` columns are the generated queries' hints
|
|
55
|
+
*/
|
|
56
|
+
add(result: QueryResult, hints: boolean): void {
|
|
57
|
+
const key = hints ? result.fields.indexOf("key") : -1;
|
|
58
|
+
const degree = hints ? result.fields.indexOf("degree") : -1;
|
|
59
|
+
const degrees = hints ? result.fields.indexOf("degrees") : -1;
|
|
60
|
+
for (const row of result.rows) {
|
|
61
|
+
row.forEach((value, i) => {
|
|
62
|
+
if (i === degrees && Array.isArray(value)) {
|
|
63
|
+
for (const pair of value as unknown[]) {
|
|
64
|
+
if (Array.isArray(pair) && typeof pair[1] === "number") {
|
|
65
|
+
this.degrees.set(String(pair[0]), pair[1]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
} else if (i !== key && i !== degree) {
|
|
69
|
+
this.visit(value);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
if (key >= 0 && degree >= 0 && typeof row[degree] === "number") {
|
|
73
|
+
this.degrees.set(String(row[key]), row[degree]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Collect every node and relationship inside a value.
|
|
80
|
+
* @param value - the value
|
|
81
|
+
*/
|
|
82
|
+
private visit(value: unknown): void {
|
|
83
|
+
if (value instanceof GraphNode) {
|
|
84
|
+
this.nodes.set(value.id, value);
|
|
85
|
+
} else if (value instanceof GraphRel) {
|
|
86
|
+
this.rels.set(value.id, value);
|
|
87
|
+
} else if (Array.isArray(value)) {
|
|
88
|
+
value.forEach((v) => {
|
|
89
|
+
this.visit(v);
|
|
90
|
+
});
|
|
91
|
+
} else if (value !== null && typeof value === "object") {
|
|
92
|
+
Object.values(value).forEach((v) => {
|
|
93
|
+
this.visit(v);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Whether nothing was collected.
|
|
100
|
+
* @returns true when no node or relationship was found
|
|
101
|
+
*/
|
|
102
|
+
get empty(): boolean {
|
|
103
|
+
return this.nodes.size === 0 && this.rels.size === 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Fail with E_SOURCE_NOT_A_GRAPH when a result has rows but no node, relationship or path.
|
|
109
|
+
* @param result - the result
|
|
110
|
+
* @param collector - what it held
|
|
111
|
+
* @param report - the load's report
|
|
112
|
+
*/
|
|
113
|
+
export function requireGraph(result: QueryResult, collector: Collector, report: ImportReportBuilder): void {
|
|
114
|
+
if (result.rows.length > 0 && collector.empty) {
|
|
115
|
+
failOn(report, "E_SOURCE_NOT_A_GRAPH", "the query returned no node, relationship or path", {
|
|
116
|
+
columns: result.fields,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The id a node gets: its `idProperty` value when it has one, else the server's element id.
|
|
123
|
+
* @param node - the node
|
|
124
|
+
* @param idProperty - the id property, or null
|
|
125
|
+
* @returns the id
|
|
126
|
+
*/
|
|
127
|
+
function nodeIdOf(node: GraphNode, idProperty: string | null): NodeId {
|
|
128
|
+
const value = idProperty === null ? undefined : node.properties[idProperty];
|
|
129
|
+
return typeof value === "string" || typeof value === "number" ? value : node.id;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A column handle, declared on first use.
|
|
134
|
+
* @param sink - the sink
|
|
135
|
+
* @param decl - the declaration
|
|
136
|
+
* @param domain - node or edge
|
|
137
|
+
* @returns the handle
|
|
138
|
+
*/
|
|
139
|
+
function column(sink: GraphSink, decl: ColumnDecl, domain: "node" | "edge"): ReturnType<GraphSink["nodeColumn"]> {
|
|
140
|
+
const existing = domain === "node" ? sink.nodeColumn(decl.name) : sink.edgeColumn(decl.name);
|
|
141
|
+
if (existing !== INVALID_INDEX) {
|
|
142
|
+
return existing;
|
|
143
|
+
}
|
|
144
|
+
return domain === "node" ? sink.declareNodeColumn(decl) : sink.declareEdgeColumn(decl);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Write what was collected into the sink. A node already in the sink is updated, not counted again.
|
|
149
|
+
* @param c - the collector
|
|
150
|
+
* @param sink - the sink
|
|
151
|
+
* @param idProperty - the id property, or null
|
|
152
|
+
* @param report - the load's report
|
|
153
|
+
* @param signal - the load's signal
|
|
154
|
+
*/
|
|
155
|
+
export function writeCollected(
|
|
156
|
+
c: Collector,
|
|
157
|
+
sink: GraphSink,
|
|
158
|
+
idProperty: string | null,
|
|
159
|
+
report: ImportReportBuilder,
|
|
160
|
+
signal: AbortSignal,
|
|
161
|
+
): void {
|
|
162
|
+
if (sink.edgeCount === 0 && !sink.directedLocked && !sink.directed) {
|
|
163
|
+
sink.setDirected(true);
|
|
164
|
+
}
|
|
165
|
+
const ids = writeNodes(c, sink, idProperty, report, signal);
|
|
166
|
+
writeRels(c, sink, ids, report, signal, c.nodes.size);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Write the collected nodes into the sink.
|
|
171
|
+
* @param c - the collector
|
|
172
|
+
* @param sink - the sink
|
|
173
|
+
* @param idProperty - the id property, or null
|
|
174
|
+
* @param report - the load's report
|
|
175
|
+
* @param signal - the load's signal
|
|
176
|
+
* @returns each element id's node id
|
|
177
|
+
*/
|
|
178
|
+
function writeNodes(
|
|
179
|
+
c: Collector,
|
|
180
|
+
sink: GraphSink,
|
|
181
|
+
idProperty: string | null,
|
|
182
|
+
report: ImportReportBuilder,
|
|
183
|
+
signal: AbortSignal,
|
|
184
|
+
): Map<string, NodeId> {
|
|
185
|
+
const ids = new Map<string, NodeId>();
|
|
186
|
+
let n = 0;
|
|
187
|
+
for (const node of c.nodes.values()) {
|
|
188
|
+
if (n++ % 64 === 0) {
|
|
189
|
+
throwIfAborted(signal);
|
|
190
|
+
}
|
|
191
|
+
const id = nodeIdOf(node, idProperty);
|
|
192
|
+
ids.set(node.id, id);
|
|
193
|
+
const degree = c.degrees.get(String(idProperty === null ? node.id : id));
|
|
194
|
+
try {
|
|
195
|
+
const fresh = sink.indexOf(id) === INVALID_INDEX;
|
|
196
|
+
const index = sink.addNodeRecord(
|
|
197
|
+
id,
|
|
198
|
+
degree === undefined ? node.properties : { ...node.properties, [SOURCE_DEGREE_ATTR]: degree },
|
|
199
|
+
);
|
|
200
|
+
sink.setNodeValue(column(sink, LABELS_DECL, "node"), index, node.labels);
|
|
201
|
+
if (fresh) {
|
|
202
|
+
report.counts.nodes++;
|
|
203
|
+
}
|
|
204
|
+
} catch (err) {
|
|
205
|
+
report.recordError(err, { element: String(id) });
|
|
206
|
+
report.counts.skippedNodes++;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return ids;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Write the collected relationships into the sink, adding any end the result did not return.
|
|
214
|
+
* @param c - the collector
|
|
215
|
+
* @param sink - the sink
|
|
216
|
+
* @param ids - each element id's node id
|
|
217
|
+
* @param report - the load's report
|
|
218
|
+
* @param signal - the load's signal
|
|
219
|
+
* @param written - how many elements were written before, for the abort check cadence
|
|
220
|
+
*/
|
|
221
|
+
function writeRels(
|
|
222
|
+
c: Collector,
|
|
223
|
+
sink: GraphSink,
|
|
224
|
+
ids: Map<string, NodeId>,
|
|
225
|
+
report: ImportReportBuilder,
|
|
226
|
+
signal: AbortSignal,
|
|
227
|
+
written: number,
|
|
228
|
+
): void {
|
|
229
|
+
let n = written;
|
|
230
|
+
for (const rel of c.rels.values()) {
|
|
231
|
+
if (n++ % 64 === 0) {
|
|
232
|
+
throwIfAborted(signal);
|
|
233
|
+
}
|
|
234
|
+
// an end the result did not return is known only by its element id
|
|
235
|
+
const s = ids.get(rel.start) ?? rel.start;
|
|
236
|
+
const t = ids.get(rel.end) ?? rel.end;
|
|
237
|
+
try {
|
|
238
|
+
for (const end of [s, t]) {
|
|
239
|
+
if (sink.indexOf(end) === INVALID_INDEX) {
|
|
240
|
+
sink.addNode(end);
|
|
241
|
+
report.counts.nodes++;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const e = sink.addEdgeRecord(s, t, rel.properties, null);
|
|
245
|
+
sink.setEdgeValue(column(sink, TYPE_DECL, "edge"), e, rel.type);
|
|
246
|
+
sink.setEdgeValue(column(sink, EDGE_ID_DECL, "edge"), e, rel.id);
|
|
247
|
+
report.counts.edges++;
|
|
248
|
+
} catch (err) {
|
|
249
|
+
report.recordError(err, { element: `${String(s)} -> ${String(t)}` });
|
|
250
|
+
report.counts.skippedEdges++;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Code-unit order of two strings, independent of locale.
|
|
257
|
+
* @param a - one string
|
|
258
|
+
* @param b - another
|
|
259
|
+
* @returns negative, zero or positive
|
|
260
|
+
*/
|
|
261
|
+
export function compareText(a: string, b: string): number {
|
|
262
|
+
if (a === b) {
|
|
263
|
+
return 0;
|
|
264
|
+
}
|
|
265
|
+
return a < b ? -1 : 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* One canonical object member.
|
|
270
|
+
* @param key - the key
|
|
271
|
+
* @param value - the value
|
|
272
|
+
* @returns `"key":value`
|
|
273
|
+
*/
|
|
274
|
+
function member(key: string, value: unknown): string {
|
|
275
|
+
return `${JSON.stringify(key)}:${canonical(value)}`;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* JSON with every object's keys sorted, so equal data spells the same.
|
|
280
|
+
* @param value - the value
|
|
281
|
+
* @returns the canonical text
|
|
282
|
+
*/
|
|
283
|
+
function canonical(value: unknown): string {
|
|
284
|
+
if (Array.isArray(value)) {
|
|
285
|
+
return `[${value.map(canonical).join(",")}]`;
|
|
286
|
+
}
|
|
287
|
+
if (value !== null && typeof value === "object") {
|
|
288
|
+
const entries = Object.entries(value).sort(([a], [b]) => compareText(a, b));
|
|
289
|
+
const members = entries.map(([k, v]) => member(k, v));
|
|
290
|
+
return `{${members.join(",")}}`;
|
|
291
|
+
}
|
|
292
|
+
return JSON.stringify(value) ?? "null";
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The canonical rows of what was collected: one line per node and relationship, sorted, for the
|
|
297
|
+
* content hash `validate` compares.
|
|
298
|
+
* @param c - the collector
|
|
299
|
+
* @param idProperty - the id property, or null
|
|
300
|
+
* @returns the lines
|
|
301
|
+
*/
|
|
302
|
+
export function canonicalRows(c: Collector, idProperty: string | null): string[] {
|
|
303
|
+
const ids = new Map<string, NodeId>();
|
|
304
|
+
const lines: string[] = [];
|
|
305
|
+
for (const node of c.nodes.values()) {
|
|
306
|
+
const id = nodeIdOf(node, idProperty);
|
|
307
|
+
ids.set(node.id, id);
|
|
308
|
+
lines.push(canonical(["n", id, [...node.labels].sort(compareText), node.properties]));
|
|
309
|
+
}
|
|
310
|
+
for (const rel of c.rels.values()) {
|
|
311
|
+
lines.push(
|
|
312
|
+
canonical([
|
|
313
|
+
"r",
|
|
314
|
+
rel.id,
|
|
315
|
+
ids.get(rel.start) ?? rel.start,
|
|
316
|
+
ids.get(rel.end) ?? rel.end,
|
|
317
|
+
rel.type,
|
|
318
|
+
rel.properties,
|
|
319
|
+
]),
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
return lines;
|
|
323
|
+
}
|