Skip to content

A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.

feat: Executable Binary builder and compatibility

towfiqiaea413f78938
diff --git a/backend/__tests__/setup.ts b/backend/__tests__/setup.ts
index a7b460f..3c88865 100644
--- a/backend/__tests__/setup.ts
+++ b/backend/__tests__/setup.ts
@@ -2,6 +2,7 @@
// import Database from 'better-sqlite3';
// import { migrate } from 'drizzle-orm/better-sqlite3/migrator';
import { initializeLogger } from '../src/utils/logger';
+import 'dotenv/config';
beforeAll(() => {
console.log('--- JEST SETUP FILE IS RUNNING ---');
diff --git a/backend/package.json b/backend/package.json
index e042882..df58c10 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -51,6 +51,7 @@
"cross-env": "^10.0.0",
"dotenv": "17.2.0",
"drizzle-kit": "^0.31.7",
+ "esbuild": "^0.27.0",
"jest": "^30.2.0",
"pino-pretty": "^13.0.0",
"prettier": "^3.4.2",
@@ -78,6 +79,7 @@
}
},
"main": "./src/index.ts",
+ "bin": "./dist/pkg-index.cjs",
"module": "./src/index.ts",
"types": "./src/index.ts",
"typesVersions": {
@@ -87,17 +89,29 @@
]
}
},
+ "pkg": {
+ "scripts": [
+ "dist/pkg-index.cjs"
+ ],
+ "assets": [
+ "public/**/*",
+ "node_modules/**/*",
+ "!node_modules/better-sqlite3/**/*",
+ "drizzle/**/*"
+ ]
+ },
"scripts": {
"checkUpdates": "npx npm-check -u",
"db:studio": "npx drizzle-kit studio --port 4983",
- "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
+ "dev": "cross-env NODE_ENV=development tsx watch -r dotenv/config src/index.ts",
"generate-migration": "drizzle-kit generate:sqlite",
"lint": "eslint src/**/*.ts",
- "migrate-db": "tsx src/db/migrate.ts",
+ "migrate-db": "tsx -r dotenv/config src/db/migrate.ts",
"start": "node dist/index.js",
"test": "jest --config jest.config.ts",
- "build:pkg": "node ./scripts/build.js",
+ "build:pkg": "node ./scripts/build-pkg.js",
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});require('fs').rmSync('public',{recursive:true,force:true})\"",
+ "copy:frontend": "node -e \"const fs=require('fs');const path=require('path');function copyDir(s,d){fs.mkdirSync(d,{recursive:true});fs.readdirSync(s,{withFileTypes:true}).forEach(e=>{const sp=path.join(s,e.name),dp=path.join(d,e.name);e.isDirectory()?copyDir(sp,dp):fs.copyFileSync(sp,dp)})};copyDir('../frontend/dist','public')\"",
"build": "pnpm run clean && node ./scripts/build.js && pnpm run copy:frontend",
"package": "node ./scripts/build.js",
"prepublishOnly": "pnpm run clean && node ./scripts/build.js"
diff --git a/backend/pkg-entry.cjs b/backend/pkg-entry.cjs
new file mode 100644
index 0000000..25f2545
--- /dev/null
+++ b/backend/pkg-entry.cjs
@@ -0,0 +1,21 @@
+// Entry point for pkg to bootstrap ESM application
+// This CJS wrapper is needed to avoid ESM resolution issues in pkg on Windows
+const path = require('path');
+const { pathToFileURL } = require('url');
+
+(async () => {
+ try {
+ // Resolve the path to the ESM entry point
+ // In pkg snapshot, __dirname points to the virtual directory containing this file
+ // We need to use a relative path that works within the snapshot filesystem
+ // The error suggests it wants a file URL, but pkg's virtual FS is tricky with ESM
+
+ // Try importing using a relative path first (standard for pkg)
+ // This often works better than absolute paths in the virtual FS
+ await import('./dist/index.js');
+ } catch (err) {
+ console.error('Failed to start application:', err);
+ console.error(err.stack);
+ process.exit(1);
+ }
+})();
diff --git a/backend/scripts/better-sqlite3-proxy.cjs b/backend/scripts/better-sqlite3-proxy.cjs
new file mode 100644
index 0000000..51f8e83
--- /dev/null
+++ b/backend/scripts/better-sqlite3-proxy.cjs
@@ -0,0 +1,48 @@
+const path = require('path');
+
+// This proxy allows us to load better-sqlite3 from the filesystem
+// instead of bundling it, which is required for pkg to work with
+// the native binary placed alongside the executable.
+
+let Database;
+
+// Use a dynamic variable to prevent esbuild from trying to bundle 'better-sqlite3'
+// if we were to require it directly (which would cause a circular dependency due to alias)
+const pkgName = 'better-sqlite3';
+
+if (process.pkg) {
+ // When running as a packaged executable
+ // Look for node_modules next to the executable
+ const execDir = path.dirname(process.execPath);
+
+ // The native module is located at node_modules/better-sqlite3/build/Release/better_sqlite3.node
+ // We need to require this specific file because we don't have the full package.json/index.js structure
+ // in the distribution folder, just the binary artifact.
+ const modulePath = path.join(execDir, 'node_modules', pkgName, 'build', 'Release', 'better_sqlite3.node');
+
+ try {
+ Database = require(modulePath);
+ } catch (error) {
+ console.error(`Failed to load external ${pkgName} from ${modulePath}`);
+ console.error('Ensure the node_modules folder is placed next to the executable.');
+ throw error;
+ }
+} else {
+ // When running in development or as a plain script
+ try {
+ // Try to load from standard node resolution
+ // We use a trick to bypass esbuild's static analysis/aliasing
+ const _require = require;
+ Database = _require(pkgName);
+ } catch (e) {
+ // Fallback: try to find it relative to project root if possible
+ // This helps if running the bundle from dist/
+ try {
+ Database = require(path.resolve(process.cwd(), 'node_modules', pkgName));
+ } catch (e2) {
+ throw e;
+ }
+ }
+}
+
+module.exports = Database;
diff --git a/backend/scripts/bindings-proxy.cjs b/backend/scripts/bindings-proxy.cjs
new file mode 100644
index 0000000..bc8617f
--- /dev/null
+++ b/backend/scripts/bindings-proxy.cjs
@@ -0,0 +1,44 @@
+const path = require('path');
+const fs = require('fs');
+
+module.exports = function (opts) {
+ // better-sqlite3 calls it with 'better_sqlite3.node'
+
+ // 1. If running in pkg
+ if (process.pkg) {
+ const execDir = path.dirname(process.execPath);
+ // The path we constructed in build-executables.js
+ const modulePath = path.join(execDir, 'node_modules', 'better-sqlite3', 'build', 'Release', 'better_sqlite3.node');
+
+ try {
+ return require(modulePath);
+ } catch (e) {
+ console.error(`[bindings-proxy] Failed to load native module from ${modulePath}`);
+ console.error(`[bindings-proxy] Ensure the node_modules folder is placed next to the executable.`);
+ throw e;
+ }
+ }
+
+ // 2. If running locally (e.g. node dist/pkg-index.cjs)
+ try {
+ // Try to resolve relative to CWD or standard node_modules
+ const candidates = [
+ path.join(process.cwd(), 'node_modules', 'better-sqlite3', 'build', 'Release', 'better_sqlite3.node'),
+ path.join(__dirname, '..', 'node_modules', 'better-sqlite3', 'build', 'Release', 'better_sqlite3.node'),
+ path.join(__dirname, '..', '..', 'node_modules', 'better-sqlite3', 'build', 'Release', 'better_sqlite3.node')
+ ];
+
+ for (const candidate of candidates) {
+ if (fs.existsSync(candidate)) {
+ return require(candidate);
+ }
+ }
+
+ // Fallback to standard require if possible
+ return require('better-sqlite3/build/Release/better_sqlite3.node');
+
+ } catch (e) {
+ console.error('[bindings-proxy] Could not locate better_sqlite3.node in development mode.');
+ throw e;
+ }
+};
diff --git a/backend/scripts/build-pkg.js b/backend/scripts/build-pkg.js
new file mode 100644
index 0000000..6bd8957
--- /dev/null
+++ b/backend/scripts/build-pkg.js
@@ -0,0 +1,117 @@
+import { build } from 'esbuild';
+import packageJson from '../package.json' with { type: 'json' };
+import { readFile } from 'fs/promises';
+import { extname, join } from 'path';
+import { createRequire } from 'module';
+
+const require = createRequire(import.meta.url);
+
+// Plugin to handle native modules correctly
+const nativeNodeModulesPlugin = {
+ name: 'native-node-modules',
+ setup(build) {
+ // If a ".node" file is imported within a module in the "file" namespace, resolve
+ // it to an absolute path and put it into the "node-file" virtual namespace.
+ build.onResolve({ filter: /\.node$/, namespace: 'file' }, (args) => ({
+ path: require.resolve(args.path, { paths: [args.resolveDir] }),
+ namespace: 'node-file',
+ }));
+
+ // Files in the "node-file" virtual namespace call "require()" on the
+ // path from esbuild of the ".node" file in the output directory.
+ build.onLoad({ filter: /.*/, namespace: 'node-file' }, (args) => ({
+ contents: `
+ import path from ${JSON.stringify(args.path)}
+ try { module.exports = require(path) }
+ catch {}
+ `,
+ }));
+
+ // If a ".node" file is imported within a module in the "node-file" namespace, put
+ // it in the "file" namespace where esbuild's default loading behavior will handle
+ // it. It is already an absolute path since we resolved it to one above.
+ build.onResolve(
+ { filter: /\.node$/, namespace: 'node-file' },
+ (args) => ({
+ path: args.path,
+ namespace: 'file',
+ }),
+ );
+
+ // Tell esbuild's default loading behavior to use the "file" loader for
+ // these ".node" files.
+ let opts = build.initialOptions;
+ opts.loader = opts.loader || {};
+ opts.loader['.node'] = 'file';
+ },
+};
+
+console.log('--- Starting Pluton Executable Build Process (esbuild) ---');
+
+// 1. Set the environment variables
+process.env.NODE_ENV = 'production';
+process.env.APP_VERSION = packageJson.version;
+
+console.log(`Setting NODE_ENV=${process.env.NODE_ENV}`);
+console.log(`Setting APP_VERSION=${process.env.APP_VERSION}`);
+
+// 2. Run esbuild
+try {
+ console.log('Running esbuild...');
+
+ // Get dependencies to mark as external
+ // We mark all dependencies as external because pkg will handle them
+ // or they are native modules that shouldn't be bundled
+ const dependencies = Object.keys(packageJson.dependencies || {});
+
+ // Remove better-sqlite3 from external list because we are aliasing it
+ const bs3Index = dependencies.indexOf('better-sqlite3');
+ if (bs3Index > -1) {
+ dependencies.splice(bs3Index, 1);
+ }
+
+ // Also remove drizzle-orm from external list so it gets bundled
+ // This ensures its require('better-sqlite3') calls are intercepted by our alias
+ const drizzleIndex = dependencies.indexOf('drizzle-orm');
+ if (drizzleIndex > -1) {
+ dependencies.splice(drizzleIndex, 1);
+ }
+
+ // Remove nanoid from external list so it gets bundled
+ // nanoid is ESM-only and causes issues with pkg
+ const nanoidIndex = dependencies.indexOf('nanoid');
+ if (nanoidIndex > -1) {
+ dependencies.splice(nanoidIndex, 1);
+ }
+
+ await build({
+ entryPoints: ['src/index.ts'],
+ bundle: true,
+ platform: 'node',
+ target: 'node20',
+ outfile: 'dist/pkg-index.cjs', // Different output file for pkg
+ format: 'cjs',
+ external: dependencies,
+ sourcemap: true,
+ minify: true,
+ keepNames: true,
+ logLevel: 'info',
+ alias: {
+ 'bindings': join(process.cwd(), 'scripts/bindings-proxy.cjs'),
+ },
+ plugins: [nativeNodeModulesPlugin],
+ // Fix import.meta.url in CJS output using the shim pattern from the example
+ define: {
+ 'import.meta.url': '__import_meta_url',
+ 'process.env.NODE_ENV': '"production"',
+ },
+ inject: [join(process.cwd(), 'scripts/esbuild-import-meta-url-shim.js')],
+ });
+
+ console.log('✅ esbuild compilation completed!');
+} catch (error) {
+ console.error('❌ Build failed:', error);
+ process.exit(1);
+}
+
+console.log('✅ Build completed successfully!');
diff --git a/backend/scripts/build.js b/backend/scripts/build.js
index 2b7dbd5..cfdb579 100644
--- a/backend/scripts/build.js
+++ b/backend/scripts/build.js
@@ -39,6 +39,7 @@ async function removeConsoleLogs(dir) {
} else if (entry.isFile() && extname(entry.name) === '.js') {
const code = await readFile(fullPath, 'utf-8');
const result = await minify(code, {
+ module: true, // Enable ES module support
compress: {
drop_console: true, // Remove console.* statements
pure_funcs: ['console.log', 'console.debug', 'console.warn'],
diff --git a/backend/scripts/esbuild-import-meta-url-shim.js b/backend/scripts/esbuild-import-meta-url-shim.js
new file mode 100644
index 0000000..31c0909
--- /dev/null
+++ b/backend/scripts/esbuild-import-meta-url-shim.js
@@ -0,0 +1 @@
+export var __import_meta_url = require("url").pathToFileURL(__filename).toString();
diff --git a/backend/src/index.ts b/backend/src/index.ts
index 6ac5d4a..a6e5ad4 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -1,4 +1,5 @@
-import 'dotenv/config';
+/// <reference path="./types/process.d.ts" />
+
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
import { migrate } from 'drizzle-orm/better-sqlite3/migrator';
import { createApp } from './createApp';
@@ -12,53 +13,68 @@ export { db } from './db';
export { initSetup } from './utils/initSetup';
export { configService } from './services/ConfigService';
-// This block only runs when this file is executed directly (e.g., npm run dev)
-// Using import.meta.url to check if the module is the main module (for plutonhq/core-backend package)
-if (import.meta.url.startsWith('file:')) {
+// This block only runs when this file is executed directly (e.g., npm run dev or packaged executable)
+// Always run when imported as the main entry point
+import path from 'path';
+import fs from 'fs';
+
+const isMainModule = import.meta.url === `file://${process.argv[1]}` || (process as any).pkg;
+const isDevelopment = process.env.NODE_ENV === 'development';
+
+console.log('isMainModule :', isMainModule, isDevelopment);
+
+if (isMainModule || isDevelopment) {
(async () => {
// Run database migrations first
if (process.env.NODE_ENV === 'production') {
- console.log('[CORE] Running database migrations...');
- try {
- const migrationsFolder = process.env.IS_DOCKER === 'true' ? '/app/drizzle' : './drizzle';
- migrate(db, { migrationsFolder });
- console.log('[CORE] Database migrations completed successfully');
- } catch (error: any) {
- // If tables already exist - skip migration
- if (
- error?.cause?.code === 'SQLITE_ERROR' &&
- error?.cause?.message?.includes('already exists')
- ) {
- console.log('[CORE] Database tables already exist, skipping migrations');
- } else {
- console.error('[CORE] Database migration error:', error);
- process.exit(1);
+ console.log('[CORE] Running database migrations...');
+ try {
+ const migrationsFolder = process.env.IS_DOCKER === 'true' ? '/app/drizzle' : path.join(path.dirname(process.execPath), 'drizzle');
+
+ // Check if migrations exist
+ const journalPath = path.join(migrationsFolder, 'meta', '_journal.json');
+ if (!fs.existsSync(journalPath)) {
+ console.log('[CORE] No migrations found (meta/_journal.json missing), skipping...');
+ } else {
+ migrate(db, { migrationsFolder });
+ console.log('[CORE] Database migrations completed successfully');
+ }
+ } catch (error: any) {
+ // If tables already exist - skip migration
+ if (
+ error?.cause?.code === 'SQLITE_ERROR' &&
+ error?.cause?.message?.includes('already exists')
+ ) {
+ console.log('[CORE] Database tables already exist, skipping migrations');
+ } else {
+ console.error('[CORE] Database migration error:', error);
+ process.exit(1);
+ }
}
}
- }
- await initSetup(db as unknown as BetterSQLite3Database);
- const { app } = await createApp();
+ await initSetup(db as unknown as BetterSQLite3Database);
+ const { app } = await createApp();
- const server = app.listen(configService.config.SERVER_PORT || 5173, () => {
- console.log(`[CORE] Server running on port ${configService.config.SERVER_PORT || 5173}`);
- });
+ const server = app.listen(configService.config.SERVER_PORT || 5173, () => {
+ console.log(`[CORE] Server running on port ${configService.config.SERVER_PORT || 5173}`);
+ });
- // Graceful shutdown handling for Docker
- process.on('SIGTERM', async () => {
- console.log('[CORE] SIGTERM received, shutting down gracefully...');
- server.close(() => {
- console.log('[CORE] Server closed');
- process.exit(0);
+ // Graceful shutdown handling for Docker
+ process.on('SIGTERM', async () => {
+ console.log('[CORE] SIGTERM received, shutting down gracefully...');
+ server.close(() => {
+ console.log('[CORE] Server closed');
+ process.exit(0);
+ });
});
- });
- process.on('SIGINT', async () => {
- console.log('[CORE] SIGINT received, shutting down gracefully...');
- server.close(() => {
- console.log('[CORE] Server closed');
- process.exit(0);
+ process.on('SIGINT', async () => {
+ console.log('[CORE] SIGINT received, shutting down gracefully...');
+ server.close(() => {
+ console.log('[CORE] Server closed');
+ process.exit(0);
+ });
});
- });
- })();
+ })();
}
diff --git a/backend/src/managers/BaseBackupManager.ts b/backend/src/managers/BaseBackupManager.ts
index 7666243..4a4c952 100644
--- a/backend/src/managers/BaseBackupManager.ts
+++ b/backend/src/managers/BaseBackupManager.ts
@@ -8,7 +8,7 @@ import { BackupHandler } from './handlers/BackupHandler';
import { PruneHandler } from './handlers/PruneHandler';
import { jobQueue } from '../jobs/JobQueue';
import { generateUID } from '../utils/helpers';
-import { configService } from 'src/services/ConfigService';
+import { configService } from '../services/ConfigService';
type ScheduleOptions = (BackupPlanArgs | PlanPrune) & {
isActive: boolean;
diff --git a/backend/src/types/process.d.ts b/backend/src/types/process.d.ts
new file mode 100644
index 0000000..317a277
--- /dev/null
+++ b/backend/src/types/process.d.ts
@@ -0,0 +1,11 @@
+// Type definitions for pkg-packaged executables
+declare namespace NodeJS {
+ interface Process {
+ pkg?: {
+ entrypoint: string;
+ defaultEntrypoint: string;
+ };
+ }
+}
+
+export {};
diff --git a/backend/src/utils/AppPaths.ts b/backend/src/utils/AppPaths.ts
index bd587fb..6cf423f 100644
--- a/backend/src/utils/AppPaths.ts
+++ b/backend/src/utils/AppPaths.ts
@@ -48,7 +48,7 @@ class AppPaths {
*/
private getTheBaseDir(): string {
// if dev use /data
- if (process.env.NODE_ENV !== 'production') {
+ if (!(process as any).pkg && process.env.NODE_ENV !== 'production') {
return path.join(process.cwd(), 'data');
}
@@ -74,6 +74,29 @@ class AppPaths {
}
}
+ /**
+ * Gets the directory where the executable is located.
+ * For pkg-packaged apps, this returns the directory containing the executable.
+ */
+ public getExecutableDir(): string {
+ return path.dirname(process.execPath);
+ }
+
+ /**
+ * Gets the binaries directory path.
+ * For pkg-packaged apps, binaries are located relative to the executable.
+ */
+ public getBinariesDir(): string {
+ if ((process as any).pkg) {
+ // In packaged mode, binaries are in {executableDir}/binaries/{platform}-{arch}/
+ const platformId = `${os.platform()}-${os.arch()}`;
+ return path.join(this.getExecutableDir(), 'binaries', platformId);
+ }
+ // In development, use the binaries folder in the project
+ const platformId = `${os.platform()}-${os.arch()}`;
+ return path.join(process.cwd(), 'binaries', platformId);
+ }
+
/**
* Synchronously initializes all application paths and creates the directories.
* This runs automatically the first time AppPaths.getInstance() is called.
diff --git a/backend/src/utils/binaryPathResolver.ts b/backend/src/utils/binaryPathResolver.ts
index a2424f8..e483925 100644
--- a/backend/src/utils/binaryPathResolver.ts
+++ b/backend/src/utils/binaryPathResolver.ts
@@ -1,21 +1,36 @@
import path from 'path';
import os from 'os';
import fs from 'fs';
+import { appPaths } from './AppPaths';
/**
* Resolves the path to a bundled binary ('restic', 'rclone' or 'rear').
- * In a packaged application (SEA), it assumes the installer has placed the binaries
- * alongside the main executable. In development, it points to the local './binaries' folder.
+ * In a pkg-packaged application, it looks for binaries in {executableDir}/binaries/{platform}-{arch}/
+ * In development, it points to the local './binaries' folder.
*
- * @param binaryName The name of the binary ('restic' or 'rclone').
+ * @param binaryName The name of the binary ('restic', 'rclone', or 'rear').
* @returns The absolute path to the executable.
*/
export function getBinaryPath(binaryName: 'restic' | 'rclone' | 'rear'): string {
const isWindows = os.platform() === 'win32';
const fileName = isWindows ? `${binaryName}.exe` : binaryName;
- // In a packaged app, process.execPath is the path to the SEA.
- // We assume the installer placed our binaries in the same directory.
+ // Priority 1: Check if running as a pkg-packaged executable
+ if ((process as any).pkg) {
+ const platformId = `${os.platform()}-${os.arch()}`;
+ const execDir = path.dirname(process.execPath);
+ const pkgBinaryPath = path.join(execDir, 'binaries', platformId, fileName);
+
+ if (fs.existsSync(pkgBinaryPath)) {
+ return pkgBinaryPath;
+ }
+
+ console.warn(
+ `[binaryPathResolver] Expected binary at '${pkgBinaryPath}' but not found. Trying fallbacks...`
+ );
+ }
+
+ // Priority 2: Production/installed binary next to executable
const installDir = path.dirname(process.execPath);
const productionPath = path.join(installDir, fileName);
@@ -23,7 +38,7 @@ export function getBinaryPath(binaryName: 'restic' | 'rclone' | 'rear'): string
return productionPath;
}
- // Fallback for development: Look in the project's 'binaries' folder.
+ // Priority 3: Development - Look in the project's 'binaries' folder
const platformId = `${os.platform()}-${os.arch()}`;
const devPath = path.resolve(process.cwd(), 'binaries', platformId, fileName);
@@ -31,8 +46,8 @@ export function getBinaryPath(binaryName: 'restic' | 'rclone' | 'rear'): string
return devPath;
}
- // Final fallback to system PATH (shouldn't be needed in production).
- // This allows development even without the binaries folder being populated.
+ // Final fallback to system PATH (shouldn't be needed in production)
+ // This allows development even without the binaries folder being populated
console.warn(
`[binaryPathResolver] Could not find bundled '${fileName}'. Falling back to system PATH.`
);
diff --git a/backend/src/utils/logger.ts b/backend/src/utils/logger.ts
index 897e6f5..988f6d4 100644
--- a/backend/src/utils/logger.ts
+++ b/backend/src/utils/logger.ts
@@ -40,31 +40,45 @@ export function initializeLogger(): void {
// 1. Create and assign the main logger instance.
const isProduction = process.env.NODE_ENV === 'production';
+ const isPkg = (process as any).pkg;
- const targets: any[] = [
- {
- target: 'pino/file',
- options: { destination: `${logPath}/app.log` },
- level: 'info',
- },
- ];
-
- // Only use pino-pretty in development (not available in production)
- if (!isProduction) {
- targets.unshift({
- target: 'pino-pretty',
- options: {
- colorize: true,
- translateTime: 'SYS:standard',
- ignore: 'pid,hostname',
- },
- level: 'info',
+ let mainLogger: pino.Logger;
+
+ if (isPkg) {
+ // In pkg environment, use pino.destination (main thread) to avoid worker thread issues
+ const stream = pino.destination({
+ dest: `${logPath}/app.log`,
+ sync: false, // Asynchronous logging
+ mkdir: true
});
- }
+ mainLogger = pino(stream);
+ } else {
+ // In development or standard node production, use transports
+ const targets: any[] = [
+ {
+ target: 'pino/file',
+ options: { destination: `${logPath}/app.log`, mkdir: true },
+ level: 'info',
+ }
+ ];
+
+ // Add pino-pretty only in development
+ if (!isProduction) {
+ targets.push({
+ target: 'pino-pretty',
+ options: {
+ colorize: true,
+ translateTime: 'SYS:standard',
+ ignore: 'pid,hostname',
+ },
+ level: 'info',
+ });
+ }
- const mainLogger = pino({
- transport: { targets },
- });
+ mainLogger = pino({
+ transport: { targets },
+ });
+ }
logger = mainLogger;
@@ -103,17 +117,30 @@ export const planLogger = (task: string, planId?: string, backupId?: string) =>
if (planId) {
if (!planLoggers[planId]) {
- planLoggers[planId] = pino({
- transport: {
- targets: [
- {
- target: 'pino/file',
- options: { destination: `${appPaths.getLogsDir()}/plan-${planId}.log` },
- level: 'info',
- },
- ],
- },
- });
+ const isPkg = (process as any).pkg;
+
+ if (isPkg) {
+ // Use pino.destination for plan loggers in pkg to avoid worker threads
+ const stream = pino.destination({
+ dest: `${appPaths.getLogsDir()}/plan-${planId}.log`,
+ sync: false,
+ mkdir: true
+ });
+ planLoggers[planId] = pino(stream);
+ } else {
+ // Use standard transport for non-pkg environments
+ planLoggers[planId] = pino({
+ transport: {
+ targets: [
+ {
+ target: 'pino/file',
+ options: { destination: `${appPaths.getLogsDir()}/plan-${planId}.log`, mkdir: true },
+ level: 'info',
+ },
+ ],
+ },
+ });
+ }
}
return planLoggers[planId].child(metadata);
}
diff --git a/backend/tsconfig.json b/backend/tsconfig.json
index c6be86f..2088efb 100644
--- a/backend/tsconfig.json
+++ b/backend/tsconfig.json
@@ -14,7 +14,8 @@
"rootDir": "./src",
"declaration": true,
"declarationMap": true,
- "sourceMap": true
+ "sourceMap": true,
+ "typeRoots": ["./node_modules/@types", "./src/types"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "__tests__", "**/*.test.ts"]
diff --git a/installers/windows/pluton-setup.iss b/installers/windows/pluton-setup.iss
new file mode 100644
index 0000000..7a8b42a
--- /dev/null
+++ b/installers/windows/pluton-setup.iss
@@ -0,0 +1,305 @@
+; Script generated by GitHub Copilot
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "Pluton"
+#define MyAppVersion "0.0.1"
+#define MyAppPublisher "Amplebyte LLC"
+#define MyAppURL "https://usepluton.com"
+#define MyAppExeName "pluton.exe"
+#define MyAppServiceName "Pluton"
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{A1B2C3D4-E5F6-7890-1234-567890ABCDEF}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={autopf}\{#MyAppName}
+DefaultGroupName={#MyAppName}
+DisableProgramGroupPage=yes
+DisableWelcomePage=no
+LicenseFile=..\..\dist\executables\pluton-win-x64\LICENSE
+; Uncomment the following line to run in non administrative install mode (install for current user only.)
+;PrivilegesRequired=lowest
+PrivilegesRequired=admin
+ArchitecturesInstallIn64BitMode=x64compatible
+OutputDir=..\..\dist\installers
+OutputBaseFilename=pluton-setup
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+WizardImageFile=sidebar.png
+SetupIconFile=setup.ico
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Dirs]
+; Create the data directory structure in ProgramData
+Name: "{commonappdata}\{#MyAppName}"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\config"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\db"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\logs"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\backups"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\restores"; Permissions: users-modify
+Name: "{commonappdata}\{#MyAppName}\temp"; Permissions: users-modify
+
+[Files]
+; Main executable
+Source: "..\..\dist\executables\pluton-win-x64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
+
+; Documentation
+Source: "..\..\dist\executables\pluton-win-x64\LICENSE"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\..\dist\executables\pluton-win-x64\README.md"; DestDir: "{app}"; Flags: ignoreversion
+
+; Binaries (restic, rclone) - Preserve directory structure
+Source: "..\..\dist\executables\pluton-win-x64\binaries\*"; DestDir: "{app}\binaries"; Flags: ignoreversion recursesubdirs createallsubdirs
+
+; Native modules (better-sqlite3) - Preserve directory structure
+Source: "..\..\dist\executables\pluton-win-x64\node_modules\*"; DestDir: "{app}\node_modules"; Flags: ignoreversion recursesubdirs createallsubdirs
+
+; Database Migrations (Required for app startup)
+Source: "..\..\dist\executables\pluton-win-x64\drizzle\*"; DestDir: "{app}\drizzle"; Flags: ignoreversion recursesubdirs createallsubdirs skipifsourcedoesntexist
+
+; NSSM for service management (Assumes you have downloaded nssm.exe to installers/windows/tools/)
+Source: "tools\nssm.exe"; DestDir: "{app}"; Flags: ignoreversion
+
+[Registry]
+; Set system-wide environment variables for sensitive data
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "PLUTON_ENCRYPTION_KEY"; ValueData: "{code:GetEncryptionKey}"; Flags: uninsdeletevalue
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "PLUTON_USER_NAME"; ValueData: "{code:GetUserName}"; Flags: uninsdeletevalue
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "PLUTON_USER_PASSWORD"; ValueData: "{code:GetUserPassword}"; Flags: uninsdeletevalue
+
+; Also set the data directory explicitly if needed, though AppPaths defaults to ProgramData
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "PLUTON_DATA_DIR"; ValueData: "{commonappdata}\{#MyAppName}"; Flags: uninsdeletevalue
+
+[Run]
+; Install the service using NSSM
+Filename: "{app}\nssm.exe"; Parameters: "install {#MyAppServiceName} ""{app}\{#MyAppExeName}"""; Flags: runhidden; StatusMsg: "Installing service..."
+; Set service description
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} Description ""Pluton Backup Service"""; Flags: runhidden
+; Set service startup to automatic
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} Start SERVICE_AUTO_START"; Flags: runhidden
+; Set service AppDirectory
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} AppDirectory ""{app}"""; Flags: runhidden
+; Set environment variables directly on the service (Avoids reboot requirement)
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} AppEnvironmentExtra PLUTON_ENCRYPTION_KEY=""{code:GetEncryptionKey}"" PLUTON_USER_NAME=""{code:GetUserName}"" PLUTON_USER_PASSWORD=""{code:GetUserPassword}"" PLUTON_DATA_DIR=""{commonappdata}\{#MyAppName}"""; Flags: runhidden
+; Set stdout and stderr logging
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} AppStdout ""{commonappdata}\{#MyAppName}\logs\service-out.log"""; Flags: runhidden
+Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppServiceName} AppStderr ""{commonappdata}\{#MyAppName}\logs\service-err.log"""; Flags: runhidden
+; Start the service
+Filename: "{app}\nssm.exe"; Parameters: "start {#MyAppServiceName}"; Flags: runhidden; StatusMsg: "Starting service..."
+
+[UninstallRun]
+; Stop the service
+Filename: "{app}\nssm.exe"; Parameters: "stop {#MyAppServiceName}"; Flags: runhidden; RunOnceId: "StopService"
+; Remove the service
+Filename: "{app}\nssm.exe"; Parameters: "remove {#MyAppServiceName} confirm"; Flags: runhidden; RunOnceId: "RemoveService"
+
+[Code]
+var
+ SensitivePage: TWizardPage;
+ SettingsPage: TInputQueryWizardPage;
+
+ // Custom Controls for Sensitive Page
+ lblEncryptionKey: TLabel;
+ txtEncryptionKey: TPasswordEdit;
+ lblEncryptionKeyInfo: TLabel;
+
+ lblUserName: TLabel;
+ txtUserName: TNewEdit;
+
+ lblUserPassword: TLabel;
+ txtUserPassword: TPasswordEdit;
+
+ // Variables to store inputs
+ EncryptionKey, UserName, UserPassword: string;
+ ServerPort, MaxConcurrentBackups: string;
+
+procedure InitializeWizard;
+begin
+ // Customize Wizard Colors
+ WizardForm.MainPanel.Color := $fff5f5;
+
+ // --- 1. Sensitive Configuration Page (Custom) ---
+ SensitivePage := CreateCustomPage(wpLicense,
+ 'Security Configuration', 'Please enter the required security credentials.');
+
+ // Encryption Key Label
+ lblEncryptionKey := TLabel.Create(WizardForm);
+ lblEncryptionKey.Parent := SensitivePage.Surface;
+ lblEncryptionKey.Caption := 'Encryption Key (min 12 chars):';
+ lblEncryptionKey.Left := 0;
+ lblEncryptionKey.Top := 0;
+
+ // Encryption Key Input
+ txtEncryptionKey := TPasswordEdit.Create(WizardForm);
+ txtEncryptionKey.Parent := SensitivePage.Surface;
+ txtEncryptionKey.Left := 0;
+ txtEncryptionKey.Top := lblEncryptionKey.Top + lblEncryptionKey.Height + 6;
+ txtEncryptionKey.Width := SensitivePage.SurfaceWidth;
+
+ // Encryption Key Info (Caption)
+ lblEncryptionKeyInfo := TLabel.Create(WizardForm);
+ lblEncryptionKeyInfo.Parent := SensitivePage.Surface;
+ lblEncryptionKeyInfo.Caption := 'Used to encrypt all your backups. Do not lose this!';
+ lblEncryptionKeyInfo.Font.Color := clGray;
+ lblEncryptionKeyInfo.Left := 0;
+ lblEncryptionKeyInfo.Top := txtEncryptionKey.Top + txtEncryptionKey.Height + 6;
+ lblEncryptionKeyInfo.Width := SensitivePage.SurfaceWidth;
+ lblEncryptionKeyInfo.WordWrap := True;
+
+ // Admin Username Label
+ lblUserName := TLabel.Create(WizardForm);
+ lblUserName.Parent := SensitivePage.Surface;
+ lblUserName.Caption := 'Admin Username:';
+ lblUserName.Left := 0;
+ lblUserName.Top := lblEncryptionKeyInfo.Top + lblEncryptionKeyInfo.Height + 16;
+
+ // Admin Username Input
+ txtUserName := TNewEdit.Create(WizardForm);
+ txtUserName.Parent := SensitivePage.Surface;
+ txtUserName.Left := 0;
+ txtUserName.Top := lblUserName.Top + lblUserName.Height + 6;
+ txtUserName.Width := SensitivePage.SurfaceWidth;
+ txtUserName.Text := 'admin'; // Default value
+
+ // Admin Password Label
+ lblUserPassword := TLabel.Create(WizardForm);
+ lblUserPassword.Parent := SensitivePage.Surface;
+ lblUserPassword.Caption := 'Admin Password:';
+ lblUserPassword.Left := 0;
+ lblUserPassword.Top := txtUserName.Top + txtUserName.Height + 16;
+
+ // Admin Password Input
+ txtUserPassword := TPasswordEdit.Create(WizardForm);
+ txtUserPassword.Parent := SensitivePage.Surface;
+ txtUserPassword.Left := 0;
+ txtUserPassword.Top := lblUserPassword.Top + lblUserPassword.Height + 6;
+ txtUserPassword.Width := SensitivePage.SurfaceWidth;
+
+ // --- 2. General Settings Page ---
+ SettingsPage := CreateInputQueryPage(SensitivePage.ID,
+ 'General Settings', 'Configure the application defaults.',
+ 'You can change these settings later in the config file.');
+
+ SettingsPage.Add('Server Port:', False);
+ SettingsPage.Add('Max Concurrent Backups:', False);
+
+ // Set hints for Settings Page
+ SettingsPage.Edits[0].Hint := 'The port the web interface will listen on.';
+ SettingsPage.Edits[0].ShowHint := True;
+ SettingsPage.Edits[1].Hint := 'Maximum number of backups to run simultaneously.';
+ SettingsPage.Edits[1].ShowHint := True;
+
+ // Set defaults
+ SettingsPage.Values[0] := '5173';
+ SettingsPage.Values[1] := '2';
+end;
+
+function NextButtonClick(CurPageID: Integer): Boolean;
+var
+ I: Integer;
+begin
+ Result := True;
+
+ // Validate Sensitive Page
+ if CurPageID = SensitivePage.ID then
+ begin
+ // Check ENCRYPTION_KEY length
+ if Length(txtEncryptionKey.Text) < 12 then
+ begin
+ MsgBox('Encryption Key must be at least 12 characters long.', mbError, MB_OK);
+ Result := False;
+ Exit;
+ end;
+
+ // Check User Name
+ if Length(txtUserName.Text) = 0 then
+ begin
+ MsgBox('Admin Username cannot be empty.', mbError, MB_OK);
+ Result := False;
+ Exit;
+ end;
+
+ // Check User Password
+ if Length(txtUserPassword.Text) = 0 then
+ begin
+ MsgBox('Admin Password cannot be empty.', mbError, MB_OK);
+ Result := False;
+ Exit;
+ end;
+
+ // Store values
+ EncryptionKey := txtEncryptionKey.Text;
+ UserName := txtUserName.Text;
+ UserPassword := txtUserPassword.Text;
+ end;
+
+ // Validate Settings Page
+ if CurPageID = SettingsPage.ID then
+ begin
+ // Store values
+ ServerPort := SettingsPage.Values[0];
+ MaxConcurrentBackups := SettingsPage.Values[1];
+ end;
+end;
+
+// Getter functions for Registry section
+function GetEncryptionKey(Param: String): String;
+begin
+ Result := EncryptionKey;
+end;
+
+function GetUserName(Param: String): String;
+begin
+ Result := UserName;
+end;
+
+function GetUserPassword(Param: String): String;
+begin
+ Result := UserPassword;
+end;
+
+procedure CurStepChanged(CurStep: TSetupStep);
+var
+ ConfigPath: String;
+ ConfigContent: String;
+begin
+ if CurStep = ssPostInstall then
+ begin
+ // Write config.json
+ ConfigPath := ExpandConstant('{commonappdata}\{#MyAppName}\config\config.json');
+
+ // Construct JSON content manually
+ ConfigContent := '{' + #13#10 +
+ ' "SERVER_PORT": ' + ServerPort + ',' + #13#10 +
+ ' "MAX_CONCURRENT_BACKUPS": ' + MaxConcurrentBackups + #13#10 +
+ '}';
+
+ if not SaveStringToFile(ConfigPath, ConfigContent, False) then
+ begin
+ MsgBox('Failed to write configuration file.', mbError, MB_OK);
+ end;
+ end;
+end;
+
+// Custom Completion Page
+procedure CurPageChanged(CurPageID: Integer);
+begin
+ if CurPageID = wpFinished then
+ begin
+ WizardForm.FinishedLabel.Caption := 'Setup has finished installing Pluton on your computer.' + #13#10 + #13#10 +
+ 'The service has been started successfully.' + #13#10 + #13#10 +
+ 'You can access the application at: http://localhost:' + ServerPort + #13#10 + #13#10 +
+ 'Please click Finish to exit Setup.';
+
+ // Optional: Open browser
+ // ShellExec('open', 'http://localhost:' + ServerPort, '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
+ end;
+end;
diff --git a/installers/windows/setup.ico b/installers/windows/setup.ico
new file mode 100644
index 0000000..b29affa
Binary files /dev/null and b/installers/windows/setup.ico differ
diff --git a/installers/windows/sidebar.png b/installers/windows/sidebar.png
new file mode 100644
index 0000000..bf4e421
Binary files /dev/null and b/installers/windows/sidebar.png differ
diff --git a/installers/windows/tools/nssm.exe b/installers/windows/tools/nssm.exe
new file mode 100644
index 0000000..6ccfe3c
Binary files /dev/null and b/installers/windows/tools/nssm.exe differ
diff --git a/package.json b/package.json
index fc71793..5dac8a7 100644
--- a/package.json
+++ b/package.json
@@ -5,11 +5,14 @@
"license": "Apache-2.0",
"scripts": {
"build": "turbo run build",
+ "build:executables": "node ./scripts/build-executables.js",
"dev:backend": "pnpm --filter @plutonhq/core-backend dev",
"dev:frontend": "pnpm --filter @plutonhq/core-frontend dev",
"dev": "concurrently \"pnpm dev:backend\" \"pnpm dev:frontend\" "
},
"devDependencies": {
+ "@yao-pkg/pkg": "^6.10.1",
+ "adm-zip": "^0.5.16",
"concurrently": "^9.1.2",
"prettier": "^3.0.0",
"release-please": "^17.1.3",
@@ -17,6 +20,20 @@
"turbo": "^2.6.0",
"typescript": "^5.0.0"
},
+ "pkg": {
+ "assets": [
+ "backend/public/**/*",
+ "backend/drizzle/**/*"
+ ],
+ "targets": [
+ "node24-win-x64",
+ "node24-linux-x64",
+ "node24-linux-arm64",
+ "node24-macos-x64",
+ "node24-macos-arm64"
+ ],
+ "outputPath": "dist/executables"
+ },
"packageManager": "[email protected]",
"workspaces": [
"backend",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d90f363..2529411 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,12 @@ importers:
.:
devDependencies:
+ '@yao-pkg/pkg':
+ specifier: ^6.10.1
+ version: 6.10.1
+ adm-zip:
+ specifier: ^0.5.16
+ version: 0.5.16
concurrently:
specifier: ^9.1.2
version: 9.2.1
@@ -135,9 +141,12 @@ importers:
drizzle-kit:
specifier: ^0.31.7
version: 0.31.7
+ esbuild:
+ specifier: ^0.27.0
+ version: 0.27.0
jest:
specifier: ^30.2.0
pino-pretty:
specifier: ^13.0.0
version: 13.1.2
@@ -152,7 +161,7 @@ importers:
version: 5.44.1
ts-jest:
specifier: ^29.4.5
typescript:
specifier: ^5.7.3
version: 5.9.3
@@ -1026,6 +1035,12 @@ packages:
cpu: [ppc64]
os: [aix]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [aix]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
engines: {node: '>=12'}
@@ -1038,6 +1053,12 @@ packages:
cpu: [arm64]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}
engines: {node: '>=12'}
@@ -1050,6 +1071,12 @@ packages:
cpu: [arm]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}
engines: {node: '>=12'}
@@ -1062,6 +1089,12 @@ packages:
cpu: [x64]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}
engines: {node: '>=12'}
@@ -1074,6 +1107,12 @@ packages:
cpu: [arm64]
os: [darwin]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [darwin]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}
engines: {node: '>=12'}
@@ -1086,6 +1125,12 @@ packages:
cpu: [x64]
os: [darwin]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [darwin]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}
engines: {node: '>=12'}
@@ -1098,6 +1143,12 @@ packages:
cpu: [arm64]
os: [freebsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [freebsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}
engines: {node: '>=12'}
@@ -1110,6 +1161,12 @@ packages:
cpu: [x64]
os: [freebsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [freebsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}
engines: {node: '>=12'}
@@ -1122,6 +1179,12 @@ packages:
cpu: [arm64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}
engines: {node: '>=12'}
@@ -1134,6 +1197,12 @@ packages:
cpu: [arm]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}
engines: {node: '>=12'}
@@ -1146,6 +1215,12 @@ packages:
cpu: [ia32]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}
engines: {node: '>=12'}
@@ -1158,6 +1233,12 @@ packages:
cpu: [loong64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==}
+ engines: {node: '>=18'}
+ cpu: [loong64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}
engines: {node: '>=12'}
@@ -1170,6 +1251,12 @@ packages:
cpu: [mips64el]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==}
+ engines: {node: '>=18'}
+ cpu: [mips64el]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}
engines: {node: '>=12'}
@@ -1182,6 +1269,12 @@ packages:
cpu: [ppc64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}
engines: {node: '>=12'}
@@ -1194,6 +1287,12 @@ packages:
cpu: [riscv64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==}
+ engines: {node: '>=18'}
+ cpu: [riscv64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}
engines: {node: '>=12'}
@@ -1206,6 +1305,12 @@ packages:
cpu: [s390x]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==}
+ engines: {node: '>=18'}
+ cpu: [s390x]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}
engines: {node: '>=12'}
@@ -1218,12 +1323,24 @@ packages:
cpu: [x64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [netbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [netbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}
engines: {node: '>=12'}
@@ -1236,12 +1353,24 @@ packages:
cpu: [x64]
os: [netbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [netbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}
engines: {node: '>=12'}
@@ -1254,12 +1383,24 @@ packages:
cpu: [x64]
os: [openbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [openbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openharmony]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openharmony]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}
engines: {node: '>=12'}
@@ -1272,6 +1413,12 @@ packages:
cpu: [x64]
os: [sunos]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [sunos]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}
engines: {node: '>=12'}
@@ -1284,6 +1431,12 @@ packages:
cpu: [arm64]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [win32]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}
engines: {node: '>=12'}
@@ -1296,6 +1449,12 @@ packages:
cpu: [ia32]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [win32]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}
engines: {node: '>=12'}
@@ -1308,6 +1467,12 @@ packages:
cpu: [x64]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [win32]
+
'@eslint-community/[email protected]':
resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -1382,6 +1547,10 @@ packages:
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
+ '@isaacs/[email protected]':
+ resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}
+ engines: {node: '>=18.0.0'}
+
'@istanbuljs/[email protected]':
resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==}
engines: {node: '>=8'}
@@ -2389,6 +2558,15 @@ packages:
resolution: {integrity: sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==}
engines: {node: '>=10.0.0'}
+ '@yao-pkg/[email protected]':
+ resolution: {integrity: sha512-OrXQlsR3vE/IvwXSk8R5ETYbcxAFtUPmLkeepbG+ArN82TvlIwcUJ65tEWxLG3Tl89VRbmOupuhkXfmuaO05+Q==}
+ hasBin: true
+
+ '@yao-pkg/[email protected]':
+ resolution: {integrity: sha512-M/eqDg0Iir2nmyZ06Q9ospIPv1Yk7K1du5iLiaYrfMogQcI6bqf82A026MVYngyLH8jZsquZvjNAbvgbW4Uwkw==}
+ engines: {node: '>=18.0.0'}
+ hasBin: true
+
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
engines: {node: '>=6.5'}
@@ -2407,6 +2585,10 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
+ resolution: {integrity: sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==}
+ engines: {node: '>=12.0'}
+
resolution: {integrity: sha512-swASey0BxGs4/npZGWoiVDmnEyPvVFIRY6l2LVKL4rbiW8IhcIGDLfnb20Qo8U20itXlitAKPQ3MVTEbOGG5ZA==}
engines: {node: '>=14'}
@@ -2419,6 +2601,10 @@ packages:
resolution: {integrity: sha512-aQfiI9w3RbqnowNCdcGMmCtxBFXN9bhJFcuZm24U5/NU06V3MCl42jWK2GUnu8rOypR2Ahi/aEcgq3w7CMcycg==}
engines: {node: '>=16'}
+ resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
+ engines: {node: '>= 6.0.0'}
+
resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
engines: {node: '>= 14'}
@@ -2532,6 +2718,14 @@ packages:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==}
+ peerDependencies:
+ react-native-b4a: '*'
+ peerDependenciesMeta:
+ react-native-b4a:
+ optional: true
+
resolution: {integrity: sha512-0YiBEOxWqKkSQWL9nNGGEgndoeL0ZpWrbLMNL5u/Kaxrli3Eaxlt3ZtIDktEvXt4L/R9r3ODr2zKwGM/2BjxVw==}
engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}
@@ -2575,6 +2769,44 @@ packages:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
+ resolution: {integrity: sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==}
+ peerDependencies:
+ bare-abort-controller: '*'
+ peerDependenciesMeta:
+ bare-abort-controller:
+ optional: true
+
+ resolution: {integrity: sha512-zGUCsm3yv/ePt2PHNbVxjjn0nNB1MkIaR4wOCxJ2ig5pCf5cCVAYJXVhQg/3OhhJV6DB1ts7Hv0oUaElc2TPQg==}
+ engines: {bare: '>=1.16.0'}
+ peerDependencies:
+ bare-buffer: '*'
+ peerDependenciesMeta:
+ bare-buffer:
+ optional: true
+
+ resolution: {integrity: sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==}
+ engines: {bare: '>=1.14.0'}
+
+ resolution: {integrity: sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==}
+
+ resolution: {integrity: sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==}
+ peerDependencies:
+ bare-buffer: '*'
+ bare-events: '*'
+ peerDependenciesMeta:
+ bare-buffer:
+ optional: true
+ bare-events:
+ optional: true
+
+ resolution: {integrity: sha512-ZMq4gd9ngV5aTMa5p9+UfY0b3skwhHELaDkhEHetMdX0LRkW9kzaym4oo/Eh+Ghm0CCDuMTsRIGM/ytUc1ZYmw==}
+
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
@@ -2601,6 +2833,9 @@ packages:
resolution: {integrity: sha512-ZV/9asSuknOExbM/zPPA8z00lc1ihPKWaStHkkQrxHNeYx+yY+TmF+v80dpv2G0mv3HVXBu7ryoAsxbFFhf4eg==}
+ resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==}
+
resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
@@ -2713,6 +2948,10 @@ packages:
resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}
+ resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==}
engines: {node: '>=8'}
@@ -2854,6 +3093,9 @@ packages:
resolution: {integrity: sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==}
+ resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
+
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
engines: {node: '>= 0.10'}
@@ -3169,6 +3411,9 @@ packages:
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==}
+
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
@@ -3275,6 +3520,11 @@ packages:
engines: {node: '>=18'}
hasBin: true
+ resolution: {integrity: sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==}
+ engines: {node: '>=18'}
+ hasBin: true
+
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
@@ -3406,6 +3656,9 @@ packages:
resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==}
+
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'}
@@ -3446,6 +3699,9 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
+ resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==}
+
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
engines: {node: '>=8.6.0'}
@@ -3560,9 +3816,16 @@ packages:
resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}
engines: {node: '>= 0.6'}
+ resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==}
+
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
+ resolution: {integrity: sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==}
+ engines: {node: '>=14.14'}
+
resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
engines: {node: '>=10'}
@@ -3737,6 +4000,10 @@ packages:
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
engines: {node: '>= 14'}
+ resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
@@ -3815,6 +4082,10 @@ packages:
resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==}
engines: {node: '>= 12'}
@@ -3972,6 +4243,9 @@ packages:
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
+ resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
+
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
@@ -4446,6 +4720,10 @@ packages:
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
+ resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==}
+ engines: {node: '>= 18'}
+
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
@@ -4474,6 +4752,9 @@ packages:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
+ resolution: {integrity: sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==}
+
resolution: {integrity: sha512-1UxuyYGdoQHcGg87Lkqm3FzefucTa0NAiOcuRsDmysep3c1LVCRK2krrUDafMWtjSG04htvAmvg96+SDknOmgQ==}
@@ -4517,6 +4798,15 @@ packages:
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
+ resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
+ engines: {node: 4.x || >=6.0.0}
+ peerDependencies:
+ encoding: ^0.1.0
+ peerDependenciesMeta:
+ encoding:
+ optional: true
+
resolution: {integrity: sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==}
@@ -4618,6 +4908,10 @@ packages:
resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
engines: {node: '>=6'}
@@ -4838,6 +5132,10 @@ packages:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
+ resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
+ engines: {node: '>=0.4.0'}
+
resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
engines: {node: '>= 6'}
@@ -4960,6 +5258,9 @@ packages:
resolution: {integrity: sha512-UkRNRIwnhG+y7hpqnycCL/xbTk7+ia9VuVTC0S+zVbwd65DI9eUpRMfsWIGrCWxTU/mi+JW8cHQCrv+zfCbEPQ==}
engines: {node: '>=10.13'}
+ resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
+
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
engines: {node: '>= 6'}
@@ -5080,6 +5381,9 @@ packages:
resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==}
engines: {node: '>=0.4'}
+ resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
+
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@@ -5412,6 +5716,12 @@ packages:
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==}
+
+ resolution: {integrity: sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==}
+
resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==}
engines: {node: '>=10'}
@@ -5444,6 +5754,9 @@ packages:
resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
+
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
@@ -5544,10 +5857,20 @@ packages:
resolution: {integrity: sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==}
+ resolution: {integrity: sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==}
+
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==}
+
+ resolution: {integrity: sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==}
engines: {node: '>=8'}
@@ -5556,11 +5879,6 @@ packages:
resolution: {integrity: sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==}
- engines: {node: '>=10'}
- hasBin: true
-
resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==}
engines: {node: '>=10'}
@@ -5570,6 +5888,9 @@ packages:
resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==}
+
resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==}
@@ -5595,6 +5916,9 @@ packages:
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
engines: {node: '>=0.6'}
+ resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
+
resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}
@@ -5841,6 +6165,9 @@ packages:
resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==}
+ resolution: {integrity: sha512-PZ8hTS+AqcGxsaQntl3IRBw65QrBI6lxzqDEL7IAo/XCEqRTKGfOX56Vea5TH9SZczRVxuzk1re04z/YjuYCJA==}
+
resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==}
engines: {node: '>=4'}
@@ -5951,9 +6278,15 @@ packages:
resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}
+ resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
+
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
+ resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
+
resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}
@@ -6100,6 +6433,10 @@ packages:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
+ resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
@@ -7284,147 +7621,225 @@ snapshots:
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@eslint-community/[email protected]([email protected])':
dependencies:
eslint: 9.39.0
@@ -7510,6 +7925,10 @@ snapshots:
wrap-ansi: 8.1.0
wrap-ansi-cjs: [email protected]
+ '@isaacs/[email protected]':
+ dependencies:
+ minipass: 7.1.2
+
'@istanbuljs/[email protected]':
dependencies:
camelcase: 5.3.1
@@ -7529,7 +7948,7 @@ snapshots:
jest-util: 30.2.0
slash: 3.0.0
dependencies:
'@jest/console': 30.2.0
'@jest/pattern': 30.0.1
@@ -7544,7 +7963,7 @@ snapshots:
exit-x: 0.2.2
graceful-fs: 4.2.11
jest-changed-files: 30.2.0
jest-haste-map: 30.2.0
jest-message-util: 30.2.0
jest-regex-util: 30.0.1
@@ -7920,7 +8339,7 @@ snapshots:
dependencies:
serialize-javascript: 6.0.2
smob: 1.5.0
- terser: 5.44.0
+ terser: 5.44.1
optionalDependencies:
rollup: 2.79.2
@@ -8707,6 +9126,46 @@ snapshots:
'@xmldom/[email protected]': {}
+ '@yao-pkg/[email protected]':
+ dependencies:
+ https-proxy-agent: 5.0.1
+ node-fetch: 2.7.0
+ picocolors: 1.1.1
+ progress: 2.0.3
+ semver: 7.7.3
+ tar-fs: 3.1.1
+ yargs: 16.2.0
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - bare-buffer
+ - encoding
+ - react-native-b4a
+ - supports-color
+
+ '@yao-pkg/[email protected]':
+ dependencies:
+ '@babel/generator': 7.28.5
+ '@babel/parser': 7.28.5
+ '@babel/types': 7.28.5
+ '@yao-pkg/pkg-fetch': 3.5.30
+ into-stream: 6.0.0
+ minimist: 1.2.8
+ multistream: 4.1.0
+ picocolors: 1.1.1
+ picomatch: 4.0.3
+ prebuild-install: 7.1.3
+ resolve: 1.22.11
+ stream-meter: 1.0.4
+ tar: 7.5.2
+ tinyglobby: 0.2.15
+ unzipper: 0.12.3
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - bare-buffer
+ - encoding
+ - react-native-b4a
+ - supports-color
+
dependencies:
event-target-shim: 5.0.1
@@ -8722,6 +9181,8 @@ snapshots:
+
dependencies:
mqtt-packet: 7.1.2
@@ -8752,6 +9213,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ debug: 4.4.3
+ transitivePeerDependencies:
+ - supports-color
+
@@ -8877,6 +9344,8 @@ snapshots:
dependencies:
possible-typed-array-names: 1.1.0
+
dependencies:
'@babel/core': 7.28.5
@@ -8955,6 +9424,43 @@ snapshots:
+
+ dependencies:
+ bare-events: 2.8.2
+ bare-path: 3.0.0
+ bare-stream: 2.7.0([email protected])
+ bare-url: 2.3.2
+ fast-fifo: 1.3.2
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - react-native-b4a
+ optional: true
+
+ optional: true
+
+ dependencies:
+ bare-os: 3.6.2
+ optional: true
+
+ dependencies:
+ streamx: 2.23.0
+ optionalDependencies:
+ bare-events: 2.8.2
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - react-native-b4a
+ optional: true
+
+ dependencies:
+ bare-path: 3.0.0
+ optional: true
+
@@ -8987,6 +9493,8 @@ snapshots:
inherits: 2.0.4
readable-stream: 4.7.0
+
dependencies:
bytes: 3.1.2
@@ -9115,6 +9623,8 @@ snapshots:
+
@@ -9252,6 +9762,8 @@ snapshots:
dependencies:
browserslist: 4.27.0
+
dependencies:
object-assign: 4.1.1
@@ -9452,6 +9964,10 @@ snapshots:
es-errors: 1.3.0
gopd: 1.2.0
+ dependencies:
+ readable-stream: 2.3.8
+
@@ -9594,6 +10110,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ debug: 4.4.3
+ esbuild: 0.27.0
+ transitivePeerDependencies:
+ - supports-color
+ optional: true
+
optionalDependencies:
'@esbuild/android-arm': 0.18.20
@@ -9648,6 +10172,35 @@ snapshots:
'@esbuild/win32-ia32': 0.25.11
'@esbuild/win32-x64': 0.25.11
+ optionalDependencies:
+ '@esbuild/aix-ppc64': 0.27.0
+ '@esbuild/android-arm': 0.27.0
+ '@esbuild/android-arm64': 0.27.0
+ '@esbuild/android-x64': 0.27.0
+ '@esbuild/darwin-arm64': 0.27.0
+ '@esbuild/darwin-x64': 0.27.0
+ '@esbuild/freebsd-arm64': 0.27.0
+ '@esbuild/freebsd-x64': 0.27.0
+ '@esbuild/linux-arm': 0.27.0
+ '@esbuild/linux-arm64': 0.27.0
+ '@esbuild/linux-ia32': 0.27.0
+ '@esbuild/linux-loong64': 0.27.0
+ '@esbuild/linux-mips64el': 0.27.0
+ '@esbuild/linux-ppc64': 0.27.0
+ '@esbuild/linux-riscv64': 0.27.0
+ '@esbuild/linux-s390x': 0.27.0
+ '@esbuild/linux-x64': 0.27.0
+ '@esbuild/netbsd-arm64': 0.27.0
+ '@esbuild/netbsd-x64': 0.27.0
+ '@esbuild/openbsd-arm64': 0.27.0
+ '@esbuild/openbsd-x64': 0.27.0
+ '@esbuild/openharmony-arm64': 0.27.0
+ '@esbuild/sunos-x64': 0.27.0
+ '@esbuild/win32-arm64': 0.27.0
+ '@esbuild/win32-ia32': 0.27.0
+ '@esbuild/win32-x64': 0.27.0
+
@@ -9793,6 +10346,12 @@ snapshots:
+ dependencies:
+ bare-events: 2.8.2
+ transitivePeerDependencies:
+ - bare-abort-controller
+
@@ -9868,6 +10427,8 @@ snapshots:
+
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -9995,8 +10556,19 @@ snapshots:
+ dependencies:
+ inherits: 2.0.4
+ readable-stream: 2.3.8
+
+ dependencies:
+ graceful-fs: 4.2.11
+ jsonfile: 6.2.0
+ universalify: 2.0.1
+
dependencies:
at-least-node: 1.0.0
@@ -10180,6 +10752,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ agent-base: 6.0.2
+ debug: 4.4.3
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
agent-base: 7.1.4
@@ -10250,6 +10829,11 @@ snapshots:
hasown: 2.0.2
side-channel: 1.1.0
+ dependencies:
+ from2: 2.3.0
+ p-is-promise: 3.0.0
+
@@ -10388,6 +10972,8 @@ snapshots:
+
@@ -10467,15 +11053,15 @@ snapshots:
- babel-plugin-macros
- supports-color
dependencies:
- '@jest/core': 30.2.0([email protected]([email protected]))
+ '@jest/core': 30.2.0([email protected]([email protected]))
'@jest/test-result': 30.2.0
'@jest/types': 30.2.0
chalk: 4.1.2
exit-x: 0.2.2
import-local: 3.2.0
jest-util: 30.2.0
jest-validate: 30.2.0
yargs: 17.7.2
@@ -10486,7 +11072,7 @@ snapshots:
- supports-color
- ts-node
dependencies:
'@babel/core': 7.28.5
'@jest/get-type': 30.1.0
@@ -10514,7 +11100,7 @@ snapshots:
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 22.18.13
- esbuild-register: 3.6.0([email protected])
+ esbuild-register: 3.6.0([email protected])
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -10734,12 +11320,12 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
dependencies:
- '@jest/core': 30.2.0([email protected]([email protected]))
+ '@jest/core': 30.2.0([email protected]([email protected]))
'@jest/types': 30.2.0
import-local: 3.2.0
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@@ -11025,6 +11611,10 @@ snapshots:
+ dependencies:
+ minipass: 7.1.2
+
@@ -11077,6 +11667,11 @@ snapshots:
+ dependencies:
+ once: 1.4.0
+ readable-stream: 3.6.2
+
optional: true
@@ -11107,6 +11702,10 @@ snapshots:
optional: true
+ dependencies:
+ whatwg-url: 5.0.0
+
dependencies:
css-select: 5.2.2
@@ -11245,6 +11844,8 @@ snapshots:
object-keys: 1.1.1
safe-push-apply: 1.0.0
+
dependencies:
p-try: 2.2.0
@@ -11449,6 +12050,8 @@ snapshots:
+
dependencies:
kleur: 3.0.3
@@ -11571,6 +12174,16 @@ snapshots:
js-yaml: 4.1.0
strip-bom: 4.0.0
+ dependencies:
+ core-util-is: 1.0.3
+ inherits: 2.0.4
+ isarray: 1.0.0
+ process-nextick-args: 2.0.1
+ safe-buffer: 5.1.2
+ string_decoder: 1.1.1
+ util-deprecate: 1.0.2
+
dependencies:
inherits: 2.0.4
@@ -11756,6 +12369,8 @@ snapshots:
has-symbols: 1.1.0
isarray: 2.0.5
+
@@ -12084,6 +12699,19 @@ snapshots:
es-errors: 1.3.0
internal-slot: 1.1.0
+ dependencies:
+ readable-stream: 2.3.8
+
+ dependencies:
+ events-universal: 1.0.1
+ fast-fifo: 1.3.2
+ text-decoder: 1.2.3
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - react-native-b4a
+
dependencies:
char-regex: 1.0.2
@@ -12146,6 +12774,10 @@ snapshots:
define-properties: 1.2.1
es-object-atoms: 1.1.1
+ dependencies:
+ safe-buffer: 5.1.2
+
dependencies:
safe-buffer: 5.2.1
@@ -12267,6 +12899,18 @@ snapshots:
pump: 3.0.3
tar-stream: 2.2.0
+ dependencies:
+ pump: 3.0.3
+ tar-stream: 3.1.7
+ optionalDependencies:
+ bare-fs: 4.5.1
+ bare-path: 3.0.0
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - bare-buffer
+ - react-native-b4a
+
dependencies:
bl: 4.1.0
@@ -12275,6 +12919,23 @@ snapshots:
inherits: 2.0.4
readable-stream: 3.6.2
+ dependencies:
+ b4a: 1.7.3
+ fast-fifo: 1.3.2
+ streamx: 2.23.0
+ transitivePeerDependencies:
+ - bare-abort-controller
+ - react-native-b4a
+
+ dependencies:
+ '@isaacs/fs-minipass': 4.0.1
+ chownr: 3.0.0
+ minipass: 7.1.2
+ minizlib: 3.1.0
+ yallist: 5.0.0
+
@@ -12284,13 +12945,6 @@ snapshots:
type-fest: 0.16.0
unique-string: 2.0.0
- dependencies:
- '@jridgewell/source-map': 0.3.11
- acorn: 8.15.0
- commander: 2.20.3
- source-map-support: 0.5.21
-
dependencies:
'@jridgewell/source-map': 0.3.11
@@ -12304,6 +12958,12 @@ snapshots:
glob: 7.2.3
minimatch: 3.1.2
+ dependencies:
+ b4a: 1.7.3
+ transitivePeerDependencies:
+ - react-native-b4a
+
dependencies:
real-require: 0.2.0
@@ -12325,6 +12985,8 @@ snapshots:
+
dependencies:
punycode: 2.3.1
@@ -12337,12 +12999,12 @@ snapshots:
dependencies:
typescript: 5.9.3
dependencies:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
handlebars: 4.7.8
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
@@ -12355,7 +13017,7 @@ snapshots:
'@jest/transform': 30.2.0
'@jest/types': 30.2.0
babel-jest: 30.2.0(@babel/[email protected])
- esbuild: 0.25.11
+ esbuild: 0.27.0
jest-util: 30.2.0
@@ -12588,6 +13250,14 @@ snapshots:
'@unrs/resolver-binding-win32-ia32-msvc': 1.11.1
'@unrs/resolver-binding-win32-x64-msvc': 1.11.1
+ dependencies:
+ bluebird: 3.7.2
+ duplexer2: 0.1.4
+ fs-extra: 11.3.2
+ graceful-fs: 4.2.11
+ node-int64: 0.4.0
+
@@ -12669,8 +13339,15 @@ snapshots:
dependencies:
makeerror: 1.0.12
+
+ dependencies:
+ tr46: 0.0.3
+ webidl-conversions: 3.0.1
+
dependencies:
lodash.sortby: 4.7.0
@@ -12916,6 +13593,8 @@ snapshots:
+
diff --git a/scripts/build-executables.js b/scripts/build-executables.js
new file mode 100644
index 0000000..73b92a4
--- /dev/null
+++ b/scripts/build-executables.js
@@ -0,0 +1,624 @@
+import { execSync } from 'child_process';
+import { readdir, readFile, writeFile, mkdir, copyFile, rm, access, chmod } from 'fs/promises';
+import { join, dirname, extname, resolve } from 'path';
+import { fileURLToPath } from 'url';
+import { constants } from 'fs';
+import https from 'https';
+import fs from 'fs';
+import { createWriteStream } from 'fs';
+import os from 'os';
+import AdmZip from 'adm-zip';
+
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = dirname(__filename);
+const rootDir = resolve(__dirname, '..');
+const backendDir = resolve(rootDir, 'backend');
+const frontendDir = resolve(rootDir, 'frontend');
+
+console.log('╔═══════════════════════════════════════════════════════════╗');
+console.log('║ 🚀 Pluton Multi-Platform Executable Build Script ║');
+console.log('╚═══════════════════════════════════════════════════════════╝\n');
+
+// Version configuration - Update these to use latest versions
+const BETTER_SQLITE3_VERSION = '12.4.4'; // Latest: Check https://github.com/WiseLibs/better-sqlite3/releases
+const RESTIC_VERSION = '0.18.1'; // Latest: Check https://github.com/restic/restic/releases
+const RCLONE_VERSION = '1.71.2'; // Latest: Check https://rclone.org/downloads/
+
+// Target configurations
+const targets = {
+ 'win-x64': {
+ pkgTarget: 'node24-win-x64',
+ executableName: 'pluton.exe',
+ binaryPlatform: 'win32-x64',
+ nodeVersion: '24',
+ betterSqlite3Url: `https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-node-v137-win32-x64.tar.gz`,
+ resticUrl: `https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_windows_amd64.zip`,
+ rcloneUrl: `https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-windows-amd64.zip`
+ },
+ 'linux-x64': {
+ pkgTarget: 'node24-linux-x64',
+ executableName: 'pluton',
+ binaryPlatform: 'linux-x64',
+ nodeVersion: '24',
+ betterSqlite3Url: `https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-node-v137-linux-x64.tar.gz`,
+ resticUrl: `https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2`,
+ rcloneUrl: `https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-amd64.zip`
+ },
+ 'linux-arm64': {
+ pkgTarget: 'node24-linux-arm64',
+ executableName: 'pluton',
+ binaryPlatform: 'linux-arm64',
+ nodeVersion: '24',
+ betterSqlite3Url: `https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-node-v137-linux-arm64.tar.gz`,
+ resticUrl: `https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_arm64.bz2`,
+ rcloneUrl: `https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-arm64.zip`
+ },
+ 'macos-x64': {
+ pkgTarget: 'node24-macos-x64',
+ executableName: 'pluton',
+ binaryPlatform: 'darwin-x64',
+ nodeVersion: '24',
+ betterSqlite3Url: `https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-node-v137-darwin-x64.tar.gz`,
+ resticUrl: `https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_darwin_amd64.bz2`,
+ rcloneUrl: `https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-osx-amd64.zip`
+ },
+ 'macos-arm64': {
+ pkgTarget: 'node24-macos-arm64',
+ executableName: 'pluton',
+ binaryPlatform: 'darwin-arm64',
+ nodeVersion: '24',
+ betterSqlite3Url: `https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-node-v137-darwin-arm64.tar.gz`,
+ resticUrl: `https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_darwin_arm64.bz2`,
+ rcloneUrl: `https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-osx-arm64.zip`
+ }
+};
+
+/**
+ * Execute a command and log the output
+ */
+function exec(command, options = {}) {
+ console.log(`\n📦 Executing: ${command}`);
+ try {
+ execSync(command, { stdio: 'inherit', ...options });
+ } catch (error) {
+ console.error(`❌ Command failed: ${command}`);
+ throw error;
+ }
+}
+
+/**
+ * Download a file from a URL
+ */
+async function downloadFile(url, destPath) {
+ console.log(`⬇️ Downloading: ${url}`);
+ return new Promise((resolve, reject) => {
+ const file = createWriteStream(destPath);
+ https.get(url, (response) => {
+ if (response.statusCode === 302 || response.statusCode === 301) {
+ // Follow redirect
+ https.get(response.headers.location, (redirectResponse) => {
+ redirectResponse.pipe(file);
+ file.on('finish', () => {
+ file.close();
+ resolve();
+ });
+ }).on('error', reject);
+ } else {
+ response.pipe(file);
+ file.on('finish', () => {
+ file.close();
+ resolve();
+ });
+ }
+ }).on('error', (err) => {
+ try {
+ fs.unlinkSync(destPath);
+ } catch {}
+ reject(err);
+ });
+ });
+}
+
+/**
+ * Check if a file exists
+ */
+async function fileExists(path) {
+ try {
+ await access(path, constants.F_OK);
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+/**
+ * Step 1: Build Frontend
+ */
+async function buildFrontend() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 1: Building Frontend');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ exec('pnpm install', { cwd: frontendDir });
+ exec('pnpm run build', { cwd: frontendDir });
+
+ console.log('✅ Frontend build completed');
+}
+
+/**
+ * Step 2: Copy Frontend Build to Backend
+ */
+async function copyFrontendToBackend() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 2: Copying Frontend Build to Backend');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ const frontendDistDir = join(frontendDir, 'dist');
+ const backendPublicDir = join(backendDir, 'public');
+
+ // Remove existing public directory
+ try {
+ await rm(backendPublicDir, { recursive: true, force: true });
+ } catch (error) {
+ // Ignore if doesn't exist
+ }
+
+ // Copy frontend dist to backend public
+ await mkdir(backendPublicDir, { recursive: true });
+ await copyDirectory(frontendDistDir, backendPublicDir);
+
+ console.log('✅ Frontend copied to backend/public');
+}
+
+/**
+ * Copy directory recursively
+ */
+async function copyDirectory(src, dest) {
+ await mkdir(dest, { recursive: true });
+ const entries = await readdir(src, { withFileTypes: true });
+
+ for (const entry of entries) {
+ const srcPath = join(src, entry.name);
+ const destPath = join(dest, entry.name);
+
+ if (entry.isDirectory()) {
+ await copyDirectory(srcPath, destPath);
+ } else {
+ await copyFile(srcPath, destPath);
+ }
+ }
+}
+
+/**
+ * Step 3: Install Backend Dependencies
+ */
+async function installBackendDeps() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 3: Installing Backend Dependencies');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ exec('pnpm install', { cwd: backendDir });
+
+ console.log('✅ Backend dependencies installed');
+}
+
+/**
+ * Step 4: Compile TypeScript Backend
+ */
+async function compileBackend() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 4: Compiling TypeScript Backend');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ exec('pnpm run build:pkg', { cwd: backendDir });
+
+ console.log('✅ Backend compiled successfully');
+}
+
+/**
+ * Step 5: Download and Setup better-sqlite3 Native Binaries
+ */
+async function setupBetterSqlite3() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 5: Setting up better-sqlite3 Native Binaries');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ const pkgAssetsDir = join(rootDir, 'dist', 'pkg-assets');
+
+ await mkdir(pkgAssetsDir, { recursive: true });
+
+ for (const [platform, config] of Object.entries(targets)) {
+ console.log(`\n🔧 Setting up better-sqlite3 for ${platform}...`);
+
+ const platformAssetsDir = join(pkgAssetsDir, platform, 'better-sqlite3');
+ await mkdir(platformAssetsDir, { recursive: true });
+
+ try {
+ // Download the pre-built binary
+ const tempFile = join(pkgAssetsDir, `better-sqlite3-${platform}.tar.gz`);
+ await downloadFile(config.betterSqlite3Url, tempFile);
+
+ // Extract the .node file - Use cross-platform approach
+ // Note: tar is available on Windows 10+ and all Unix systems
+ const isWindows = os.platform() === 'win32';
+ const tarCommand = isWindows
+ ? `tar -xzf "${tempFile}" -C "${platformAssetsDir}"`
+ : `tar -xzf ${tempFile} -C ${platformAssetsDir}`;
+
+ try {
+ execSync(tarCommand, { stdio: 'pipe' });
+ } catch (tarError) {
+ console.warn(` ⚠️ tar command failed, trying alternative extraction...`);
+ // Fallback: Just note the issue, manual extraction may be needed
+ console.warn(` Download available at: ${tempFile}`);
+ }
+
+ // Clean up tar file
+ await rm(tempFile, { force: true });
+
+ console.log(` ✅ better-sqlite3 binary ready for ${platform}`);
+ } catch (error) {
+ console.warn(` ⚠️ Failed to download better-sqlite3 for ${platform}: ${error.message}`);
+ console.warn(` You may need to build it manually or copy from node_modules`);
+ }
+ }
+
+ console.log('\n✅ better-sqlite3 binaries setup completed');
+}
+
+/**
+ * Step 6: Download Platform-Specific Binaries (restic/rclone)
+ */
+async function downloadBinaries() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 6: Downloading Platform-Specific Binaries');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ const binariesDir = join(rootDir, 'dist', 'binaries');
+ await mkdir(binariesDir, { recursive: true });
+
+ // Check if all binaries already exist
+ let allBinariesExist = true;
+ for (const [platform, config] of Object.entries(targets)) {
+ const platformDir = join(binariesDir, config.binaryPlatform);
+ const isWindows = config.binaryPlatform.startsWith('win32');
+ const resticName = isWindows ? 'restic.exe' : 'restic';
+ const rcloneName = isWindows ? 'rclone.exe' : 'rclone';
+
+ const hasRestic = await fileExists(join(platformDir, resticName));
+ const hasRclone = await fileExists(join(platformDir, rcloneName));
+
+ if (!hasRestic || !hasRclone) {
+ allBinariesExist = false;
+ break;
+ }
+ }
+
+ if (allBinariesExist) {
+ console.log('✅ All binaries already exist, skipping download\n');
+ console.log('💡 To force re-download, delete the dist/binaries folder');
+ return;
+ }
+
+ for (const [platform, config] of Object.entries(targets)) {
+ console.log(`\n🔧 Downloading binaries for ${platform}...`);
+
+ const platformDir = join(binariesDir, config.binaryPlatform);
+ await mkdir(platformDir, { recursive: true });
+
+ const isWindows = config.binaryPlatform.startsWith('win32');
+ const resticName = isWindows ? 'restic.exe' : 'restic';
+ const rcloneName = isWindows ? 'rclone.exe' : 'rclone';
+
+ // Download and extract restic
+ try {
+ const resticPath = join(platformDir, resticName);
+ if (await fileExists(resticPath)) {
+ console.log(` ✓ restic already exists, skipping download`);
+ } else {
+ const resticTemp = join(binariesDir, `restic-${platform}.tmp`);
+ await downloadFile(config.resticUrl, resticTemp);
+
+ // Extract based on file type
+ if (config.resticUrl.endsWith('.bz2')) {
+ // Decompress bz2 (Unix)
+ try {
+ execSync(`bunzip2 -c "${resticTemp}" > "${resticPath}"`, { stdio: 'pipe' });
+ await rm(resticTemp, { force: true });
+ } catch (err) {
+ console.warn(` ⚠️ bunzip2 failed, file saved at: ${resticTemp}`);
+ }
+ } else if (config.resticUrl.endsWith('.zip')) {
+ // Extract zip (Windows) using adm-zip for cross-platform support
+ try {
+ const zip = new AdmZip(resticTemp);
+ const zipEntries = zip.getEntries();
+
+ // Find the restic executable
+ // Restic windows zip usually contains a versioned exe like restic_0.16.0_windows_amd64.exe
+ for (const entry of zipEntries) {
+ if (entry.entryName.endsWith('.exe') && entry.name.includes('restic')) {
+ zip.extractEntryTo(entry, dirname(resticPath), false, true, false, resticName);
+ break;
+ }
+ }
+ await rm(resticTemp, { force: true });
+ } catch (err) {
+ console.warn(` ⚠️ zip extraction failed: ${err.message}`);
+ console.warn(` File saved at: ${resticTemp}`);
+ }
+ }
+
+ // Set executable permissions on Unix
+ if (!isWindows && os.platform() !== 'win32' && await fileExists(resticPath)) {
+ await chmod(resticPath, 0o755);
+ }
+
+ console.log(` ✅ restic downloaded`);
+ }
+ } catch (error) {
+ console.warn(` ⚠️ Failed to download restic: ${error.message}`);
+ }
+
+ // Download and extract rclone
+ try {
+ const rclonePath = join(platformDir, rcloneName);
+ if (await fileExists(rclonePath)) {
+ console.log(` ✓ rclone already exists, skipping download`);
+ } else {
+ const rcloneTemp = join(binariesDir, `rclone-${platform}.zip`);
+ await downloadFile(config.rcloneUrl, rcloneTemp);
+
+ // Extract zip using adm-zip for cross-platform support
+ try {
+ const zip = new AdmZip(rcloneTemp);
+ const zipEntries = zip.getEntries();
+
+ // Find the rclone executable (usually in a versioned folder)
+ for (const entry of zipEntries) {
+ if (!entry.isDirectory && (entry.name === 'rclone.exe' || entry.name === 'rclone')) {
+ zip.extractEntryTo(entry, dirname(rclonePath), false, true, false, rcloneName);
+ break;
+ }
+ }
+ await rm(rcloneTemp, { force: true });
+ } catch (err) {
+ console.warn(` ⚠️ zip extraction failed: ${err.message}`);
+ console.warn(` File saved at: ${rcloneTemp}`);
+ }
+
+ // Set executable permissions on Unix
+ if (!isWindows && os.platform() !== 'win32' && await fileExists(rclonePath)) {
+ await chmod(rclonePath, 0o755);
+ }
+
+ console.log(` ✅ rclone downloaded`);
+ }
+ } catch (error) {
+ console.warn(` ⚠️ Failed to download rclone: ${error.message}`);
+ }
+ }
+
+ console.log('\n✅ Binary downloads completed');
+}
+
+/**
+ * Step 7: Generate Executables with pkg
+ */
+async function generateExecutables() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 7: Generating Executables with pkg');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ const executablesDir = join(rootDir, 'dist', 'executables');
+ const pkgBuildsDir = join(rootDir, 'dist', 'pkg-builds');
+
+ // Ensure directories exist
+ await mkdir(executablesDir, { recursive: true });
+ await mkdir(pkgBuildsDir, { recursive: true });
+
+ // Build pkg command with all targets
+ const pkgTargets = Object.values(targets).map(t => t.pkgTarget).join(',');
+ // Use package.json as entry point so pkg reads the configuration (bin, pkg.scripts, etc.)
+ const entryPoint = join(backendDir, 'package.json');
+
+ console.log(`\n🔨 Building executables for all platforms...`);
+ console.log(` Targets: ${pkgTargets}`);
+
+ // Output to pkg-builds directory to avoid naming conflicts with distribution folders
+ const pkgCommand = `npx pkg ${entryPoint} --targets ${pkgTargets} --output ${join(pkgBuildsDir, 'pluton')} --compress GZip --public --public-packages "*" --options expose-gc --no-bytecode`;
+
+ try {
+ exec(pkgCommand, { cwd: rootDir });
+ console.log('\n✅ All executables generated successfully');
+ } catch (error) {
+ console.error('\n❌ Failed to generate executables');
+ throw error;
+ }
+}
+
+/**
+ * Step 8: Create Distribution Packages
+ */
+async function createDistributionPackages() {
+ console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+ console.log('📦 Step 8: Creating Distribution Packages');
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
+
+ const executablesDir = join(rootDir, 'dist', 'executables');
+ const pkgBuildsDir = join(rootDir, 'dist', 'pkg-builds');
+ const binariesDir = join(rootDir, 'dist', 'binaries');
+ const pkgAssetsDir = join(rootDir, 'dist', 'pkg-assets');
+
+ for (const [platform, config] of Object.entries(targets)) {
+ console.log(`\n📦 Creating distribution package for ${platform}...`);
+
+ const packageDir = join(executablesDir, `pluton-${platform}`);
+ const packageBinariesDir = join(packageDir, 'binaries', config.binaryPlatform);
+
+ // Create package directory structure
+ await mkdir(packageBinariesDir, { recursive: true });
+
+ // Determine the source executable name generated by pkg
+ // pkg might strip the node version from the filename or add .exe on Windows
+ let executableSource = join(pkgBuildsDir, `pluton-${config.pkgTarget}`);
+
+ // Check for variations if the exact target name doesn't exist
+ if (!(await fileExists(executableSource))) {
+ // Try with .exe extension (for Windows targets)
+ if (await fileExists(executableSource + '.exe')) {
+ executableSource += '.exe';
+ }
+ // Try without the node version (e.g. pluton-linux-x64 instead of pluton-node24-linux-x64)
+ else {
+ const simplifiedName = `pluton-${platform}`;
+ const simplifiedSource = join(pkgBuildsDir, simplifiedName);
+
+ if (await fileExists(simplifiedSource)) {
+ executableSource = simplifiedSource;
+ } else if (await fileExists(simplifiedSource + '.exe')) {
+ executableSource = simplifiedSource + '.exe';
+ }
+ }
+ }
+
+ const executableDest = join(packageDir, config.executableName);
+
+ if (await fileExists(executableSource)) {
+ await copyFile(executableSource, executableDest);
+
+ // Make executable on Unix systems (skip on Windows host)
+ const isWindowsHost = os.platform() === 'win32';
+ if (!config.binaryPlatform.startsWith('win32') && !isWindowsHost) {
+ try {
+ await chmod(executableDest, 0o755);
+ } catch (error) {
+ console.warn(` ⚠️ Could not set executable permissions: ${error.message}`);
+ }
+ }
+ console.log(` ✓ Copied executable`);
+ } else {
+ console.warn(` ⚠️ Executable not found: ${executableSource}`);
+ }
+
+ // Copy better-sqlite3 native module
+ const sqliteAssetsDir = join(pkgAssetsDir, platform, 'better-sqlite3');
+ if (await fileExists(sqliteAssetsDir)) {
+ // The path structure better-sqlite3 expects is:
+ // node_modules/better-sqlite3/build/Release/better_sqlite3.node
+ // Our downloaded tarball might have a different structure, so we need to be careful.
+ // The tarball usually extracts to build/Release/better_sqlite3.node directly or similar.
+
+ const sqliteDestDir = join(packageDir, 'node_modules', 'better-sqlite3', 'build', 'Release');
+ await mkdir(sqliteDestDir, { recursive: true });
+
+ // We copy the contents of the extracted folder to the destination
+ // If the extracted folder has build/Release structure, we need to handle that.
+ // Based on the setupBetterSqlite3 function, we extract to platformAssetsDir.
+ // Let's check if we need to drill down.
+
+ // Check if build/Release exists in source
+ const sourceBuildRelease = join(sqliteAssetsDir, 'build', 'Release');
+ if (await fileExists(sourceBuildRelease)) {
+ await copyDirectory(sourceBuildRelease, sqliteDestDir);
+ } else {
+ // Fallback: copy everything from root of extraction
+ await copyDirectory(sqliteAssetsDir, sqliteDestDir);
+ }
+
+ console.log(` ✓ Copied better-sqlite3 native module`);
+ }
+
+ // Copy binaries if they exist
+ const sourceBinariesDir = join(binariesDir, config.binaryPlatform);
+ if (await fileExists(sourceBinariesDir)) {
+ await copyDirectory(sourceBinariesDir, packageBinariesDir);
+
+ // Make binaries executable on Unix systems (skip on Windows host)
+ const isWindowsHost = os.platform() === 'win32';
+ if (!config.binaryPlatform.startsWith('win32') && !isWindowsHost) {
+ const resticPath = join(packageBinariesDir, 'restic');
+ const rclonePath = join(packageBinariesDir, 'rclone');
+
+ if (await fileExists(resticPath)) {
+ await chmod(resticPath, 0o755);
+ }
+ if (await fileExists(rclonePath)) {
+ await chmod(rclonePath, 0o755);
+ }
+ }
+
+ console.log(` ✓ Copied binaries for ${config.binaryPlatform}`);
+ } else {
+ console.warn(` ⚠️ Binaries not found for ${config.binaryPlatform} at ${sourceBinariesDir}`);
+ }
+
+ // Copy README and LICENSE
+ const readme = join(rootDir, 'README.md');
+ const license = join(rootDir, 'LICENSE');
+
+ if (await fileExists(readme)) {
+ await copyFile(readme, join(packageDir, 'README.md'));
+ }
+ if (await fileExists(license)) {
+ await copyFile(license, join(packageDir, 'LICENSE'));
+ }
+
+ // Copy drizzle migrations folder
+ const drizzleSrc = join(backendDir, 'drizzle');
+ const drizzleDest = join(packageDir, 'drizzle');
+ if (await fileExists(drizzleSrc)) {
+ await copyDirectory(drizzleSrc, drizzleDest);
+ console.log(` ✓ Copied drizzle migrations`);
+ } else {
+ console.warn(` ⚠️ Drizzle migrations not found at ${drizzleSrc}`);
+ }
+
+ console.log(`✅ Distribution package created: pluton-${platform}/`);
+ }
+
+ console.log('\n✅ All distribution packages created successfully');
+ console.log(`\n📁 Packages location: ${executablesDir}`);
+}
+
+/**
+ * Main Build Process
+ */
+async function main() {
+ try {
+ const startTime = Date.now();
+
+ await buildFrontend();
+ await copyFrontendToBackend();
+ await installBackendDeps();
+ await compileBackend();
+ await setupBetterSqlite3();
+ await downloadBinaries();
+ await generateExecutables();
+ await createDistributionPackages();
+
+ const duration = ((Date.now() - startTime) / 1000).toFixed(2);
+
+ console.log('\n╔═══════════════════════════════════════════════════════════╗');
+ console.log('║ ✅ Build Completed Successfully! ║');
+ console.log('╚═══════════════════════════════════════════════════════════╝');
+ console.log(`\n⏱️ Total build time: ${duration}s`);
+ console.log(`📁 Distribution packages: ${join(rootDir, 'dist', 'executables')}\n`);
+
+ console.log('📋 Next steps:');
+ console.log(' 1. Test executables on target platforms');
+ console.log(' 2. Create installers (Windows Inno Setup, Linux/macOS scripts)');
+ console.log(' 3. Sign executables (optional but recommended)');
+ console.log(' 4. Create release packages/archives\n');
+
+ } catch (error) {
+ console.error('\n╔═══════════════════════════════════════════════════════════╗');
+ console.error('║ ❌ Build Failed! ║');
+ console.error('╚═══════════════════════════════════════════════════════════╝\n');
+ console.error(error);
+ process.exit(1);
+ }
+}
+
+// Run the build
+main();