New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dashkite

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dashkite - npm Package Compare versions

Comparing version 0.0.1 to 0.2.0

bin/kite

2

build/npm/src/client/builder.js

@@ -22,3 +22,3 @@ "use strict";

var client, url;
url = "https://unx7bif5m3.execute-api.us-west-2.amazonaws.com/staging";
url = "https://ms0v1tyzkl.execute-api.us-east-1.amazonaws.com/staging";
client = yield (0, _pandaSkyClient2.default)(url, _fetchH.fetch);

@@ -25,0 +25,0 @@ return {

@@ -54,2 +54,6 @@ "use strict";

addDevice = (0, _post2.default)(client, creds);
if (creds.device) {
(0, _logger.logError)("device keys already detected. exiting to avoid data loss");
process.exit(-1);
}
(0, _logger.logInfo)("updating profile with provisional device...");

@@ -56,0 +60,0 @@ pair = yield _credentials.keyPair.encryption();

@@ -66,7 +66,7 @@ "use strict";

privateKey = yield decrypt(sharedKey, creds.fromAPI.privateKey);
(0, _logger.logInfo)(`encrypting profile private key for ${creds.fromAPI.name}`);
(0, _logger.logInfo)(`encrypting profile private key for ${creds.fromAPI.nickname}`);
sharedKey = key.shared(key.private(creds.device.privateKey), key.public(creds.device.publicKey));
privateKey = yield encrypt(sharedKey, privateKey);
(0, _logger.logInfo)("completing device authorization...");
pin = yield putDevice(creds.fromAPI.name, { privateKey, pin });
pin = yield putDevice(creds.fromAPI.nickname, { privateKey, pin });
hangup();

@@ -73,0 +73,0 @@ (0, _logger.logInfo)("success");

@@ -19,4 +19,8 @@ "use strict";

var _feed = require("./feed");
var _feed2 = _interopRequireDefault(_feed);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = { profile: _profile2.default, device: _device2.default, post: _post2.default };
exports.default = { profile: _profile2.default, device: _device2.default, post: _post2.default, feed: _feed2.default };

@@ -37,3 +37,3 @@ "use strict";

var _ref = _asyncToGenerator(function* (argv) {
var client, defs, hangup, i, len, listPosts, lookupNickname, nickname, p, posts, profileID;
var client, defs, hangup, i, id, len, listPosts, lookupNickname, nickname, p, posts;
defs = [{

@@ -53,4 +53,4 @@ name: "nickname",

(0, _logger.logInfo)(`looking for posts from "${nickname}"...`);
({ profileID } = yield lookupNickname(nickname));
posts = yield listPosts(profileID);
({ id } = yield lookupNickname(nickname));
posts = yield listPosts(id);
hangup();

@@ -57,0 +57,0 @@ if (posts.length === 0) {

@@ -21,2 +21,14 @@ "use strict";

var _follow = require("./follow");
var _follow2 = _interopRequireDefault(_follow);
var _unfollow = require("./unfollow");
var _unfollow2 = _interopRequireDefault(_unfollow);
var _sources = require("./sources");
var _sources2 = _interopRequireDefault(_sources);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -47,2 +59,9 @@

return yield (0, _link2.default)(argv);
case "follow":
return yield (0, _follow2.default)(argv);
case "unfollow":
return yield (0, _unfollow2.default)(argv);
case "source":
case "sources":
return yield (0, _sources2.default)(argv);
default:

@@ -49,0 +68,0 @@ // TODO: Put some fancy commandline usage stuff here.

@@ -167,3 +167,3 @@ "use strict";

var _ref7 = _asyncToGenerator(function* (client, file, returnRaw) {
var device, deviceKey, dir, encryptedKey, profile;
var device, deviceKey, dir, encryptedKey, fromAPI, profile;
({ dir } = (0, _path.parse)(file));

@@ -179,8 +179,11 @@ (0, _logger.logInfo)(`using profile from [${dir}]`);

} else if (returnRaw) {
({
// Return a dump of the local and remote profiles
device: fromAPI
} = yield (0, _get2.default)(client, { profile, device }));
return {
// Return a dump of the local and remote profiles
creds: {
device: device,
profile: profile,
fromAPI: yield (0, _get2.default)(client, { profile, device })
fromAPI: fromAPI
},

@@ -192,3 +195,5 @@ root: dir

// Derive an encryption key by retrieving the private key from the profile
privateKey: encryptedKey
device: {
privateKey: encryptedKey
}
} = yield (0, _get2.default)(client, { profile, device }));

@@ -195,0 +200,0 @@ deviceKey = key.shared(key.public(device.publicKey), key.private(device.privateKey));

@@ -38,2 +38,4 @@ "use strict";

return yield _commands2.default.post(argv);
case "feed":
return yield _commands2.default.feed(argv);
default:

@@ -40,0 +42,0 @@ // TODO: Put some fancy commandline usage stuff here.

{
"name": "dashkite",
"version": "0.0.1",
"version": "0.2.0",
"description": "CLI for DashKite - social media with strong privacy",
"main": "./build/npm/src/index.js",
"bin": {
"dash": "./bin/dash"
"kite": "./bin/kite"
},

@@ -9,0 +9,0 @@ "files": [

@@ -27,3 +27,3 @@ # DashKite CLI

```
This gives you the command-line executable `dash`
This gives you the command-line executable `kite`

@@ -33,3 +33,3 @@ # Examples

```
$ dash profile add david
$ kite profile add david

@@ -51,3 +51,3 @@ [dash] warn: no credentials found in /Users/david/desktop-test or its direct ancestors.

$ dash profile link david
$ kite profile link david

@@ -57,3 +57,3 @@ [dash] info: fetching test public key

$ dash device add phone
$ kite device add phone

@@ -72,3 +72,3 @@ [dash] info: using profile from [/Users/david/phone-test]

$ dash device authorize phone
$ kite device authorize phone

@@ -87,3 +87,3 @@ [dash] info: using profile from [/Users/david/desktop-test]

$ dash device pin R1B1xA
$ kite device pin R1B1xA

@@ -104,3 +104,3 @@ [dash] info: using profile from [/Users/david/phone-test]

$ dash post add 'Hello World!'
$ kite post add 'Hello World!'

@@ -117,3 +117,3 @@ [dash] info: using profile from [/Users/david/desktop-test]

$ echo "We can write multiple lines here, too." >> foo.txt
$ dash post add < foo.txt
$ kite post add < foo.txt

@@ -128,3 +128,3 @@ [dash] info: using profile from [/Users/david/desktop-test]

$ dash post list david
$ kite post list david

@@ -145,11 +145,20 @@ [dash] info: looking for posts from "david"...

## Your Feed
```
```
# Command-Line Usage
[profile]: #your-dashkite-profile
[new-device-flow]: #adding-a-new-device-to-your-profile
[feed]: #your-feed
## Feed
_kite feed_
This command serves up the freshest posts from the people you follow.
## Profile
### add
_dash profile add [profile-name]_
_kite profile add [profile-name]_

@@ -161,10 +170,21 @@ This command allows you to create a new DashKite profile or update the name of an existing profile. Your profile is stored within a file named `.dashkite`. If it cannot be found in your working directory or its ancestors, one is automatically generated and saved in your current working directory. See [Your DashKite Profile][profile] for more information.

### link
_dash profile link [profile-name]_
_kite profile link [profile-name]_
This command allows you to link a new device with an existing profile. You cannot use this command if you already have a `.dashkite` file. `link` takes the profile name you provide, looks up the public key for that profile, and creates a `.dashkite` stub. You then need to go through the [new device flow][new-device-flow] to authorize this device.
### follow
_kite profile follow [profile-name]_
This command allows you to follow the posts of an existing profile in [your feed][feed]. After you follow them, their posts will appear in your feed the next time you check it.
### unfollow
_kite profile unfollow [profile-name]_
This command allows you to stop following the posts of an existing profile in [your feed][feed]. After you unfollow them, their posts will disappear from your feed the next time you check it.
## Device
### add
_dash device add [device-name]_
_kite device add [device-name]_

@@ -174,5 +194,5 @@ This command allows you to add a new device to your profile. This merely places a request with your profile from a new device, and is part of a larger [new device flow][new-device-flow].

### authorize
_dash device authorize [device-name]_
_kite device authorize [device-name]_
This command authorizes a new device, requested via `dash device add`. It is part of the [new device flow][new-device-flow]. You use `authorize` from an already-authorized device. It uses its access to the profile private key to encrypt a copy for the new device with asymmetric encryption.
This command authorizes a new device, requested via `kite device add`. It is part of the [new device flow][new-device-flow]. You use `authorize` from an already-authorized device. It uses its access to the profile private key to encrypt a copy for the new device with asymmetric encryption.

@@ -182,5 +202,5 @@ This command grants temporary authorization to the new device's public device key, allowing it to access the API, but without access to the profile private key to access private data. It returns a 6-character PIN to be used with the new device to complete the authorization flow. You have 3 minutes to enter this PIN before re-submitting authorization.

### pin
_dash device pin [device-PIN]_
_kite device pin [device-PIN]_
This command completes the [new device flow][new-device-flow]. You get a PIN when using `dash device authorize`. Using this PIN allows the API to permanently authorize the new device, retrieve the encrypted profile private key, and replace it with a copy only the new device can decrypt.
This command completes the [new device flow][new-device-flow]. You get a PIN when using `kite device authorize`. Using this PIN allows the API to permanently authorize the new device, retrieve the encrypted profile private key, and replace it with a copy only the new device can decrypt.

@@ -190,3 +210,3 @@ After completing the new device flow, the device is ready and has full access to the profile.

### delete
_dash device delete [device-name]_
_kite device delete [device-name]_

@@ -199,4 +219,4 @@ This command causes the profile to forget the target device. The public key entry is deleted, including the encrypted copy of the profile private key, denying the device access to both the API and any private data.

### add
_dash post add [text]_
_dash post add < [file]_
_kite post add [text]_
_kite post add < [file]_

@@ -206,3 +226,3 @@ This command creates a DashKite post attributed to your profile. You may either input the content directly on the commandline, or pipe in a file. New-line characters are maintained.

### list
_dash post list [profile name]_
_kite post list [profile name]_

@@ -212,4 +232,4 @@ This command lists out the posts from the target profile in reverse chronological order. Because DashKite posts are public, you may use this command without a `.dashkite` profile and see the posts from any profile you specify.

### delete
_dash post delete [post ID]_
_kite post delete [post ID]_
This is a WIP command to delete a target post. It is functional, but there is currently no way to view a post's ID in the CLI tool.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc