Skip to content

Release prep #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
src/
coverage/
.idea/
tslint.json
*.iml
.editorconfig
.jshintrc
test/
24 changes: 1 addition & 23 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,10 @@ var tslint = require('gulp-tslint');
var debug = require('gulp-debug');
var rimraf = require('rimraf');

var typeDefsPath = (function (typings) {
return typings.path || 'typings';
})(require('./typings.json'));

var tsFilesGlob = (function (c) {
return c.filesGlob || c.files || '**/*.ts';
})(require('./tsconfig.json'));

gulp.task('gen_tsrefs', 'Generates the main.d.ts references file dynamically for all application *.ts files', function () {
var target = gulp.src(path.join('.', typeDefsPath, 'typings/main.d.ts'));
var sources = gulp.src([path.join('.', 'src', '**', '*.ts')], {read: false});
// sources.pipe(debug());
// target.pipe(debug());
var transformation = inject(sources, {
starttag: '//{',
endtag: '//}',
transform: function (filepath) {
console.log(filepath);
return '/// <reference path="..' + filepath + '" />';
}
});
return target
.pipe(transformation)
.pipe(gulp.dest(path.join('.', typeDefsPath)));
});

gulp.task('typings install', function(cb) {
exec('typings install', function(err, stdout, stderr) {
console.log(stdout);
Expand All @@ -63,7 +41,7 @@ gulp.task('tslint', 'Lints all TypeScript source files', function () {
.pipe(tslint.report('verbose'));
});

gulp.task('tsBuild', 'Compiles all TypeScript source files and updates module references', gulpSequence('tslint', 'typings install', 'gen_tsrefs', '_build'));
gulp.task('tsBuild', 'Compiles all TypeScript source files and updates module references', gulpSequence('tslint', 'typings install', '_build'));


gulp.task('nsp', function (cb) {
Expand Down
1 change: 0 additions & 1 deletion index.js

This file was deleted.

108 changes: 53 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,55 @@
{
"name": "hazelcast-nodejs-client",
"version": "0.1.0",
"description": "Hazelcast - open source In-Memory Data Grid - client for NodeJS",
"main": "index.js",
"files": [
"lib"
],
"dependencies": {
"long": "3.0.1",
"q": "1.4.1"
},
"devDependencies": {
"chai": "3.4.1",
"gulp": "^3.9.0",
"gulp-debug": "^2.1.2",
"gulp-eslint": "^1.0.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-exec": "^2.1.2",
"gulp-help": "^1.6.0",
"gulp-inject": "3.0.0",
"gulp-istanbul": "^0.9.0",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^2.0.0",
"gulp-nsp": "^2.1.0",
"gulp-plumber": "^1.0.0",
"gulp-sequence": "^0.4.4",
"gulp-tsconfig-files": "0.0.2",
"gulp-tslint": "^3.1",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"mocha": "2.3.4",
"rimraf": "^2.5.2",
"sinon": "^1.17.3",
"winston": "^2.2.0"
},
"scripts": {
"test": "gulp test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hazelcast/hazelcast-nodejs-client.git"
},
"keywords": [
"hazelcast",
"nodejs",
"node",
"client",
"data",
"grid"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hazelcast/hazelcast-nodejs-client/issues"
},
"homepage": "https://github.com/hazelcast/hazelcast-nodejs-client#readme"
"name": "hazelcast-nodejs-client",
"version": "0.1.0",
"description": "Hazelcast - open source In-Memory Data Grid - client for NodeJS",
"main": "lib/index.js",
"dependencies": {
"long": "3.0.1",
"q": "1.4.1"
},
"devDependencies": {
"chai": "3.4.1",
"gulp": "^3.9.0",
"gulp-debug": "^2.1.2",
"gulp-eslint": "^1.0.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-exec": "^2.1.2",
"gulp-help": "^1.6.0",
"gulp-inject": "3.0.0",
"gulp-istanbul": "^0.9.0",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^2.0.0",
"gulp-nsp": "^2.1.0",
"gulp-plumber": "^1.0.0",
"gulp-sequence": "^0.4.4",
"gulp-tsconfig-files": "0.0.2",
"gulp-tslint": "^3.1",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"mocha": "2.3.4",
"rimraf": "^2.5.2",
"sinon": "^1.17.3",
"winston": "^2.2.0"
},
"scripts": {
"test": "gulp test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hazelcast/hazelcast-nodejs-client.git"
},
"keywords": [
"hazelcast",
"nodejs",
"node",
"client",
"data",
"grid"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hazelcast/hazelcast-nodejs-client/issues"
},
"homepage": "https://github.com/hazelcast/hazelcast-nodejs-client#readme",
"typings": "./lib/index"
}
4 changes: 2 additions & 2 deletions src/DistributedObject.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Promise = Q.Promise;
import * as Q from 'q';
export interface DistributedObject {
/*
* Returns the key of the partition that this DistributedObject is assigned to.
Expand All @@ -20,5 +20,5 @@ export interface DistributedObject {
* Destroys this object cluster-wide.
* Clears all resources taken for this object.
*/
destroy() : Promise<void>;
destroy() : Q.Promise<void>;
}
5 changes: 2 additions & 3 deletions src/HazelcastClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {InvocationService, ListenerService} from './invocation/InvocationService
import ClientConnectionManager = require('./invocation/ClientConnectionManager');
import {ClientConfig} from './Config';
import ProxyManager = require('./proxy/ProxyManager');
import Q = require('q');
import * as Q from 'q';
import {IMap} from './IMap';
import {JsonSerializationService} from './serialization/SerializationService';
import PartitionService = require('./PartitionService');
Expand All @@ -17,7 +17,7 @@ import defer = Q.defer;
import {ClientInfo} from './ClientInfo';
import ClientMessage = require('./ClientMessage');

class HazelcastClient {
export default class HazelcastClient {

private config: ClientConfig = new ClientConfig();
private loggingService: LoggingService;
Expand Down Expand Up @@ -151,4 +151,3 @@ class HazelcastClient {
}
}

export = HazelcastClient;
4 changes: 2 additions & 2 deletions src/Heartbeat.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {ClientPingCodec} from './codec/ClientPingCodec';
import HazelcastClient = require('./HazelcastClient');
import HazelcastClient from './HazelcastClient';
import ClientConnection = require('./invocation/ClientConnection');
import {ConnectionHeartbeatListener} from './ConnectionHeartbeatListener';
import Q = require('q');
import * as Q from 'q';
import {LoggingService} from './LoggingService';
import Address = require('./Address');

Expand Down
18 changes: 9 additions & 9 deletions src/IMap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Promise = Q.Promise;
import * as Q from 'q';
import {DistributedObject} from './DistributedObject';
export interface IMap<K, V> extends DistributedObject {

Expand All @@ -8,15 +8,15 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to true if the map contains the key, false otherwise.
*/
containsKey(key: K) : Promise<boolean>;
containsKey(key: K) : Q.Promise<boolean>;

/**
* This method return true if this map has key(s) associated with given value
* @throws {Error} if value is undefined or null
* @param value
* @return a promise to be resolved to true if the map has key or keys associated with given value.
*/
containsValue(value: V) : Promise<boolean>;
containsValue(value: V) : Q.Promise<boolean>;

/**
* Associates the specified value with the specified key.
Expand All @@ -29,15 +29,15 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if specified key or value is undefined or null or ttl is negative.
* @return a promise to be resolved to the old value if there was any, undefined otherwise.
*/
put(key: K, value: V, ttl?: number) : Promise<V>;
put(key: K, value: V, ttl?: number) : Q.Promise<V>;

/**
* Retrieves the value associated with given key.
* @param key
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to the value associated with key, undefined if the key does not exist.
*/
get(key: K) : Promise<V>;
get(key: K) : Q.Promise<V>;

/**
* Removes specified key from map. If optional value is specified, the key is removed only if currently mapped to
Expand All @@ -48,24 +48,24 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to the value associated with key, undefined if the key did not exist before.
*/
remove(key: K, value?: V) : Promise<V>;
remove(key: K, value?: V) : Q.Promise<V>;

/**
* Retrieves the number of elements in map
* @return a promise to be resolved to the number of elements in map
*/
size() : Promise<number>;
size() : Q.Promise<number>;

/**
* Removes all of the mappings
* @return
*/
clear() : Promise<void>;
clear() : Q.Promise<void>;

/**
* Returns whether this map is empty or not
*/
isEmpty() : Promise<boolean>;
isEmpty() : Q.Promise<boolean>;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/LifecycleService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import HazelcastClient = require('./HazelcastClient');
import {EventEmitter} from 'events';
import HazelcastClient from './HazelcastClient';

export var LifecycleEvent = {
name: 'lifecycleEvent',
Expand Down
4 changes: 2 additions & 2 deletions src/PartitionService.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import HazelcastClient = require('./HazelcastClient');
import Q = require('q');
import * as Q from 'q';
import GetPartitionsCodec = require('./codec/GetPartitionsCodec');
import ClientMessage = require('./ClientMessage');
import Address = require('./Address');
import HazelcastClient from './HazelcastClient';

class PartitionService {

Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import HazelcastClient from './HazelcastClient';
import * as Config from './Config';
export {
HazelcastClient as Client,
Config
}
2 changes: 1 addition & 1 deletion src/invocation/ClientConnection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import net = require('net');
import Q = require('q');
import * as Q from 'q';
import Address = require('../Address');
import {BitsUtil} from '../BitsUtil';
import {LoggingService} from '../LoggingService';
Expand Down
4 changes: 2 additions & 2 deletions src/invocation/ClientConnectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Q = require('q');
import * as Q from 'q';

import Address = require('../Address');
import ClientConnection = require('./ClientConnection');
Expand All @@ -8,9 +8,9 @@ import InvocationService = require('./InvocationService');
import {GroupConfig, ClientNetworkConfig} from '../Config';

import ConnectionAuthenticator = require('./ConnectionAuthenticator');
import HazelcastClient = require('../HazelcastClient');
import {LoggingService} from '../LoggingService';
import {EventEmitter} from 'events';
import HazelcastClient from '../HazelcastClient';

const EMIT_CONNECTION_CLOSED = 'connectionClosed';
const EMIT_CONNECTION_OPENED = 'connectionOpened';
Expand Down
4 changes: 2 additions & 2 deletions src/invocation/ClusterService.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import ClientConnection = require('./ClientConnection');
import HazelcastClient = require('../HazelcastClient');
import Address = require('../Address');
import Q = require('q');
import * as Q from 'q';
import {ClientAddMembershipListenerCodec} from '../codec/ClientAddMembershipListenerCodec';
import ClientMessage = require('../ClientMessage');
import {Member} from '../Member';
import {LoggingService} from '../LoggingService';
import {EventEmitter} from 'events';
import {ClientInfo} from '../ClientInfo';
import HazelcastClient from '../HazelcastClient';

const MEMBER_ADDED = 1;
const MEMBER_REMOVED = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/invocation/ConnectionAuthenticator.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Q = require('q');
import * as Q from 'q';

import ClientConnection = require('./ClientConnection');
import {InvocationService} from './InvocationService';
import ClientMessage = require('../ClientMessage');
import {ClientAuthenticationCodec} from '../codec/ClientAuthenticationCodec';
import HazelcastClient = require('../HazelcastClient');
import HazelcastClient from '../HazelcastClient';

class ConnectionAuthenticator {

Expand Down
4 changes: 2 additions & 2 deletions src/invocation/InvocationService.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import ClientConnection = require('./ClientConnection');
import ClientMessage = require('../ClientMessage');
import Q = require('q');
import * as Q from 'q';
import Long = require('long');
import HazelcastClient = require('../HazelcastClient');
import {Data} from '../serialization/Data';
import Address = require('../Address');
import ExceptionCodec = require('../codec/ExceptionCodec');
import {BitsUtil} from '../BitsUtil';
import {LoggingService} from '../LoggingService';
import {EventEmitter} from 'events';
import HazelcastClient from '../HazelcastClient';

var EXCEPTION_MESSAGE_TYPE = 109;
var INVOCATION_TIMEOUT = 120000;
Expand Down
4 changes: 2 additions & 2 deletions src/proxy/BaseProxy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {SerializationService} from '../serialization/SerializationService';
import {Data} from '../serialization/Data';
import HazelcastClient = require('../HazelcastClient');
import ClientMessage = require('../ClientMessage');
import Q = require('q');
import * as Q from 'q';
import HazelcastClient from '../HazelcastClient';

export class BaseProxy {

Expand Down
2 changes: 1 addition & 1 deletion src/proxy/Map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BaseProxy} from './BaseProxy';
import {IMap} from '../IMap';
import Q = require('q');
import * as Q from 'q';
import {Data} from '../serialization/Data';
import {MapPutCodec} from '../codec/MapPutCodec';
import ClientMessage = require('../ClientMessage');
Expand Down
Loading