Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dynrl/data-slammer

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynrl/data-slammer - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

2

lib/index.js

@@ -61,3 +61,3 @@ "use strict";

query: url,
result: lodash.map(r.data.items, i => {
items: lodash.map(r.data.items, i => {
return {

@@ -64,0 +64,0 @@ id: this.getId(i.link),

@@ -64,3 +64,3 @@ import { ServiceRequest, ServiceResponse, IStatus, IPayload } from '@dynrl/service-data-models';

/** List of links with ids. IDs are hashed link values. */
result: Array<{
items: Array<{
id: string;

@@ -67,0 +67,0 @@ url: string;

export declare class DataSlammerService {
private static getResult;
static handleRequest(context: any, req: any): Promise<void>;
}

@@ -15,4 +15,13 @@ "use strict";

class DataSlammerService {
static getResult(r) {
return {
headers: {
'content-type': 'application/json'
},
body: r
};
}
static handleRequest(context, req) {
return __awaiter(this, void 0, void 0, function* () {
// Create a new data slammer
let ds = new index_1.DataSlammer({

@@ -24,17 +33,7 @@ googleSearchCx: drl_settings_1.DrlSettings.getSetting('GOOGLE_CX'),

context.log('JavaScript HTTP trigger function processed a GET request.');
const r = yield ds
.slam(req.query['pn'], req.query['mf'], req.query['fileType'])
.catch(function () {
context.res = {
body: 'fail'
};
});
context.res = {
body: JSON.stringify(r)
};
context.res = this.getResult(yield ds.slam(req.query['pn'], req.query['mf'], req.query['fileType']));
}
else if (req.method === 'POST') {
context.log('JavaScript HTTP trigger function processed a POST request.');
const r = yield ds.get(req.body);
context.res = JSON.stringify(r);
context.res = this.getResult(yield ds.get(req.body));
}

@@ -41,0 +40,0 @@ else {

{
"name": "@dynrl/data-slammer",
"version": "1.0.2",
"version": "2.0.0",
"description": "",

@@ -40,6 +40,2 @@ "main": "lib/index.js",

"license": "MIT",
"bugs": {
"url": "https://github.com/dschomburg/pdfslammer/issues"
},
"homepage": "https://github.com/dschomburg/pdfslammer#readme",
"dependencies": {

@@ -87,3 +83,3 @@ "@dynrl/service-data-models": "^1.0.1",

"lint-staged": {
"*.ts": [
"src/*.ts": [
"tslint --fix --project tsconfig.json",

@@ -90,0 +86,0 @@ "prettier --write",

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