Skip to content

Commit

Permalink
Merge pull request #712 from imolorhe/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
imolorhe committed Apr 7, 2019
2 parents 3067913 + de1367d commit 16ffea9
Show file tree
Hide file tree
Showing 74 changed files with 1,024 additions and 98 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@
"contributions": [
"translation"
]
},
{
"login": "victormihaita",
"name": "Victor Mihaita",
"avatar_url": "https://avatars0.githubusercontent.com/u/43206741?v=4",
"profile": "https://github.com/victormihaita",
"contributions": [
"translation"
]
}
],
"contributorsPerLine": 7
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ script:
- ng lint
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then yarn test-single-run; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then ng e2e; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then yarn test-electron; fi
- if [ ! -z "$TRAVIS_TAG" ]; then yarn build-electron; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then yarn build; fi # Need to generate files for deployment
before_deploy:
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build](https://travis-ci.org/imolorhe/altair.svg?branch=master "Travis CI")](https://travis-ci.org/imolorhe/altair)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors)
[![Build status](https://ci.appveyor.com/api/projects/status/qp69kxnlxntsumdj/branch/staging?svg=true)](https://ci.appveyor.com/project/imolorhe/altair/branch/staging)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fimolorhe%2Faltair.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fimolorhe%2Faltair?ref=badge_shield)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/altair-gql/localized.svg)](https://crowdin.com/project/altair-gql)
Expand Down Expand Up @@ -236,9 +236,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/all-contri

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars1.githubusercontent.com/u/4080177?v=4" width="100px;" alt="Danilo Caruso"/><br /><sub><b>Danilo Caruso</b></sub>](https://github.com/DaniloCaruso)<br />[🌍](#translation-DaniloCaruso "Translation") | [<img src="https://avatars0.githubusercontent.com/u/12682069?v=4" width="100px;" alt="Igor Szymanski"/><br /><sub><b>Igor Szymanski</b></sub>](https://github.com/IgorSzymanski)<br />[🌍](#translation-IgorSzymanski "Translation") | [<img src="https://avatars2.githubusercontent.com/u/1839345?v=4" width="100px;" alt="Kevin Porten"/><br /><sub><b>Kevin Porten</b></sub>](https://github.com/kporten)<br />[🌍](#translation-kporten "Translation") | [<img src="https://avatars0.githubusercontent.com/u/690661?v=4" width="100px;" alt="JongChan Choi"/><br /><sub><b>JongChan Choi</b></sub>](https://0xabcdef.com/)<br />[🌍](#translation-disjukr "Translation") | [<img src="https://avatars1.githubusercontent.com/u/7892779?v=4" width="100px;" alt="Alexey Rodionov"/><br /><sub><b>Alexey Rodionov</b></sub>](https://twitter.com/alexey_rodionov)<br />[📖](https://github.com/imolorhe/altair/commits?author=FluorescentHallucinogen "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/742894?v=4" width="100px;" alt="kurisutofu"/><br /><sub><b>kurisutofu</b></sub>](https://github.com/kurisutofu)<br />[🌍](#translation-kurisutofu "Translation") | [<img src="https://avatars1.githubusercontent.com/u/5834593?v=4" width="100px;" alt="Claércio Santos"/><br /><sub><b>Claércio Santos</b></sub>](https://github.com/Claercio)<br />[🌍](#translation-Claercio "Translation") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/16863691?v=4" width="100px;" alt="jenda"/><br /><sub><b>jenda</b></sub>](https://janjaromirhorak.cz/)<br />[🌍](#translation-janjaromirhorak "Translation") | [<img src="https://avatars2.githubusercontent.com/u/20699793?v=4" width="100px;" alt="pcharbon70"/><br /><sub><b>pcharbon70</b></sub>](https://github.com/pcharbon70)<br />[🌍](#translation-pcharbon70 "Translation") | [<img src="https://avatars1.githubusercontent.com/u/5823011?v=4" width="100px;" alt="Juan Cruz"/><br /><sub><b>Juan Cruz</b></sub>](https://github.com/juca-cruz)<br />[🌍](#translation-juca-cruz "Translation") |
<table><tr><td align="center"><a href="https://github.com/DaniloCaruso"><img src="https://avatars1.githubusercontent.com/u/4080177?v=4" width="100px;" alt="Danilo Caruso"/><br /><sub><b>Danilo Caruso</b></sub></a><br /><a href="#translation-DaniloCaruso" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/IgorSzymanski"><img src="https://avatars0.githubusercontent.com/u/12682069?v=4" width="100px;" alt="Igor Szymanski"/><br /><sub><b>Igor Szymanski</b></sub></a><br /><a href="#translation-IgorSzymanski" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/kporten"><img src="https://avatars2.githubusercontent.com/u/1839345?v=4" width="100px;" alt="Kevin Porten"/><br /><sub><b>Kevin Porten</b></sub></a><br /><a href="#translation-kporten" title="Translation">🌍</a></td><td align="center"><a href="https://0xabcdef.com/"><img src="https://avatars0.githubusercontent.com/u/690661?v=4" width="100px;" alt="JongChan Choi"/><br /><sub><b>JongChan Choi</b></sub></a><br /><a href="#translation-disjukr" title="Translation">🌍</a></td><td align="center"><a href="https://twitter.com/alexey_rodionov"><img src="https://avatars1.githubusercontent.com/u/7892779?v=4" width="100px;" alt="Alexey Rodionov"/><br /><sub><b>Alexey Rodionov</b></sub></a><br /><a href="https://github.com/imolorhe/altair/commits?author=FluorescentHallucinogen" title="Documentation">📖</a></td><td align="center"><a href="https://github.com/kurisutofu"><img src="https://avatars0.githubusercontent.com/u/742894?v=4" width="100px;" alt="kurisutofu"/><br /><sub><b>kurisutofu</b></sub></a><br /><a href="#translation-kurisutofu" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/Claercio"><img src="https://avatars1.githubusercontent.com/u/5834593?v=4" width="100px;" alt="Claércio Santos"/><br /><sub><b>Claércio Santos</b></sub></a><br /><a href="#translation-Claercio" title="Translation">🌍</a></td></tr><tr><td align="center"><a href="https://janjaromirhorak.cz/"><img src="https://avatars3.githubusercontent.com/u/16863691?v=4" width="100px;" alt="jenda"/><br /><sub><b>jenda</b></sub></a><br /><a href="#translation-janjaromirhorak" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/pcharbon70"><img src="https://avatars2.githubusercontent.com/u/20699793?v=4" width="100px;" alt="pcharbon70"/><br /><sub><b>pcharbon70</b></sub></a><br /><a href="#translation-pcharbon70" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/juca-cruz"><img src="https://avatars1.githubusercontent.com/u/5823011?v=4" width="100px;" alt="Juan Cruz"/><br /><sub><b>Juan Cruz</b></sub></a><br /><a href="#translation-juca-cruz" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/victormihaita"><img src="https://avatars0.githubusercontent.com/u/43206741?v=4" width="100px;" alt="Victor Mihaita"/><br /><sub><b>Victor Mihaita</b></sub></a><br /><a href="#translation-victormihaita" title="Translation">🌍</a></td></tr></table>

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
2 changes: 1 addition & 1 deletion chrome-ext-files/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Altair GraphQL Client",
"short_name": "Altair",
"description": "The only graphQL client you'll ever need.",
"version": "2.1.5",
"version": "2.1.6",
"icons": {
"16": "assets/img/altair_logo_128.png",
"48": "assets/img/altair_logo_128.png",
Expand Down
6 changes: 3 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ logo_url: /assets/img/altair.svg
email: samuelimolo4real@gmail.com
download_link: https://github.com/imolorhe/altair/releases/latest
description: > # this means to ignore newlines until "baseurl:"
A beautiful feature-rich GraphQL Client IDE for all platforms.
A beautiful feature-rich GraphQL Client IDE for all platforms. Available for MacOS, Windows, Linux, Chrome, Firefox.
Enables you interact with any GraphQL server you are authorized to access from any platform you are on.
Much like Postman for GraphQL, you can easily test and optimize your GraphQL implementations.
You also have several features to make your GraphQL development process much easier including subscriptions,
query scaffolding, formatting, multiple languages, themes, and many more.
# baseurl: "" # the subpath of your site, e.g. /blog
# url: "" # the base hostname & protocol for your site, e.g. http://example.com
seo_image: /assets/img/app-shot.jpg
seo_image: /assets/img/app-shot.png
seo_author: Samuel Imolorhe
releases:
-
Expand Down Expand Up @@ -59,7 +59,7 @@ releases:
image: webapp_icon.svg
link: https://altair-gql.sirmuel.design/
learn_more: >
A beautiful feature-rich GraphQL Client IDE for all platforms.
A beautiful feature-rich GraphQL Client IDE for all platforms. Available for MacOS, Windows, Linux, Chrome, Firefox.
Enables you interact with any GraphQL server you are authorized to access from any platform you are on.
Much like Postman for GraphQL, you can easily test and optimize your GraphQL implementations.
You also have several features to make your GraphQL development process much easier including subscriptions, query scaffolding, formatting, multiple languages, themes, and many more.
Expand Down
6 changes: 3 additions & 3 deletions docs/_includes/head_basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="Altair GraphQL Client">
<meta itemprop="description" content="A beautiful feature-rich GraphQL Client IDE for all platforms. Enables you interact with any GraphQL server you are authorized to access from any platform you are on. Much like Postman for GraphQL, you can easily test and optimize your GraphQL implementations.">
<meta itemprop="image" content="https://altair.sirmuel.design/assets/img/app-shot.jpg">
<meta itemprop="image" content="https://altair.sirmuel.design/assets/img/app-shot.png">
<meta name="author" content="Samuel Imolorhe">

<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://altair.sirmuel.design">
<meta property="og:type" content="website">
<meta property="og:title" content="Altair GraphQL Client">
<meta property="og:description" content="A beautiful feature-rich GraphQL Client IDE for all platforms. Enables you interact with any GraphQL server you are authorized to access from any platform you are on. Much like Postman for GraphQL, you can easily test and optimize your GraphQL implementations.">
<meta property="og:image" content="https://altair.sirmuel.design/assets/img/app-shot.jpg">
<meta property="og:image" content="https://altair.sirmuel.design/assets/img/app-shot.png">

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Altair GraphQL Client">
<meta name="twitter:description" content="A beautiful feature-rich GraphQL Client IDE for all platforms. Enables you interact with any GraphQL server you are authorized to access from any platform you are on. Much like Postman for GraphQL, you can easily test and optimize your GraphQL implementations.">
<meta name="twitter:image" content="https://altair.sirmuel.design/assets/img/app-shot.jpg">
<meta name="twitter:image" content="https://altair.sirmuel.design/assets/img/app-shot.png">

<!-- Meta Tags Generated via http://heymeta.com -->

Expand Down
5 changes: 2 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ Note
It is **NOT** recommended to use the web app for full development, because there are some limitations there which might lead to frustrations if something isn't working as expected. It is preferred for you to use the desktop apps where possible, or the browser extensions for ease of use.


### Usage with express
You can use altair with an express server using [altair-express-middleware](/docs/integrations/altair-express-middleware).

### Usage with your application
You can easily integrate altair with several application setups. Check the [available integrations](/docs/integrations).

Checkout the features available in Altair [here](/docs/features).
56 changes: 56 additions & 0 deletions docs/docs/integrations/altair-koa-middleware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
parent: Integrations
---

## altair-koa-middleware
npm
{: .label .label-red }
Koa
{: .label .label-purple }

You can use altair with a koa server using [altair-koa-middleware](https://www.npmjs.com/package/altair-koa-middleware).

This is an koa middleware for mounting an instance of altair GraphQL client.

#### Installation
This is a node module and can be installed using npm:

```
npm install --save altair-koa-middleware
```

Alternatively, if you are using [`yarn`](https://yarnpkg.com/):

```
yarn add altair-koa-middleware
```

#### Usage

```js
import Koa from 'koa';
import KoaRouter from 'koa-router';
import { createRouteExplorer } from 'altair-koa-middleware';
const app = new Koa();
const router = new KoaRouter();

createRouteExplorer({
url: '/altair',
router,
opts: {
endpoint: '/graphql',
subscriptionsEndpoint: `ws://localhost:4000/subscriptions`,
initialQuery: `{ getData { id name surname } }`,
},
});

app
.use(router.routes())
.use(router.allowedMethods());

app.listen(3500);

// ... the rest of your code ...
```

An instance of Altair GraphQL Client would be available at `/altair` of your server.
42 changes: 19 additions & 23 deletions electron/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Application = require('spectron').Application;
const assert = require('assert');
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
const path = require('path');

console.log(__dirname);
let electronPath = path.join(__dirname, '../../node_modules', '.bin', 'electron');
const appPath = path.join(__dirname, '../main');
if (process.platform === 'win32') {
Expand All @@ -14,28 +14,24 @@ const app = new Application({
env: {
ELECTRON_ENABLE_LOGGING: true,
ELECTRON_ENABLE_STACK_DUMPING: true,
NODE_ENV: 'development'
NODE_ENV: 'test'
},
startTimeout: 20000,
requireName: 'electronRequire',
});

app.start().then(() => {
// Check if the window is visible
return app.browserWindow.isVisible();
}).then((isVisible) => {
// Verify the window is visible
assert.equal(isVisible, true);
}).then(() => {
// Get the window's title
return app.client.getTitle();
}).then((title) => {
// Verify the window's title
assert.equal(title, 'Altair');
}).then(() => {
// Stop the application
return app.stop();
}).catch((error) => {
// Log any failures
console.error('Test failed', error.message);
return app.stop();
})
global.before(function() {
chai.should();
chai.use(chaiAsPromised);
});
describe('Altair electron', () => {
beforeEach(function() {
this.timeout(20000);
return app.start();
});
afterEach(() => app.stop());

it('load window successfully', () => {
return app.browserWindow.isVisible().should.eventually.equal(true);
});
});
5 changes: 5 additions & 0 deletions electron/preload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
// window.bar = 'bar'

window.ipc = require('electron').ipcRenderer;

// Giving access to spectron to run tests successfully
if (process.env.NODE_ENV === 'test') {
window.electronRequire = require;
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "2.1.5",
"version": "2.1.6",
"registry": "https://registry.npmjs.org/",
"npmClient": "yarn"
}
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "altair",
"productName": "Altair GraphQL Client",
"version": "2.1.5",
"version": "2.1.6",
"license": "MIT",
"author": "Samuel Imolorhe <samuelimolo4real@gmail.com> (https://sirmuel.design/)",
"description": "The best graphQL client you will ever need",
Expand Down Expand Up @@ -33,6 +33,8 @@
"package": "electron-forge package",
"make": "electron-forge make",
"dist-electron": "build",
"test-electron": "npm run build && ./electron/fix-base-path.sh && npm run test-electron:simple",
"test-electron:simple": "./node_modules/.bin/mocha --full-trace electron/__tests__",
"postinstall": "npm run generate-settings-schema-validator && opencollective postinstall",
"lerna-publish": "lerna publish from-git --force-publish=* --yes",
"publish-packages": "npm run build && lerna bootstrap && npm run lerna-publish",
Expand Down Expand Up @@ -93,7 +95,7 @@
"file-saver": "^2.0.0-rc.4",
"graphql": "^14.0.2",
"graphql-query-compress": "^1.0.0",
"marked": "^0.6.0",
"marked": "^0.6.2",
"mousetrap": "^1.6.2",
"mousetrap-global-bind": "^1.1.0",
"ngrx-store-localstorage": "^6.0.0",
Expand All @@ -118,16 +120,20 @@
"@angular-devkit/build-angular": "~0.10.0",
"@types/chrome": "^0.0.81",
"@types/electron": "^1.4.38",
"@types/graphql": "^14.2.0",
"@types/jasmine": "3.3.12",
"@types/mousetrap": "^1.6.0",
"@types/node": "^11.11.8",
"ajv-cli": "^3.0.0",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"codelyzer": "^4.0.2",
"devtron": "^1.4.0",
"electron-builder": "^20.27.1",
"electron-chromedriver": "^5.0.0-beta.1",
"electron-prebuilt-compile": "^4.0.0",
"electron-reloader": "^0.2.0",
"jasmine-core": "^3.1.0",
Expand All @@ -140,14 +146,15 @@
"karma-jasmine-html-reporter": "1.3.1",
"lerna": "^3.10.7",
"mime-types": "^2.1.17",
"mocha": "6.0.0",
"ncp": "^2.0.0",
"ngrx-store-freeze": "^0.2.0",
"protractor": "^5.2.2",
"spectron": "^5.0.0",
"ts-node": "^8.0.3",
"tslint": "^5.9.1",
"typescript": ">=3.1.1 <3.2",
"typescript-json-schema": "^0.35.0",
"typescript-json-schema": "^0.37.0",
"web-ext": "^3.0.0"
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions packages/altair-express-middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "altair-express-middleware",
"version": "2.1.5",
"version": "2.1.6",
"description": "Express middleware for altair graphql client",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/imolorhe/altair#readme",
"dependencies": {
"altair-static": "^2.1.5",
"altair-static": "^2.1.6",
"express": "^4.16.2"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/altair-koa-middleware/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
build/
1 change: 1 addition & 0 deletions packages/altair-koa-middleware/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/scripts
21 changes: 21 additions & 0 deletions packages/altair-koa-middleware/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 16ffea9

Please sign in to comment.