Skip to content

Commit f5212c9

Browse files
Merge pull request #82 from mustafaiman/release-prep
Release prep
2 parents d0c7983 + 3800742 commit f5212c9

30 files changed

+117
-128
lines changed

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
src/
2+
coverage/
3+
.idea/
4+
tslint.json
5+
*.iml
6+
.editorconfig
7+
.jshintrc
8+
test/

gulpfile.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,10 @@ var tslint = require('gulp-tslint');
1515
var debug = require('gulp-debug');
1616
var rimraf = require('rimraf');
1717

18-
var typeDefsPath = (function (typings) {
19-
return typings.path || 'typings';
20-
})(require('./typings.json'));
21-
2218
var tsFilesGlob = (function (c) {
2319
return c.filesGlob || c.files || '**/*.ts';
2420
})(require('./tsconfig.json'));
2521

26-
gulp.task('gen_tsrefs', 'Generates the main.d.ts references file dynamically for all application *.ts files', function () {
27-
var target = gulp.src(path.join('.', typeDefsPath, 'typings/main.d.ts'));
28-
var sources = gulp.src([path.join('.', 'src', '**', '*.ts')], {read: false});
29-
// sources.pipe(debug());
30-
// target.pipe(debug());
31-
var transformation = inject(sources, {
32-
starttag: '//{',
33-
endtag: '//}',
34-
transform: function (filepath) {
35-
console.log(filepath);
36-
return '/// <reference path="..' + filepath + '" />';
37-
}
38-
});
39-
return target
40-
.pipe(transformation)
41-
.pipe(gulp.dest(path.join('.', typeDefsPath)));
42-
});
43-
4422
gulp.task('typings install', function(cb) {
4523
exec('typings install', function(err, stdout, stderr) {
4624
console.log(stdout);
@@ -63,7 +41,7 @@ gulp.task('tslint', 'Lints all TypeScript source files', function () {
6341
.pipe(tslint.report('verbose'));
6442
});
6543

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

6846

6947
gulp.task('nsp', function (cb) {

index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
11
{
2-
"name": "hazelcast-nodejs-client",
3-
"version": "0.1.0",
4-
"description": "Hazelcast - open source In-Memory Data Grid - client for NodeJS",
5-
"main": "index.js",
6-
"files": [
7-
"lib"
8-
],
9-
"dependencies": {
10-
"long": "3.0.1",
11-
"q": "1.4.1"
12-
},
13-
"devDependencies": {
14-
"chai": "3.4.1",
15-
"gulp": "^3.9.0",
16-
"gulp-debug": "^2.1.2",
17-
"gulp-eslint": "^1.0.0",
18-
"gulp-exclude-gitignore": "^1.0.0",
19-
"gulp-exec": "^2.1.2",
20-
"gulp-help": "^1.6.0",
21-
"gulp-inject": "3.0.0",
22-
"gulp-istanbul": "^0.9.0",
23-
"gulp-jshint": "^2.0.0",
24-
"gulp-mocha": "^2.0.0",
25-
"gulp-nsp": "^2.1.0",
26-
"gulp-plumber": "^1.0.0",
27-
"gulp-sequence": "^0.4.4",
28-
"gulp-tsconfig-files": "0.0.2",
29-
"gulp-tslint": "^3.1",
30-
"jshint": "^2.8.0",
31-
"jshint-stylish": "^2.1.0",
32-
"mocha": "2.3.4",
33-
"rimraf": "^2.5.2",
34-
"sinon": "^1.17.3",
35-
"winston": "^2.2.0"
36-
},
37-
"scripts": {
38-
"test": "gulp test"
39-
},
40-
"repository": {
41-
"type": "git",
42-
"url": "git+https://github.com/hazelcast/hazelcast-nodejs-client.git"
43-
},
44-
"keywords": [
45-
"hazelcast",
46-
"nodejs",
47-
"node",
48-
"client",
49-
"data",
50-
"grid"
51-
],
52-
"license": "Apache-2.0",
53-
"bugs": {
54-
"url": "https://github.com/hazelcast/hazelcast-nodejs-client/issues"
55-
},
56-
"homepage": "https://github.com/hazelcast/hazelcast-nodejs-client#readme"
2+
"name": "hazelcast-nodejs-client",
3+
"version": "0.1.0",
4+
"description": "Hazelcast - open source In-Memory Data Grid - client for NodeJS",
5+
"main": "lib/index.js",
6+
"dependencies": {
7+
"long": "3.0.1",
8+
"q": "1.4.1"
9+
},
10+
"devDependencies": {
11+
"chai": "3.4.1",
12+
"gulp": "^3.9.0",
13+
"gulp-debug": "^2.1.2",
14+
"gulp-eslint": "^1.0.0",
15+
"gulp-exclude-gitignore": "^1.0.0",
16+
"gulp-exec": "^2.1.2",
17+
"gulp-help": "^1.6.0",
18+
"gulp-inject": "3.0.0",
19+
"gulp-istanbul": "^0.9.0",
20+
"gulp-jshint": "^2.0.0",
21+
"gulp-mocha": "^2.0.0",
22+
"gulp-nsp": "^2.1.0",
23+
"gulp-plumber": "^1.0.0",
24+
"gulp-sequence": "^0.4.4",
25+
"gulp-tsconfig-files": "0.0.2",
26+
"gulp-tslint": "^3.1",
27+
"jshint": "^2.8.0",
28+
"jshint-stylish": "^2.1.0",
29+
"mocha": "2.3.4",
30+
"rimraf": "^2.5.2",
31+
"sinon": "^1.17.3",
32+
"winston": "^2.2.0"
33+
},
34+
"scripts": {
35+
"test": "gulp test"
36+
},
37+
"repository": {
38+
"type": "git",
39+
"url": "git+https://github.com/hazelcast/hazelcast-nodejs-client.git"
40+
},
41+
"keywords": [
42+
"hazelcast",
43+
"nodejs",
44+
"node",
45+
"client",
46+
"data",
47+
"grid"
48+
],
49+
"license": "Apache-2.0",
50+
"bugs": {
51+
"url": "https://github.com/hazelcast/hazelcast-nodejs-client/issues"
52+
},
53+
"homepage": "https://github.com/hazelcast/hazelcast-nodejs-client#readme",
54+
"typings": "./lib/index"
5755
}

src/DistributedObject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Promise = Q.Promise;
1+
import * as Q from 'q';
22
export interface DistributedObject {
33
/*
44
* Returns the key of the partition that this DistributedObject is assigned to.
@@ -20,5 +20,5 @@ export interface DistributedObject {
2020
* Destroys this object cluster-wide.
2121
* Clears all resources taken for this object.
2222
*/
23-
destroy() : Promise<void>;
23+
destroy() : Q.Promise<void>;
2424
}

src/HazelcastClient.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {InvocationService, ListenerService} from './invocation/InvocationService
33
import ClientConnectionManager = require('./invocation/ClientConnectionManager');
44
import {ClientConfig} from './Config';
55
import ProxyManager = require('./proxy/ProxyManager');
6-
import Q = require('q');
6+
import * as Q from 'q';
77
import {IMap} from './IMap';
88
import {JsonSerializationService} from './serialization/SerializationService';
99
import PartitionService = require('./PartitionService');
@@ -17,7 +17,7 @@ import defer = Q.defer;
1717
import {ClientInfo} from './ClientInfo';
1818
import ClientMessage = require('./ClientMessage');
1919

20-
class HazelcastClient {
20+
export default class HazelcastClient {
2121

2222
private config: ClientConfig = new ClientConfig();
2323
private loggingService: LoggingService;
@@ -151,4 +151,3 @@ class HazelcastClient {
151151
}
152152
}
153153

154-
export = HazelcastClient;

src/Heartbeat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {ClientPingCodec} from './codec/ClientPingCodec';
2-
import HazelcastClient = require('./HazelcastClient');
2+
import HazelcastClient from './HazelcastClient';
33
import ClientConnection = require('./invocation/ClientConnection');
44
import {ConnectionHeartbeatListener} from './ConnectionHeartbeatListener';
5-
import Q = require('q');
5+
import * as Q from 'q';
66
import {LoggingService} from './LoggingService';
77
import Address = require('./Address');
88

src/IMap.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Promise = Q.Promise;
1+
import * as Q from 'q';
22
import {DistributedObject} from './DistributedObject';
33
export interface IMap<K, V> extends DistributedObject {
44

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

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

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

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

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

5353
/**
5454
* Retrieves the number of elements in map
5555
* @return a promise to be resolved to the number of elements in map
5656
*/
57-
size() : Promise<number>;
57+
size() : Q.Promise<number>;
5858

5959
/**
6060
* Removes all of the mappings
6161
* @return
6262
*/
63-
clear() : Promise<void>;
63+
clear() : Q.Promise<void>;
6464

6565
/**
6666
* Returns whether this map is empty or not
6767
*/
68-
isEmpty() : Promise<boolean>;
68+
isEmpty() : Q.Promise<boolean>;
6969

7070
/**
7171
*

src/LifecycleService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import HazelcastClient = require('./HazelcastClient');
21
import {EventEmitter} from 'events';
2+
import HazelcastClient from './HazelcastClient';
33

44
export var LifecycleEvent = {
55
name: 'lifecycleEvent',

src/PartitionService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import HazelcastClient = require('./HazelcastClient');
2-
import Q = require('q');
1+
import * as Q from 'q';
32
import GetPartitionsCodec = require('./codec/GetPartitionsCodec');
43
import ClientMessage = require('./ClientMessage');
54
import Address = require('./Address');
5+
import HazelcastClient from './HazelcastClient';
66

77
class PartitionService {
88

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import HazelcastClient from './HazelcastClient';
2+
import * as Config from './Config';
3+
export {
4+
HazelcastClient as Client,
5+
Config
6+
}

src/invocation/ClientConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import net = require('net');
2-
import Q = require('q');
2+
import * as Q from 'q';
33
import Address = require('../Address');
44
import {BitsUtil} from '../BitsUtil';
55
import {LoggingService} from '../LoggingService';

src/invocation/ClientConnectionManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22

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

1010
import ConnectionAuthenticator = require('./ConnectionAuthenticator');
11-
import HazelcastClient = require('../HazelcastClient');
1211
import {LoggingService} from '../LoggingService';
1312
import {EventEmitter} from 'events';
13+
import HazelcastClient from '../HazelcastClient';
1414

1515
const EMIT_CONNECTION_CLOSED = 'connectionClosed';
1616
const EMIT_CONNECTION_OPENED = 'connectionOpened';

src/invocation/ClusterService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import ClientConnection = require('./ClientConnection');
2-
import HazelcastClient = require('../HazelcastClient');
32
import Address = require('../Address');
4-
import Q = require('q');
3+
import * as Q from 'q';
54
import {ClientAddMembershipListenerCodec} from '../codec/ClientAddMembershipListenerCodec';
65
import ClientMessage = require('../ClientMessage');
76
import {Member} from '../Member';
87
import {LoggingService} from '../LoggingService';
98
import {EventEmitter} from 'events';
109
import {ClientInfo} from '../ClientInfo';
10+
import HazelcastClient from '../HazelcastClient';
1111

1212
const MEMBER_ADDED = 1;
1313
const MEMBER_REMOVED = 2;

src/invocation/ConnectionAuthenticator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22

33
import ClientConnection = require('./ClientConnection');
44
import {InvocationService} from './InvocationService';
55
import ClientMessage = require('../ClientMessage');
66
import {ClientAuthenticationCodec} from '../codec/ClientAuthenticationCodec';
7-
import HazelcastClient = require('../HazelcastClient');
7+
import HazelcastClient from '../HazelcastClient';
88

99
class ConnectionAuthenticator {
1010

src/invocation/InvocationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import ClientConnection = require('./ClientConnection');
22
import ClientMessage = require('../ClientMessage');
3-
import Q = require('q');
3+
import * as Q from 'q';
44
import Long = require('long');
5-
import HazelcastClient = require('../HazelcastClient');
65
import {Data} from '../serialization/Data';
76
import Address = require('../Address');
87
import ExceptionCodec = require('../codec/ExceptionCodec');
98
import {BitsUtil} from '../BitsUtil';
109
import {LoggingService} from '../LoggingService';
1110
import {EventEmitter} from 'events';
11+
import HazelcastClient from '../HazelcastClient';
1212

1313
var EXCEPTION_MESSAGE_TYPE = 109;
1414
var INVOCATION_TIMEOUT = 120000;

src/proxy/BaseProxy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {SerializationService} from '../serialization/SerializationService';
22
import {Data} from '../serialization/Data';
3-
import HazelcastClient = require('../HazelcastClient');
43
import ClientMessage = require('../ClientMessage');
5-
import Q = require('q');
4+
import * as Q from 'q';
5+
import HazelcastClient from '../HazelcastClient';
66

77
export class BaseProxy {
88

src/proxy/Map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {BaseProxy} from './BaseProxy';
22
import {IMap} from '../IMap';
3-
import Q = require('q');
3+
import * as Q from 'q';
44
import {Data} from '../serialization/Data';
55
import {MapPutCodec} from '../codec/MapPutCodec';
66
import ClientMessage = require('../ClientMessage');

0 commit comments

Comments
 (0)