2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
deno-version: [1.4.0]
deno-version: [1.4.2]

steps:
- name: Git Checkout Deno Module
Expand Down
2 changes: 1 addition & 1 deletion examples/bench.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { connect, Nuid } from "../src/mod.ts";
import { Bench, Metric } from "../nats-base-client/bench.ts";
const defaults = {
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-events.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { ConnectionOptions, connect } from "../src/mod.ts";

const argv = parse(
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-pub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { ConnectionOptions, connect, StringCodec } from "../src/mod.ts";
import { headers, MsgHdrs } from "../nats-base-client/mod.ts";
import { delay } from "../nats-base-client/internal_mod.ts";
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-rep.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { ConnectionOptions, connect, StringCodec } from "../src/mod.ts";
import { headers } from "../nats-base-client/mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/nats-req.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { ConnectionOptions, connect, StringCodec } from "../src/mod.ts";
import { delay } from "../nats-base-client/internal_mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/nats-sub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";
import { ConnectionOptions, connect, StringCodec } from "../src/mod.ts";

const argv = parse(
Expand Down
31 changes: 24 additions & 7 deletions nats-base-client/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,38 @@ export class Connect {
echo?: boolean;
no_responders?: boolean;
protocol: number = 1;
verbose?: boolean;
pedantic?: boolean;
jwt?: string;
nkey?: string;
sig?: string;
user?: string;
pass?: string;
auth_token?: string;
tls_required?: boolean;
name?: string;
lang: string;
version: string;
headers?: boolean;

constructor(
transport: { version: string; lang: string },
opts: ConnectionOptions,
nonce?: string,
) {
if (opts.noEcho) {
this.echo = false;
}
if (opts.noResponders) {
this.no_responders = true;
}
this.version = transport.version;
this.lang = transport.lang;
this.echo = opts.noEcho ? false : undefined;
this.no_responders = opts.noResponders ? true : undefined;
this.verbose = opts.verbose;
this.pedantic = opts.pedantic;
this.tls_required = opts.tls ? true : undefined;
this.name = opts.name;
this.headers = opts.headers;

const creds =
(opts && opts.authenticator ? opts.authenticator(nonce) : {}) || {};
extend(this, opts, transport, creds);
extend(this, creds);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/deno_transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { BufWriter } from "https://deno.land/std@0.69.0/io/mod.ts";
import { Deferred, deferred } from "https://deno.land/std@0.69.0/async/mod.ts";
import { BufWriter } from "https://deno.land/std@0.71.0/io/mod.ts";
import { Deferred, deferred } from "https://deno.land/std@0.71.0/async/mod.ts";
import Conn = Deno.Conn;
import {
ConnectionOptions,
Expand All @@ -30,7 +30,7 @@ import {
} from "../nats-base-client/internal_mod.ts";
import type { TlsOptions } from "../nats-base-client/types.ts";

const VERSION = "1.0.0-8";
const VERSION = "1.0.0-9";
const LANG = "nats.deno";

// if trying to simply write to the connection for some reason
Expand Down
2 changes: 1 addition & 1 deletion tests/auth_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import {
fail,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
connect,
ErrorCode,
Expand Down
2 changes: 1 addition & 1 deletion tests/autounsub_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

import {
ErrorCode,
Expand Down
2 changes: 1 addition & 1 deletion tests/basics_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
assert,
assertEquals,
fail,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
connect,
Msg,
Expand Down
2 changes: 1 addition & 1 deletion tests/binary_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
connect,
Msg,
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
assertEquals,
assert,
assertThrows,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
DenoBuffer,
MAX_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion tests/clobber_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { connect } from "../src/mod.ts";
import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

function makeBuffer(N: number): Uint8Array {
const buf = new Uint8Array(N);
Expand Down
2 changes: 1 addition & 1 deletion tests/codec_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { StringCodec, JSONCodec } from "../nats-base-client/codec.ts";
import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

Deno.test("codec - string", () => {
const sc = StringCodec();
Expand Down
2 changes: 1 addition & 1 deletion tests/databuffer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { assertEquals } from "https://deno.land/std@0.69.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.71.0/testing/asserts.ts";
import { DataBuffer } from "../nats-base-client/internal_mod.ts";

Deno.test("databuffer - empty", () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/doublesubs_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
import {
assertEquals,
assertArrayContains,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import { extend } from "../nats-base-client/util.ts";
import { join, resolve } from "https://deno.land/std@0.69.0/path/mod.ts";
import { join, resolve } from "https://deno.land/std@0.71.0/path/mod.ts";

async function runDoubleSubsTest(tls: boolean) {
const cwd = Deno.cwd();
Expand Down
2 changes: 1 addition & 1 deletion tests/drain_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
assertThrows,
assertThrowsAsync,
fail,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
connect,
createInbox,
Expand Down
2 changes: 1 addition & 1 deletion tests/events_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NatsServer, Lock, ServerSignals } from "../tests/helpers/mod.ts";
import { connect, Events, ServersChanged } from "../src/mod.ts";
import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import { delay, NatsConnectionImpl } from "../nats-base-client/internal_mod.ts";

Deno.test("events - close on close", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/headers_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
assertArrayContains,
assert,
fail,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

Deno.test("headers - option", async () => {
const srv = await NatsServer.start();
Expand Down
2 changes: 1 addition & 1 deletion tests/heartbeats_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
fail,
assert,
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

import {
DebugEvents,
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/asserts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { assert, fail } from "https://deno.land/std@0.69.0/testing/asserts.ts";
import { assert, fail } from "https://deno.land/std@0.71.0/testing/asserts.ts";

export function assertErrorCode(err: Error, ...codes: string[]) {
const { code } = err as { code?: string };
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import {
NatsServer,
} from "./mod.ts";
import { parse } from "https://deno.land/std@0.69.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.71.0/flags/mod.ts";

const defaults = {
c: 2,
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/conf_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

import { toConf } from "./launcher.ts";
import { assertEquals } from "https://deno.land/std@0.69.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.71.0/testing/asserts.ts";

Deno.test("conf - serializing simple", () => {
let x = {
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as path from "https://deno.land/std@0.69.0/path/mod.ts";
import * as path from "https://deno.land/std@0.71.0/path/mod.ts";
import { check } from "./mod.ts";
import {
deferred,
Expand All @@ -21,7 +21,7 @@ import {
nuid,
Deferred,
} from "../../nats-base-client/internal_mod.ts";
import { assert } from "https://deno.land/std@0.69.0/testing/asserts.ts";
import { assert } from "https://deno.land/std@0.71.0/testing/asserts.ts";

export const ServerSignals = Object.freeze({
QUIT: Deno.Signal.SIGQUIT,
Expand Down
2 changes: 1 addition & 1 deletion tests/iterators_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { connect, createInbox, ErrorCode, NatsError } from "../src/mod.ts";
import {
assertEquals,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import { assertErrorCode, Lock, NatsServer } from "./helpers/mod.ts";
import { assert } from "../nats-base-client/denobuffer.ts";

Expand Down
2 changes: 1 addition & 1 deletion tests/json_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { assertEquals } from "https://deno.land/std@0.69.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.71.0/testing/asserts.ts";
import {
connect,
createInbox,
Expand Down
2 changes: 1 addition & 1 deletion tests/msgheaders_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
assertEquals,
assertThrows,
assertArrayContains,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import { NatsError, MsgHdrsImpl } from "../nats-base-client/internal_mod.ts";

Deno.test("msgheaders - basics", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/noresponders_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
assertEquals,
assert,
fail,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";

Deno.test("noresponders - option", async () => {
const srv = await NatsServer.start();
Expand Down
2 changes: 1 addition & 1 deletion tests/parser_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
assertEquals,
assertThrows,
assert,
} from "https://deno.land/std@0.69.0/testing/asserts.ts";
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
import type { Publisher } from "../nats-base-client/protocol.ts";

let te = new TextEncoder();
Expand Down
Loading