-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updated copyrights, and optimized imports
- Loading branch information
Showing
17 changed files
with
104 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
/* | ||
* Copyright 2024 Synadia Communications, Inc | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { MutableMsg, Pipeline } from "../mod.ts"; | ||
import { connect, Empty, headers } from "jsr:@nats-io/[email protected]"; | ||
import type { Msg } from "jsr:@nats-io/[email protected]"; | ||
|
@@ -52,7 +66,7 @@ const nc2 = await connect({ servers: ["demo.nats.io"] }); | |
let i = 0; | ||
setInterval(() => { | ||
nc2.request("hello", `hello ${++i}`) | ||
.then((r) => { | ||
.then((r: Msg) => { | ||
console.log(r.string()); | ||
}); | ||
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
/* | ||
* Copyright 2024 Synadia Communications, Inc | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { connect } from "jsr:@nats-io/[email protected]"; | ||
import { headers } from "@nats-io/nats-core"; | ||
import type { Msg } from "./mod.ts"; | ||
|
@@ -13,7 +27,7 @@ Deno.test("mm - copies values", async () => { | |
const nc = await connect({ servers: "demo.nats.io" }); | ||
const subj = nuid.next(); | ||
const reply = subj.split("").reverse().join(); | ||
const sub = syncIterator(nc.subscribe(subj)); | ||
const sub = syncIterator<Msg>(nc.subscribe(subj)); | ||
const h = headers(); | ||
h.set("test", "a"); | ||
nc.publish(subj, JSON.stringify({ hello: "world" }), { reply, headers: h }); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2024 The Synadia Authors | ||
* Copyright 2024 Synadia Communications, Inc | ||
* 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 | ||
|
@@ -12,18 +12,19 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { | ||
assert, | ||
assertArrayIncludes, | ||
assertEquals, | ||
assertExists, | ||
assertRejects, | ||
fail, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
} from "jsr:@std/assert"; | ||
import { newNHG } from "./mod.ts"; | ||
import { getConnectionDetails, randomKvName } from "./credentials.ts"; | ||
import { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; | ||
import { KvChangeEvent } from "./types.ts"; | ||
import type { KvChangeEvent } from "./types.ts"; | ||
import { deferred } from "./util.ts"; | ||
|
||
Deno.test("kv - cleanup test buckets", async () => { | ||
const nhg = newNHG(getConnectionDetails()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2024 The Synadia Authors | ||
* Copyright 2024 Synadia Communications, Inc | ||
* 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 | ||
|
@@ -12,12 +12,13 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { newNHG } from "./mod.ts"; | ||
import { | ||
assertArrayIncludes, | ||
assertEquals, | ||
assertRejects, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
} from "jsr:@std/assert"; | ||
import { getConnectionDetails, randomKvName } from "./credentials.ts"; | ||
|
||
Deno.test("kvm - add", async () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { HttpImpl } from "./nhgc.ts"; | ||
import { | ||
import type { | ||
Msg, | ||
MsgCallback, | ||
Nats, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
/* | ||
* Copyright 2024 Synadia Communications, Inc | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { newNHG } from "./mod.ts"; | ||
import { delay } from "https://deno.land/[email protected]/async/delay.ts"; | ||
import { delay } from "jsr:@std/async"; | ||
import { getConnectionDetails } from "./credentials.ts"; | ||
import { | ||
assert, | ||
assertEquals, | ||
assertExists, | ||
fail, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { assert, assertEquals, assertExists, fail } from "jsr:@std/assert"; | ||
|
||
Deno.test("nats - pub", async () => { | ||
const nhg = newNHG(getConnectionDetails()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters