Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2ead58

Browse files
authored
refactor: remove dead code and reorganize binary.ts (#652)
1 parent cdcaa97 commit d2ead58

File tree

7 files changed

+5
-71
lines changed

7 files changed

+5
-71
lines changed

packages/open-next/src/adapters/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isBinaryContentType } from "./binary";
1+
import { isBinaryContentType } from "../utils/binary";
22
import { debug, error, warn } from "./logger";
33

44
interface CachedFetchValue {

packages/open-next/src/build/createAssets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import fs from "node:fs";
22
import path from "node:path";
33

4-
import { isBinaryContentType } from "../adapters/binary.js";
54
import logger from "../logger.js";
5+
import { isBinaryContentType } from "../utils/binary.js";
66
import * as buildHelper from "./helper.js";
77

88
export function createStaticAssets(options: buildHelper.BuildOptions) {

packages/open-next/src/core/routing/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { parseHeaders } from "http/util.js";
99
import type { MiddlewareManifest } from "types/next-types";
1010
import type { InternalEvent, InternalResult } from "types/open-next.js";
1111

12-
import { isBinaryContentType } from "../../adapters/binary.js";
1312
import { debug, error } from "../../adapters/logger.js";
13+
import { isBinaryContentType } from "../../utils/binary.js";
1414

1515
/**
1616
*

packages/open-next/src/overrides/proxyExternalRequest/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { request } from "node:https";
33
import { Readable } from "node:stream";
44
import type { InternalEvent, InternalResult } from "types/open-next";
55
import type { ProxyExternalRequest } from "types/overrides";
6-
import { isBinaryContentType } from "../../adapters/binary";
6+
import { isBinaryContentType } from "../../utils/binary";
77

88
function filterHeadersForProxy(
99
headers: Record<string, string | string[] | undefined>,

packages/tests-unit/tests/binary.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isBinaryContentType } from "@opennextjs/aws/adapters/binary.js";
1+
import { isBinaryContentType } from "@opennextjs/aws/utils/binary.js";
22

33
describe("isBinaryContentType", () => {
44
const tests = [

packages/utils/src/binary.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)