Socket
Book a DemoInstallSign in
Socket

data-apps-tool

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-apps-tool

data-apps-tool

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
0
Created
Source

data-apps-tool

post-web data runtime

[!WARNING] Highly experimental work in progress

https://www.npmjs.com/package/data-apps-tool

usage

npm install -g data-apps-tool

$ data-apps-tool portal
  • generates an ./index.json file which contains an array of all valid filepaths in current folder.
  • starts a web server on port 10000
  • starts a web socket server on port 10000
  • starts a file watchter to watch all files in current directory
  • open default browser on http://localhost:10000
  • serves a default index.html file which connects to ws://localhost:10000
  • index.html loads index.js unless user specified a js filepath argument after portal
  • the executed js file can use the regular web api (see https://developer.mozilla.org/en-US/docs/Web/API), and some additional api surface.

[!NOTE] e.g. data-apps-tool portal index.js runs a data-apps-tool browser page which loads index.js with access to the full runtime api surface

api

window.vault

window.vault

vault.burnthemall()

vault.burnthemall()
// resets the embedded database and deletes all data

vault.on(type, callback)

vault.on('portal', async (ws) => {
  console.log('portal', ws)
})
//
vault.on('files', async (files, version) => {
  console.log('files', files, version)
  console.log('@TODO: download and cache all files listed `files` array?')
  // @TODO: hash or stat.ctime as eTag for files ...integrity
  // => should probably be included in files as an object instead of array
})

FAQs

Package last updated on 18 Oct 2024

Did you know?

Socket

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