Registry / devops / fis3-deploy-http-push

fis3-deploy-http-push

JSON →
library2.0.8jsnpmunverified

The `fis3-deploy-http-push` package serves as the default deployment plugin for the FIS3 build system, offering functionalities for both local and remote file synchronization via HTTP POST requests. Currently at version 2.0.8, it enables developers to configure custom deployment targets and attach specific data parameters for different file types directly within their FIS3 build configurations. A key characteristic is its deep integration with the FIS3 framework, allowing for sophisticated, programmatic control over the deployment process, including the ability to incorporate interactive elements like token prompts for authentication during a build. However, it is critical to note the explicit and severe security warnings associated with the provided `receiver.php` example script, which is inherently insecure and **must not be deployed in production environments**. This limitation means the plugin is primarily suitable for internal development, staging, or highly trusted network setups. The package's release cadence is not independent but rather follows the lifecycle and maintenance schedule of the broader FIS3 project.

npm install fis3-deploy-http-push
INSTALL
IMPORT
SIG · FIS3-DEPLOY-HTTP-P
F
fis3-deploy-http-push
devopsjavascriptv2.0.8
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fis3-deploy-http-push (module)
const deployPlugin = require('fis3-deploy-http-push');
import deployPlugin from 'fis3-deploy-http-push';
This package is a CommonJS module. Direct 'require' is typically for advanced, programmatic usage as demonstrated in the '另类使用方法' section of the README, where its 'apply' method is used.
http-push (plugin string)
fis.plugin('http-push', { /* config */ });
fis.plugin(require('fis3-deploy-http-push'), { /* config */ });
This is the standard way to reference and configure the plugin within a FIS3 build configuration, telling FIS3 to use this plugin by its registered name.

Demonstrates how to configure the `http-push` plugin within a FIS3 project to deploy JavaScript files to a remote HTTP receiver endpoint with custom parameters.

const fis = require('fis3'); fis.match('*.js', { deploy: fis.plugin('http-push', { // If configured, fis will POST files one by one to the receiver endpoint. receiver: 'http://www.example.com:8080/receiver.php', // This parameter will be sent along with the POST request. to: '/home/fis/www', // Additional parameters, backend accesses via $_POST['xx']. // If 'data' contains a 'to' key, the above 'to' parameter will override it. data: { token : 'abcdefghijk', user : 'maxming', uid : 1 } }) }); // Example of running the build (assuming fis3 CLI is installed) // fis.project.vcs.query = () => '1.0.0'; // Mock version for a complete example // fis.match('**', { release: '/$0' }); // Release all files // fis.log.level = fis.log.L_INFO; // fis.cli.run(process.argv); // This would trigger a build if run in a FIS3 project context
Debug
Known issues
breakingThe `receiver.php` script provided as an example in the README has severe security vulnerabilities and is explicitly marked as unsafe for production. Deploying it in a live environment will expose your server to significant risks.
fix
DO NOT use the example `receiver.php` script in production. Implement a custom, secure backend receiver that includes robust authentication, authorization, and input validation, or utilize a different, secure deployment mechanism for production assets.
affects: >=1.0.0
gotchaThis plugin is tightly coupled with the FIS3 build system. It is not a standalone deployment tool and requires a functioning FIS3 project setup to operate.
fix
Ensure you are using `fis3` as your project's build tool. If you require a standalone HTTP deployment solution, consider alternative packages not specific to FIS3.
affects: >=1.0.0
gotchaThe remote HTTP receiver endpoint (`receiver` option) must be a live server capable of accepting POST requests and handling file uploads. The plugin does not provide this server component itself (beyond the insecure example `receiver.php`).
fix
Before deploying, ensure your target server is running and configured with a custom, secure receiver script or API endpoint that can process the uploaded files sent by this plugin.
affects: >=1.0.0
Errors
Common errors & fixes
Security vulnerability when using receiver.php in production
The provided example `receiver.php` script lacks crucial security measures and is intended only for development or testing.
fix
Develop a custom, secure receiver application with proper authentication, authorization, and input sanitization, or choose an alternative, secure deployment method for production.
Files are not deploying, or receiver responds with 404/500
The `receiver` URL configured in `fis.plugin('http-push', { receiver: '...' })` is incorrect, the remote server is not running, or the receiver script has errors.
fix
Verify the `receiver` URL is correct and accessible. Ensure the remote server is online and the receiver script (your custom one, not the insecure example) is correctly deployed and functioning.
Deployed files land in wrong directories on the remote server
The `to` parameter in the plugin configuration is incorrectly set, or the remote receiver is not processing the `to` parameter as expected.
fix
Double-check the `to` option in your `fis.plugin('http-push', { to: '...' })` configuration. Also, verify that your custom receiver script correctly reads and utilizes the `to` parameter to determine the target path on the server.
Upgrade
Version history
2.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Resources
fis3-deploy-http-push — npm install fis3-deploy-http-push · libregistry