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 @@
1// @effect-diagnostics nodeBuiltinImport:off - The CLI loopback OAuth callback is a Node HTTP boundary.1// @effect-diagnostics nodeBuiltinImport:off - The CLI loopback OAuth callback is a Node HTTP boundary.
2import { createServer } from "node:http";2import * as NodeHttp from "node:http";
3 3
4import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer";4import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer";
5import * as Clock from "effect/Clock";5import * as Clock from "effect/Clock";
@@ -206,7 +206,7 @@ export const make = Effect.gen(function* () { · 200 unmodified lines
206 disableLogger: true,206 disableLogger: true,
207 }).pipe(207 }).pipe(
208 Layer.provide(208 Layer.provide(
209 NodeHttpServer.layer(createServer, {209 NodeHttpServer.layer(NodeHttp.createServer, {
210 host: "127.0.0.1",210 host: "127.0.0.1",
211 port: 34338,211 port: 34338,
212 disablePreemptiveShutdown: true,212 disablePreemptiveShutdown: true,
apps/server/src/cloud/http.ts+2−2
@@ -1,4 +1,4 @@
1import { createPublicKey } from "node:crypto";1import * as NodeCrypto from "node:crypto";
2import {2import {
3 AuthRelayReadScope,3 AuthRelayReadScope,
4 AuthRelayWriteScope,4 AuthRelayWriteScope,
@@ -152,7 +152,7 @@ function validateCloudMintPublicKey( · 147 unmodified lines
152 publicKey: string,152 publicKey: string,
153): Effect.Effect<void, EnvironmentHttpBadRequestError> {153): Effect.Effect<void, EnvironmentHttpBadRequestError> {
154 return Effect.try({154 return Effect.try({
155 try: () => createPublicKey(publicKey.replace(/\\n/g, "\n")),155 try: () => NodeCrypto.createPublicKey(publicKey.replace(/\\n/g, "\n")),
156 catch: () =>156 catch: () =>
157 new EnvironmentHttpBadRequestError({157 new EnvironmentHttpBadRequestError({
158 message: "Cloud mint public key must be a valid Ed25519 public key.",158 message: "Cloud mint public key must be a valid Ed25519 public key.",