Browse Source

Release 0.9.4

master 0.9.4
Guillermo Rauch 9 years ago
parent
commit
1a837d96aa
  1. 5
      History.md
  2. 11
      lib/login.js
  3. 2
      package.json

5
History.md

@ -1,4 +1,9 @@
0.9.4 / 2016-03-03
==================
* login: extend configuration instead of overwriting it [@rauchg]
0.9.3 / 2016-03-03
==================

11
lib/login.js

@ -1,5 +1,5 @@
import { homedir } from 'os';
import { join as pathJoin } from 'path';
import path from 'path';
import fs from 'fs-promise';
import fetch from 'node-fetch';
import { stringify as stringifyQuery } from 'querystring';
@ -77,12 +77,13 @@ async function register () {
}
export default async function () {
const path = resolve(os.homedir(), '.now.json');
const file = path.resolve(homedir(), '.now.json');
const loginData = await register();
let existing = null;
try {
existing = await fs.readFile(path, 'utf8');
} catch(err){}
existing = await fs.readFile(file, 'utf8');
existing = JSON.parse(existing);
} catch (err) {}
const config = Object.extend({}, existing, loginData);
return fs.writeFile(path, JSON.stringify(config));
return fs.writeFile(file, JSON.stringify(config));
}

2
package.json

@ -1,6 +1,6 @@
{
"name": "now",
"version": "0.9.3",
"version": "0.9.4",
"description": "Realtime Deployments for Node.JS apps.",
"main": "./build/lib/index",
"files": [

Loading…
Cancel
Save