Socket
Socket
Sign inDemoInstall

@wfh/assets-processer

Package Overview
Dependencies
17
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @wfh/assets-processer

Work with Plink, copy assets to destDir folder only when devMode is false


Version published
Maintainers
1
Created

Readme

Source

Utilities

Functions

utils.ts functionsDescription
createResponseTimestamp()Middleware for printing each response process duration time to log
commandProxy()Create an HTTP request proxy middleware and use for specific request path

Deploy and file server runtime

Use case

A cheap version of Static Content update mechnism, in which case we don't need involve any Redis like cross machine/cluster cache/storage service.

Pros: No polling required. Cons: To make sure all (both) nodes are reached and updated, must try multiple times.

graph LR
buildBox((build<br>machine))
env((Runtime<br>env))

subgraph assets-processer tool
   fetchOtherZip(Fetch other<br>zip files)
   sendZip(upload<br>to all nodes<br>master<br>process)
   upload[Repeat uploading,<br>until all<br>nodes are<br>updated]
   storeZip[stored zip]
end

subgraph assets-processer runtime
   rejDupli(Accept connection,<br>verify if it is<br>duplicate<br>uploading)
   unzip(extract<br>zip files<br>and delete)
end

buildBox --> staticBuild(build<br>static only)
staticBuild -.-> |1. include| build(compile)
build ---|output| zip[zip<br>file]
staticBuild -.-> |2. include| sendZip

buildBox --> fullBuild(Full build)

fullBuild -.->|1.| build
fullBuild -.->|2.| fetchOtherZip
fullBuild -.-> |3. include| sendZip
sendZip -.->|include| upload
sendZip --> |store|storeZip
fetchOtherZip --> |get|storeZip

sendZip -.-> |include| rejDupli
rejDupli ---|store & compare| version[app name,<br>version]
rejDupli -.->|include|unzip

fullBuild -.->|5.| gitCommit(git<br>commit/push/tag<br>release/*)
fullBuild -.-> |0.| buildNode(build Node<br>side *.ts)

env --> deploy(being<br>deployed)
env --> reboot(reboot on<br>fail over)


deploy -.-> |include| unzip
admin((admin)) --> mailNotif(Can recieve mail:<br>current<br>app zip<br>names/version)
admin --> seeVersion(query version<br>and node id)
mailNotif --> version
seeVersion --> version

FAQs

Last updated on 10 Oct 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