Socket
Socket
Sign inDemoInstall

fiftyone.pipeline.core

Package Overview
Dependencies
Maintainers
0
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fiftyone.pipeline.core - npm Package Compare versions

Comparing version 4.4.99 to 4.4.100

types/constants.d.ts

6

aspectPropertyValue.js

@@ -33,3 +33,3 @@ /* *********************************************************************

* @param {string} noValueMessage The message to show when no value is set
* @param {Mixed} value The value inside the wrapper
* @param {*} value The value inside the wrapper
*/

@@ -50,3 +50,3 @@ constructor (noValueMessage = 'No value has been set.', value) {

*
* @returns {Mixed} The value of the property
* @returns {*} The value of the property
* @throws Will throw error if 'hasValue' is false.

@@ -65,3 +65,3 @@ */

*
* @param {Mixed} value the value to set
* @param {*} value the value to set
*/

@@ -68,0 +68,0 @@ set value (value) {

@@ -28,2 +28,3 @@ /* *********************************************************************

* @typedef {import('./flowElement')} FlowElement
* @typedef {import('./flowData')} FlowData
*/

@@ -92,3 +93,3 @@

* @param {string} key the key to retrieve a property value for
* @returns {mixed} value
* @returns {FlowData} value
*/

@@ -126,3 +127,3 @@ get (key) {

* @param {string} key the key to retreive a property value for
* @returns {number} value
* @returns {number} float value
*/

@@ -141,3 +142,3 @@ getAsFloat (key) {

* @param {string} key the key to retreive a property value for
* @returns {number} value
* @returns {number} int value
*/

@@ -144,0 +145,0 @@ getAsInteger (key) {

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

* @param {string} key evidence key to add
* @param {Mixed} value value of evidence key
* @param {*} value value of evidence key
*/

@@ -80,3 +80,3 @@ add (key, value) {

* @param {string} evidenceObject.key evidencekey
* @param {Mixed} evidenceObject.value evidence value
* @param {*} evidenceObject.value evidence value
*/

@@ -97,3 +97,3 @@ addObject (evidenceObject) {

* @param {object} request an HTTP request object
* @returns {undefined}
* @returns {Evidence} return updated evidence
*/

@@ -179,3 +179,3 @@ addFromRequest (request) {

* @param {string} key evidence key to retreive
* @returns {mixed} the evidence value
* @returns {*} the evidence value
*/

@@ -182,0 +182,0 @@ get (key) {

@@ -129,3 +129,3 @@ /* *********************************************************************

*
* @param {mixed} error the error to throw
* @param {*} error the error to throw
* @param {FlowElement} flowElement the FlowElement the error is thrown on

@@ -132,0 +132,0 @@ */

@@ -28,2 +28,3 @@ /* *********************************************************************

* @typedef {import('./pipeline')} Pipeline
* @typedef {import('./evidenceKeyFilter')} EvidenceKeyFilter
*/

@@ -70,5 +71,11 @@

/**
* @type {Function[]}
*/
this.registrationCallbacks = [];
// List of pipelines the flowElement has been added to
/**
* @type {Pipeline[]}
*/
this.pipelines = [];

@@ -107,3 +114,3 @@ }

* @param {FlowData} flowData FlowData being processed
* @returns {Mixed} result of processing
* @returns {*} result of processing
*/

@@ -155,2 +162,8 @@ processInternal (flowData) {

/**
* Internal log
*
* @param {string} type log type
* @param {*} message message to log
*/
_log (type, message) {

@@ -157,0 +170,0 @@ if (this.pipelines) {

@@ -23,2 +23,6 @@ /* *********************************************************************

/**
* @typedef {import('./flowData')} FlowData
*/
class Helpers {

@@ -28,3 +32,3 @@ /**

*
* @param {http.ServerResponse} response The response to set the headers in.
* @param {import('http').ServerResponse} response The response to set the headers in.
* @param {FlowData} flowData A processed FlowData instance to get the response header values

@@ -31,0 +35,0 @@ * from.

@@ -40,2 +40,6 @@ /* *********************************************************************

/**
* @typedef {import('./flowData')} FlowData
*/
/**
* An instance of EvidenceKeyFilter which removes all but header

@@ -42,0 +46,0 @@ * and query evidence as that is all that is used by

@@ -27,2 +27,6 @@ /* *********************************************************************

/**
* @typedef {import('./flowData')} FlowData
*/
const elementBlacklist = ['jsonbundler', 'javascriptbuilder', 'sequence', 'set-headers'];

@@ -29,0 +33,0 @@

{
"name": "fiftyone.pipeline.core",
"version": "4.4.99",
"version": "4.4.100",
"description": "Core library for the 51Degrees Pipeline API",

@@ -25,6 +25,8 @@ "keywords": [

"devDependencies": {
"@types/node": "^15.14.9",
"@types/jest": "^27.5.2",
"@types/node": "^20.14.10",
"jest": "^27.5.1",
"jest-each": "^27.5.1",
"node-mocks-http": "^1.13.0"
"node-mocks-http": "^1.13.0",
"typescript": "^5.5.3"
},

@@ -31,0 +33,0 @@ "license": "EUPL-1.2",

@@ -28,3 +28,3 @@ /* *********************************************************************

* @typedef {import('./flowElement')} FlowElement
* @typedef {import('../fiftyone.pipeline.engines/dataFileUpdateService')} DataFileUpdateService
* @typedef {import('fiftyone.pipeline.engines').DataFileUpdateService} DataFileUpdateService
*/

@@ -56,6 +56,12 @@

// A logger for emitting messages
/**
* A logger for emitting messages
* @type {EventEmitter}
*/
this.eventEmitter = new EventEmitter();
// Flattened dictionary of flowElements the pipeline contains
/**
* @type {object}
*/
this.flowElements = {};

@@ -72,4 +78,4 @@

// which are passed in as arrays
const storeInFlowElementList = function (flowElemmentList) {
flowElemmentList.forEach(function (slot) {
const storeInFlowElementList = function (flowElementList) {
flowElementList.forEach(function (slot) {
if (Array.isArray(slot)) {

@@ -93,2 +99,5 @@ storeInFlowElementList(slot);

// updated by flowElements' property lists
/**
* @type {object}
*/
this.propertyDatabase = {};

@@ -208,3 +217,3 @@

* @param {string} type type of message
* @param {mixed} message message to store in the log
* @param {*} message message to store in the log
*/

@@ -211,0 +220,0 @@ log (type, message) {

@@ -134,2 +134,8 @@ /* *********************************************************************

/**
* Add required elements to an existing FlowElement array
*
* @param {FlowElement[]} flowElements array of elements to add to
* @returns {FlowElement[]} resulting array with required elements
*/
addRequiredElements (flowElements) {

@@ -136,0 +142,0 @@ return flowElements

@@ -29,2 +29,6 @@ /* *********************************************************************

/**
* @typedef {import('./flowData')} FlowData
*/
/**
* The SequenceElement stores session data regarding requests

@@ -31,0 +35,0 @@ * for client side JavaScript from the JavaScript created by a

{
// Change this to match your project
"include": ["*"],
"compilerOptions": {
// Tells TypeScript to read JS files, as
// normally they are ignored as source files
"allowJs": true,
// Generate d.ts files
"declaration": true,
// This compiler run should
// only output d.ts files
"emitDeclarationOnly": true,
// Types should go into this directory.
// Removing this would place the .d.ts files
// next to the .js files
"outDir": "types",
"lib": ["ES2015"],
"moduleResolution": "Node",
"noImplicitAny": true
}
}
// Change this to match your project
"include": ["*"],
"exclude": ["node_modules"],
"compilerOptions": {
// Tells TypeScript to read JS files, as
// normally they are ignored as source files
"allowJs": true,
// Generate d.ts files
"declaration": true,
// This compiler run should
// only output d.ts files
"emitDeclarationOnly": true,
// Types should go into this directory.
// Removing this would place the .d.ts files
// next to the .js files
"outDir": "types",
"lib": ["ES2015"],
"moduleResolution": "Node",
"noImplicitAny": true
}
}

@@ -12,3 +12,3 @@ export = AspectPropertyValue;

* @param {string} noValueMessage The message to show when no value is set
* @param {Mixed} value The value inside the wrapper
* @param {*} value The value inside the wrapper
*/

@@ -22,9 +22,9 @@ constructor(noValueMessage: string, value: any);

*
* @param {Mixed} value the value to set
* @param {*} value the value to set
*/
set value(arg: any);
set value(value: any);
/**
* Get the value of this instance.
*
* @returns {Mixed} The value of the property
* @returns {*} The value of the property
* @throws Will throw error if 'hasValue' is false.

@@ -31,0 +31,0 @@ */

export = ElementData;
/**
* @typedef {import('./flowElement')} FlowElement
* @typedef {import('./flowData')} FlowData
*/

@@ -34,5 +35,5 @@ /**

* @param {string} key the key to retrieve a property value for
* @returns {mixed} value
* @returns {FlowData} value
*/
get(key: string): any;
get(key: string): FlowData;
/**

@@ -49,3 +50,3 @@ * Return string value of property

* @param {string} key the key to retreive a property value for
* @returns {number} value
* @returns {number} float value
*/

@@ -57,3 +58,3 @@ getAsFloat(key: string): number;

* @param {string} key the key to retreive a property value for
* @returns {number} value
* @returns {number} int value
*/

@@ -63,4 +64,5 @@ getAsInteger(key: string): number;

declare namespace ElementData {
export { FlowElement };
export { FlowElement, FlowData };
}
type FlowElement = import('./flowElement');
type FlowElement = import("./flowElement");
type FlowData = import("./flowData");

@@ -22,2 +22,10 @@ export = ElementDataDictionary;

contents: object;
/**
* Return value from elementData dictionary
*
* @param {string} key the property key to retrieve
* @returns {number} integer value
*/
getInternal(key: string): number;
[Symbol.iterator](): Generator<string, void, unknown>;
}

@@ -28,2 +36,2 @@ declare namespace ElementDataDictionary {

import ElementData = require("./elementData");
type FlowElement = import('./flowElement');
type FlowElement = import("./flowElement");

@@ -1,3 +0,3 @@

export const noElementData: string;
export const genericMissingProperties: string;
export const noReasonUnknown: string;
export let noElementData: string;
export let genericMissingProperties: string;
export let noReasonUnknown: string;

@@ -21,3 +21,3 @@ export = Evidence;

* @param {string} key evidence key to add
* @param {Mixed} value value of evidence key
* @param {*} value value of evidence key
*/

@@ -30,3 +30,3 @@ add(key: string, value: any): void;

* @param {string} evidenceObject.key evidencekey
* @param {Mixed} evidenceObject.value evidence value
* @param {*} evidenceObject.value evidence value
*/

@@ -43,5 +43,5 @@ addObject(evidenceObject: {

* @param {object} request an HTTP request object
* @returns {undefined}
* @returns {Evidence} return updated evidence
*/
addFromRequest(request: object): undefined;
addFromRequest(request: object): Evidence;
/**

@@ -51,3 +51,3 @@ * Get a piece of evidence

* @param {string} key evidence key to retreive
* @returns {mixed} the evidence value
* @returns {*} the evidence value
*/

@@ -65,2 +65,2 @@ get(key: string): any;

}
type FlowData = import('./flowData');
type FlowData = import("./flowData");

@@ -41,3 +41,3 @@ export = FlowData;

*
* @param {mixed} error the error to throw
* @param {*} error the error to throw
* @param {FlowElement} flowElement the FlowElement the error is thrown on

@@ -90,4 +90,4 @@ */

import Evidence = require("./evidence");
type FlowElement = import('./flowElement');
type ElementData = import('./elementData');
type Pipeline = import('./pipeline');
type Pipeline = import("./pipeline");
type FlowElement = import("./flowElement");
type ElementData = import("./elementData");

@@ -5,2 +5,3 @@ export = FlowElement;

* @typedef {import('./pipeline')} Pipeline
* @typedef {import('./evidenceKeyFilter')} EvidenceKeyFilter
*/

@@ -30,3 +31,3 @@ /**

properties: object;
evidenceKeyFilter: any;
evidenceKeyFilter: EvidenceKeyFilter;
});

@@ -40,10 +41,16 @@ dataKey: string;

* @param {FlowData} flowData FlowData being processed
* @returns {Mixed} result of processing
* @returns {*} result of processing
*/
processInternal(flowData: FlowData): any;
properties: object;
evidenceKeyFilter: any;
registrationCallbacks: any[];
pipelines: any[];
evidenceKeyFilter: EvidenceKeyFilterBase;
/**
* @type {Function[]}
*/
registrationCallbacks: Function[];
/**
* @type {Pipeline[]}
*/
pipelines: Pipeline[];
/**
* Internal function to be called when a FlowElement is added

@@ -60,3 +67,4 @@ * to pipeline, runs through any registrationCallbacks on the FlowElement

* Used when there are asynchronous initialisation steps
* @returns {Promise}
*
* @returns {Promise} returns Promise
* */

@@ -88,7 +96,16 @@ ready(): Promise<any>;

getProperties(): object;
/**
* Internal log
*
* @param {string} type log type
* @param {*} message message to log
*/
_log(type: string, message: any): void;
}
declare namespace FlowElement {
export { FlowData, Pipeline };
export { FlowData, Pipeline, EvidenceKeyFilter };
}
type FlowData = import('./flowData');
type Pipeline = import('./pipeline');
import EvidenceKeyFilterBase = require("./evidenceKeyFilter");
type FlowData = import("./flowData");
type Pipeline = import("./pipeline");
type EvidenceKeyFilter = import("./evidenceKeyFilter");
export = Helpers;
/**
* @typedef {import('./flowData')} FlowData
*/
declare class Helpers {
/**
* Set response headers in the response object (e.g. Accept-CH)
* @param response: The response to set the headers in.
* @param flowData: A processed FlowData instance to get the response header values
*
* @param {import('http').ServerResponse} response The response to set the headers in.
* @param {FlowData} flowData A processed FlowData instance to get the response header values
* from.
*/
static setResponseHeaders(response: any, flowData: any): void;
static setResponseHeaders(response: import("http").ServerResponse, flowData: FlowData): void;
}
declare namespace Helpers {
export { FlowData };
}
type FlowData = import("./flowData");

@@ -1,15 +0,24 @@

export const BasicListEvidenceKeyFilter: typeof import("./basicListEvidenceKeyFilter");
export const ElementData: typeof import("./elementData");
export const ElementDataDictionary: typeof import("./elementDataDictionary");
export const Evidence: typeof import("./evidence");
export const EvidenceKeyFilter: typeof import("./evidenceKeyFilter");
export const FlowData: typeof import("./flowData");
export const FlowElement: typeof import("./flowElement");
export const Pipeline: typeof import("./pipeline");
export const PipelineBuilder: typeof import("./pipelineBuilder");
export const AspectPropertyValue: typeof import("./aspectPropertyValue");
export const JsonBundler: typeof import("./jsonbundler");
export const JavascriptBuilder: typeof import("./javascriptbuilder");
export const SequenceElement: typeof import("./sequenceElement");
export const SetHeadersElement: typeof import("./setHeadersElement");
export const Helpers: typeof import("./helpers");
export let BasicListEvidenceKeyFilter: typeof import("./basicListEvidenceKeyFilter");
export let ElementData: typeof import("./elementData");
export let ElementDataDictionary: typeof import("./elementDataDictionary");
export let ErrorMessages: {
noElementData: string;
genericMissingProperties: string;
noReasonUnknown: string;
};
export let Constants: {
evidenceEnableCookies: string;
evidenceObjectName: string;
};
export let Evidence: typeof import("./evidence");
export let EvidenceKeyFilter: typeof import("./evidenceKeyFilter");
export let FlowData: typeof import("./flowData");
export let FlowElement: typeof import("./flowElement");
export let Pipeline: typeof import("./pipeline");
export let PipelineBuilder: typeof import("./pipelineBuilder");
export let AspectPropertyValue: typeof import("./aspectPropertyValue");
export let JsonBundler: typeof import("./jsonbundler");
export let JavascriptBuilder: typeof import("./javascriptbuilder");
export let SequenceElement: typeof import("./sequenceElement");
export let SetHeadersElement: typeof import("./setHeadersElement");
export let Helpers: typeof import("./helpers");

@@ -29,3 +29,6 @@ export = JavaScriptBuilderElement;

* callback url
* @param {boolean} options.enableCookies whether cookies should be enabled
* @param {boolean} options.enableCookies Whether the client JavaScript
* stored results of client side processing in cookies. This can also
* be set per request, using the "query.fod-js-enable-cookies" evidence key.
* For more details on personal data policy, see http://51degrees.com/terms/client-services-privacy-policy/
* @param {boolean} options.minify Whether to minify the JavaScript

@@ -49,3 +52,29 @@ */

};
evidenceKeyFilter: JSEvidenceKeyFilter;
/**
* Internal process function of the JavaScript builder
* Gets JSON from the JSONBundler and constructs JavaScript
* to place on the client side
*
* @param {FlowData} flowData to process
* @returns {undefined}
*/
processInternal(flowData: FlowData): undefined;
}
declare namespace JavaScriptBuilderElement {
export { FlowData };
}
import FlowElement = require("./flowElement.js");
/**
* @typedef {import('./flowData')} FlowData
*/
/**
* An instance of EvidenceKeyFilter which removes all but header
* and query evidence as that is all that is used by
* the JavaScript builder
**/
declare class JSEvidenceKeyFilter extends EvidenceKeyFilter {
filterEvidenceKey(key: any): boolean;
}
type FlowData = import("./flowData");
import EvidenceKeyFilter = require("./evidenceKeyFilter.js");

@@ -13,4 +13,16 @@ export = JSONBundlerElement;

constructor(...args: any[]);
evidenceKeyFilter: BasicListEvidenceKeyFilter;
propertyCache: {};
/**
* The JSON Builder extracts all properties and serializes them into JSON
*
* @param {FlowData} flowData the FlowData being processed
*/
processInternal(flowData: FlowData): void;
}
declare namespace JSONBundlerElement {
export { FlowData };
}
import FlowElement = require("./flowElement.js");
import BasicListEvidenceKeyFilter = require("./basicListEvidenceKeyFilter.js");
type FlowData = import("./flowData");
export = Pipeline;
/**
* @typedef {import('./flowElement')} FlowElement
* @typedef {import('fiftyone.pipeline.engines').DataFileUpdateService} DataFileUpdateService
*/

@@ -16,8 +17,23 @@ /**

* add to the Pipeline
* @param {boolean} suppressProcessExceptions If true then pipeline
* will suppress exceptions added to FlowData.
* @param {DataFileUpdateService} dataFileUpdateService Service that registers FlowElements
*/
constructor(flowElements?: FlowElement[]);
constructor(flowElements?: FlowElement[], suppressProcessExceptions?: boolean, dataFileUpdateService?: DataFileUpdateService);
flowElementsChain: import("./flowElement")[];
suppressProcessExceptions: boolean;
/**
* A logger for emitting messages
* @type {EventEmitter}
*/
eventEmitter: EventEmitter;
flowElements: {};
propertyDatabase: {};
/**
* @type {object}
*/
flowElements: object;
dataFileUpdateService: any;
/**
* @type {object}
*/
propertyDatabase: object;
processMethod: (flowData: any) => any;

@@ -43,3 +59,3 @@ /**

* @param {string} type type of message
* @param {mixed} message message to store in the log
* @param {*} message message to store in the log
*/

@@ -56,4 +72,5 @@ log(type: string, message: any): void;

/**
* Update pipeline's property database for FlowElement
*
* @param {FlowElement} flowElement
* @param {FlowElement} flowElement FlowElement to update
* @returns {void}

@@ -64,6 +81,7 @@ */

declare namespace Pipeline {
export { FlowElement };
export { FlowElement, DataFileUpdateService };
}
import EventEmitter = require("events");
type FlowElement = import('./flowElement');
import FlowData = require("./flowData");
type FlowElement = import("./flowElement");
type DataFileUpdateService = any;

@@ -25,5 +25,5 @@ export = PipelineBuilder;

* HTTP headers from the client side. This is true by default.
* @param {typeof import('./javascriptbuilder').prototype.settings}
* settings.javascriptBuilderSettings The settings
* to pass to the JavaScriptBuilder. See JavaScriptBuilder class for details.
* @param {typeof import('./javascriptbuilder').prototype.settings} settings.javascriptBuilderSettings
* The settings to pass to the JavaScriptBuilder.
* See JavaScriptBuilder class for details.
*/

@@ -33,3 +33,3 @@ constructor(settings?: {

useSetHeaderProperties: boolean;
javascriptBuilderSettings: typeof import('./javascriptbuilder').prototype.settings;
javascriptBuilderSettings: typeof import("./javascriptbuilder").prototype.settings;
});

@@ -40,2 +40,3 @@ /**

flowElements: FlowElement[];
dataFileUpdateService: any;
addJavaScriptBuilder: boolean;

@@ -67,2 +68,9 @@ javascriptBuilderSettings: {

/**
* Add required elements to an existing FlowElement array
*
* @param {FlowElement[]} flowElements array of elements to add to
* @returns {FlowElement[]} resulting array with required elements
*/
addRequiredElements(flowElements: FlowElement[]): FlowElement[];
/**
* Internal function used to first check if the

@@ -111,3 +119,3 @@ * JavaScript elements should be added to the pipeline

}
type FlowElement = import('./flowElement');
import Pipeline = require("./pipeline");
type FlowElement = import("./flowElement");
export = SequenceElement;
/**
* @typedef {import('./flowData')} FlowData
*/
/**
* The SequenceElement stores session data regarding requests

@@ -11,3 +14,18 @@ * for client side JavaScript from the JavaScript created by a

constructor(...args: any[]);
evidenceKeyFilter: BasicListEvidenceKeyFilter;
/**
* Internal process function for the sequence element
* Checks if there is a session id and sequence number set
* if there is it increments the sequence number for that session
* if not it initialises both
*
* @param {FlowData} flowData flowData with the evidence in it
*/
processInternal(flowData: FlowData): void;
}
declare namespace SequenceElement {
export { FlowData };
}
import FlowElement = require("./flowElement.js");
import BasicListEvidenceKeyFilter = require("./basicListEvidenceKeyFilter");
type FlowData = import("./flowData");

@@ -13,7 +13,14 @@ export = SetHeadersElement;

constructor(...args: any[]);
properties: {
responseheadersdictionary: {
name: string;
type: string;
};
};
headers: object;
/**
* Get the name of the header which the property relates to.
* @param {string} propertyName: To get the header name from.
* @return {string} Header name.
*
* @param {string} propertyName To get the header name from.
* @returns {string} Header name.
*/

@@ -31,11 +38,19 @@ getHeaderName(propertyName: string): string;

* 'device.SetHeaderHardwareAccept-CH' ] } }
* @param {Pipeline} pipeline: The pipeline instance to get the properties from.
* @return {object} Collection of headers which can be set in the response.
*
* @param {Pipeline} pipeline The pipeline instance to get the properties from.
* @returns {object} Collection of headers which can be set in the response.
*/
constructHeaders(pipeline: Pipeline): object;
/**
* Add the response header dictionary to the FlowData.
*
* @param {FlowData} flowData the FlowData being processed
*/
processInternal(flowData: FlowData): void;
/**
* Get response headers (e.g. Accept-CH)
* @param {FlowData} flowData: A processed FlowData instance to get the response header values
*
* @param {FlowData} flowData A processed FlowData instance to get the response header values
* from.
* @return {object} A dictionary of response header names with their values if they are not
* @returns {object} A dictionary of response header names with their values if they are not
* null

@@ -48,6 +63,7 @@ */

* is returned.
* @param {FlowData} flowData: A processed FlowData instance to get the value from.
* @param {string} elementKey: Key for the element data to get the value from.
* @param {string} propertyKey: Name of the property to get the value for.
* @return {string | undefined} value string or undefined.
*
* @param {FlowData} flowData A processed FlowData instance to get the value from.
* @param {string} elementKey Key for the element data to get the value from.
* @param {string} propertyKey Name of the property to get the value for.
* @returns {string | undefined} value string or undefined.
*/

@@ -60,3 +76,3 @@ tryGetValue(flowData: FlowData, elementKey: string, propertyKey: string): string | undefined;

import FlowElement = require("./flowElement.js");
type Pipeline = import('./pipeline');
type FlowData = import('./flowData');
type Pipeline = import("./pipeline");
type FlowData = import("./flowData");
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