@sockethub/data-layer 1.0.0-alpha.4 → 1.0.0-alpha.5

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.
@@ -1,30 +0,0 @@
1
- import { IActivityStream, CallbackInterface } from "@sockethub/schemas";
2
- import { RedisConfigProps, RedisConfigUrl } from "./types";
3
- /**
4
- * Encapsulates the storing and fetching of credential objects.
5
- */
6
- export default class CredentialsStore {
7
- readonly uid: string;
8
- private readonly store;
9
- private readonly log;
10
- /**
11
- * @param parentId - The ID of the parent instance (eg. sockethub itself)
12
- * @param sessionId - The ID of the session (socket.io connection)
13
- * @param secret - The encryption secret (parent + session secrets)
14
- * @param redisConfig - Connect info for redis
15
- */
16
- constructor(parentId: string, sessionId: string, secret: string, redisConfig: RedisConfigProps | RedisConfigUrl);
17
- /**
18
- * Gets the credentials for a given actor ID
19
- * @param actor
20
- * @param credentialHash
21
- */
22
- get(actor: string, credentialHash: string): Promise<IActivityStream>;
23
- /**
24
- * Saves the credentials for a given actor ID
25
- * @param actor
26
- * @param creds
27
- * @param done
28
- */
29
- save(actor: string, creds: IActivityStream, done: CallbackInterface): void;
30
- }
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const secure_store_redis_1 = __importDefault(require("secure-store-redis"));
7
- const debug_1 = __importDefault(require("debug"));
8
- const crypto_1 = __importDefault(require("@sockethub/crypto"));
9
- /**
10
- * Encapsulates the storing and fetching of credential objects.
11
- */
12
- class CredentialsStore {
13
- /**
14
- * @param parentId - The ID of the parent instance (eg. sockethub itself)
15
- * @param sessionId - The ID of the session (socket.io connection)
16
- * @param secret - The encryption secret (parent + session secrets)
17
- * @param redisConfig - Connect info for redis
18
- */
19
- constructor(parentId, sessionId, secret, redisConfig) {
20
- this.uid = `sockethub:data-layer:credentials-store:${parentId}:${sessionId}`;
21
- this.store = new secure_store_redis_1.default({
22
- namespace: this.uid,
23
- secret: secret,
24
- redis: redisConfig
25
- });
26
- this.log = (0, debug_1.default)(this.uid);
27
- }
28
- /**
29
- * Gets the credentials for a given actor ID
30
- * @param actor
31
- * @param credentialHash
32
- */
33
- async get(actor, credentialHash) {
34
- this.log(`get credentials for ${actor}`);
35
- return new Promise((resolve, reject) => {
36
- this.store.get(actor, (err, credentials) => {
37
- if (err) {
38
- return reject(err.toString());
39
- }
40
- if (!credentials) {
41
- return resolve(undefined);
42
- }
43
- if (credentialHash) {
44
- if (credentialHash !== crypto_1.default.objectHash(credentials.object)) {
45
- return reject(`provided credentials do not match existing platform instance for actor ${actor}`);
46
- }
47
- }
48
- return resolve(credentials);
49
- });
50
- });
51
- }
52
- /**
53
- * Saves the credentials for a given actor ID
54
- * @param actor
55
- * @param creds
56
- * @param done
57
- */
58
- save(actor, creds, done) {
59
- this.store.save(actor, creds, (err) => {
60
- if (err) {
61
- this.log('error saving credentials to store ' + err);
62
- return done(err);
63
- }
64
- else {
65
- this.log(`credentials encrypted and saved`);
66
- return done();
67
- }
68
- });
69
- }
70
- }
71
- exports.default = CredentialsStore;
72
- //# sourceMappingURL=/credentials-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"credentials-store.js","sourceRoot":"/","sources":["credentials-store.ts"],"names":[],"mappings":";;;;;AAAA,4EAA6C;AAC7C,kDAAsC;AAEtC,+DAAuC;AAGvC;;GAEG;AACH,MAAqB,gBAAgB;IAKnC;;;;;OAKG;IACH,YACE,QAAgB,EAChB,SAAiB,EACjB,MAAc,EACd,WAA8C;QAE9C,IAAI,CAAC,GAAG,GAAG,0CAA0C,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC7E,IAAI,CAAC,KAAK,GAAG,IAAI,4BAAW,CAAC;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG;YACnB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,WAAW;SACnB,CAAC,CA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AAC,CAAC;IACL,CAAC;CACF;AAlED,mCAkEC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { default as CredentialsStore } from "./credentials-store";
2
- export { default as JobQueue } from "./job-queue";
3
- export * from "./types";
package/dist/index.js DELETED
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.JobQueue = exports.CredentialsStore = void 0;
21
- var credentials_store_1 = require("./credentials-store");
22
- Object.defineProperty(exports, "CredentialsStore", { enumerable: true, get: function () { return __importDefault(credentials_store_1).default; } });
23
- var job_queue_1 = require("./job-queue");
24
- Object.defineProperty(exports, "JobQueue", { enumerable: true, get: function () { return __importDefault(job_queue_1).default; } });
25
- __exportStar(require("./types"), exports);
26
- //# sourceMappingURL=/index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAgE;AAAxD,sIAAA,OAAO,OAAoB;AACnC,yCAAgD;AAAxC,sHAAA,OAAO,OAAY;AAC3B,0CAAwB"}
@@ -1,32 +0,0 @@
1
- /// <reference types="node" />
2
- import { JobDataDecrypted, JobDataEncrypted, JobDecrypted, RedisConfig } from "./types";
3
- import EventEmitter from "events";
4
- import { IActivityStream } from "@sockethub/schemas";
5
- interface JobHandler {
6
- (job: JobDataDecrypted, done: CallableFunction): any;
7
- }
8
- export default class JobQueue extends EventEmitter {
9
- readonly uid: string;
10
- private readonly bull;
11
- private readonly debug;
12
- private readonly secret;
13
- private handler;
14
- private counter;
15
- constructor(instanceId: string, sessionId: string, secret: string, redisConfig: RedisConfig);
16
- add(socketId: string, msg: IActivityStream): Promise<JobDataEncrypted>;
17
- initResultEvents(): void;
18
- getJob(jobId: string): Promise<JobDecrypted>;
19
- onJob(handler: JobHandler): void;
20
- pause(): Promise<void>;
21
- resume(): Promise<void>;
22
- shutdown(): Promise<void>;
23
- private createJob;
24
- private jobHandler;
25
- /**
26
- * @param job
27
- * @private
28
- */
29
- private decryptJobData;
30
- private decryptActivityStream;
31
- }
32
- export {};
package/dist/job-queue.js DELETED
@@ -1,126 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const bull_1 = __importDefault(require("bull"));
7
- const crypto_1 = __importDefault(require("@sockethub/crypto"));
8
- const debug_1 = __importDefault(require("debug"));
9
- const events_1 = __importDefault(require("events"));
10
- class JobQueue extends events_1.default {
11
- constructor(instanceId, sessionId, secret, redisConfig) {
12
- super();
13
- this.counter = 0;
14
- this.bull = new bull_1.default(instanceId + sessionId, { redis: redisConfig });
15
- this.uid = `sockethub:data-layer:job-queue:${instanceId}:${sessionId}`;
16
- this.secret = secret;
17
- this.debug = (0, debug_1.default)(this.uid);
18
- this.debug('initialized');
19
- }
20
- async add(socketId, msg) {
21
- const job = this.createJob(socketId, msg);
22
- const isPaused = await this.bull.isPaused();
23
- if (isPaused) {
24
- this.bull.emit('failed', job, 'queue closed');
25
- return undefined;
26
- }
27
- this.debug(`adding ${job.title} ${msg.type}`);
28
- this.bull.add(job);
29
- return job;
30
- }
31
- initResultEvents() {
32
- this.bull.on('global:completed', async (jobId, result) => {
33
- const r = result ? JSON.parse(result) : "";
34
- const job = await this.getJob(jobId);
35
- if (job) {
36
- this.debug(`completed ${job.data.title} ${job.data.msg.type}`);
37
- this.emit('global:completed', job.data, r);
38
- await job.remove();
39
- }
40
- });
41
- this.bull.on('global:error', async (jobId, result) => {
42
- this.debug("unknown queue error", jobId, result);
43
- });
44
- this.bull.on('global:failed', async (jobId, result) => {
45
- const job = await this.getJob(jobId);
46
- if (job) {
47
- this.debug(`failed ${job.data.title} ${job.data.msg.type}`);
48
- this.emit('global:failed', job.data, result);
49
- await job.remove();
50
- }
51
- });
52
- this.bull.on('failed', (job, result) => {
53
- // locally failed jobs (eg. due to paused queue)
54
- const unencryptedJobData = {
55
- title: job.title,
56
- msg: this.decryptActivityStream(job.msg),
57
- sessionId: job.sessionId
58
- };
59
- this.debug(`failed ${unencryptedJobData.title} ${unencryptedJobData.msg.type}`);
60
- this.emit('global:failed', unencryptedJobData, result);
61
- });
62
- }
63
- async getJob(jobId) {
64
- const job = await this.bull.getJob(jobId);
65
- if (job) {
66
- job.data = this.decryptJobData(job);
67
- try {
68
- delete job.data.msg.sessionSecret;
69
- }
70
- catch (e) {
71
- // this property should never be exposed externally
72
- }
73
- }
74
- return job;
75
- }
76
- onJob(handler) {
77
- this.handler = handler;
78
- this.bull.process(this.jobHandler.bind(this));
79
- }
80
- async pause() {
81
- await this.bull.pause();
82
- this.debug('paused');
83
- }
84
- async resume() {
85
- await this.bull.resume();
86
- this.debug('resumed');
87
- }
88
- async shutdown() {
89
- this.debug('shutdown');
90
- const isPaused = await this.bull.isPaused(true);
91
- if (!isPaused) {
92
- await this.bull.pause();
93
- }
94
- await this.bull.obliterate({ force: true });
95
- await this.bull.removeAllListeners();
96
- }
97
- createJob(socketId, msg) {
98
- const title = `${msg.context}-${(msg.id) ? msg.id : this.counter++}`;
99
- return {
100
- title: title,
101
- sessionId: socketId,
102
- msg: crypto_1.default.encrypt(msg, this.secret)
103
- };
104
- }
105
- jobHandler(encryptedJob, done) {
106
- const job = this.decryptJobData(encryptedJob);
107
- this.debug(`handling ${job.title} ${job.msg.type}`);
108
- this.handler(job, done);
109
- }
110
- /**
111
- * @param job
112
- * @private
113
- */
114
- decryptJobData(job) {
115
- return {
116
- title: job.data.title,
117
- msg: this.decryptActivityStream(job.data.msg),
118
- sessionId: job.data.sessionId
119
- };
120
- }
121
- decryptActivityStream(msg) {
122
- return crypto_1.default.decrypt(msg, this.secret);
123
- }
124
- }
125
- exports.default = JobQueue;
126
- //# sourceMappingURL=/job-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"job-queue.js","sourceRoot":"/","sources":["job-queue.ts"],"names":[],"mappings":";;;;;AAAA,gDAAyB;AACzB,+DAAuC;AAOvC,kDAAsC;AACtC,oDAAkC;AAOlC,MAAqB,QAAS,SAAQ,gBAAY;IAQhD,YAAY,UAAkB,EAAE,SAAiB,EAAE,MAAc,EAAE,WAAwB;QACzF,KAAK,EAAE,CAAC;QAHF,YAAO,GAAG,CAAC,CAAC;QAIlB,IAAI,CAAC,IAAI,GAAG,IAAI,cAAK,CAAC,UAAU,GAAG,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,GAAG,GAAG,kCAAkC,UAAU,IAAI,SAAS,EAAE,CAAC;QACvE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,IAAA,eAAK,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE7B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,GAAoB;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC1C,MAAM,QA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AAS,EAAE,QAAQ;YACnB,GAAG,EAAE,gBAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC;SACtC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,YAA0B,EAAE,IAAsB;QACnE,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACK,cAAc,CAAC,GAAiB;QACtC,OAAO;YACL,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK;YACrB,GAAG,EAAE,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;YAC7C,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS;SAC9B,CAAC;IACJ,CAAC;IAEO,qBAAqB,CAAC,GAAW;QACvC,OAAO,gBAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACF;AAnID,2BAmIC"}
package/dist/types.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { IActivityStream } from "@sockethub/schemas";
2
- export declare type RedisConfigUrl = string;
3
- export interface RedisConfigProps {
4
- host: string;
5
- port: string;
6
- }
7
- export declare type RedisConfig = RedisConfigProps | RedisConfigUrl;
8
- export interface JobDataEncrypted {
9
- title?: string;
10
- msg: string;
11
- sessionId: string;
12
- }
13
- export interface JobDataDecrypted {
14
- title?: string;
15
- msg: IActivityStream;
16
- sessionId: string;
17
- }
18
- export interface JobEncrypted {
19
- data: JobDataEncrypted;
20
- remove?: {
21
- (): void;
22
- };
23
- }
24
- export interface JobDecrypted {
25
- data: JobDataDecrypted;
26
- remove?: {
27
- (): void;
28
- };
29
- }
package/dist/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=/types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":""}