Skip to content
Browse files

[local-private] move old edgehill src/pro into packages/local-private

Summary: This is a test

Test Plan: Testing

Reviewers: juan

Differential Revision:

[local-private] add old edgehill src/pro into packages/local-private
  • Loading branch information...
emorikawa committed Dec 12, 2016
1 parent bc60882 commit 85de77c9645010e7a463e55b16617de50362c49c
Showing 337 changed files with 18,918 additions and 2 deletions.
@@ -1,4 +1,8 @@
"project_id" : "K2",
"conduit_uri" : ""
"project_id" : "N1",
"conduit_uri" : "",
"load" : [
"lint.engine": "ArcanistConfigurationDrivenLintEngine"
@@ -0,0 +1,17 @@
"linters": {
"coffeescript-linter": {
"type": "script-and-regex",
"script-and-regex.script": "script/grunt coffeelint:target --target",
"script-and-regex.regex": "/^ ((?P<error>✖)|(?P<warning>⚠)) *line (?P<line>\\d+) +(?P<message>.*)$/m",
"include": "{\\.(e?coffee|cjsx)}"
"eslint-regex-based": {
"type": "script-and-regex",
"include": ["(\\.jsx?$)", "(\\.es6$)"],
"exclude": ["(src\\/K2)", "(node_modules)"],
"script-and-regex.script": "sh -c '([ -e ./node_modules/.bin/eslint ]) && (./node_modules/.bin/eslint -f compact \"$0\" || true)'",
"script-and-regex.regex": "/^(?P<file>.*): line (?P<line>[0-9]*), col (?P<char>[0-9]*), (?P<warning>Warning|Error) - (?P<message>.*?)(\\((?P<code>[a-z-]+)\\))?$/m"
@@ -0,0 +1 @@
@@ -0,0 +1,3 @@
phutil_register_library('customlib', __FILE__);
@@ -0,0 +1,14 @@
* This file is automatically generated. Use 'arc liberate' to rebuild it.
* @generated
* @phutil-library-version 2
'__library_version__' => 2,
'class' => array(),
'function' => array(),
'xmap' => array(),
@@ -0,0 +1,12 @@
# Nylas Mail

This repo contains proprietary Nylas plugins and other extensions to N1

It is included as a submodule of the open source N1 repo at

From the root of N1, run `script/grunt add-nylas-build-resources` to manually
copy the files from this repo into the appropriate places within N1.

That script is run as part of the N1 `build` task. Machines that have access
this repo will automatically include the proprietary plugins.
@@ -0,0 +1,70 @@
# Building N1 with Continuous Integration

script/grunt ci

N1 is designed to be built into a production app for Mac, Windows, and Linux.
Only Nylas core team members currently have access to produce a production

Production builds are code-signed with a Nylas, Inc. certificate and include a
handful of other proprietary assets such as custom fonts and sounds.

We currently use [Travis]( to build on Mac &
Windows and AppVeyor to build on Windows.

A build can be run from a local machines by Jenkins or manually; however,
several environment variables must be setup.:


They exist in an encrypted file that only Travis can read in

**IMPORTANT** Do NOT remove the `2>/dev/null 1>/dev/null` in the
`before_install` scripts. If any of commands fail we don't want to leak
sensitive data in the output.

That file must be decrypted and `source`d before the environment variables can

If not building on Travis, the environment variables must be manually decrypted
via gpg and sourced

We use [Travis encryption](
and AppVeyor encryption to store the certificates, keys, and passwords

To login to GitHub and clone the Nylas submodule with private assets you need
to clone recursively (or `git submodule init; git submodule update`) with a
valid SSH key or login username and password.

We have a CI GitHub account:
The password for that account is stored in the environment variable:

For signing builds on Mac only when the certificates are already in the
Keychain (not Travis):
- `XCODE_KEYCHAIN` - The name of the Mac keychain that contains the
certificates and private key.
- `XCODE_KEYCHAIN_PASSWORD` - Th password to that keychain.
- `KEYCHAIN_ACCESS` - Alternatively, the `XCODE_KEYCHAIN` and
`XCODE_KEYCHAIN_PASSWORD` in a single colon-separated string.

Alternatively, on Travis we decrypt the actual certificate files and create a
temporary keychain. To do this we need the password to the private key. That's
stored in:

For signing builds on Windows only:
- `CERTIFICATE_FILE` - The Windows certificate
- `CERTIFICATE_PASSWORD` - The password for the private key on the cert

To download Electron:
- `NYLAS_GITHUB_OAUTH_TOKEN` - The OAuth token to use for GitHub API requests. See

To upload built artifacts to S3:

To notify when builds are done:
- `NYLAS_INTERNAL_HOOK_URL` - Nylas internal Slack token and url
Binary file not shown.
@@ -0,0 +1,18 @@
import Rx from 'rx-lite';
import {Message, DatabaseStore} from 'nylas-exports';

export default class ActivityDataSource {
buildObservable({openTrackingId, linkTrackingId, messageLimit}) {
const query = DatabaseStore
.where(Message.attributes.pluginMetadata.contains(openTrackingId, linkTrackingId))
this.observable = Rx.Observable.fromQuery(query);
return this.observable;

subscribe(callback) {
return this.observable.subscribe(callback);
@@ -0,0 +1,11 @@
import Reflux from 'reflux';

const ActivityListActions = Reflux.createActions([

for (const key of Object.keys(ActivityListActions)) {
ActivityListActions[key].sync = true;

export default ActivityListActions;
@@ -0,0 +1,70 @@
import React from 'react';
import {Actions, ReactDOM} from 'nylas-exports';
import {RetinaImg} from 'nylas-component-kit';

import ActivityList from './activity-list';
import ActivityListStore from './activity-list-store';

class ActivityListButton extends React.Component {
static displayName = 'ActivityListButton';

constructor() {
this.state = this._getStateFromStores();

componentDidMount() {
this._unsub = ActivityListStore.listen(this._onDataChanged);

componentWillUnmount() {

onClick = () => {
const buttonRect = ReactDOM.findDOMNode(this).getBoundingClientRect();
<ActivityList />,
{originRect: buttonRect, direction: 'down'}

_onDataChanged = () => {

_getStateFromStores() {
return {
unreadCount: ActivityListStore.unreadCount(),

render() {
let unreadCountClass = "unread-count";
let iconClass = "activity-toolbar-icon";
if (this.state.unreadCount) {
unreadCountClass += " active";
iconClass += " unread";
return (
title="View activity"
<div className={unreadCountClass}>

export default ActivityListButton;
@@ -0,0 +1,21 @@
import React from 'react';
import {RetinaImg} from 'nylas-component-kit';

const ActivityListEmptyState = function ActivityListEmptyState() {
return (
<div className="empty">
<div className="text">
Enable read receipts <RetinaImg name="icon-activity-mailopen.png" mode={RetinaImg.Mode.ContentDark} /> or
link tracking <RetinaImg name="icon-activity-linkopen.png" mode={RetinaImg.Mode.ContentDark} /> to
see notifications here.

export default ActivityListEmptyState;
Oops, something went wrong.

0 comments on commit 85de77c

Please sign in to comment.
You can’t perform that action at this time.