···11name: media-server-stack
22-runtime:
33- name: nodejs
44- options:
55- packagemanager: bun
66- typescript: true
77- nodeargs: "--import tsx/esm"
88-description: Pulumi definitions for my media server
22+runtime: bun
33+description: Pulumi definitions for my server setup
···11-diff --git a/node_modules/@pulumi/pulumi/.bun-tag-46d0f34eb565d783 b/.bun-tag-46d0f34eb565d783
22-new file mode 100644
33-index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
44-diff --git a/node_modules/@pulumi/pulumi/.bun-tag-48654133d060ad05 b/.bun-tag-48654133d060ad05
55-new file mode 100644
66-index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
77-diff --git a/cmd/run/index.js b/cmd/run/index.js
88-index 0757cf0d31363909f424a0aee2bcd95f264d1b9f..a5d53602878b12b4a44cf46b590babfdf4ae1da6 100644
99---- a/cmd/run/index.js
1010-+++ b/cmd/run/index.js
1111-@@ -152,7 +152,6 @@ async function beforeExitHandler(code) {
1212- // fact. For example, we want to keep track of ScriptId->FileNames so that we can appropriately
1313- // report errors for Functions we cannot serialize. This can only be done (up to Node11 at least)
1414- // by register to hear about scripts being parsed.
1515--const v8Hooks = __importStar(require("../../runtime/closure/v8Hooks"));
1616- // This is the entrypoint for running a Node.js program with minimal scaffolding.
1717- const minimist_1 = __importDefault(require("minimist"));
1818- function usage() {
1919-@@ -230,7 +229,8 @@ function main(args) {
2020- addToEnvIfDefined("PULUMI_NODEJS_ENGINE", argv["engine"]);
2121- addToEnvIfDefined("PULUMI_NODEJS_SYNC", argv["sync"]);
2222- // Ensure that our v8 hooks have been initialized. Then actually load and run the user program.
2323-- v8Hooks.isInitializedAsync().then(() => {
2424-+ const ready = process.versions.bun ? Promise.resolve() : import("../../runtime/closure/v8Hooks.js").then((v8Hooks) => v8Hooks.isInitializedAsync());
2525-+ ready.then(() => {
2626- const promise = require("./run").run(argv,
2727- /*programStarted: */ () => {
2828- programRunning = true;
2929-@@ -250,7 +250,7 @@ function main(args) {
3030- }
3131- function addToEnvIfDefined(key, value) {
3232- if (value) {
3333-- process.env[key] = value;
3434-+ process.env[key] = `${value}`;
3535- }
3636- }
3737- main(process.argv.slice(2));
3838-diff --git a/cmd/run/run.js b/cmd/run/run.js
3939-index 2e2e1fd9dc9379197bc7a6c9f3e8b47e80c10a22..90a69c07f62c238c0ff36860700b45e8a5099457 100644
4040---- a/cmd/run/run.js
4141-+++ b/cmd/run/run.js
4242-@@ -235,7 +235,7 @@ async function run(argv, programStarted, reportLoggedError, isErrorReported) {
4343- process.chdir(pwd);
4444- }
4545- // If this is a typescript project, we'll want to load node-ts.
4646-- const typeScript = process.env["PULUMI_NODEJS_TYPESCRIPT"] === "true";
4747-+ const typeScript = !process.versions.bun && process.env["PULUMI_NODEJS_TYPESCRIPT"] === "true";
4848- // We provide reasonable defaults for many ts options, meaning you don't need to have a tsconfig.json present
4949- // if you want to use TypeScript with Pulumi. However, ts-node's default behavior is to walk up from the cwd to
5050- // find a tsconfig.json. For us, it's reasonable to say that the "root" of the project is the cwd,
5151-diff --git a/cmd/run-plugin/index.js b/cmd/run-plugin/index.js
5252-index 5907d393cf8ac711624e3a77484adddba1c3158e..0c4dc3fe4f7895215619cfce77ddcf4068ed69e8 100644
5353---- a/cmd/run-plugin/index.js
5454-+++ b/cmd/run-plugin/index.js
5555-@@ -82,7 +82,6 @@ process.on("exit", (code) => {
5656- // fact. For example, we want to keep track of ScriptId->FileNames so that we can appropriately
5757- // report errors for Functions we cannot serialize. This can only be done (up to Node11 at least)
5858- // by register to hear about scripts being parsed.
5959--const v8Hooks = __importStar(require("../../runtime/closure/v8Hooks"));
6060- // This is the entrypoint for running a Node.js program with minimal scaffolding.
6161- const minimist_1 = __importDefault(require("minimist"));
6262- function usage() {
6363-@@ -100,7 +99,8 @@ function main(args) {
6464- return printUsageAndExit();
6565- }
6666- // Ensure that our v8 hooks have been initialized. Then actually load and run the user program.
6767-- v8Hooks.isInitializedAsync().then(() => {
6868-+ const ready = process.versions.bun ? Promise.resolve() : import("../../runtime/closure/v8Hooks.js").then((v8Hooks) => v8Hooks.isInitializedAsync());
6969-+ ready.then(() => {
7070- const promise = require("./run").run({
7171- argv,
7272- programStarted: () => {
7373-diff --git a/cmd/run-policy-pack/index.js b/cmd/run-policy-pack/index.js
7474-index 1c701d52af34e0a52f2dabca7c52e4137549ae8a..53b3a9d97b1c5cd0b9212484354c55a073bdcd5f 100644
7575---- a/cmd/run-policy-pack/index.js
7676-+++ b/cmd/run-policy-pack/index.js
7777-@@ -82,7 +82,6 @@ process.on("exit", (code) => {
7878- // fact. For example, we want to keep track of ScriptId->FileNames so that we can appropriately
7979- // report errors for Functions we cannot serialize. This can only be done (up to Node11 at least)
8080- // by register to hear about scripts being parsed.
8181--const v8Hooks = __importStar(require("../../runtime/closure/v8Hooks"));
8282- // This is the entrypoint for running a Node.js program with minimal scaffolding.
8383- const minimist_1 = __importDefault(require("minimist"));
8484- function usage() {
8585-@@ -102,7 +101,8 @@ function main(args) {
8686- // Remove <engine-address> so we simply execute the program.
8787- argv._.shift();
8888- // Ensure that our v8 hooks have been initialized. Then actually load and run the user program.
8989-- v8Hooks.isInitializedAsync().then(() => {
9090-+ const ready = process.versions.bun ? Promise.resolve() : import("../../runtime/closure/v8Hooks.js").then((v8Hooks) => v8Hooks.isInitializedAsync());
9191-+ ready.then(() => {
9292- const promise = require("./run").run({
9393- argv,
9494- programStarted: () => {
9595-diff --git a/runtime/index.js b/runtime/index.js
9696-index 3c616eed05fd57db76aa37e76c11507ec255ab75..6dd47a8a2b3e62e7a6f018c9f1f0d529ee3901a9 100644
9797---- a/runtime/index.js
9898-+++ b/runtime/index.js
9999-@@ -16,9 +16,14 @@ function __export(m) {
100100- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
101101- }
102102- Object.defineProperty(exports, "__esModule", { value: true });
103103--var serializeClosure_1 = require("./closure/serializeClosure");
104104--exports.serializeFunctionAsync = serializeClosure_1.serializeFunctionAsync;
105105--exports.serializeFunction = serializeClosure_1.serializeFunction;
106106-+exports.serializeFunctionAsync = async (...args) => {
107107-+ var serializeClosure_1 = await import("./closure/serializeClosure");
108108-+ return serializeClosure_1.serializeFunctionAsync(...args);
109109-+};
110110-+exports.serializeFunction = async (...args) => {
111111-+ var serializeClosure_1 = await import("./closure/serializeClosure");
112112-+ return serializeClosure_1.serializeFunction(...args);
113113-+};
114114- var codePaths_1 = require("./closure/codePaths");
115115- exports.computeCodePaths = codePaths_1.computeCodePaths;
116116- var mocks_1 = require("./mocks");
+3-2
services/haring/atproto/did-web.ts
···11+import { DnsRecord } from "@pulumi/cloudflare";
22+import { getEnv } from "~lib/env";
13import { ContainerService } from "~lib/service/service";
44+25import didweb from "./did.json";
33-import { DnsRecord } from "@pulumi/cloudflare";
44-import { getEnv } from "~lib/env";
5667const CADDYFILE = `
78 :80 {
+3-2
services/haring/atproto/pds/pds.ts
···11+import path from "path";
22+13import { DnsRecord } from "@pulumi/cloudflare";
24import { remote } from "@pulumi/command";
33-import { asset, interpolate, output } from "@pulumi/pulumi";
44-import path from "path";
55+import { asset, output } from "@pulumi/pulumi";
56import { getEnv } from "~lib/env";
67import { fetchRelays } from "~lib/relay-hosts";
78import { confMount, ssdcacheMount } from "~lib/service/mounts";
+6-5
services/haring/atproto/relay.ts
···11-import { ContainerService } from "~lib/service/service";
21import dockerBuild from "@pulumi/docker-build";
22+import { interpolate } from "@pulumi/pulumi";
33import { getEnv } from "~lib/env";
44-import { interpolate } from "@pulumi/pulumi";
55-import { confMount, dataMount } from "~lib/service/mounts";
44+import { confMount, dataMount, nvmeMount } from "~lib/service/mounts";
55+import { defaultNetwork } from "~lib/service/networks";
66+import { ContainerService } from "~lib/service/service";
67import { getLatestCommit } from "~lib/util";
88+99+import { STATIC_IPS } from "../ips";
710import { unboundService } from "../networking/unbound/unbound";
88-import { STATIC_IPS } from "../ips";
99-import { defaultNetwork } from "~lib/service/networks";
10111112const postgresRelayService = new ContainerService("postgres-relay", {
1213 image: "postgres",
+7-10
services/haring/atproto/tranquil/tranquil.ts
···11+import path from "path";
22+33+import { DnsRecord } from "@pulumi/cloudflare";
44+import { remote } from "@pulumi/command";
55+import dockerBuild from "@pulumi/docker-build";
16import { asset, interpolate } from "@pulumi/pulumi";
27import { getEnv } from "~lib/env";
88+import { fetchRelays } from "~lib/relay-hosts";
39import { _mount, confMount, mount } from "~lib/service/mounts";
410import { ContainerService, defaultConnection } from "~lib/service/service";
55-import dockerBuild from "@pulumi/docker-build";
66-import { remote } from "@pulumi/command";
711import { getLatestCommit } from "~lib/util";
88-import { fetchRelays } from "~lib/relay-hosts";
99-import path from "path";
1010-import { DnsRecord } from "@pulumi/cloudflare";
11121213const tranquilImage = new dockerBuild.Image(
1314 "tranquil-pds",
···1920 buildArgs: {
2021 BUILDKIT_CONTEXT_KEEP_GIT_DIR: "true",
2122 },
2222- exports: [
2323- {
2424- docker: {},
2525- },
2626- ],
2323+ exports: [{ docker: {} }],
2724 push: false,
2825 buildOnPreview: false,
2926 },
+1
services/haring/downloaders/qbittools.ts
···11import { getEnv } from "~lib/env";
22import { confMount } from "~lib/service/mounts";
33import { ContainerService } from "~lib/service/service";
44+45import { qbittorrentService } from "./qbittorrent";
5667export const qbittoolsService = new ContainerService("qbittools", {