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

@journeyapps/cloudcode

Package Overview
Dependencies
Maintainers
0
Versions
504
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@journeyapps/cloudcode - npm Package Compare versions

Comparing version 0.0.0-dev.ca2c7b1 to 0.0.0-dev.cb261bb

2

dist/bootstrap.js

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

processId: exports.PROCESS_ID,
message: `Start process. Process trace ID: ${exports.PROCESS_ID}. Revision: ${global.CloudCode.deployInfo.description}.`
message: `Start process. Process trace ID: ${exports.PROCESS_ID}. Revision: ${CloudCode.deployInfo.description}.`
});

@@ -46,0 +46,0 @@ // Default Lambda uncaughtException handler does a process.exit(1), preventing us from logging the error.

@@ -6,3 +6,2 @@ "use strict";

const event_sources_1 = require("./event_sources");
const node_fetch_1 = require("node-fetch");
const DatabaseAuth_1 = require("./DatabaseAuth");

@@ -128,3 +127,3 @@ const api_db_1 = require("./api_db");

logs_1.systemConsole.debug('Enqueue request:', payload);
const response = await (0, node_fetch_1.default)(`${SCHEDULER_ENDPOINT}/api/tasks/enqueue`, {
const response = await fetch(`${SCHEDULER_ENDPOINT}/api/tasks/enqueue`, {
headers: {

@@ -144,4 +143,4 @@ Authorization: `Token ${this.currentTaskContext.token}`,

logs_1.systemConsole.debug('Enqueue response:', result);
logs_1.systemConsole.info(`Enqueued '${options.task}' with trace ID '${result.trace_id}'.`);
return result.trace_id;
logs_1.systemConsole.info(`Enqueued '${options.task}' with trace ID '${result['trace_id']}'.`);
return result['trace_id'];
}

@@ -148,0 +147,0 @@ }

/// <reference types="node" />
/// <reference types="node" />
import { Headers } from 'node-fetch';
/// <reference types="node" />
/// <reference types="node" />
import { URL, URLSearchParams } from 'url';

@@ -5,0 +6,0 @@ /**

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudCodeRequest = void 0;
const node_fetch_1 = require("node-fetch");
const url_1 = require("url");

@@ -48,3 +47,3 @@ /**

url: rawRequest.url,
headers: new node_fetch_1.Headers(rawRequest.headers),
headers: new Headers(rawRequest.headers),
body: rawRequest.body,

@@ -51,0 +50,0 @@ ip: rawRequest.sourceIp

/// <reference types="node" />
import { Headers } from 'node-fetch';
/// <reference types="node" />
/// <reference types="node" />
export declare class CloudCodeResponse {

@@ -4,0 +5,0 @@ readonly headers: Headers;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudCodeResponse = void 0;
const node_fetch_1 = require("node-fetch");
const http_1 = require("http");

@@ -9,3 +8,3 @@ const DEBUG_MODE = process.env.DEBUG === '1'; // Currently used for tests only

constructor() {
this.headers = new node_fetch_1.Headers();
this.headers = new Headers();
}

@@ -12,0 +11,0 @@ static notFound() {

@@ -89,3 +89,3 @@ 'use strict';

type: rawRequest.eventSource,
message: `Start '${rawRequest.eventSource}' request. Process trace ID: '${bootstrap_1.PROCESS_ID}'. Revision: '${global.CloudCode.deployInfo.description}'.`
message: `Start '${rawRequest.eventSource}' request. Process trace ID: '${bootstrap_1.PROCESS_ID}'. Revision: '${CloudCode.deployInfo.description}'.`
});

@@ -179,4 +179,3 @@ // TODO: Remove these non-webby bits

}
const response = await router.handleRequest(taskContext, request);
return response;
return await router.handleRequest(taskContext, request);
}

@@ -183,0 +182,0 @@ else if (taskContext.source == event_sources_1.default.IDP) {

@@ -7,3 +7,2 @@ "use strict";

const db_1 = require("@journeyapps/db");
const node_fetch_1 = require("node-fetch");
const assert = require("assert");

@@ -19,5 +18,7 @@ const httpLib = require("http");

indexModule.setCloudCode(cloudcode);
// @ts-ignore
global.CloudCode = cloudcode;
// @ts-ignore
global.Day = db_1.Day;
global.fetch = node_fetch_1.default;
// @ts-ignore
global.Attachment = db_1.Attachment;

@@ -24,0 +25,0 @@ Object.defineProperty(global, 'DB', {

import { CloudCodeEnvironment } from './CloudCodeEnvironment';
import { Day as DayConstructor, Attachment as AttachmentConstructor } from '@journeyapps/db';
import fetchModule from 'node-fetch';
declare global {
namespace NodeJS {
interface Global {
CloudCode: CloudCodeEnvironment;
Day: typeof DayConstructor;
fetch: typeof fetchModule;
Attachment: typeof AttachmentConstructor;
}
}
const CloudCode: CloudCodeEnvironment;
const Day: typeof DayConstructor;
const fetch: typeof fetchModule;
const Attachment: typeof AttachmentConstructor;

@@ -17,0 +7,0 @@ type Day = DayConstructor;

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.flush = exports.setLogContext = exports.createLoggers = exports.systemConsole = exports.systemStream = void 0;
/*
*
*/
const highland = require("highland");

@@ -8,0 +5,0 @@ const node_fetch_1 = require("node-fetch");

{
"name": "@journeyapps/cloudcode",
"version": "0.0.0-dev.ca2c7b1",
"version": "0.0.0-dev.cb261bb",
"main": "./dist/index",

@@ -18,3 +18,3 @@ "types": "./dist/index",

"@journeyapps/db": "^6.0.1",
"@types/node": "^10.14.14",
"@types/node": "^20.17.6",
"base64url": "^3.0.1",

@@ -24,5 +24,5 @@ "bs58": "^4.0.1",

"highland": "^2.13.5",
"lodash": "^4.17.15",
"node-fetch": "^2.6.0",
"source-map-support": "^0.5.13"
"lodash": "^4.17.21",
"node-fetch": "^3.3.2",
"source-map-support": "^0.5.21"
},

@@ -29,0 +29,0 @@ "devDependencies": {

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

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