@pie-framework/build-helper
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -1,1 +0,1 @@ | ||
export declare const deployToNow: (dir: any, token: any, alias?: string, nowPath?: string) => void; | ||
export declare const deployToNow: (dir: any, token: any, alias?: string, nowPath?: string, dryRun?: boolean) => string; |
@@ -6,16 +6,22 @@ "use strict"; | ||
const log = debug_1.default('build-helper:deploy-to-now'); | ||
exports.deployToNow = (dir, token, alias, nowPath = 'now') => { | ||
const runCmd = (c, dryRun, opts = {}) => { | ||
if (dryRun) { | ||
log(c); | ||
return; | ||
} | ||
return child_process_1.execSync(c, opts).toString(); | ||
}; | ||
exports.deployToNow = (dir, token, alias, nowPath = 'now', dryRun = false) => { | ||
const deployCmd = `${nowPath} ${dir} ${token ? `--token=${token}` : ''} --public`; | ||
log('cmd: ', deployCmd); | ||
const url = child_process_1.execSync(deployCmd).toString(); | ||
const url = runCmd(deployCmd, dryRun); | ||
log('url: ', url); | ||
if (!url) { | ||
return; | ||
log('url is missing - continuing for info purposes'); | ||
} | ||
if (alias) { | ||
const aliasCmd = `${nowPath} alias ${url} ${alias} ${token ? `--token=${token}` : ''}`; | ||
log('aliasCmd', aliasCmd); | ||
const result = child_process_1.execSync(aliasCmd, { stdio: 'inherit' }); | ||
const result = runCmd(aliasCmd, dryRun || !url, { stdio: 'inherit' }); | ||
return result; | ||
} | ||
}; | ||
//# sourceMappingURL=deploy-to-now.js.map |
@@ -5,1 +5,2 @@ import { processFix } from './process-fix'; | ||
export { processFix, watch }; | ||
export { Commands } from './commands'; |
@@ -9,2 +9,4 @@ "use strict"; | ||
exports.deployToNow = deploy_to_now_1.deployToNow; | ||
var commands_1 = require("./commands"); | ||
exports.Commands = commands_1.Commands; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pie-framework/build-helper", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances 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
132229
18
234
4
3