Skip to content

Commit

Permalink
import nuid from jsr
Browse files Browse the repository at this point in the history
fix import type issues
  • Loading branch information
aricart committed May 9, 2024
1 parent 40a2d54 commit d375627
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 30 deletions.
2 changes: 1 addition & 1 deletion nats-base-client/nuid.ts
Expand Up @@ -13,4 +13,4 @@
* limitations under the License.
*/

export { Nuid, nuid } from "../nuid/src/mod.ts";
export { Nuid, nuid } from "jsr:@nats-io/nuid@2.0.0-1";
3 changes: 1 addition & 2 deletions service/mod.ts
Expand Up @@ -22,6 +22,5 @@ export {
ServiceErrorHeader,
ServiceResponseType,
ServiceVerb,
Svc,
} from "./internal_mod.ts";

export { Svc } from "./internal_mod.ts";
3 changes: 2 additions & 1 deletion service/service.ts
Expand Up @@ -12,7 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Deferred, deferred, nanos } from "../nats-base-client/util.ts";
import { deferred, nanos } from "../nats-base-client/util.ts";
import type { Deferred } from "../nats-base-client/util.ts";
import { headers } from "../nats-base-client/headers.ts";
import { JSONCodec } from "../nats-base-client/codec.ts";
import { nuid } from "../nats-base-client/nuid.ts";
Expand Down
17 changes: 10 additions & 7 deletions service/serviceclient.ts
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 The NATS Authors
* Copyright 2022-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 @@ -15,20 +15,23 @@
import { Empty } from "../nats-base-client/encoders.ts";
import { JSONCodec } from "../nats-base-client/codec.ts";
import { QueuedIteratorImpl } from "../nats-base-client/queued_iterator.ts";
import {
import { RequestStrategy } from "../nats-base-client/core.ts";

import type {
NatsConnection,
QueuedIterator,
RequestManyOptions,
RequestStrategy,
} from "../nats-base-client/core.ts";
} from "../nats-base-client/mod.ts";

import { ServiceImpl } from "./service.ts";

import { QueuedIterator } from "../nats-base-client/core.ts";
import {
import { ServiceVerb } from "./types.ts";

import type {
ServiceClient,
ServiceIdentity,
ServiceInfo,
ServiceStats,
ServiceVerb,
} from "./types.ts";

export class ServiceClientImpl implements ServiceClient {
Expand Down
18 changes: 7 additions & 11 deletions service/tests/service-check.ts
Expand Up @@ -14,21 +14,17 @@
*/

import { cli } from "https://deno.land/x/cobra@v0.0.9/mod.ts";
import { connect, NatsConnection, StringCodec } from "../../src/mod.ts";
import { connect, StringCodec } from "../../src/mod.ts";
import type { NatsConnection } from "../../src/mod.ts";

import {
ServiceError,
ServiceIdentity,
ServiceInfo,
ServiceResponseType,
ServiceStats,
ServiceVerb,
Svc,
} from "../mod.ts";
import type { ServiceIdentity, ServiceInfo, ServiceStats } from "../mod.ts";

import { ServiceError, ServiceResponseType, ServiceVerb, Svc } from "../mod.ts";

import { collect } from "../../nats-base-client/util.ts";
import { ServiceClientImpl } from "../serviceclient.ts";
import Ajv, { JSONSchemaType, ValidateFunction } from "npm:ajv";
import Ajv from "npm:ajv";
import type { JSONSchemaType, ValidateFunction } from "npm:ajv";

import { parseSemVer } from "../../nats-base-client/semver.ts";

Expand Down
21 changes: 13 additions & 8 deletions service/tests/service_test.ts
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 The NATS Authors
* Copyright 2022-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 @@ -26,31 +26,36 @@ import {

import { collect, delay } from "../../nats-base-client/util.ts";
import { NatsConnectionImpl } from "../../nats-base-client/nats.ts";
import {
import type {
EndpointInfo,
Service,
ServiceConfig,
ServiceIdentity,
ServiceInfo,
ServiceStats,
} from "../mod.ts";
import {
ServiceError,
ServiceErrorCodeHeader,
ServiceErrorHeader,
ServiceIdentity,
ServiceInfo,
ServiceResponseType,
ServiceStats,
ServiceVerb,
Svc,
} from "../types.ts";
} from "../mod.ts";
import {
connect,
createInbox,
ErrorCode,
JSONCodec,
nuid,
StringCodec,
} from "../../src/mod.ts";

import type {
Msg,
NatsConnection,
NatsError,
nuid,
QueuedIterator,
StringCodec,
} from "../../src/mod.ts";
import { SubscriptionImpl } from "../../nats-base-client/protocol.ts";

Expand Down

0 comments on commit d375627

Please sign in to comment.