History

[codex] Enforce canonical Node namespace imports (#3238)

Julius Marminge committed 4 months ago

Commit 2fa37ec1 parent db2750271 files · +1205 −952Browse files

Showing the changes to apps/server/src/cloud (2 of 71 files). Show all

Unified · Split

2 files
  1. apps/server/src/cloud/CliTokenManager.ts +2 −2
  2. apps/server/src/cloud/http.ts +2 −2
apps/server/src/cloud/CliTokenManager.ts+2−2
@@ -1,5 +1,5 @@
11 // @effect-diagnostics nodeBuiltinImport:off - The CLI loopback OAuth callback is a Node HTTP boundary.
2−import { createServer } from "node:http";
2+import * as NodeHttp from "node:http";
33
44 import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer";
55 import * as Clock from "effect/Clock";
@@ -206,7 +206,7 @@ export const make = Effect.gen(function* () { · 200 unmodified lines
206206 disableLogger: true,
207207 }).pipe(
208208 Layer.provide(
209− NodeHttpServer.layer(createServer, {
209+ NodeHttpServer.layer(NodeHttp.createServer, {
210210 host: "127.0.0.1",
211211 port: 34338,
212212 disablePreemptiveShutdown: true,
apps/server/src/cloud/http.ts+2−2
@@ -1,4 +1,4 @@
1−import { createPublicKey } from "node:crypto";
1+import * as NodeCrypto from "node:crypto";
22 import {
33 AuthRelayReadScope,
44 AuthRelayWriteScope,
@@ -152,7 +152,7 @@ function validateCloudMintPublicKey( · 147 unmodified lines
152152 publicKey: string,
153153 ): Effect.Effect<void, EnvironmentHttpBadRequestError> {
154154 return Effect.try({
155− try: () => createPublicKey(publicKey.replace(/\\n/g, "\n")),
155+ try: () => NodeCrypto.createPublicKey(publicKey.replace(/\\n/g, "\n")),
156156 catch: () =>
157157 new EnvironmentHttpBadRequestError({
158158 message: "Cloud mint public key must be a valid Ed25519 public key.",