Socket
Socket
Sign inDemoInstall

arc-plugin-file-copy

Package Overview
Dependencies
4
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    arc-plugin-file-copy

Use Typescript and esbuild with arc.codes!


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
142 kB
Created
Weekly downloads
 

Readme

Source

arc-plugin-file-copy

Copy files into your functions. Works for sandbox and built functions.

Arc serverless framework plugin for compiling your functions with ESBuild Bundler

Install

npm i --save-dev arc-plugin-file-copy

Usage

After installing add @plugins and @file-copy pragmas to your app.arc file:

app.arc

@app
myapp

@file-copy
config/config.json config.json

@http
get /

@plugins
arc-plugin-file-copy

File listing;

myapp/app.arc
myapp/config.json
myapp/package.json
myapp/tsconfig.json
myapp/src/http/get-index/index.js

When running sandbox your functions will be able to find your file symlinked, when deploying the symlinks will be shipped as files. Since these are symbolic links file changes are immediate, however changes to your app.arc won't be picked up without a restart.

myapp/src/http/get-index/config.json

Copy as many files as you like, directories, and give them any new path.

@file-copy
config/settings.json config.json
config fullconfig
data.csv data/root.csv

Options

The options are simply source and destination. Both are required.

The source is relative to the .arc file. The destination is relative to the function directory. The target directory structure will be created and a symlink will be created. While the sandbox symlinks will be cleaned up, target directories will not be removed as it is generally not safe.

Keywords

FAQs

Last updated on 15 Aug 2022

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