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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@into-cps-association/dt-automation

v0.2.0

Published

The DTaaS's data and business-logic layer including representations of digital twins, communication with data/execution managers like GitLab, file, pipeline and execution operations and maintaining Redux state for UI. Sits between the consuming applicatio

Downloads

338

Readme

DT Automation

@into-cps-association/dt-automation provides the shared data, state, and business logic for creating, managing, and executing Digital Twins in DTaaS.

The package contains Digital Twin models, Redux state, and operations for GitLab, files, pipelines, execution history, and measurements.

It has no React dependency. React components, hooks, and other UI-specific code belong in the consuming application.

NOTE: Some features use browser APIs such as sessionStorage, document, Blob, and object URLs.

Install

yarn add @into-cps-association/dt-automation

Import supported APIs from the package root:

import { formatName } from '@into-cps-association/dt-automation';

const label = formatName('example-digital-twin');

Imports from src are implementation-specific and are not part of the public API.

Application Setup

Register the services required by the features used by the application.

| Feature | Setup | | :---------------- | :--------------------------------------------------------------------- | | Environment | setEnvironmentStore | | GitLab settings | setSettingsStore | | Authentication | setUsername and setAccessToken | | Execution history | setStorageService, setExecutionHistoryDB, setPipelineExecutionDB | | Measurements | setMeasurementStore, setMeasurementDB |

Environment

GitLab-backed operations require environment.AUTH_AUTHORITY.

The package provides environmentSlice and updateAuthority:

import { configureStore } from '@reduxjs/toolkit';
import {
  environmentSlice,
  setEnvironmentStore,
  updateAuthority,
} from '@into-cps-association/dt-automation';

const store = configureStore({
  reducer: { environment: environmentSlice },
});

store.dispatch(updateAuthority(appConfig.gitlabAuthority));
setEnvironmentStore(store);

Register the environment store before calling operations that use the backend authority.

Settings

Register the application settings store with setSettingsStore.

The settings state provides the GitLab group, Digital Twin directory, common library project, branch, runner tag, and logging settings.

Authentication

Set the GitLab credentials before making authenticated requests:

import {
  clearAccessToken,
  clearUsername,
  setAccessToken,
  setUsername,
} from '@into-cps-association/dt-automation';

setUsername(username);
setAccessToken(accessToken);

// On sign-out
clearUsername();
clearAccessToken();

The package keeps both values in memory rather than in sessionStorage, so script in same-origin iframes cannot read the token. Memory does not survive a page reload: set both again before anything that uses the package fetches, and call setAccessToken whenever the token is renewed.

Redux State

The package exports Redux reducers and actions for Digital Twins, assets, cart state, files, library configuration, environment configuration, and execution history.

For example, add the cart reducer to the application store:

import { configureStore } from '@reduxjs/toolkit';
import { addToCart, cartSlice } from '@into-cps-association/dt-automation';

const store = configureStore({
  reducer: { cart: cartSlice },
});

store.dispatch(addToCart(asset));

The package does not provide React hooks or a React Redux Provider.

Execution History

Register the required storage services before using execution-history features:

setStorageService(executionHistoryStorage);
setExecutionHistoryDB(executionHistoryStorage);
setPipelineExecutionDB(executionHistoryStorage);

The package root exports the following selectors:

  • selectExecutionHistoryEntries
  • selectExecutionHistoryById
  • selectExecutionHistoryByDTName
  • selectSelectedExecutionId
  • selectSelectedExecution
  • selectExecutionHistoryLoading
  • selectExecutionHistoryError

Measurements

Register setMeasurementStore and setMeasurementDB when using measurement features.

The measurement API provides operations for starting and stopping measurements, managing active pipelines, storing results, and downloading measurement data.

Backend Architecture

Backend communication uses interfaces and dependency injection. GitLab is the current backend implementation.

See src/ARCHITECTURE.md for the backend structure and extension points.

Development

See DEVELOPER.md for development, build, test, and package validation instructions.