Skip to content

Commit

Permalink
Merge pull request #59 from Linkurious/develop
Browse files Browse the repository at this point in the history
v2.6.0
  • Loading branch information
maxime-allex authored Nov 15, 2018
2 parents a4ae492 + ce4eea7 commit f43c004
Show file tree
Hide file tree
Showing 15 changed files with 600 additions and 553 deletions.
3 changes: 2 additions & 1 deletion .ciconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ pipeline {
dir('linkurious-server') {
git branch: 'develop', credentialsId: 'dd38fcea-d471-4856-a009-4029127c6450', url: 'git@github.com:Linkurious/linkurious-server.git'
sh 'npm install'
sh 'npm run tsc'
}
}
}
stage('unit tests') {
steps {
throttle(['FrontendTestEnv']) {
dir('linkurious-rest-client') {
sh 'node ../linkurious-server/test/runMocha.js -sm & echo $! > SERVER_PID'
sh 'node ../linkurious-server/dist/test/runMocha.js -sm & echo $! > SERVER_PID'
sh 'npm run compileTests && npm run lint'
sh 'xvfb-run node_modules/.bin/karma start karma.conf.js'
sh 'kill -9 `cat SERVER_PID`'
Expand Down
11 changes: 7 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type ShareRightType = 'read'|'write'|'owner';
export type ConstraintsOperatorType = 'contains'|'equals'|'more than'|'less than'|'starts with';
export type MatchStatus = 'unconfirmed'|'confirmed'|'dismissed';
export type MatchActionType = 'open'|'confirm'|'dismiss'|'unconfirm';
export type TypeAccessRight = 'writable'|'readable'|'editable'|'none';

export type IIndexationCallback = ( res:IIndexationStatus ) => void;

Expand Down Expand Up @@ -242,7 +243,8 @@ export interface IGraphQuery extends ISimpleGraphQuery {
export interface ISearchResult {
// todo:remove ambiguity node/nodes/edge/edges (i.e. fix on server too)
type:ItemsType|ItemType;
totalHits:number;
totalHits?:number;
moreResults?:boolean;
}

export interface ISearchEdgesInDirectory extends ISearchResult {
Expand All @@ -258,7 +260,7 @@ export interface ISearchItemList extends ISearchResult {
}

export interface ISearchFullItems extends ISearchResult {
results:Array<ISearchNode>;
results:Array<INode>;
}

export interface ISearchMatchGroup {
Expand Down Expand Up @@ -308,6 +310,7 @@ export interface IProperty extends ICountItemType {

export interface IItemType extends ICountItemType {
name:string;
access: TypeAccessRight;
properties:Array<IProperty>;
}

Expand Down Expand Up @@ -482,8 +485,8 @@ export interface IQueryVisualization {
}

export interface IItemFields {
captions:any;
fields:Array<IFields>;
captions:{[key:string]:{displayName:boolean; properties:Array<string>;active:boolean}};
types:{[key:string]:string};
}

export interface IFields {
Expand Down
25 changes: 1 addition & 24 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ module.exports = function(config) {
frameworks: ['systemjs', 'jasmine'],

plugins : [
'karma-coverage',
'karma-systemjs',
'karma-jasmine',
'karma-chrome-launcher',
'karma-remap-istanbul',
'karma-mocha-reporter',
'karma-clear-screen-reporter'
],
Expand Down Expand Up @@ -68,28 +66,7 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha', 'coverage', 'karma-remap-istanbul'],

preprocessors: {
'tempTests/src/**/*.js': ['coverage'],
'tempTests/index.js' : ['coverage']
},

coverageReporter : {
type: 'json',
dir: 'cover_client',
subdir : 'tmp',
file: 'coverage.json'
},

remapIstanbulReporter: {
src: 'cover_client/tmp/coverage.json',
reports: {
html: 'cover_client'
},
timeoutNotCreated: 1000,
timeoutNoMoreFiles: 1000
},
reporters: ['mocha'],

// web server port
port: 9876,
Expand Down
46 changes: 23 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkurious-rest-client",
"version": "2.5.0",
"version": "2.6.0",
"description": "A TypeScript lib to interact with Linkurious REST API",
"contributors": [
{
Expand Down Expand Up @@ -46,8 +46,7 @@
"doc": "typedoc --ignoreCompilerErrors --target ES6 --out ./docs index.ts",
"prepublishOnly": "tsc -p ./tsconfig.json",
"patch": "npm version patch && git push && npm publish",
"prerelease": "npm version prerelease && git push && npm publish --tag next",
"publish" : "tsc -p ./tsconfig.json && npm publish"
"prerelease": "tsc -p ./tsconfig.json && npm version prerelease && git push && npm publish --tag next"
},
"devDependencies": {
"@types/jasmine": "^2.5.35",
Expand Down
17 changes: 17 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,23 @@ export class Linkurious {
);
}

/**
* Return a sorted list of files stored on server
*
* @param {any} data
* @returns {Promise<any>}
*/
public getCustomFiles(data?:{
root?:string;
extensions?:string;
}):Promise<{results:Array<{path:string; name:'string'}>}> {
return this._fetcher.fetch({
method: 'GET',
query: data,
url: '/customFiles'
});
}

/**
* Restart the server and send the new URL
*/
Expand Down
3 changes: 1 addition & 2 deletions src/module/AlertModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {
IMatch,
IMatchAction,
IAlert,
IMatchResults
} from '../../index';
IMatchResults } from '../../index';
import { Fetcher } from '../http/fetcher';

export class AlertModule extends Module {
Expand Down
Loading

0 comments on commit f43c004

Please sign in to comment.