Socket
Socket
Sign inDemoInstall

fiftyone.pipeline.engines

Package Overview
Dependencies
Maintainers
0
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.4.99 to 4.4.100

types/autoUpdateStatus.d.ts

3

aspectData.js

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

* @typedef {import('./missingPropertyService')} MissingPropertyService
* @typedef {import('fiftyone.pipeline.core').FlowData} FlowData
*/

@@ -71,3 +72,3 @@

* @param {string} key the property key to lookup
* @returns {mixed} result
* @returns {FlowData} result
*/

@@ -74,0 +75,0 @@ get (key) {

@@ -62,3 +62,3 @@ /* *********************************************************************

* @param {string} key property key
* @returns {Mixed} property value
* @returns {*} property value
*/

@@ -65,0 +65,0 @@ getInternal (key) {

@@ -31,50 +31,53 @@ /* *********************************************************************

* A datafile used by a FlowElement / Engine to get calculate properties values
*
* @param {object} options
* @param {FlowElement} options.flowElement
* The FlowElement using the datafile
* @param {string} options.identifier
* Name of the datafile
* @param {object} options.updateURLParams
* Parameters used to construct the datafile update url
* if autoupdate is set to true
* @param {string} options.tempDataDirectory
* temporary file location (defaults to the operating system defualt)
* @param {boolean} options.createTempDataCopy
* whether to copy datafile to temporary location when updating
* @param {mixed} options.data data, if the file is stored in memory
* @param {string} options.path path to the datafile
* @param {boolean} options.autoUpdate whether to automatically
* update the datafile when required
* @param {boolean} options.fileSystemWatcher
* whether to check the datafile's path for changes and
* update the connected FlowElement's data automatically
* when the file is changed in the operating system
* @param {number} options.pollingInterval How often to poll for
* updates to the datafile (minutes)
* @param {number} options.updateTimeMaximumRandomisation
* Maximum randomisation offset in seconds to polling time interval
* @param {boolean} options.verifyMD5 whether to check a 'content-md5'
* header in the data file update service against the datafile
* to verify its contents
* @param {boolean} options.decompress is the datafile gziped
* when returning from the update service?
* @param {boolean} options.download should the datafile be
* downloaded or stored in memory
* @param {Function} options.getDatePublished function for getting
* the published date of the datafile
* @param {Function} options.getNextUpdate function for getting the
* next available update from the datafile
* @param {boolean} options.verifyIfModifiedSince whether to check
* an "If-Modified-Since" header on the update service against
* the last datafile update date
* @param {boolean} options.updateOnStart whether to update the
* datafile as soon as it is initialised
* @param {boolean} options.isRegistered whether the datafile has already
* been registered with a datafile update service (defaults to false)
* @param {Function} options.refresh callback to call when datafile
* has been updated. Defaults to a refresh method on the attached FlowElement
*
*/
class DataFile {
/**
* Constructor for Data File
*
* @param {object} options the options for the data file
* @param {FlowElement} options.flowElement
* The FlowElement using the datafile
* @param {string} options.identifier
* Name of the datafile
* @param {object} options.updateURLParams
* Parameters used to construct the datafile update url
* if autoupdate is set to true
* @param {string} options.tempDataDirectory
* temporary file location (defaults to the operating system defualt)
* @param {boolean} options.createTempDataCopy
* whether to copy datafile to temporary location when updating
* @param {*} options.data data, if the file is stored in memory
* @param {string} options.path path to the datafile
* @param {boolean} options.autoUpdate whether to automatically
* update the datafile when required
* @param {boolean} options.fileSystemWatcher
* whether to check the datafile's path for changes and
* update the connected FlowElement's data automatically
* when the file is changed in the operating system
* @param {number} options.pollingInterval How often to poll for
* updates to the datafile (minutes)
* @param {number} options.updateTimeMaximumRandomisation
* Maximum randomisation offset in seconds to polling time interval
* @param {boolean} options.verifyMD5 whether to check a 'content-md5'
* header in the data file update service against the datafile
* to verify its contents
* @param {boolean} options.decompress is the datafile gziped
* when returning from the update service?
* @param {boolean} options.download should the datafile be
* downloaded or stored in memory
* @param {Function} options.getDatePublished function for getting
* the published date of the datafile
* @param {Function} options.getNextUpdate function for getting the
* next available update from the datafile
* @param {boolean} options.verifyIfModifiedSince whether to check
* an "If-Modified-Since" header on the update service against
* the last datafile update date
* @param {boolean} options.updateOnStart whether to update the
* datafile as soon as it is initialised
* @param {boolean} options.isRegistered whether the datafile has already
* been registered with a datafile update service (defaults to false)
* @param {Function} options.refresh callback to call when datafile
* has been updated. Defaults to a refresh method on the attached FlowElement
*
*/
constructor (

@@ -81,0 +84,0 @@ {

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

*
* @param {Pipeline} pipeline
* @param {Pipeline} [pipeline]
* pipeline the update service is attached to

@@ -55,5 +55,13 @@ **/

this.registerPipeline(pipeline);
/**
* @type {EventEmitter}
*/
this.eventEmitter = new EventEmitter();
}
/**
* Method to register a pipeline with the update service
*
* @param {Pipeline} [pipeline] Pipeline to register
*/
registerPipeline (pipeline) {

@@ -63,2 +71,8 @@ this.pipeline = pipeline;

/**
* EventEmitter's 'on' delegation
*
* @param {string | symbol} listener listener
* @param {Function} callback callback
*/
on (listener, callback) {

@@ -68,2 +82,8 @@ this.eventEmitter.on(listener, callback);

/**
* EventEmitter's 'once' delegation
*
* @param {string | symbol} listener listener
* @param {Function} callback callback
*/
once (listener, callback) {

@@ -77,3 +97,4 @@ this.eventEmitter.once(listener, callback);

* @param {DataFile} dataFile the datafile to update
* @returns {undefined}
* @returns {boolean | void} returns false if already updating
* or request failed
*/

@@ -100,5 +121,3 @@ updateDataFile (dataFile) {

} catch (e) {
// getPublished might not exist if no datafile
}

@@ -225,3 +244,3 @@ }

* @param {string} filename the filename of the updated datafile
* @returns {undefined}
* @returns {void}
*/

@@ -228,0 +247,0 @@ fileReady (dataFile, filename) {

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

*
* @param {Mixed} cachekey key to lookup in the cache
* @param {*} cachekey key to lookup in the cache
*/

@@ -41,3 +41,3 @@ get (cachekey) {

*
* @param {Mixed} cachekey key for the cache entry
* @param {*} cachekey key for the cache entry
* @param {any} value value for the cache entry

@@ -44,0 +44,0 @@ */

@@ -102,3 +102,3 @@ /* *********************************************************************

* @param {FlowData} flowData FlowData to process
* @returns {undefined} result of processing
* @returns {Promise<true|void>} result of processing
*/

@@ -105,0 +105,0 @@ process (flowData) {

{
"name": "fiftyone.pipeline.engines",
"version": "4.4.99",
"version": "4.4.100",
"description": "Shared base functionality for implementing engines for the 51Degrees Pipeline API",

@@ -5,0 +5,0 @@ "keywords": [

@@ -35,3 +35,3 @@ /* *********************************************************************

*
* @param {mixed} key cache key to run through tracker
* @param {*} key cache key to run through tracker
* @returns {boolean} result of tracking

@@ -52,6 +52,7 @@ */

*
* @param {object} result of the track function
* @returns {boolean} whether a match has been made
* @param {string} key key of piece of evidence
* @param {*} value value of piece of evidence
* @returns {boolean} whether put in cache
*/
match (result) {
match (key, value) {
return true;

@@ -58,0 +59,0 @@ }

{
// 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,
"paths": {
"fiftyone.pipeline.core": ["../fiftyone.pipeline.core"]
},
}
}
// 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
}
}

@@ -6,2 +6,3 @@ export = AspectData;

* @typedef {import('./missingPropertyService')} MissingPropertyService
* @typedef {import('fiftyone.pipeline.core').FlowData} FlowData
*/

@@ -29,12 +30,9 @@ /**

missingPropertyService: MissingPropertyServiceBase;
/**
* @returns {ElementData}
*/
test(): typeof import("fiftyone.pipeline.core/types/elementData");
}
declare namespace AspectData {
export { FlowElement, MissingPropertyService };
export { FlowElement, MissingPropertyService, FlowData };
}
import MissingPropertyServiceBase = require("./missingPropertyService");
type FlowElement = import("fiftyone.pipeline.core/types/flowElement");
type MissingPropertyService = import('./missingPropertyService');
type MissingPropertyService = import("./missingPropertyService");
type FlowData = import("fiftyone.pipeline.core/types/flowData");

@@ -28,2 +28,10 @@ export = AspectDataDictionary;

contents: object;
/**
* getInternal retrieves a value from the dictionary
*
* @param {string} key property key
* @returns {*} property value
*/
getInternal(key: string): any;
[Symbol.iterator](): Generator<string, void, unknown>;
}

@@ -35,2 +43,2 @@ declare namespace AspectDataDictionary {

type FlowElement = import("fiftyone.pipeline.core/types/flowElement");
type MissingPropertyService = import('./missingPropertyService');
type MissingPropertyService = import("./missingPropertyService");

@@ -7,79 +7,82 @@ export = DataFile;

* A datafile used by a FlowElement / Engine to get calculate properties values
*
* @param {object} options
* @param {FlowElement} options.flowElement
* The FlowElement using the datafile
* @param {string} options.identifier
* Name of the datafile
* @param {object} options.updateURLParams
* Parameters used to construct the datafile update url
* if autoupdate is set to true
* @param {string} options.tempDataDirectory
* temporary file location (defaults to the operating system defualt)
* @param {boolean} options.createTempDataCopy
* whether to copy datafile to temporary location when updating
* @param {mixed} options.data data, if the file is stored in memory
* @param {string} options.path path to the datafile
* @param {boolean} options.autoUpdate whether to automatically
* update the datafile when required
* @param {boolean} options.fileSystemWatcher
* whether to check the datafile's path for changes and
* update the connected FlowElement's data automatically
* when the file is changed in the operating system
* @param {number} options.pollingInterval How often to poll for
* updates to the datafile (minutes)
* @param {number} options.updateTimeMaximumRandomisation
* Maximum randomisation offset in seconds to polling time interval
* @param {boolean} options.verifyMD5 whether to check a 'content-md5'
* header in the data file update service against the datafile
* to verify its contents
* @param {boolean} options.decompress is the datafile gziped
* when returning from the update service?
* @param {boolean} options.download should the datafile be
* downloaded or stored in memory
* @param {Function} options.getDatePublished function for getting
* the published date of the datafile
* @param {Function} options.getNextUpdate function for getting the
* next available update from the datafile
* @param {boolean} options.verifyIfModifiedSince whether to check
* an "If-Modified-Since" header on the update service against
* the last datafile update date
* @param {boolean} options.updateOnStart whether to update the
* datafile as soon as it is initialised
* @param {boolean} options.isRegistered whether the datafile has already
* been registered with a datafile update service (defaults to false)
* @param {Function} options.refresh callback to call when datafile
* has been updated. Defaults to a refresh method on the attached FlowElement
*
*/
declare class DataFile {
/**
* Constructor for Data File
*
* @param {object} options the options for the data file
* @param {FlowElement} options.flowElement
* The FlowElement using the datafile
* @param {string} options.identifier
* Name of the datafile
* @param {object} options.updateURLParams
* Parameters used to construct the datafile update url
* if autoupdate is set to true
* @param {string} options.tempDataDirectory
* temporary file location (defaults to the operating system defualt)
* @param {boolean} options.createTempDataCopy
* whether to copy datafile to temporary location when updating
* @param {*} options.data data, if the file is stored in memory
* @param {string} options.path path to the datafile
* @param {boolean} options.autoUpdate whether to automatically
* update the datafile when required
* @param {boolean} options.fileSystemWatcher
* whether to check the datafile's path for changes and
* update the connected FlowElement's data automatically
* when the file is changed in the operating system
* @param {number} options.pollingInterval How often to poll for
* updates to the datafile (minutes)
* @param {number} options.updateTimeMaximumRandomisation
* Maximum randomisation offset in seconds to polling time interval
* @param {boolean} options.verifyMD5 whether to check a 'content-md5'
* header in the data file update service against the datafile
* to verify its contents
* @param {boolean} options.decompress is the datafile gziped
* when returning from the update service?
* @param {boolean} options.download should the datafile be
* downloaded or stored in memory
* @param {Function} options.getDatePublished function for getting
* the published date of the datafile
* @param {Function} options.getNextUpdate function for getting the
* next available update from the datafile
* @param {boolean} options.verifyIfModifiedSince whether to check
* an "If-Modified-Since" header on the update service against
* the last datafile update date
* @param {boolean} options.updateOnStart whether to update the
* datafile as soon as it is initialised
* @param {boolean} options.isRegistered whether the datafile has already
* been registered with a datafile update service (defaults to false)
* @param {Function} options.refresh callback to call when datafile
* has been updated. Defaults to a refresh method on the attached FlowElement
*
*/
constructor({ flowElement, identifier, updateURLParams, tempDataDirectory, createTempDataCopy, data, path, autoUpdate, fileSystemWatcher, pollingInterval, updateTimeMaximumRandomisation, verifyMD5, decompress, download, getDatePublished, getNextUpdate, verifyIfModifiedSince, updateOnStart, isRegistered, refresh }: {
flowElement: any;
identifier: any;
updateURLParams: any;
tempDataDirectory?: string;
createTempDataCopy?: boolean;
flowElement: FlowElement;
identifier: string;
updateURLParams: object;
tempDataDirectory: string;
createTempDataCopy: boolean;
data: any;
path: any;
autoUpdate?: boolean;
fileSystemWatcher?: boolean;
pollingInterval?: number;
updateTimeMaximumRandomisation?: number;
verifyMD5?: boolean;
decompress?: boolean;
download?: boolean;
getDatePublished: any;
getNextUpdate: any;
verifyIfModifiedSince?: boolean;
updateOnStart?: boolean;
isRegistered?: boolean;
refresh: any;
path: string;
autoUpdate: boolean;
fileSystemWatcher: boolean;
pollingInterval: number;
updateTimeMaximumRandomisation: number;
verifyMD5: boolean;
decompress: boolean;
download: boolean;
getDatePublished: Function;
getNextUpdate: Function;
verifyIfModifiedSince: boolean;
updateOnStart: boolean;
isRegistered: boolean;
refresh: Function;
});
flowElement: any;
identifier: any;
updateURLParams: any;
flowElement: import("fiftyone.pipeline.core/types/flowElement");
identifier: string;
updateURLParams: object;
tempDataDirectory: string;
createTempDataCopy: boolean;
data: any;
path: any;
path: string;
autoUpdate: boolean;

@@ -92,7 +95,8 @@ fileSystemWatcher: boolean;

download: boolean;
getDatePublished: any;
getNextUpdate: any;
getDatePublished: Function;
getNextUpdate: Function;
verifyIfModifiedSince: boolean;
updateOnStart: boolean;
isRegistered: boolean;
attemptedDownload: boolean;
/**

@@ -99,0 +103,0 @@ * Function called when datafile has been updated.

@@ -15,14 +15,39 @@ export = DataFileUpdateService;

*
* @param {Pipeline} pipeline
* @param {Pipeline} [pipeline]
* pipeline the update service is attached to
**/
constructor(pipeline: Pipeline);
constructor(pipeline?: Pipeline);
/**
* @type {EventEmitter}
*/
eventEmitter: EventEmitter;
/**
* Method to register a pipeline with the update service
*
* @param {Pipeline} [pipeline] Pipeline to register
*/
registerPipeline(pipeline?: Pipeline): void;
pipeline: import("fiftyone.pipeline.core/types/pipeline");
/**
* EventEmitter's 'on' delegation
*
* @param {string | symbol} listener listener
* @param {Function} callback callback
*/
on(listener: string | symbol, callback: Function): void;
/**
* EventEmitter's 'once' delegation
*
* @param {string | symbol} listener listener
* @param {Function} callback callback
*/
once(listener: string | symbol, callback: Function): void;
/**
* Method that updates a datafile when it is due an update
*
* @param {DataFile} dataFile the datafile to update
* @returns {undefined}
* @returns {boolean | void} returns false if already updating
* or request failed
*/
updateDataFile(dataFile: DataFile): undefined;
updateDataFile(dataFile: DataFile): boolean | void;
/**

@@ -34,5 +59,5 @@ * Internal method called when the datafile has

* @param {string} filename the filename of the updated datafile
* @returns {undefined}
* @returns {void}
*/
fileReady(dataFile: DataFile, filename: string): undefined;
fileReady(dataFile: DataFile, filename: string): void;
/**

@@ -63,3 +88,4 @@ * Internal method to process the datafile has been downloaded

}
type DataFile = import('./dataFile');
import EventEmitter = require("events");
type Pipeline = import("fiftyone.pipeline.core/types/pipeline");
type DataFile = import("./dataFile");

@@ -10,3 +10,3 @@ export = DataKeyedCache;

*
* @param {Mixed} cachekey key to lookup in the cache
* @param {*} cachekey key to lookup in the cache
*/

@@ -17,3 +17,3 @@ get(cachekey: any): void;

*
* @param {Mixed} cachekey key for the cache entry
* @param {*} cachekey key for the cache entry
* @param {any} value value for the cache entry

@@ -20,0 +20,0 @@ */

@@ -41,2 +41,13 @@ export = Engine;

/**
* An engine's process function checks cache for an item
* (calling inCache)
* If found it returns the cached object
* If not found it runs the standard processInternal function
* and adds it to the cache (if a cache is present)
*
* @param {FlowData} flowData FlowData to process
* @returns {Promise<true|void>} result of processing
*/
process(flowData: FlowData): Promise<true | void>;
/**
* Callback which runs when an attached DataFile is updated

@@ -59,4 +70,4 @@ * Needs to be overriden by a specific engine to do anything

}
type DataFile = import("./dataFile");
type DataKeyedCache = import("./dataKeyedCache");
type FlowData = import("fiftyone.pipeline.core/types/flowData");
type DataFile = import('./dataFile');
type DataKeyedCache = import('./dataKeyedCache');

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

export const cloudNoPropertiesAccess: string;
export const cloudNoPropertyAccess: string;
export const cloudReasonUnknown: string;
export const propertyExcluded: string;
export let cloudNoPropertiesAccess: string;
export let cloudNoPropertyAccess: string;
export let cloudReasonUnknown: string;
export let propertyExcluded: string;

@@ -1,10 +0,23 @@

export const AspectData: typeof import("./aspectData");
export const AspectDataDictionary: typeof import("./aspectDataDictionary");
export const DataFile: typeof import("./dataFile");
export const DataKeyedCache: typeof import("./dataKeyedCache");
export const Engine: typeof import("./engine");
export const Lru: typeof import("./lru");
export const LruCache: typeof import("./lruCache");
export const MissingPropertyService: typeof import("./missingPropertyService");
export const Tracker: typeof import("./tracker");
// export const DataFileUpdateService: typeof import("./dataFileUpdateService");
export let AspectData: typeof import("./aspectData");
export let AspectDataDictionary: typeof import("./aspectDataDictionary");
export let DataFile: typeof import("./dataFile");
export let DataKeyedCache: typeof import("./dataKeyedCache");
export let Engine: typeof import("./engine");
export let Lru: typeof import("./lru");
export let LruCache: typeof import("./lruCache");
export let MissingPropertyService: typeof import("./missingPropertyService");
export let DataFileUpdateService: typeof import("./dataFileUpdateService");
export let AutoUpdateStatus: {
AUTO_UPDATE_SUCCESS: string;
AUTO_UPDATE_HTTPS_ERR: string;
AUTO_UPDATE_NOT_NEEDED: string;
AUTO_UPDATE_IN_PROGRESS: string;
AUTO_UPDATE_MASTER_FILE_CANT_RENAME: string;
AUTO_UPDATE_ERR_429_TOO_MANY_ATTEMPTS: string;
AUTO_UPDATE_ERR_403_FORBIDDEN: string;
AUTO_UPDATE_ERR_READING_STREAM: string;
AUTO_UPDATE_ERR_MD5_VALIDATION_FAILED: string;
AUTO_UPDATE_NEW_FILE_CANT_RENAME: string;
AUTO_UPDATE_REFRESH_FAILED: string;
};
export let Tracker: typeof import("./tracker");

@@ -9,2 +9,3 @@ export = LRU;

cache: {};
__convertKey(key: any): any;
write(key: any, value: any): void;

@@ -11,0 +12,0 @@ read(key: any): any;

@@ -16,4 +16,6 @@ export = LRUcache;

cache: LRU;
get(cacheKey: any): any;
put(cacheKey: any, value: any): void;
}
import DataKeyedCache = require("./dataKeyedCache");
import LRU = require("./lru");

@@ -22,5 +22,7 @@ export = MissingPropertyService;

* Return true if the supplied flow element is a CloudEngine, false if not.
*
* @param {FlowElement} flowElement The flow element to check
* @returns {boolean} Is CloudEngine
*/
_isCloudEngine(flowElement: FlowElement): any;
_isCloudEngine(flowElement: FlowElement): boolean;
}

@@ -27,0 +29,0 @@ declare namespace MissingPropertyService {

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

*
* @param {mixed} key cache key to run through tracker
* @param {*} key cache key to run through tracker
* @returns {boolean} result of tracking

@@ -20,7 +20,8 @@ */

*
* @param {object} result of the track function
* @returns {boolean} whether a match has been made
* @param {string} key key of piece of evidence
* @param {*} value value of piece of evidence
* @returns {boolean} whether put in cache
*/
match(result: object): any;
match(key: string, value: any): boolean;
}
import DataKeyedCache = require("./dataKeyedCache");
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc