Skip to content

Commit

Permalink
jsr nbc
Browse files Browse the repository at this point in the history
import type fixes
  • Loading branch information
aricart committed May 10, 2024
1 parent 9346c77 commit 74c64ab
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
13 changes: 8 additions & 5 deletions src/connect.ts
@@ -1,5 +1,5 @@
/*
* Copyright 2020 The NATS Authors
* Copyright 2020-2024 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -13,14 +13,17 @@
* limitations under the License.
*/
import { denoResolveHost, DenoTransport } from "./deno_transport.ts";
import {
import type {
ConnectionOptions,
NatsConnection,
Transport,
TransportFactory,
} from "@nats-io/nats-core/internal";

import {
NatsConnectionImpl,
setTransportFactory,
Transport,
} from "../nats-base-client/internal_mod.ts";
import { TransportFactory } from "../nats-base-client/transport.ts";
} from "@nats-io/nats-core/internal";

export function connect(opts: ConnectionOptions = {}): Promise<NatsConnection> {
setTransportFactory({
Expand Down
17 changes: 17 additions & 0 deletions src/deno.json
@@ -0,0 +1,17 @@
{
"name": "@nats-io/nats-transport-deno",
"version": "3.0.0-2",
"exports": {
".": "./mod.ts"
},
"publish": {
"include": [
"./**/*"
]
},
"imports": {
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@3.0.0-1/internal",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@3.0.0-1",
"@std/io": "jsr:@std/io@0.224.0"
}
}
18 changes: 10 additions & 8 deletions src/deno_transport.ts
Expand Up @@ -13,26 +13,28 @@
* limitations under the License.
*/

import {
Deferred,
deferred,
TlsOptions,
} from "../nats-base-client/internal_mod.ts";
import { writeAll } from "https://deno.land/std@0.221.0/io/write_all.ts";
import {
checkOptions,
checkUnsupportedOption,
ConnectionOptions,
DataBuffer,
deferred,
Empty,
ErrorCode,
extractProtocolMessage,
INFO,
NatsError,
render,
} from "@nats-io/nats-core/internal";

import type {
ConnectionOptions,
Deferred,
ServerInfo,
TlsOptions,
Transport,
} from "../nats-base-client/internal_mod.ts";
} from "@nats-io/nats-core/internal";

import { writeAll } from "@std/io";

const VERSION = "1.25.0";
const LANG = "nats.deno";
Expand Down
3 changes: 1 addition & 2 deletions src/mod.ts
@@ -1,3 +1,2 @@
export { connect } from "./connect.ts";
export * from "../nats-base-client/mod.ts";
export * from "../jetstream/mod.ts";
export * from "@nats-io/nats-core";

0 comments on commit 74c64ab

Please sign in to comment.