Socket
Socket
Sign inDemoInstall

@6river/loopback2-component-pubsub

Package Overview
Dependencies
Maintainers
5
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@6river/loopback2-component-pubsub - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

.husky/commit-msg

2

dist/src/component.d.ts
import { PubSub } from '@google-cloud/pubsub';
declare type ClientConfig = PubSub['options'];
type ClientConfig = PubSub['options'];
declare const _default: (app: {

@@ -4,0 +4,0 @@ pubsub: PubSub;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const should = require('chai').should();
const chai_1 = require("chai");
const server_1 = require("./server");
describe('loopback-component-pubsub', function () {
beforeEach(function () { });
afterEach(function () { });
beforeEach(function () {
return;
});
afterEach(function () {
return;
});
it('should create pubsub client', function () {
should.exist(server_1.app.pubsub);
chai_1.assert.ok(server_1.app.pubsub);
});
it('should use component config', function () {
server_1.app.pubsub.projectId.should.equal('test');
chai_1.assert.equal(server_1.app.pubsub.projectId, 'test');
});
});
//# sourceMappingURL=component.test.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.app = void 0;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const loopback = require('loopback');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const boot = require('loopback-boot');

@@ -15,3 +17,3 @@ exports.app = loopback();

exports.app.start = (done) => {
let listener = exports.app.listen(() => {
const listener = exports.app.listen(() => {
exports.app.stop = function (cb) {

@@ -18,0 +20,0 @@ listener.close(cb);

@@ -11,20 +11,21 @@ {

},
"dependencies": {},
"description": "Google Pub/Sub loopback component",
"devDependencies": {
"@6river/commitlint-config-6river": "^2.2.1",
"@commitlint/cli": "^8.3.5",
"@google-cloud/pubsub": "2.19.0",
"@sixriver/pubsub-support": "11.9.1",
"@types/chai": "^4.2.12",
"@6river/commitlint-config-6river": "2.3.0-node.1",
"@commitlint/cli": "^17.4.2",
"@google-cloud/pubsub": "^3.0.2",
"@types/chai": "^4.3.4",
"@types/mocha": "^5.2.7",
"@types/node": "14.17.21",
"@typescript-eslint/parser": "^1.12.0",
"chai": "^3.5.0",
"eslint": "^6.8.0",
"eslint-config-6river": "^1.0.3",
"eslint-plugin-mocha": "^5.3.0",
"eslint-plugin-typescript": "^0.8.1",
"@types/node": "16.18.11",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"chai": "^4.3.7",
"eslint": "^8.32.0",
"eslint-config-6river": "6.1.0-node.6",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.4",
"eslint-plugin-mocha": "^10.1.0",
"google-auth-library": "7.14.1",
"husky": "^1.3.1",
"husky": "^8.0.3",
"loopback": "^2.36.0",

@@ -34,4 +35,6 @@ "loopback-boot": "^2.23.0",

"mocha-junit-reporter": "^1.23.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.3",
"ts-node": "^8.10.2",
"typescript": "^3.9.7"
"typescript": "~4.9.4"
},

@@ -42,10 +45,5 @@ "directories": {

"engines": {
"node": "\u003e= 14.17.6"
"node": "\u003e= 16.19.0"
},
"homepage": "https://github.com/6riversystems/loopback2-component-pubsub#readme",
"husky": {
"hooks": {
"commit-msg": "commitlint -e ${HUSKY_GIT_PARAMS}"
}
},
"keywords": [

@@ -59,4 +57,4 @@ "loopback",

"peerDependencies": {
"@google-cloud/pubsub": "^2.19.0",
"@sixriver/pubsub-support": "^11.9.1"
"@google-cloud/pubsub": "^3.0.2",
"@sixriver/pubsub-support": "^13.5.0"
},

@@ -68,12 +66,17 @@ "repository": {

"scripts": {
"prebuild": "npm run lint",
"build": "npm run only:build",
"clean": "rm -rf dist/",
"lint": "npm-run-all lint:eslint lint:prettier",
"lint:eslint": "eslint --ext .ts,.js ${ESLINT_OPTS} .",
"lint:fix": "npm-run-all lint:fix:eslint lint:fix:prettier",
"lint:fix:eslint": "eslint --ext .ts,.js --fix ${ESLINT_OPTS} .",
"lint:fix:prettier": "prettier --write '{src,test}/**/*.ts'",
"lint:prettier": "prettier --check '{src,test}/**/*.ts'",
"only:build": "tsc",
"only:test": "./node_modules/.bin/mocha -r ts-node/register --timeout 30000 test/**/*test.ts",
"prebuild": "npm run lint",
"build": "npm run only:build",
"pretest": "npm run build",
"test": "npm run only:test",
"lint": "./node_modules/.bin/eslint .",
"clean": "rm -rf dist/"
"test": "npm run only:test"
},
"version": "3.0.2"
"version": "3.1.0"
}

@@ -1,2 +0,2 @@

import {PubSub} from '@google-cloud/pubsub';
import { PubSub } from '@google-cloud/pubsub';

@@ -7,4 +7,4 @@ // this type is named ClientConfig in pubsub, but isn't properly exported

// Component registration function
export = function(app: {pubsub: PubSub}, options: ClientConfig) {
export = function (app: { pubsub: PubSub }, options: ClientConfig) {
app.pubsub = new PubSub(options);
}
};

@@ -1,16 +0,21 @@

const should = require('chai').should();
import {app} from './server';
import { assert } from 'chai';
describe('loopback-component-pubsub', function() {
beforeEach(function() {});
import { app } from './server';
afterEach(function() {});
describe('loopback-component-pubsub', function () {
beforeEach(function () {
return;
});
it('should create pubsub client', function() {
should.exist(app.pubsub);
afterEach(function () {
return;
});
it('should use component config', function() {
app.pubsub.projectId.should.equal('test');
it('should create pubsub client', function () {
assert.ok(app.pubsub);
});
it('should use component config', function () {
assert.equal(app.pubsub.projectId, 'test');
});
});

@@ -0,2 +1,4 @@

// eslint-disable-next-line @typescript-eslint/no-var-requires
const loopback = require('loopback');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const boot = require('loopback-boot');

@@ -8,9 +10,11 @@

// Sub-apps like REST API are mounted via boot scripts.
boot(app, __dirname, function(err: Error) {
if (err) { throw err; }
boot(app, __dirname, function (err: Error) {
if (err) {
throw err;
}
});
app.start = (done: () => void) => {
let listener = app.listen(() => {
app.stop = function(cb: any) {
const listener = app.listen(() => {
app.stop = function (cb: any) {
listener.close(cb);

@@ -17,0 +21,0 @@ };

@@ -7,3 +7,3 @@ {

"outDir": "dist",
"target": "es2020",
"target": "es2021",
"module": "commonjs",

@@ -10,0 +10,0 @@ "moduleResolution": "node",

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc