Skip to content

Commit 892cb42

Browse files
committed
fix tsdown, fix tests.
1 parent 773e51e commit 892cb42

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ jobs:
3737
- run: npm pack
3838
- uses: actions/upload-artifact@v4
3939
with:
40-
name: build-artifacts
41-
path: |
42-
lib/
43-
firebase-functions-*.tgz
40+
name: lib
41+
path: lib/
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: tarball
45+
path: firebase-functions-*.tgz
4446

4547
unit:
4648
runs-on: ubuntu-latest
@@ -79,8 +81,8 @@ jobs:
7981
- run: npm ci
8082
- uses: actions/download-artifact@v4
8183
with:
82-
name: build-artifacts
83-
path: .
84+
name: lib
85+
path: lib
8486
- run: npm run test:bin
8587
env:
8688
SKIP_BUILD: true
@@ -102,6 +104,6 @@ jobs:
102104
node-version: ${{ matrix.node-version }}
103105
- uses: actions/download-artifact@v4
104106
with:
105-
name: build-artifacts
107+
name: tarball
106108
path: .
107-
- run: chmod +x ./scripts/test-packaging.sh && ./scripts/test-packaging.sh firebase-functions-*.tgz
109+
- run: chmod +x ./scripts/test-packaging.sh && ./scripts/test-packaging.sh firebase-functions-*.tgz

scripts/bin-test/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ async function runHttpDiscovery(modulePath: string): Promise<DiscoveryResult> {
154154
PORT: port.toString(),
155155
FUNCTIONS_CONTROL_API: "true",
156156
},
157+
stdio: "inherit",
157158
});
158159

159160
try {
@@ -208,6 +209,11 @@ async function runFileDiscovery(modulePath: string): Promise<DiscoveryResult> {
208209

209210
proc.stderr?.on("data", (chunk: Buffer) => {
210211
stderr += chunk.toString("utf8");
212+
process.stderr.write(chunk);
213+
});
214+
215+
proc.stdout?.on("data", (chunk: Buffer) => {
216+
process.stdout.write(chunk);
211217
});
212218

213219
const timeoutId = setTimeout(async () => {

src/v2/providers/https.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ import { wrapTraceContext } from "../trace";
3232
import { isDebugFeatureEnabled } from "../../common/debug";
3333
import { ResetValue } from "../../common/options";
3434
import {
35-
CallableRequest,
36-
CallableResponse,
37-
FunctionsErrorCode,
35+
type CallableRequest,
36+
type CallableResponse,
37+
type FunctionsErrorCode,
3838
HttpsError,
3939
onCallHandler,
40-
Request,
41-
AuthData,
40+
type Request,
41+
type AuthData,
4242
} from "../../common/providers/https";
4343
import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest";
4444
import { GlobalOptions, SupportedRegion } from "../options";
@@ -48,7 +48,8 @@ import * as options from "../options";
4848
import { withInit } from "../../common/onInit";
4949
import * as logger from "../../logger";
5050

51-
export { Request, CallableRequest, CallableResponse, FunctionsErrorCode, HttpsError };
51+
export type { Request, CallableRequest, CallableResponse, FunctionsErrorCode };
52+
export { HttpsError };
5253

5354
/**
5455
* Options that can be set on an onRequest HTTPS function.

0 commit comments

Comments
 (0)