@voidwalkers/void-cli
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "@voidwalkers/void-cli", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "CLI for Void Walkers Void", | ||
@@ -5,0 +5,0 @@ "main": "./src/app.js", |
@@ -7,3 +7,3 @@ const CWD = process.cwd(); | ||
export const InternalBucketNames = { | ||
export const InternalBucketName = { | ||
Functions: '__internal-functions', | ||
@@ -10,0 +10,0 @@ Websites: '__internal-websites' |
@@ -8,3 +8,3 @@ import {execSync} from 'node:child_process'; | ||
import {InternalBucketNames, BASE_URL_API, BASE_URL_CDN, PATH_FUNCTIONS} from '#src/lib/constants.js'; | ||
import {InternalBucketName, BASE_URL_API, BASE_URL_CDN, PATH_FUNCTIONS} from '#src/lib/constants.js'; | ||
import {archiveFileTree, getFileTree, loadConfig} from '#src/lib/helper.js'; | ||
@@ -19,4 +19,4 @@ | ||
setRegisterHandler((type, name) => { | ||
list.push({name, type}); | ||
setRegisterHandler((type, name, func, options) => { | ||
list.push({name, options, type}); | ||
}); | ||
@@ -44,3 +44,3 @@ | ||
const {data} = await axios.post(`${BASE_URL_CDN}/cdn/buckets/${InternalBucketNames.Functions}/files`, { | ||
const {data} = await axios.post(`${BASE_URL_CDN}/cdn/buckets/${InternalBucketName.Functions}/files`, { | ||
file: fs.createReadStream(temporaryFile), | ||
@@ -113,3 +113,3 @@ name: `${dateString}.tar.gz` | ||
for (const {name, type} of functionsToDeploy) { | ||
for (const {name, options, type} of functionsToDeploy) { | ||
console.log(`Deploying function: "${name}" (${type})\n`); | ||
@@ -119,3 +119,4 @@ | ||
type, | ||
archive_file_id: file.id | ||
archive_file_id: file.id, | ||
is_private: Boolean(options?.isPrivate) | ||
}, { | ||
@@ -122,0 +123,0 @@ headers: { |
@@ -6,3 +6,3 @@ import fs from 'node:fs'; | ||
import {InternalBucketNames, BASE_URL_API, BASE_URL_CDN, PATH_WEBSITES} from '#src/lib/constants.js'; | ||
import {InternalBucketName, BASE_URL_API, BASE_URL_CDN, PATH_WEBSITES} from '#src/lib/constants.js'; | ||
import {archiveFileTree, getFileTree, loadConfig} from '#src/lib/helper.js'; | ||
@@ -23,3 +23,3 @@ | ||
const {data} = await axios.post(`${BASE_URL_CDN}/cdn/buckets/${InternalBucketNames.Websites}/files`, { | ||
const {data} = await axios.post(`${BASE_URL_CDN}/cdn/buckets/${InternalBucketName.Websites}/files`, { | ||
file: fs.createReadStream(temporaryFile), | ||
@@ -26,0 +26,0 @@ name: `${website.name}-${dateString}.tar.gz` |
@@ -43,3 +43,3 @@ import {execSync} from 'node:child_process'; | ||
dependencies: { | ||
'@voidwalkers/void-functions': '^0.1.3' | ||
'@voidwalkers/void-functions': '^0.1.4' | ||
} | ||
@@ -46,0 +46,0 @@ }, null, 2) + '\n'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30478
834