diff --git a/.zuul.yml b/.zuul.yml index 829222b19..ad2be6684 100644 --- a/.zuul.yml +++ b/.zuul.yml @@ -18,6 +18,7 @@ browsers: version: [8.1, 9.0, latest] scripts: - scripts/polyfill.js + - node_modules/long/dist/long.js tunnel: type: ngrok proto: tcp diff --git a/dist/protobuf.js b/dist/protobuf.js index 6f810d7f4..a35d17a78 100644 --- a/dist/protobuf.js +++ b/dist/protobuf.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.0.1 (c) 2016 Daniel Wirtz - * Compiled Fri, 02 Dec 2016 11:19:57 UTC + * Compiled Fri, 02 Dec 2016 12:20:41 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ diff --git a/dist/protobuf.min.js b/dist/protobuf.min.js index d0819e3a4..5488b4e34 100644 --- a/dist/protobuf.min.js +++ b/dist/protobuf.min.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.0.1 (c) 2016 Daniel Wirtz - * Compiled Fri, 02 Dec 2016 11:19:57 UTC + * Compiled Fri, 02 Dec 2016 12:20:41 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ diff --git a/dist/protobuf.min.js.gz b/dist/protobuf.min.js.gz index 9dfc13156..f1a68749d 100644 Binary files a/dist/protobuf.min.js.gz and b/dist/protobuf.min.js.gz differ diff --git a/scripts/types.js b/scripts/types.js index 67a0adb6c..3fbff41b2 100644 --- a/scripts/types.js +++ b/scripts/types.js @@ -4,8 +4,8 @@ var fs = require("fs"), var dir = path.join(__dirname, "..", "types"); var header = [ - '/// ', - '/// ', + '/// ', + '/// ', "", "/*", " * protobuf.js v" + pkg.version + " TypeScript definitions", diff --git a/types/protobuf.js.d.ts b/types/protobuf.js.d.ts index b8765c61d..803ad9203 100644 --- a/types/protobuf.js.d.ts +++ b/types/protobuf.js.d.ts @@ -1,9 +1,9 @@ -/// -/// +/// +/// /* * protobuf.js v6.0.1 TypeScript definitions - * Generated Thu, 01 Dec 2016 15:54:46 UTC + * Generated Fri, 02 Dec 2016 12:20:52 UTC */ declare module protobuf { @@ -1619,6 +1619,29 @@ declare module protobuf { */ var Long: (() => any); + /** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ + function longToHash(value: (Long|number)): string; + + /** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ + function longFromHash(hash: string, unsigned?: boolean): (Long|number); + + /** + * Tests if two possibly long values are not equal. + * @param {number|Long} a First value + * @param {number|Long} b Second value + * @returns {boolean} `true` if not equal + */ + function longNeq(a: (number|Long), b: (number|Long)): boolean; + /** * Tests if the specified value is a string. * @memberof util @@ -1693,29 +1716,6 @@ declare module protobuf { */ function resolvePath(originPath: string, importPath: string, alreadyNormalized?: boolean): string; - /** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ - function longToHash(value: (Long|number)): string; - - /** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ - function longFromHash(hash: string, unsigned?: boolean): (Long|number); - - /** - * Tests if two possibly long values are not equal. - * @param {number|Long} a First value - * @param {number|Long} b Second value - * @returns {boolean} `true` if not equal - */ - function longNeq(a: (number|Long), b: (number|Long)): boolean; - /** * Merges the properties of the source object into the destination object. * @param {Object} dst Destination object @@ -1742,54 +1742,24 @@ declare module protobuf { } /** - * Constructs a new verifier for the specified message type. - * @classdesc Runtime message verifier using code generation on top of reflection. - * @constructor - * @param {Type} type Message type + * Runtime message verifier using code generation on top of reflection. + * @namespace */ - class Verifier { - /** - * Constructs a new verifier for the specified message type. - * @classdesc Runtime message verifier using code generation on top of reflection. - * @constructor - * @param {Type} type Message type - */ - constructor(type: Type); - - /** - * Message type. - * @type {Type} - */ - type: Type; - - /** - * Fields of this verifier's message type as an array for iteration. - * @name Verifier#fieldsArray - * @type {Field[]} - * @readonly - */ - fieldsArray: Field[]; - - /** - * Full name of this verifier's message type. - * @name Verifier#fullName - * @type {string} - * @readonly - */ - fullName: string; - + module verifier { /** - * Verifies a runtime message of this verifier's message type. + * Verifies a runtime message of `this` message type. * @param {Prototype|Object} message Runtime message or plain object to verify * @returns {?string} `null` if valid, otherwise the reason why it is not + * @this {Type} */ - verify(message: (Prototype|Object)): string; + function fallback(message: (Prototype|Object)): string; /** - * Generates a verifier specific to this verifier's message type. - * @returns {function} Verifier function with an identical signature to {@link Verifier#verify} + * Generates a verifier specific to the specified message type. + * @param {Type} mtype Message type + * @returns {util.CodegenAppender} Unscoped codegen instance */ - generate(): (() => any); + function generate(mtype: Type): util.CodegenAppender; }