diff --git a/bin/now-deploy b/bin/now-deploy index 6f7d8ec..773dbc4 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -25,6 +25,7 @@ const argv = minimist(process.argv.slice(2), { force: 'f', forceSync: 'F', login: 'L', + public: 'p', 'no-clipboard': 'C', 'forward-npm': 'N' } @@ -50,6 +51,7 @@ const help = () => { -d, --debug debug mode [off] -f, --force force a new deployment even if nothing has changed -L, --login configure login + -p, --public deployment is public (\`/_src\` is exposed) [on for oss, off for premium] -C, --no-clipboard do not attempt to copy URL to clipboard -N, --forward-npm Forward login information to install private NPM modules @@ -102,6 +104,7 @@ const forwardNpm = argv['forward-npm']; const forceNew = argv.force; const forceSync = argv.forceSync; const shouldLogin = argv.login; +const wantsPublic = argv.public; const apiUrl = argv.url || 'https://api.zeit.co'; const isTTY = process.stdout.isTTY; const quiet = !isTTY; @@ -227,7 +230,8 @@ async function sync (token) { forceNew, forceSync, forwardNpm: alwaysForwardNpm || forwardNpm, - quiet + quiet, + wantsPublic }); } catch (err) { if (debug) console.log(`> [debug] error: ${err.stack}`); diff --git a/lib/index.js b/lib/index.js index cc2931b..9eba340 100644 --- a/lib/index.js +++ b/lib/index.js @@ -35,6 +35,7 @@ export default class Now extends EventEmitter { } async create (path, { + wantsPublic, quiet = false, forceNew = false, forceSync = false, @@ -176,10 +177,11 @@ export default class Now extends EventEmitter { const res = await this._fetch('/now/create', { method: 'POST', body: { + public: wantsPublic, forceNew, forceSync, name: name, - description: description, + description, deploymentType, registryAuthToken: authToken, // Flatten the array to contain files to sync where each nested input