Skip to content

Commit 2258df6

Browse files
committed
Initial commit
0 parents  commit 2258df6

19 files changed

+6027
-0
lines changed

.babelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": [
3+
"transform-object-rest-spread",
4+
"transform-flow-strip-types"
5+
],
6+
"presets": [
7+
["env", {
8+
"targets": {
9+
"node": 4
10+
},
11+
}]
12+
],
13+
}

.eslintrc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"extends": [
3+
"airbnb-base",
4+
"prettier"
5+
],
6+
"parser": "babel-eslint",
7+
"rules": {
8+
"no-underscore-dangle": 0,
9+
"arrow-body-style": 0,
10+
"arrow-parens": 0,
11+
"prefer-template": 0,
12+
"no-use-before-define": 0,
13+
"no-else-return": 0,
14+
"comma-dangle": ["error", {
15+
"arrays": "always-multiline",
16+
"objects": "always-multiline",
17+
"imports": "always-multiline",
18+
"exports": "always-multiline",
19+
"functions": "ignore",
20+
}],
21+
"no-plusplus": 0
22+
},
23+
"env": {
24+
"jasmine": true,
25+
"jest": true
26+
},
27+
"plugins": [
28+
"flowtype",
29+
"prettier"
30+
]
31+
}

.flowconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[ignore]
2+
.*/node_modules/.*
3+
4+
[include]
5+
6+
[libs]
7+
8+
[options]

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
15+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
16+
.grunt
17+
18+
# node-waf configuration
19+
.lock-wscript
20+
21+
# Compiled binary addons (http://nodejs.org/api/addons.html)
22+
build/Release
23+
24+
# IntelliJ Files
25+
*.iml
26+
*.ipr
27+
*.iws
28+
/out/
29+
.idea/
30+
.idea_modules/
31+
32+
# Dependency directory
33+
node_modules
34+
35+
# Optional npm cache directory
36+
.npm
37+
38+
# Optional REPL history
39+
.node_repl_history
40+
41+
# Transpiled code
42+
/es
43+
/lib
44+
45+
coverage
46+
.nyc_output

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
*.log
3+
src

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
yarn: true
5+
directories:
6+
- node_modules
7+
notifications:
8+
email: true
9+
node_js:
10+
- "7"
11+
script:
12+
- yarn run coverage
13+
- yarn run build
14+
after_success:
15+
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
16+
- python travis_after_all.py
17+
- export $(cat .to_export_back) &> /dev/null
18+
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then bash <(curl -s https://codecov.io/bash); fi
19+
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run semantic-release; fi
20+
branches:
21+
except:
22+
- /^v\d+\.\d+\.\d+$/

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.0-semantically-released (March 04, 2017)
2+
This package publishing automated by [semantic-release](https://github.com/semantic-release/semantic-release).
3+
[Changelog](https://github.com/nodkz/graphql-compose-elasticsearch/releases) is generated automatically and can be found here: https://github.com/nodkz/graphql-compose-elasticsearch/releases

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017-present Pavel Chertorogov
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
graphql-compose-elasticsearch
2+
======================
3+
[![](https://img.shields.io/npm/v/graphql-compose-elasticsearch.svg)](https://www.npmjs.com/package/graphql-compose-elasticsearch)
4+
[![npm](https://img.shields.io/npm/dt/graphql-compose-elasticsearch.svg)](https://www.npmjs.com/package/graphql-compose-elasticsearch)
5+
[![Travis](https://img.shields.io/travis/nodkz/graphql-compose-elasticsearch.svg?maxAge=2592000)](https://travis-ci.org/nodkz/graphql-compose-elasticsearch)
6+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
7+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8+
9+
# NOT READY YET, IN PROGRESS...
10+
11+
License
12+
=======
13+
[MIT](https://github.com/nodkz/graphql-compose-elasticsearch/blob/master/LICENSE.md)

package.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"name": "graphql-compose-elasticsearch",
3+
"version": "0.0.0-semantically-released",
4+
"description": "Elastic search via GraphQL",
5+
"files": [
6+
"es",
7+
"lib"
8+
],
9+
"main": "lib/index.js",
10+
"jsnext:main": "es/index.js",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/nodkz/graphql-compose-elasticsearch.git"
14+
},
15+
"keywords": [
16+
"graphql",
17+
"elastic",
18+
"elasticsearch",
19+
"graphql-compose"
20+
],
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/nodkz/graphql-compose-elasticsearch/issues"
24+
},
25+
"homepage": "https://github.com/nodkz/graphql-compose-elasticsearch#readme",
26+
"dependencies": {},
27+
"peerDependencies": {
28+
"graphql": "^0.9.1",
29+
"graphql-compose": "^1.14.0"
30+
},
31+
"devDependencies": {
32+
"babel-cli": "^6.22.2",
33+
"babel-eslint": "^7.1.1",
34+
"babel-plugin-transform-flow-strip-types": "^6.22.0",
35+
"babel-plugin-transform-object-rest-spread": "^6.22.0",
36+
"babel-preset-env": "^1.1.8",
37+
"cz-conventional-changelog": "^2.0.0",
38+
"dox": "^0.9.0",
39+
"eslint": "^3.14.1",
40+
"eslint-config-airbnb-base": "^11.0.1",
41+
"eslint-config-prettier": "^1.0.2",
42+
"eslint-plugin-flowtype": "^2.30.0",
43+
"eslint-plugin-import": "^2.2.0",
44+
"eslint-plugin-prettier": "^2.0.0",
45+
"flow-bin": "^0.41.0",
46+
"graphql": "^0.9.1",
47+
"graphql-compose": "^1.14.0",
48+
"jest": "^19.0.2",
49+
"jest-babel": "^1.0.1",
50+
"npm-run-all": "^4.0.1",
51+
"prettier": "^0.21.0",
52+
"rimraf": "^2.5.4",
53+
"semantic-release": "^6.3.2"
54+
},
55+
"config": {
56+
"commitizen": {
57+
"path": "./node_modules/cz-conventional-changelog"
58+
}
59+
},
60+
"jest": {
61+
"roots": [
62+
"<rootDir>/src",
63+
"<rootDir>/scripts"
64+
]
65+
},
66+
"scripts": {
67+
"build": "npm-run-all build:*",
68+
"build:lib": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib",
69+
"build:flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
70+
"coverage": "jest --coverage",
71+
"lint": "eslint src test *.js",
72+
"test": "jest",
73+
"test:watch": "jest --watch",
74+
"watch": "npm run test:watch",
75+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
76+
}
77+
}

scripts/apiParser/method.js

Whitespace-only changes.

scripts/apiParser/method.test.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* @flow */
2+
3+
import fs from 'fs';
4+
import path from 'path';
5+
import dox from 'dox';
6+
7+
const t = fs.readFileSync(path.resolve(__dirname, 'search.txt'), 'utf8');
8+
// console.log(t);
9+
10+
function parseDescription(str: string): string {
11+
const strCleaned = str.replace(/{<<.+`(.*)`.+}/gi, '{$1}');
12+
const parsed = dox.parseComments(strCleaned, { raw: true });
13+
console.dir(parsed, { depth: 5, colors: 1});
14+
// console.log(str.match(/[ \t]*\/\*\*\s*\n([^*]*(\*[^/])?)*\*\//g));
15+
}
16+
17+
describe('API Parser: method', () => {
18+
it('should', () => {
19+
parseDescription(t);
20+
});
21+
});

0 commit comments

Comments
 (0)