@gapi/falkordb 1.8.152
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/.prettierrc +4 -0
- package/README.md +38 -0
- package/dist/falkordb.config.d.ts +7 -0
- package/dist/falkordb.config.js +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +47 -0
- package/package.json +42 -0
- package/src/falkordb.config.ts +9 -0
- package/src/index.ts +27 -0
- package/tsconfig.json +39 -0
package/.prettierrc
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @gapi/falkordb
|
|
2
|
+
|
|
3
|
+
#### @Gapi [Falkordb](https://github.com/FalkorDB/falkordb-ts)
|
|
4
|
+
|
|
5
|
+
##### For questions/issues you can write ticket [here](https://github.com/Stradivario/gapi/issues)
|
|
6
|
+
|
|
7
|
+
##### This module is intended to be used with [GAPI](https://github.com/Stradivario/gapi)
|
|
8
|
+
|
|
9
|
+
## Installation and basic examples:
|
|
10
|
+
|
|
11
|
+
##### To install this Gapi module, run:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
$ npm install @gapi/falkordb
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Consuming @gapi/falkordb
|
|
18
|
+
|
|
19
|
+
##### Import inside AppModule or CoreModule
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { Module } from '@rxdi/core';
|
|
23
|
+
import { FalkorDBModule } from '@gapi/falkordb';
|
|
24
|
+
|
|
25
|
+
@Module({
|
|
26
|
+
imports: [
|
|
27
|
+
FalkorDBModule.forRoot({
|
|
28
|
+
username: 'myUsername',
|
|
29
|
+
password: 'myPassword',
|
|
30
|
+
socket: {
|
|
31
|
+
host: 'localhost',
|
|
32
|
+
port: 6379,
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
})
|
|
37
|
+
export class CoreModule {}
|
|
38
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@rxdi/core';
|
|
2
|
+
import { FalkorDB as FalkorDb } from 'falkordb';
|
|
3
|
+
import { FalkorDBOptions } from 'falkordb/dist/src/falkordb';
|
|
4
|
+
export declare const FalkorDBConfig: InjectionToken<unknown>;
|
|
5
|
+
export declare type FalkorDBConfig = FalkorDBOptions;
|
|
6
|
+
export declare const FalkorDB: InjectionToken<unknown>;
|
|
7
|
+
export declare type FalkorDB = FalkorDb;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FalkorDB = exports.FalkorDBConfig = void 0;
|
|
4
|
+
const core_1 = require("@rxdi/core");
|
|
5
|
+
exports.FalkorDBConfig = new core_1.InjectionToken('falkordb-config');
|
|
6
|
+
exports.FalkorDB = new core_1.InjectionToken('falkordb');
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
var FalkorDBModule_1;
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.FalkorDBModule = void 0;
|
|
21
|
+
const core_1 = require("@rxdi/core");
|
|
22
|
+
const falkordb_1 = require("falkordb");
|
|
23
|
+
const falkordb_config_1 = require("./falkordb.config");
|
|
24
|
+
let FalkorDBModule = FalkorDBModule_1 = class FalkorDBModule {
|
|
25
|
+
static forRoot(config) {
|
|
26
|
+
return {
|
|
27
|
+
module: FalkorDBModule_1,
|
|
28
|
+
providers: [
|
|
29
|
+
{
|
|
30
|
+
provide: falkordb_config_1.FalkorDBConfig,
|
|
31
|
+
useValue: config,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
provide: falkordb_config_1.FalkorDB,
|
|
35
|
+
deps: [falkordb_config_1.FalkorDBConfig],
|
|
36
|
+
lazy: true,
|
|
37
|
+
useFactory: (config) => falkordb_1.FalkorDB.connect(config),
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
FalkorDBModule = FalkorDBModule_1 = __decorate([
|
|
44
|
+
core_1.Module()
|
|
45
|
+
], FalkorDBModule);
|
|
46
|
+
exports.FalkorDBModule = FalkorDBModule;
|
|
47
|
+
__exportStar(require("./falkordb.config"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gapi/falkordb",
|
|
3
|
+
"version": "1.8.152",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/Stradivario/falkordb.git"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"patch": "npm run build && npm version patch && npm publish --update-readme --access public && npm run delete-dist",
|
|
10
|
+
"delete-dist": "rm -rf dist",
|
|
11
|
+
"clean": "git clean -dxf",
|
|
12
|
+
"test": "echo test",
|
|
13
|
+
"lint": "npx eslint . --ext .ts",
|
|
14
|
+
"lint-fix": "npx eslint . --fix --ext .ts",
|
|
15
|
+
"build": "rm -rf dist && tsc || true"
|
|
16
|
+
},
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Kristian Tachev(Stradivario)",
|
|
19
|
+
"email": "kristiqn.tachev@gmail.com"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"graphql",
|
|
23
|
+
"gapi",
|
|
24
|
+
"node",
|
|
25
|
+
"falkordb"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/Stradivario/gapi/issues"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"falkordb": "^6.3.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@rxdi/core": "^0.7.173",
|
|
36
|
+
"@types/node": "^13.11.1"
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"module": "./dist/index.js",
|
|
41
|
+
"typings": "./dist/index.d.ts"
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@rxdi/core';
|
|
2
|
+
import { FalkorDB as FalkorDb } from 'falkordb';
|
|
3
|
+
import { FalkorDBOptions } from 'falkordb/dist/src/falkordb';
|
|
4
|
+
|
|
5
|
+
export const FalkorDBConfig = new InjectionToken('falkordb-config');
|
|
6
|
+
export type FalkorDBConfig = FalkorDBOptions;
|
|
7
|
+
|
|
8
|
+
export const FalkorDB = new InjectionToken('falkordb');
|
|
9
|
+
export type FalkorDB = FalkorDb;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Module, ModuleWithServices } from '@rxdi/core';
|
|
2
|
+
import { FalkorDB as FalkorDb } from 'falkordb';
|
|
3
|
+
|
|
4
|
+
import { FalkorDB, FalkorDBConfig } from './falkordb.config';
|
|
5
|
+
|
|
6
|
+
@Module()
|
|
7
|
+
export class FalkorDBModule {
|
|
8
|
+
static forRoot(config: FalkorDBConfig): ModuleWithServices {
|
|
9
|
+
return {
|
|
10
|
+
module: FalkorDBModule,
|
|
11
|
+
providers: [
|
|
12
|
+
{
|
|
13
|
+
provide: FalkorDBConfig,
|
|
14
|
+
useValue: config,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
provide: FalkorDB,
|
|
18
|
+
deps: [FalkorDBConfig],
|
|
19
|
+
lazy: true,
|
|
20
|
+
useFactory: (config: FalkorDBConfig) => FalkorDb.connect(config),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export * from './falkordb.config';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"target": "es6",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"stripInternal": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"outDir": "dist",
|
|
12
|
+
"rootDir": "./src",
|
|
13
|
+
"lib": [
|
|
14
|
+
"es2017",
|
|
15
|
+
"es2016",
|
|
16
|
+
"es2015",
|
|
17
|
+
"es6",
|
|
18
|
+
"dom",
|
|
19
|
+
"esnext.asynciterable"
|
|
20
|
+
],
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"types": [
|
|
23
|
+
"node"
|
|
24
|
+
],
|
|
25
|
+
"typeRoots": [
|
|
26
|
+
"node_modules/"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"angularCompilerOptions": {
|
|
30
|
+
"annotateForClosureCompiler": true,
|
|
31
|
+
"strictMetadataEmit": true,
|
|
32
|
+
"skipTemplateCodegen": true,
|
|
33
|
+
"flatModuleOutFile": "gapi-amqp.js",
|
|
34
|
+
"flatModuleId": "gapi-amqp"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"./src/index.ts"
|
|
38
|
+
]
|
|
39
|
+
}
|