Skip to content

Commit 3affda8

Browse files
committed
Define file traversal build mechanism
1 parent a837c88 commit 3affda8

85 files changed

Lines changed: 1255 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deno.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps.internal.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
"@rapidjs.org/adapters",
3+
"@rapidjs.org/pool",
34
"@rapidjs.org/rjs-build",
45
"@rapidjs.org/rjs-handler",
56
"@rapidjs.org/rjs-server",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
override

integration/src/changed/foo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo

integration/src/identity/_bar.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lost

packages/adapters/docs/.gitkeep

Whitespace-only changes.

packages/adapters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": "npm run clean && npx tsc --project ./tsconfig.build.json",
1515
"build:watch": "npx tsc --watch --project ./tsconfig.watch.json",
1616
"test:node": "npx rjs-test unit ./test/node",
17-
"test:deno": "deno test --allow-read --allow-write --allow-net ./test/deno",
17+
"test:deno": "deno test --allow-read --allow-write --allow-net --allow-run ./test/deno",
1818
"test": "npm run test:node && npm run test:deno",
1919
"lint": "# deno lint",
2020
"format": "deno fmt"

packages/adapters/src/RuntimeAdapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { IS_DENO, IS_NODE } from "./constants.js";
22

33
export class RuntimeAdapter<Cb extends CallableFunction> {
44
private interfaceCb?: Cb;
5-
6-
constructor() {}
7-
5+
86
public withNode(interfaceCb: Cb): this {
97
if (!IS_NODE) return this;
108

packages/adapters/src/cwd.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// deno-lint-ignore-file
2+
// @ts-nocheck
3+
4+
import { RuntimeAdapter } from "./RuntimeAdapter.js";
5+
6+
export const cwd = new RuntimeAdapter<
7+
() => string
8+
>()
9+
.withNode(() => {
10+
return process.cwd();
11+
})
12+
.withDeno(() => {
13+
return Deno.cwd();
14+
})
15+
.compile();

0 commit comments

Comments
 (0)