Skip to content

Commit f9682e4

Browse files
author
Boris Yakubchik
committed
compile
1 parent 0d9fa30 commit f9682e4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/cli.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
type InputType = 'file' | 'stdin' | 'command';
99
type PostType = 'browser' | 'pbcopy';
1010

11+
const clipboardy = require('clipboardy');
1112
const fs = require('fs');
13+
const ncp = require('copy-paste');
14+
const opn = require('opn');
1215
const os = require('os');
1316
const path = require('path');
1417

1518
const diff2Html = require('diff2html').Diff2Html;
16-
17-
var open = require('open');
18-
var clipboardy = require('clipboardy');
19-
20-
const ncp = require('copy-paste');
21-
const opn = require('opn');
19+
const http = require('./http-utils.js').HttpUtils;
20+
const log = require('./logger.js').Logger;
21+
const utils = require('./utils.js').Utils;
2222

2323
module.exports = {
2424

@@ -159,14 +159,14 @@ module.exports = {
159159
}
160160

161161
log.print('Link powered by https://diffy.org');
162-
log.print(url);
162+
log.print(response);
163163

164164
if (postType === 'browser') {
165-
open(url);
166-
return callback(null, url);
165+
opn(response);
166+
return callback(null, response);
167167
} else if (postType === 'pbcopy') {
168-
clipboardy.writeSync(url);
169-
return callback(null, url);
168+
clipboardy.writeSync(response);
169+
return callback(null, response);
170170
}
171171
});
172172
}

0 commit comments

Comments
 (0)