Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
af7859c
update lib
goodmind Nov 6, 2016
1a580dd
build(package): update deps, use rxjs
goodmind Mar 8, 2017
3c93d3c
refactor(interfaces): use rxjs
goodmind Mar 8, 2017
f1e6ada
refactor(plugins): use rxjs
goodmind Mar 8, 2017
058c6d5
refactor(helpers): use rxjs
goodmind Mar 8, 2017
15c12a0
refactor(api-request): use rxjs
goodmind Mar 8, 2017
65b4f46
refactor(sinks): loose types
goodmind Mar 8, 2017
f0c7623
refactor(sources): use rxjs
goodmind Mar 8, 2017
ab2ace7
refactor(telegram-driver): use rxjs
goodmind Mar 8, 2017
5b26168
test(intergration/plugins): use RxAdapter
goodmind Mar 8, 2017
2408c67
chore(lib): update
goodmind Mar 8, 2017
4edc026
build(package): fix rx
goodmind Mar 8, 2017
0e29498
build(package): unified branch
goodmind Mar 8, 2017
a38246b
merge
goodmind Mar 8, 2017
e47cba7
Merge branch 'rxjs5-pull' into unified
goodmind Mar 8, 2017
b1806ea
refactor(interfaces): rearrange types
goodmind Mar 8, 2017
b01e2e9
refactor(types): change string to tcomb type
goodmind Mar 8, 2017
eb366b8
refactor(sinks): add returnType to getChat
goodmind Mar 8, 2017
552d8ab
refactor(sources): flatten response
goodmind Mar 8, 2017
7369701
feat(telegram-driver): select responses by type
goodmind Mar 8, 2017
092d6b2
test(integration): getChat
goodmind Mar 8, 2017
da88026
build(package): remove rx tests
goodmind Mar 10, 2017
8f250ea
test(integration): remove rx tests
goodmind Mar 10, 2017
63f62ca
test(integration/plugins): remove rx tests
goodmind Mar 10, 2017
74c5c39
refactor(rx-typings): remove rx 4.1.0
goodmind Mar 10, 2017
d57d8d2
refactor(plugins): migrate to cycle unified
goodmind Mar 10, 2017
c166e47
refactor(helpers): migrate to cycle unified
goodmind Mar 10, 2017
7299727
refactor(types/inline-types): use arrow function
goodmind Mar 10, 2017
2270ea1
style(api-request): fix indent
goodmind Mar 10, 2017
42644ae
refactor(telegram-driver): migrate to cycle unified
goodmind Mar 10, 2017
ac02563
ci(.travis.yml): request remote types checking
goodmind Mar 10, 2017
86234a6
chore(trigger-travis): add request script
goodmind Mar 10, 2017
471abba
ci(.travis.yml): use docker branch
goodmind Mar 10, 2017
c19431f
ci(.travis.yml): move script to success block
goodmind Mar 10, 2017
d2ceac6
Merge unified from goodmind/type-safety
goodmind Mar 19, 2017
716df15
Merge pull request #34 from goodmind/type-safety
goodmind Mar 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
.idea/
lib/
.vscode/
typings/
test/record.js
Expand Down
165 changes: 165 additions & 0 deletions .scripts/trigger-travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
#!/bin/sh -f

# Trigger a new Travis-CI job.
# Ordinarily, a new Travis job is triggered when a commit is pushed to a
# GitHub repository. The trigger-travis.sh script provides a programmatic
# way to trigger a new Travis job.

# Usage:
# trigger-travis.sh [--pro] [--branch BRANCH] GITHUBID GITHUBPROJECT TRAVIS_ACCESS_TOKEN [MESSAGE]
# For example:
# trigger-travis.sh typetools checker-framework `cat ~/private/.travis-access-token` "Trigger for testing"
#
# where --pro means to use travis-ci.com instead of travis-ci.org, and
# where TRAVIS_ACCESS_TOKEN is, or ~/private/.travis-access-token contains,
# the Travis access token.
#
# Your Travis access token is the text after "Your access token is " in
# the output of these commands:
# travis login && travis token
# (If the travis program isn't installed, then use one of these two commands:
# gem install travis
# sudo apt-get install ruby-dev && sudo gem install travis
# Don't do "sudo apt-get install travis" which installs a trajectory analyzer.)
# Note that the Travis access token output by `travis token` differs from the
# Travis token available at https://travis-ci.org/profile .
# If you store it in in a file, make sure the file is not readable by others,
# for example by running: chmod og-rwx ~/private

# To use this script to trigger a dependent build in Travis, do two things:
#
# 1. Set an environment variable TRAVIS_ACCESS_TOKEN by navigating to
# https://travis-ci.org/MYGITHUBID/MYGITHUBPROJECT/settings
# The TRAVIS_ACCESS_TOKEN environment variable will be set when Travis runs
# the job, but won't be visible to anyone browsing https://travis-ci.org/.
#
# 2. Add the following before_install and after_script blocks to your
# .travis.yml file, where you replace OTHERGITHUB* by a specific downstream
# project, but you leave $TRAVIS_ACCESS_TOKEN as literal text:
#
# before_install:
# - npm install --save-dev travis-after-all
#
# after_script:
# - |
# set +e
# declare exitCode;
# $(npm bin)/travis-after-all
# exitCode=$?
#
# if [ "$exitCode" -eq 0 ]; then
# if [[ ($TRAVIS_BRANCH == master) &&
# ($TRAVIS_PULL_REQUEST == false) ]] ; then
# curl -LO https://raw.github.com/mernst/plume-lib/master/bin/trigger-travis.sh
# sh trigger-travis.sh OTHERGITHUBID OTHERGITHUBPROJECT $TRAVIS_ACCESS_TOKEN
# fi
# fi
#
# Your .travis.yml file must not use `language: generic` because then
# npm won't be installed.
#
# Note that Travis does not fail a job if an after_success command fails.
# If you misspell a GitHub ID or project name, then this script will fail,
# but Travis won't inform you of the mistake. So, check the end of the
# Travis build log the first time that a build succeeds. If there is any
# occurrence of
# "@type": "error",
# then it failed.

