npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kurtosys/udm_data_toolkit

v7.1.2

Published

UDM Data Toolkit

Downloads

187

Readme

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