Browse Source

add "public" logic to the Now lib client

master
Nathan Rajlich 9 years ago
parent
commit
89f50abf4f
  1. 2
      bin/now-deploy
  2. 4
      lib/index.js

2
bin/now-deploy

@ -231,7 +231,7 @@ async function sync (token) {
forceSync, forceSync,
forwardNpm: alwaysForwardNpm || forwardNpm, forwardNpm: alwaysForwardNpm || forwardNpm,
quiet, quiet,
public: wantsPublic wantsPublic
}); });
} catch (err) { } catch (err) {
if (debug) console.log(`> [debug] error: ${err.stack}`); if (debug) console.log(`> [debug] error: ${err.stack}`);

4
lib/index.js

@ -35,6 +35,7 @@ export default class Now extends EventEmitter {
} }
async create (path, { async create (path, {
wantsPublic,
quiet = false, quiet = false,
forceNew = false, forceNew = false,
forceSync = false, forceSync = false,
@ -176,10 +177,11 @@ export default class Now extends EventEmitter {
const res = await this._fetch('/now/create', { const res = await this._fetch('/now/create', {
method: 'POST', method: 'POST',
body: { body: {
public: wantsPublic,
forceNew, forceNew,
forceSync, forceSync,
name: name, name: name,
description: description, description,
deploymentType, deploymentType,
registryAuthToken: authToken, registryAuthToken: authToken,
// Flatten the array to contain files to sync where each nested input // Flatten the array to contain files to sync where each nested input

Loading…
Cancel
Save