# Here is an explanation of the conditional in the after_success block:
#
# 1. Downstream projects are triggered only for builds of the mainline, not
# branches or pull requests. The reason is that typically a downstream
# project clones and uses the mainline. You could enhance this script to
# accept pass an environment variable for the upstream project; the
# downstream project's build script would need to read and use that
# environment variable. If you make this enhancement, feel free to submit
# a pull request so that others can benefit from it.
#
# 2. Downstream projects are triggered only if the Travis job number
# contains no "." or ends with ".1". In other words, if your .travis.yml
# defines a build matrix
# (https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix)
# that runs the same job using different configurations, then the
# "after_success:" block is run only for the first configuration.
# By default an after_success: block is run for every build in the matrix,
# but you really want it to run once if all the builds in the matrix
# succeed. Running if the first job succeeds is simple and it is usually
# adequate, even though the downstream job is triggered even if some job
# other than the first one fails.

# TODO: take a --branch command-line argument.
# TODO: enable the script to clone a particular branch rather than master.
# This would require a way to know the relationships among branches in
# different GitHub projects. It's easier to run all your tests within a
# single Travis job, if they fit within Travis's 50-minute time limit.

# An alternative to this script would be to install the Travis command-line
# client and then run:
# travis restart -r OTHERGITHUBID/OTHERGITHUBPROJECT
# That is undesirable because it restarts an old job, destroying its history,
# rather than starting a new job which is our goal.

# Parts of this script were originally taken from
# http://docs.travis-ci.com/user/triggering-builds/


if [ "$#" -lt 3 ] || [ "$#" -ge 7 ]; then
echo "Wrong number of arguments $# to trigger-travis.sh; run like:"
echo " trigger-travis.sh [--pro] [--branch BRANCH] GITHUBID GITHUBPROJECT TRAVIS_ACCESS_TOKEN [MESSAGE]" >&2
exit 1
fi

if [ "$1" = "--pro" ] ; then
TRAVIS_URL=travis-ci.com
shift
else
TRAVIS_URL=travis-ci.org
fi

if [ "$1" = "--branch" ] ; then
shift
BRANCH="$1"
shift
else
BRANCH=master
fi

USER=$1
REPO=$2
TOKEN=$3
if [ $# -eq 4 ] ; then
MESSAGE=",\"message\": \"$4\""
elif [ -n "$TRAVIS_REPO_SLUG" ] ; then
MESSAGE=",\"message\": \"Triggered by upstream build of $TRAVIS_REPO_SLUG commit "`git rev-parse --short HEAD`"\""
else
MESSAGE=""
fi
## For debugging:
# echo "USER=$USER"
# echo "REPO=$REPO"
# echo "TOKEN=$TOKEN"
# echo "MESSAGE=$MESSAGE"

body="{
\"request\": {
\"branch\":\"$BRANCH\"
$MESSAGE
}}"

# It does not work to put / in place of %2F in the URL below. I'm not sure why.
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${TOKEN}" \
-d "$body" \
https://api.${TRAVIS_URL}/repo/${USER}%2F${REPO}/requests \
| tee /tmp/travis-request-output.$$.txt

if grep -q '"@type": "error"' /tmp/travis-request-output.$$.txt; then
exit 1
fi
if grep -q 'access denied' /tmp/travis-request-output.$$.txt; then
exit 1
fi
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ node_js:
- '4'
before_install:
- npm i -g npm@^3.0.0
- npm i --save-dev travis-after-all
before_script:
- npm prune
after_success:
- |
set +e
declare exitCode;
$(npm bin)/travis-after-all
exitCode=$?
if [ "$exitCode" -eq 0 ]; then
if [[ ($TRAVIS_PULL_REQUEST == false) ]] ; then
sh ./.scripts/trigger-travis.sh --branch docker goodmind check-types $TRAVIS_TOKEN
fi
fi
- npm run semantic-release
branches:
except:
Expand Down
3 changes: 0 additions & 3 deletions lib/helpers/entities.d.ts

This file was deleted.

16 changes: 0 additions & 16 deletions lib/helpers/entities.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/helpers/entities.js.map

This file was deleted.

11 changes: 0 additions & 11 deletions lib/helpers/index.d.ts

This file was deleted.

63 changes: 0 additions & 63 deletions lib/helpers/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/helpers/index.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions lib/index.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions lib/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.js.map

This file was deleted.

44 changes: 0 additions & 44 deletions lib/interfaces.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions lib/interfaces.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/interfaces.js.map

This file was deleted.

27 changes: 0 additions & 27 deletions lib/plugins.d.ts

This file was deleted.

Loading