Socket
Socket
Sign inDemoInstall

@kurtosys/udm_data_toolkit

Package Overview
Dependencies
229
Maintainers
84
Versions
160
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @kurtosys/udm_data_toolkit

UDM Data Toolkit


Version published
Weekly downloads
151
Maintainers
84
Created
Weekly downloads
 

Readme

Source

UDM_DATA_TOOLKIT

Interface library for loading data into fund press.

Installing

Simply run npm install on the root folder of this project to install

BEFORE Publishing to npm: Building

For a dev build run npm run build

For a production build run npm run build:prod

Type definitions

This project has very experimental type definitions that attempts to document the functions for it. It doesn't cover the entire api so you can ignore large sections of it for now.

If you use vscode regardless if you use typescript or javascript you should get documentation built in and autocomplete.

Auto Complete

Project structure

/dist <-- Output Folder
/src  <-- Source Directory
    /utils
    index.js    <-- Entry Point
kDataToolkit.d.ts    <-- Type Definitions
webpack.config.js    <-- Build Configuration

Ftps changes

This is just to document the current changes with the ftps. A more thorough one will be done later. First there is the ftp folder you are pulling the files from it needs to be defined as ftpPath. This has been put on the LOADER_CONFIG object as ftpPath.

There are two functions syncFTPFolder and finalizeFTP.

Call syncFtpFolder with the remote path for the ftp it will return a promise that resolves with all the file names that have been copied. It syncs with your local ${globalRoot}/pending folder.

Once your loader is complete call finalizeFTP with the remote path this will archive all of the files into a zip clear the pending folder and clear the ftp folder.

import {
    LOADER_CONFIG,
    syncFTPFolder,
    finalizeFTP,
    registerLoaderStart,
    registerLoaderEnd,
    initDataToolkitConfig,
    login,
    getClient
} from "@kurtosys/udm_data_toolkit";
const manifest = require("rootDir/config/manifest");
const { ftpPath } = LOADER_CONFIG.ftp;

async function loadData() {
    let filesSynced = await syncFTPFolder(ftpPath); //Returns an array of files synced
    let token = await login();
    let client = await getClient();
    await registerLoaderStart();
    let isFilesToLoad = await loadFilesFromFolder("rootDir/pending", manifest);
    if (isFilesToLoad) {
        let [funds, timeSeries, ...otherStuff] = manifest;
        //Do your calls to load data
    }
    await finalizeFTP(ftpPath);
    await registerLoaderEnd(0, null, manifest);
    console.log("All Done");
}

initDataToolkitConfig("rootDir/", loadData);

Enviroment config changes

In the loaderConfig_[target].json file there is now a property called enviroment. Valid values for this is DEV, STAGING and PROD; this will target api-dev.fundpress.io, api-rel.fundpress.io and api.fundpress.io respectively.

Updating UDM Data Toolkit to a major version

Before updating this package to a major version, make sure that you first create a branch off master (without your changes) and name this branch "versions/{v#}" where {#} is the major version number. By doing this, we can easily maintain any version of this package

Example:

  • versions/v1
  • versions/v2

FAQs

Last updated on 15 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc