Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: add Pi provider integration via RPC #4355

Closedoussamadouhou(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/4355/headopened View on GitHub

Showing 34 changed files with 74 additions and 0 deletions (loading 30).

x
0 of 34 viewed, 34 left
7 additions and 0 deletionsapps/server/scripts/cli.tsModified
View file
@@ -19,6 +19,7 @@
import { fromYaml } from "@t3tools/shared/schemaYaml";
import { resolveSpawnCommand } from "@t3tools/shared/shell";
import serverPackageJson from "../package.json" with { type: "json" };
+import { copyRequiredBuildAsset } from "./cliBuildAssets.ts";
import {
ServerCliBuildAssetMissingError,
ServerCliCommandExitError,
@@ -180,6 +181,12 @@
const webDist = path.join(repoRoot, "apps/web/dist");
const clientTarget = path.join(serverDir, "dist/client");
​
+ // Pi loads the approval-gate extension at runtime; vp pack won't emit it, so copy it next to the bundle.
+ const piExtensionSource = path.join(serverDir, "src/provider/assets/pi/t3-approvals.ts");
+ const piExtensionTarget = path.join(serverDir, "dist/assets/pi/t3-approvals.ts");
+ yield* copyRequiredBuildAsset(piExtensionSource, piExtensionTarget);
+ yield* Effect.log("[cli] Bundled Pi approval extension into dist/assets/pi");
+​
if (yield* fs.exists(webDist)) {
yield* fs.copy(webDist, clientTarget);
yield* applyDevelopmentIconOverrides(repoRoot, serverDir);
47 additions and 0 deletionsapps/server/scripts/cliBuildAssets.test.tsAdded
View file
@@ -0,0 +1,47 @@
+import * as NodeServices from "@effect/platform-node/NodeServices";
+import { assert, it } from "@effect/vitest";
+import * as Effect from "effect/Effect";
+import * as FileSystem from "effect/FileSystem";