You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@google-cloud/functions-framework

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/functions-framework - npm Package Compare versions

Comparing version

to
3.4.5

1

build/src/async_local_storage.d.ts

@@ -5,3 +5,2 @@ import { Request, Response } from './functions';

executionId?: string;
traceId?: string;
spanId?: string;

@@ -8,0 +7,0 @@ }

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

executionId: req.executionId,
traceId: req.traceId,
spanId: req.spanId,

@@ -22,0 +21,0 @@ }, () => {

6

build/src/execution_context.js

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

const TRACE_CONTEXT_HEADER_KEY = 'X-Cloud-Trace-Context';
const TRACE_CONTEXT_PATTERN = /^(?<traceId>\w+)\/(?<spanId>\d+);o=(?<options>.+)$/;
const TRACE_CONTEXT_PATTERN = /^(?<traceId>\w+)\/(?<spanId>\d+)(?:;o=(?<options>.+))?$/;
function generateExecutionId() {

@@ -23,5 +23,3 @@ const timestampPart = Date.now().toString(36).slice(-6);

if (match === null || match === void 0 ? void 0 : match.groups) {
const { traceId, spanId } = match.groups;
req.traceId = traceId;
req.spanId = spanId;
req.spanId = match.groups.spanId;
}

@@ -28,0 +26,0 @@ }

@@ -23,6 +23,2 @@ /// <reference types="node" />

/**
* Cloud Trace trace ID.
*/
traceId?: string;
/**
* Cloud Trace span ID.

@@ -29,0 +25,0 @@ */

/// <reference types="node" />
import * as express from 'express';
export declare const EXECUTION_CONTEXT_LABELS_KEY = "logging.googleapis.com/labels";
export declare const EXECUTION_CONTEXT_TRACE_KEY = "logging.googleapis.com/trace";
export declare const EXECUTION_CONTEXT_SPAN_ID_KEY = "logging.googleapis.com/spanId";

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

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getModifiedData = exports.splitArgs = exports.errorHandler = exports.loggingHandlerAddExecutionContext = exports.sendCrashResponse = exports.EXECUTION_CONTEXT_SPAN_ID_KEY = exports.EXECUTION_CONTEXT_TRACE_KEY = exports.EXECUTION_CONTEXT_LABELS_KEY = void 0;
exports.getModifiedData = exports.splitArgs = exports.errorHandler = exports.loggingHandlerAddExecutionContext = exports.sendCrashResponse = exports.EXECUTION_CONTEXT_SPAN_ID_KEY = exports.EXECUTION_CONTEXT_LABELS_KEY = void 0;
const types_1 = require("./types");

@@ -22,3 +22,2 @@ const async_local_storage_1 = require("./async_local_storage");

exports.EXECUTION_CONTEXT_LABELS_KEY = 'logging.googleapis.com/labels';
exports.EXECUTION_CONTEXT_TRACE_KEY = 'logging.googleapis.com/trace';
exports.EXECUTION_CONTEXT_SPAN_ID_KEY = 'logging.googleapis.com/spanId';

@@ -123,3 +122,2 @@ const SEVERITY = 'severity';

[exports.EXECUTION_CONTEXT_LABELS_KEY]: { execution_id: context.executionId },
[exports.EXECUTION_CONTEXT_TRACE_KEY]: context.traceId,
[exports.EXECUTION_CONTEXT_SPAN_ID_KEY]: context.spanId,

@@ -136,7 +134,6 @@ };

}
return {
...json,
[exports.EXECUTION_CONTEXT_TRACE_KEY]: context.traceId,
[exports.EXECUTION_CONTEXT_SPAN_ID_KEY]: context.spanId,
};
if (!(exports.EXECUTION_CONTEXT_SPAN_ID_KEY in json)) {
json[exports.EXECUTION_CONTEXT_SPAN_ID_KEY] = context.spanId;
}
return json;
}

@@ -143,0 +140,0 @@ function processData(data, encoding) {

{
"name": "@google-cloud/functions-framework",
"version": "3.4.4",
"version": "3.4.5",
"description": "FaaS (Function as a service) framework for writing portable Node.js functions",

@@ -5,0 +5,0 @@ "engines": {