gemi 0.4.21 → 0.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +1 -1
- package/dist/auth/adapters/prisma.d.ts.map +1 -1
- package/dist/bin/index.js +56 -488
- package/dist/chunk-8b3d411f441a43ce.js +2 -0
- package/dist/email/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +4 -4
- package/package.json +1 -1
package/dist/bin/index.js
CHANGED
|
@@ -2951,9 +2951,9 @@ var require_sharp = __commonJS((exports, module) => {
|
|
|
2951
2951
|
];
|
|
2952
2952
|
var sharp;
|
|
2953
2953
|
var errors = [];
|
|
2954
|
-
for (const
|
|
2954
|
+
for (const path of paths) {
|
|
2955
2955
|
try {
|
|
2956
|
-
sharp = import.meta.require(
|
|
2956
|
+
sharp = import.meta.require(path);
|
|
2957
2957
|
break;
|
|
2958
2958
|
} catch (err) {
|
|
2959
2959
|
errors.push(err);
|
|
@@ -2962,7 +2962,7 @@ var require_sharp = __commonJS((exports, module) => {
|
|
|
2962
2962
|
if (sharp) {
|
|
2963
2963
|
module.exports = sharp;
|
|
2964
2964
|
} else {
|
|
2965
|
-
const [isLinux, isMacOs, isWindows] = ["linux", "darwin", "win32"].map((
|
|
2965
|
+
const [isLinux, isMacOs, isWindows] = ["linux", "darwin", "win32"].map((os) => runtimePlatform.startsWith(os));
|
|
2966
2966
|
const help = [`Could not load the "sharp" module using the ${runtimePlatform} runtime`];
|
|
2967
2967
|
errors.forEach((err) => {
|
|
2968
2968
|
if (err.code !== "MODULE_NOT_FOUND") {
|
|
@@ -2975,9 +2975,9 @@ var require_sharp = __commonJS((exports, module) => {
|
|
|
2975
2975
|
const { found, expected } = isUnsupportedNodeRuntime();
|
|
2976
2976
|
help.push("- Please upgrade Node.js:", ` Found ${found}`, ` Requires ${expected}`);
|
|
2977
2977
|
} else if (prebuiltPlatforms.includes(runtimePlatform)) {
|
|
2978
|
-
const [
|
|
2979
|
-
const libc =
|
|
2980
|
-
help.push("- Ensure optional dependencies can be installed:", " npm install --include=optional sharp", " yarn add sharp --ignore-engines", "- Ensure your package manager supports multi-platform installation:", " See https://sharp.pixelplumbing.com/install#cross-platform", "- Add platform-specific dependencies:", ` npm install --os=${
|
|
2978
|
+
const [os, cpu] = runtimePlatform.split("-");
|
|
2979
|
+
const libc = os.endsWith("musl") ? " --libc=musl" : "";
|
|
2980
|
+
help.push("- Ensure optional dependencies can be installed:", " npm install --include=optional sharp", " yarn add sharp --ignore-engines", "- Ensure your package manager supports multi-platform installation:", " See https://sharp.pixelplumbing.com/install#cross-platform", "- Add platform-specific dependencies:", ` npm install --os=${os.replace("musl", "")}${libc} --cpu=${cpu} sharp`);
|
|
2981
2981
|
} else {
|
|
2982
2982
|
help.push(`- Manually install libvips >= ${minimumLibvipsVersion}`, "- Add experimental WebAssembly-based dependencies:", " npm install --cpu=wasm32 sharp", " npm install @img/sharp-wasm32");
|
|
2983
2983
|
}
|
|
@@ -4296,15 +4296,15 @@ var require_route = __commonJS((exports, module) => {
|
|
|
4296
4296
|
};
|
|
4297
4297
|
};
|
|
4298
4298
|
var wrapConversion = function(toModel, graph) {
|
|
4299
|
-
const
|
|
4299
|
+
const path = [graph[toModel].parent, toModel];
|
|
4300
4300
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
4301
4301
|
let cur = graph[toModel].parent;
|
|
4302
4302
|
while (graph[cur].parent) {
|
|
4303
|
-
|
|
4303
|
+
path.unshift(graph[cur].parent);
|
|
4304
4304
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
4305
4305
|
cur = graph[cur].parent;
|
|
4306
4306
|
}
|
|
4307
|
-
fn.conversion =
|
|
4307
|
+
fn.conversion = path;
|
|
4308
4308
|
return fn;
|
|
4309
4309
|
};
|
|
4310
4310
|
var conversions = require_conversions();
|
|
@@ -6136,9 +6136,9 @@ var require_output = __commonJS((exports, module) => {
|
|
|
6136
6136
|
let err;
|
|
6137
6137
|
if (!is.string(fileOut)) {
|
|
6138
6138
|
err = new Error("Missing output file path");
|
|
6139
|
-
} else if (is.string(this.options.input.file) &&
|
|
6139
|
+
} else if (is.string(this.options.input.file) && path.resolve(this.options.input.file) === path.resolve(fileOut)) {
|
|
6140
6140
|
err = new Error("Cannot use same file for input and output");
|
|
6141
|
-
} else if (jp2Regex.test(
|
|
6141
|
+
} else if (jp2Regex.test(path.extname(fileOut)) && !this.constructor.format.jp2k.output.file) {
|
|
6142
6142
|
err = errJp2Save();
|
|
6143
6143
|
}
|
|
6144
6144
|
if (err) {
|
|
@@ -6913,7 +6913,7 @@ var require_output = __commonJS((exports, module) => {
|
|
|
6913
6913
|
}
|
|
6914
6914
|
}
|
|
6915
6915
|
};
|
|
6916
|
-
var
|
|
6916
|
+
var path = import.meta.require("path");
|
|
6917
6917
|
var is = require_is();
|
|
6918
6918
|
var sharp = require_sharp();
|
|
6919
6919
|
var formats = new Map([
|
|
@@ -7693,10 +7693,10 @@ var require_command = __commonJS((exports) => {
|
|
|
7693
7693
|
});
|
|
7694
7694
|
};
|
|
7695
7695
|
var EventEmitter = import.meta.require("events").EventEmitter;
|
|
7696
|
-
var
|
|
7697
|
-
var
|
|
7698
|
-
var
|
|
7699
|
-
var
|
|
7696
|
+
var childProcess = import.meta.require("child_process");
|
|
7697
|
+
var path3 = import.meta.require("path");
|
|
7698
|
+
var fs = import.meta.require("fs");
|
|
7699
|
+
var process2 = import.meta.require("process");
|
|
7700
7700
|
var { Argument, humanReadableArgName } = require_argument();
|
|
7701
7701
|
var { CommanderError } = require_error();
|
|
7702
7702
|
var { Help } = require_help();
|
|
@@ -7738,10 +7738,10 @@ var require_command = __commonJS((exports) => {
|
|
|
7738
7738
|
this._showHelpAfterError = false;
|
|
7739
7739
|
this._showSuggestionAfterError = true;
|
|
7740
7740
|
this._outputConfiguration = {
|
|
7741
|
-
writeOut: (str) =>
|
|
7742
|
-
writeErr: (str) =>
|
|
7743
|
-
getOutHelpWidth: () =>
|
|
7744
|
-
getErrHelpWidth: () =>
|
|
7741
|
+
writeOut: (str) => process2.stdout.write(str),
|
|
7742
|
+
writeErr: (str) => process2.stderr.write(str),
|
|
7743
|
+
getOutHelpWidth: () => process2.stdout.isTTY ? process2.stdout.columns : undefined,
|
|
7744
|
+
getErrHelpWidth: () => process2.stderr.isTTY ? process2.stderr.columns : undefined,
|
|
7745
7745
|
outputError: (str, write) => write(str)
|
|
7746
7746
|
};
|
|
7747
7747
|
this._hidden = false;
|
|
@@ -7938,7 +7938,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
7938
7938
|
if (this._exitCallback) {
|
|
7939
7939
|
this._exitCallback(new CommanderError(exitCode, code, message));
|
|
7940
7940
|
}
|
|
7941
|
-
|
|
7941
|
+
process2.exit(exitCode);
|
|
7942
7942
|
}
|
|
7943
7943
|
action(fn) {
|
|
7944
7944
|
const listener = (args) => {
|
|
@@ -8133,16 +8133,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8133
8133
|
}
|
|
8134
8134
|
parseOptions = parseOptions || {};
|
|
8135
8135
|
if (argv === undefined && parseOptions.from === undefined) {
|
|
8136
|
-
if (
|
|
8136
|
+
if (process2.versions?.electron) {
|
|
8137
8137
|
parseOptions.from = "electron";
|
|
8138
8138
|
}
|
|
8139
|
-
const execArgv =
|
|
8139
|
+
const execArgv = process2.execArgv ?? [];
|
|
8140
8140
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
|
|
8141
8141
|
parseOptions.from = "eval";
|
|
8142
8142
|
}
|
|
8143
8143
|
}
|
|
8144
8144
|
if (argv === undefined) {
|
|
8145
|
-
argv =
|
|
8145
|
+
argv = process2.argv;
|
|
8146
8146
|
}
|
|
8147
8147
|
this.rawArgs = argv.slice();
|
|
8148
8148
|
let userArgs;
|
|
@@ -8153,7 +8153,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8153
8153
|
userArgs = argv.slice(2);
|
|
8154
8154
|
break;
|
|
8155
8155
|
case "electron":
|
|
8156
|
-
if (
|
|
8156
|
+
if (process2.defaultApp) {
|
|
8157
8157
|
this._scriptPath = argv[1];
|
|
8158
8158
|
userArgs = argv.slice(2);
|
|
8159
8159
|
} else {
|
|
@@ -8189,12 +8189,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8189
8189
|
let launchWithNode = false;
|
|
8190
8190
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
8191
8191
|
function findFile(baseDir, baseName) {
|
|
8192
|
-
const localBin =
|
|
8193
|
-
if (
|
|
8192
|
+
const localBin = path3.resolve(baseDir, baseName);
|
|
8193
|
+
if (fs.existsSync(localBin))
|
|
8194
8194
|
return localBin;
|
|
8195
|
-
if (sourceExt.includes(
|
|
8195
|
+
if (sourceExt.includes(path3.extname(baseName)))
|
|
8196
8196
|
return;
|
|
8197
|
-
const foundExt = sourceExt.find((ext) =>
|
|
8197
|
+
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
8198
8198
|
if (foundExt)
|
|
8199
8199
|
return `${localBin}${foundExt}`;
|
|
8200
8200
|
return;
|
|
@@ -8206,41 +8206,41 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8206
8206
|
if (this._scriptPath) {
|
|
8207
8207
|
let resolvedScriptPath;
|
|
8208
8208
|
try {
|
|
8209
|
-
resolvedScriptPath =
|
|
8209
|
+
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
8210
8210
|
} catch (err) {
|
|
8211
8211
|
resolvedScriptPath = this._scriptPath;
|
|
8212
8212
|
}
|
|
8213
|
-
executableDir =
|
|
8213
|
+
executableDir = path3.resolve(path3.dirname(resolvedScriptPath), executableDir);
|
|
8214
8214
|
}
|
|
8215
8215
|
if (executableDir) {
|
|
8216
8216
|
let localFile = findFile(executableDir, executableFile);
|
|
8217
8217
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
8218
|
-
const legacyName =
|
|
8218
|
+
const legacyName = path3.basename(this._scriptPath, path3.extname(this._scriptPath));
|
|
8219
8219
|
if (legacyName !== this._name) {
|
|
8220
8220
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
8221
8221
|
}
|
|
8222
8222
|
}
|
|
8223
8223
|
executableFile = localFile || executableFile;
|
|
8224
8224
|
}
|
|
8225
|
-
launchWithNode = sourceExt.includes(
|
|
8225
|
+
launchWithNode = sourceExt.includes(path3.extname(executableFile));
|
|
8226
8226
|
let proc;
|
|
8227
|
-
if (
|
|
8227
|
+
if (process2.platform !== "win32") {
|
|
8228
8228
|
if (launchWithNode) {
|
|
8229
8229
|
args.unshift(executableFile);
|
|
8230
|
-
args = incrementNodeInspectorPort(
|
|
8231
|
-
proc =
|
|
8230
|
+
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
8231
|
+
proc = childProcess.spawn(process2.argv[0], args, { stdio: "inherit" });
|
|
8232
8232
|
} else {
|
|
8233
|
-
proc =
|
|
8233
|
+
proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
8234
8234
|
}
|
|
8235
8235
|
} else {
|
|
8236
8236
|
args.unshift(executableFile);
|
|
8237
|
-
args = incrementNodeInspectorPort(
|
|
8238
|
-
proc =
|
|
8237
|
+
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
8238
|
+
proc = childProcess.spawn(process2.execPath, args, { stdio: "inherit" });
|
|
8239
8239
|
}
|
|
8240
8240
|
if (!proc.killed) {
|
|
8241
8241
|
const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
8242
8242
|
signals.forEach((signal) => {
|
|
8243
|
-
|
|
8243
|
+
process2.on(signal, () => {
|
|
8244
8244
|
if (proc.killed === false && proc.exitCode === null) {
|
|
8245
8245
|
proc.kill(signal);
|
|
8246
8246
|
}
|
|
@@ -8251,7 +8251,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8251
8251
|
proc.on("close", (code) => {
|
|
8252
8252
|
code = code ?? 1;
|
|
8253
8253
|
if (!exitCallback) {
|
|
8254
|
-
|
|
8254
|
+
process2.exit(code);
|
|
8255
8255
|
} else {
|
|
8256
8256
|
exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
8257
8257
|
}
|
|
@@ -8268,7 +8268,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8268
8268
|
throw new Error(`'${executableFile}' not executable`);
|
|
8269
8269
|
}
|
|
8270
8270
|
if (!exitCallback) {
|
|
8271
|
-
|
|
8271
|
+
process2.exit(1);
|
|
8272
8272
|
} else {
|
|
8273
8273
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
8274
8274
|
wrappedError.nestedError = err;
|
|
@@ -8613,11 +8613,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8613
8613
|
}
|
|
8614
8614
|
_parseOptionsEnv() {
|
|
8615
8615
|
this.options.forEach((option) => {
|
|
8616
|
-
if (option.envVar && option.envVar in
|
|
8616
|
+
if (option.envVar && option.envVar in process2.env) {
|
|
8617
8617
|
const optionKey = option.attributeName();
|
|
8618
8618
|
if (this.getOptionValue(optionKey) === undefined || ["default", "config", "env"].includes(this.getOptionValueSource(optionKey))) {
|
|
8619
8619
|
if (option.required || option.optional) {
|
|
8620
|
-
this.emit(`optionEnv:${option.name()}`,
|
|
8620
|
+
this.emit(`optionEnv:${option.name()}`, process2.env[option.envVar]);
|
|
8621
8621
|
} else {
|
|
8622
8622
|
this.emit(`optionEnv:${option.name()}`);
|
|
8623
8623
|
}
|
|
@@ -8784,13 +8784,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8784
8784
|
return this;
|
|
8785
8785
|
}
|
|
8786
8786
|
nameFromFilename(filename) {
|
|
8787
|
-
this._name =
|
|
8787
|
+
this._name = path3.basename(filename, path3.extname(filename));
|
|
8788
8788
|
return this;
|
|
8789
8789
|
}
|
|
8790
|
-
executableDir(
|
|
8791
|
-
if (
|
|
8790
|
+
executableDir(path4) {
|
|
8791
|
+
if (path4 === undefined)
|
|
8792
8792
|
return this._executableDir;
|
|
8793
|
-
this._executableDir =
|
|
8793
|
+
this._executableDir = path4;
|
|
8794
8794
|
return this;
|
|
8795
8795
|
}
|
|
8796
8796
|
helpInformation(contextOptions) {
|
|
@@ -8862,7 +8862,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
8862
8862
|
}
|
|
8863
8863
|
help(contextOptions) {
|
|
8864
8864
|
this.outputHelp(contextOptions);
|
|
8865
|
-
let exitCode =
|
|
8865
|
+
let exitCode = process2.exitCode || 0;
|
|
8866
8866
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
|
|
8867
8867
|
exitCode = 1;
|
|
8868
8868
|
}
|
|
@@ -8922,441 +8922,10 @@ var require_commander = __commonJS((exports) => {
|
|
|
8922
8922
|
|
|
8923
8923
|
// bin/gemi.ts
|
|
8924
8924
|
var {$ } = globalThis.Bun;
|
|
8925
|
-
import
|
|
8925
|
+
import path3 from "path";
|
|
8926
8926
|
|
|
8927
8927
|
// server/dev.ts
|
|
8928
|
-
import path2 from "path";
|
|
8929
|
-
|
|
8930
|
-
// ../../node_modules/open/index.js
|
|
8931
|
-
import process6 from "process";
|
|
8932
|
-
import {Buffer as Buffer2} from "buffer";
|
|
8933
8928
|
import path from "path";
|
|
8934
|
-
import {fileURLToPath} from "url";
|
|
8935
|
-
import childProcess from "child_process";
|
|
8936
|
-
import fs4, {constants as fsConstants} from "fs/promises";
|
|
8937
|
-
|
|
8938
|
-
// ../../node_modules/is-wsl/index.js
|
|
8939
|
-
import process2 from "process";
|
|
8940
|
-
import os from "os";
|
|
8941
|
-
import fs3 from "fs";
|
|
8942
|
-
|
|
8943
|
-
// ../../node_modules/is-inside-container/index.js
|
|
8944
|
-
import fs2 from "fs";
|
|
8945
|
-
|
|
8946
|
-
// ../../node_modules/is-docker/index.js
|
|
8947
|
-
import fs from "fs";
|
|
8948
|
-
var hasDockerEnv = function() {
|
|
8949
|
-
try {
|
|
8950
|
-
fs.statSync("/.dockerenv");
|
|
8951
|
-
return true;
|
|
8952
|
-
} catch {
|
|
8953
|
-
return false;
|
|
8954
|
-
}
|
|
8955
|
-
};
|
|
8956
|
-
var hasDockerCGroup = function() {
|
|
8957
|
-
try {
|
|
8958
|
-
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
8959
|
-
} catch {
|
|
8960
|
-
return false;
|
|
8961
|
-
}
|
|
8962
|
-
};
|
|
8963
|
-
var isDockerCached;
|
|
8964
|
-
function isDocker() {
|
|
8965
|
-
if (isDockerCached === undefined) {
|
|
8966
|
-
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
8967
|
-
}
|
|
8968
|
-
return isDockerCached;
|
|
8969
|
-
}
|
|
8970
|
-
|
|
8971
|
-
// ../../node_modules/is-inside-container/index.js
|
|
8972
|
-
var cachedResult;
|
|
8973
|
-
var hasContainerEnv = () => {
|
|
8974
|
-
try {
|
|
8975
|
-
fs2.statSync("/run/.containerenv");
|
|
8976
|
-
return true;
|
|
8977
|
-
} catch {
|
|
8978
|
-
return false;
|
|
8979
|
-
}
|
|
8980
|
-
};
|
|
8981
|
-
function isInsideContainer() {
|
|
8982
|
-
if (cachedResult === undefined) {
|
|
8983
|
-
cachedResult = hasContainerEnv() || isDocker();
|
|
8984
|
-
}
|
|
8985
|
-
return cachedResult;
|
|
8986
|
-
}
|
|
8987
|
-
|
|
8988
|
-
// ../../node_modules/is-wsl/index.js
|
|
8989
|
-
var isWsl = () => {
|
|
8990
|
-
if (process2.platform !== "linux") {
|
|
8991
|
-
return false;
|
|
8992
|
-
}
|
|
8993
|
-
if (os.release().toLowerCase().includes("microsoft")) {
|
|
8994
|
-
if (isInsideContainer()) {
|
|
8995
|
-
return false;
|
|
8996
|
-
}
|
|
8997
|
-
return true;
|
|
8998
|
-
}
|
|
8999
|
-
try {
|
|
9000
|
-
return fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
9001
|
-
} catch {
|
|
9002
|
-
return false;
|
|
9003
|
-
}
|
|
9004
|
-
};
|
|
9005
|
-
var is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
9006
|
-
|
|
9007
|
-
// ../../node_modules/define-lazy-prop/index.js
|
|
9008
|
-
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
9009
|
-
const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
|
|
9010
|
-
Object.defineProperty(object, propertyName, {
|
|
9011
|
-
configurable: true,
|
|
9012
|
-
enumerable: true,
|
|
9013
|
-
get() {
|
|
9014
|
-
const result = valueGetter();
|
|
9015
|
-
define(result);
|
|
9016
|
-
return result;
|
|
9017
|
-
},
|
|
9018
|
-
set(value) {
|
|
9019
|
-
define(value);
|
|
9020
|
-
}
|
|
9021
|
-
});
|
|
9022
|
-
return object;
|
|
9023
|
-
}
|
|
9024
|
-
|
|
9025
|
-
// ../../node_modules/default-browser/index.js
|
|
9026
|
-
import {promisify as promisify4} from "util";
|
|
9027
|
-
import process5 from "process";
|
|
9028
|
-
import {execFile as execFile4} from "child_process";
|
|
9029
|
-
|
|
9030
|
-
// ../../node_modules/default-browser-id/index.js
|
|
9031
|
-
import {promisify} from "util";
|
|
9032
|
-
import process3 from "process";
|
|
9033
|
-
import {execFile} from "child_process";
|
|
9034
|
-
var execFileAsync = promisify(execFile);
|
|
9035
|
-
async function defaultBrowserId() {
|
|
9036
|
-
if (process3.platform !== "darwin") {
|
|
9037
|
-
throw new Error("macOS only");
|
|
9038
|
-
}
|
|
9039
|
-
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
9040
|
-
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
9041
|
-
return match?.groups.id ?? "com.apple.Safari";
|
|
9042
|
-
}
|
|
9043
|
-
|
|
9044
|
-
// ../../node_modules/run-applescript/index.js
|
|
9045
|
-
import process4 from "process";
|
|
9046
|
-
import {promisify as promisify2} from "util";
|
|
9047
|
-
import {execFile as execFile2, execFileSync} from "child_process";
|
|
9048
|
-
async function runAppleScript(script, { humanReadableOutput = true } = {}) {
|
|
9049
|
-
if (process4.platform !== "darwin") {
|
|
9050
|
-
throw new Error("macOS only");
|
|
9051
|
-
}
|
|
9052
|
-
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
9053
|
-
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments]);
|
|
9054
|
-
return stdout.trim();
|
|
9055
|
-
}
|
|
9056
|
-
var execFileAsync2 = promisify2(execFile2);
|
|
9057
|
-
|
|
9058
|
-
// ../../node_modules/bundle-name/index.js
|
|
9059
|
-
async function bundleName(bundleId) {
|
|
9060
|
-
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
9061
|
-
}
|
|
9062
|
-
|
|
9063
|
-
// ../../node_modules/default-browser/windows.js
|
|
9064
|
-
import {promisify as promisify3} from "util";
|
|
9065
|
-
import {execFile as execFile3} from "child_process";
|
|
9066
|
-
var execFileAsync3 = promisify3(execFile3);
|
|
9067
|
-
var windowsBrowserProgIds = {
|
|
9068
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
9069
|
-
MSEdgeDHTML: { name: "Edge", id: "com.microsoft.edge" },
|
|
9070
|
-
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
9071
|
-
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" },
|
|
9072
|
-
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
9073
|
-
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
9074
|
-
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
9075
|
-
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
9076
|
-
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }
|
|
9077
|
-
};
|
|
9078
|
-
|
|
9079
|
-
class UnknownBrowserError extends Error {
|
|
9080
|
-
}
|
|
9081
|
-
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
9082
|
-
const { stdout } = await _execFileAsync("reg", [
|
|
9083
|
-
"QUERY",
|
|
9084
|
-
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
9085
|
-
"/v",
|
|
9086
|
-
"ProgId"
|
|
9087
|
-
]);
|
|
9088
|
-
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
9089
|
-
if (!match) {
|
|
9090
|
-
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
9091
|
-
}
|
|
9092
|
-
const { id } = match.groups;
|
|
9093
|
-
const browser = windowsBrowserProgIds[id];
|
|
9094
|
-
if (!browser) {
|
|
9095
|
-
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
9096
|
-
}
|
|
9097
|
-
return browser;
|
|
9098
|
-
}
|
|
9099
|
-
|
|
9100
|
-
// ../../node_modules/default-browser/index.js
|
|
9101
|
-
var execFileAsync4 = promisify4(execFile4);
|
|
9102
|
-
var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
|
|
9103
|
-
async function defaultBrowser2() {
|
|
9104
|
-
if (process5.platform === "darwin") {
|
|
9105
|
-
const id = await defaultBrowserId();
|
|
9106
|
-
const name = await bundleName(id);
|
|
9107
|
-
return { name, id };
|
|
9108
|
-
}
|
|
9109
|
-
if (process5.platform === "linux") {
|
|
9110
|
-
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
9111
|
-
const id = stdout.trim();
|
|
9112
|
-
const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
9113
|
-
return { name, id };
|
|
9114
|
-
}
|
|
9115
|
-
if (process5.platform === "win32") {
|
|
9116
|
-
return defaultBrowser();
|
|
9117
|
-
}
|
|
9118
|
-
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
9119
|
-
}
|
|
9120
|
-
|
|
9121
|
-
// ../../node_modules/open/index.js
|
|
9122
|
-
var detectArchBinary = function(binary) {
|
|
9123
|
-
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
9124
|
-
return binary;
|
|
9125
|
-
}
|
|
9126
|
-
const { [arch]: archBinary } = binary;
|
|
9127
|
-
if (!archBinary) {
|
|
9128
|
-
throw new Error(`${arch} is not supported`);
|
|
9129
|
-
}
|
|
9130
|
-
return archBinary;
|
|
9131
|
-
};
|
|
9132
|
-
var detectPlatformBinary = function({ [platform]: platformBinary }, { wsl }) {
|
|
9133
|
-
if (wsl && is_wsl_default) {
|
|
9134
|
-
return detectArchBinary(wsl);
|
|
9135
|
-
}
|
|
9136
|
-
if (!platformBinary) {
|
|
9137
|
-
throw new Error(`${platform} is not supported`);
|
|
9138
|
-
}
|
|
9139
|
-
return detectArchBinary(platformBinary);
|
|
9140
|
-
};
|
|
9141
|
-
var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
9142
|
-
var localXdgOpenPath = path.join(__dirname2, "xdg-open");
|
|
9143
|
-
var { platform, arch } = process6;
|
|
9144
|
-
var getWslDrivesMountPoint = (() => {
|
|
9145
|
-
const defaultMountPoint = "/mnt/";
|
|
9146
|
-
let mountPoint;
|
|
9147
|
-
return async function() {
|
|
9148
|
-
if (mountPoint) {
|
|
9149
|
-
return mountPoint;
|
|
9150
|
-
}
|
|
9151
|
-
const configFilePath = "/etc/wsl.conf";
|
|
9152
|
-
let isConfigFileExists = false;
|
|
9153
|
-
try {
|
|
9154
|
-
await fs4.access(configFilePath, fsConstants.F_OK);
|
|
9155
|
-
isConfigFileExists = true;
|
|
9156
|
-
} catch {
|
|
9157
|
-
}
|
|
9158
|
-
if (!isConfigFileExists) {
|
|
9159
|
-
return defaultMountPoint;
|
|
9160
|
-
}
|
|
9161
|
-
const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
|
|
9162
|
-
const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
|
|
9163
|
-
if (!configMountPoint) {
|
|
9164
|
-
return defaultMountPoint;
|
|
9165
|
-
}
|
|
9166
|
-
mountPoint = configMountPoint.groups.mountPoint.trim();
|
|
9167
|
-
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
9168
|
-
return mountPoint;
|
|
9169
|
-
};
|
|
9170
|
-
})();
|
|
9171
|
-
var pTryEach = async (array, mapper) => {
|
|
9172
|
-
let latestError;
|
|
9173
|
-
for (const item of array) {
|
|
9174
|
-
try {
|
|
9175
|
-
return await mapper(item);
|
|
9176
|
-
} catch (error) {
|
|
9177
|
-
latestError = error;
|
|
9178
|
-
}
|
|
9179
|
-
}
|
|
9180
|
-
throw latestError;
|
|
9181
|
-
};
|
|
9182
|
-
var baseOpen = async (options) => {
|
|
9183
|
-
options = {
|
|
9184
|
-
wait: false,
|
|
9185
|
-
background: false,
|
|
9186
|
-
newInstance: false,
|
|
9187
|
-
allowNonzeroExitCode: false,
|
|
9188
|
-
...options
|
|
9189
|
-
};
|
|
9190
|
-
if (Array.isArray(options.app)) {
|
|
9191
|
-
return pTryEach(options.app, (singleApp) => baseOpen({
|
|
9192
|
-
...options,
|
|
9193
|
-
app: singleApp
|
|
9194
|
-
}));
|
|
9195
|
-
}
|
|
9196
|
-
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
9197
|
-
appArguments = [...appArguments];
|
|
9198
|
-
if (Array.isArray(app)) {
|
|
9199
|
-
return pTryEach(app, (appName) => baseOpen({
|
|
9200
|
-
...options,
|
|
9201
|
-
app: {
|
|
9202
|
-
name: appName,
|
|
9203
|
-
arguments: appArguments
|
|
9204
|
-
}
|
|
9205
|
-
}));
|
|
9206
|
-
}
|
|
9207
|
-
if (app === "browser" || app === "browserPrivate") {
|
|
9208
|
-
const ids = {
|
|
9209
|
-
"com.google.chrome": "chrome",
|
|
9210
|
-
"google-chrome.desktop": "chrome",
|
|
9211
|
-
"org.mozilla.firefox": "firefox",
|
|
9212
|
-
"firefox.desktop": "firefox",
|
|
9213
|
-
"com.microsoft.msedge": "edge",
|
|
9214
|
-
"com.microsoft.edge": "edge",
|
|
9215
|
-
"microsoft-edge.desktop": "edge"
|
|
9216
|
-
};
|
|
9217
|
-
const flags = {
|
|
9218
|
-
chrome: "--incognito",
|
|
9219
|
-
firefox: "--private-window",
|
|
9220
|
-
edge: "--inPrivate"
|
|
9221
|
-
};
|
|
9222
|
-
const browser = await defaultBrowser2();
|
|
9223
|
-
if (browser.id in ids) {
|
|
9224
|
-
const browserName = ids[browser.id];
|
|
9225
|
-
if (app === "browserPrivate") {
|
|
9226
|
-
appArguments.push(flags[browserName]);
|
|
9227
|
-
}
|
|
9228
|
-
return baseOpen({
|
|
9229
|
-
...options,
|
|
9230
|
-
app: {
|
|
9231
|
-
name: apps[browserName],
|
|
9232
|
-
arguments: appArguments
|
|
9233
|
-
}
|
|
9234
|
-
});
|
|
9235
|
-
}
|
|
9236
|
-
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
9237
|
-
}
|
|
9238
|
-
let command;
|
|
9239
|
-
const cliArguments = [];
|
|
9240
|
-
const childProcessOptions = {};
|
|
9241
|
-
if (platform === "darwin") {
|
|
9242
|
-
command = "open";
|
|
9243
|
-
if (options.wait) {
|
|
9244
|
-
cliArguments.push("--wait-apps");
|
|
9245
|
-
}
|
|
9246
|
-
if (options.background) {
|
|
9247
|
-
cliArguments.push("--background");
|
|
9248
|
-
}
|
|
9249
|
-
if (options.newInstance) {
|
|
9250
|
-
cliArguments.push("--new");
|
|
9251
|
-
}
|
|
9252
|
-
if (app) {
|
|
9253
|
-
cliArguments.push("-a", app);
|
|
9254
|
-
}
|
|
9255
|
-
} else if (platform === "win32" || is_wsl_default && !isInsideContainer() && !app) {
|
|
9256
|
-
const mountPoint = await getWslDrivesMountPoint();
|
|
9257
|
-
command = is_wsl_default ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process6.env.SYSTEMROOT || process6.env.windir || "C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
|
|
9258
|
-
cliArguments.push("-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand");
|
|
9259
|
-
if (!is_wsl_default) {
|
|
9260
|
-
childProcessOptions.windowsVerbatimArguments = true;
|
|
9261
|
-
}
|
|
9262
|
-
const encodedArguments = ["Start"];
|
|
9263
|
-
if (options.wait) {
|
|
9264
|
-
encodedArguments.push("-Wait");
|
|
9265
|
-
}
|
|
9266
|
-
if (app) {
|
|
9267
|
-
encodedArguments.push(`"\`"${app}\`""`);
|
|
9268
|
-
if (options.target) {
|
|
9269
|
-
appArguments.push(options.target);
|
|
9270
|
-
}
|
|
9271
|
-
} else if (options.target) {
|
|
9272
|
-
encodedArguments.push(`"${options.target}"`);
|
|
9273
|
-
}
|
|
9274
|
-
if (appArguments.length > 0) {
|
|
9275
|
-
appArguments = appArguments.map((argument) => `"\`"${argument}\`""`);
|
|
9276
|
-
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
9277
|
-
}
|
|
9278
|
-
options.target = Buffer2.from(encodedArguments.join(" "), "utf16le").toString("base64");
|
|
9279
|
-
} else {
|
|
9280
|
-
if (app) {
|
|
9281
|
-
command = app;
|
|
9282
|
-
} else {
|
|
9283
|
-
const isBundled = !__dirname2 || __dirname2 === "/";
|
|
9284
|
-
let exeLocalXdgOpen = false;
|
|
9285
|
-
try {
|
|
9286
|
-
await fs4.access(localXdgOpenPath, fsConstants.X_OK);
|
|
9287
|
-
exeLocalXdgOpen = true;
|
|
9288
|
-
} catch {
|
|
9289
|
-
}
|
|
9290
|
-
const useSystemXdgOpen = process6.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
|
|
9291
|
-
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
9292
|
-
}
|
|
9293
|
-
if (appArguments.length > 0) {
|
|
9294
|
-
cliArguments.push(...appArguments);
|
|
9295
|
-
}
|
|
9296
|
-
if (!options.wait) {
|
|
9297
|
-
childProcessOptions.stdio = "ignore";
|
|
9298
|
-
childProcessOptions.detached = true;
|
|
9299
|
-
}
|
|
9300
|
-
}
|
|
9301
|
-
if (platform === "darwin" && appArguments.length > 0) {
|
|
9302
|
-
cliArguments.push("--args", ...appArguments);
|
|
9303
|
-
}
|
|
9304
|
-
if (options.target) {
|
|
9305
|
-
cliArguments.push(options.target);
|
|
9306
|
-
}
|
|
9307
|
-
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
9308
|
-
if (options.wait) {
|
|
9309
|
-
return new Promise((resolve, reject) => {
|
|
9310
|
-
subprocess.once("error", reject);
|
|
9311
|
-
subprocess.once("close", (exitCode) => {
|
|
9312
|
-
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
9313
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
9314
|
-
return;
|
|
9315
|
-
}
|
|
9316
|
-
resolve(subprocess);
|
|
9317
|
-
});
|
|
9318
|
-
});
|
|
9319
|
-
}
|
|
9320
|
-
subprocess.unref();
|
|
9321
|
-
return subprocess;
|
|
9322
|
-
};
|
|
9323
|
-
var open = (target, options) => {
|
|
9324
|
-
if (typeof target !== "string") {
|
|
9325
|
-
throw new TypeError("Expected a `target`");
|
|
9326
|
-
}
|
|
9327
|
-
return baseOpen({
|
|
9328
|
-
...options,
|
|
9329
|
-
target
|
|
9330
|
-
});
|
|
9331
|
-
};
|
|
9332
|
-
var apps = {};
|
|
9333
|
-
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
9334
|
-
darwin: "google chrome",
|
|
9335
|
-
win32: "chrome",
|
|
9336
|
-
linux: ["google-chrome", "google-chrome-stable", "chromium"]
|
|
9337
|
-
}, {
|
|
9338
|
-
wsl: {
|
|
9339
|
-
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
9340
|
-
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
9341
|
-
}
|
|
9342
|
-
}));
|
|
9343
|
-
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
9344
|
-
darwin: "firefox",
|
|
9345
|
-
win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
|
|
9346
|
-
linux: "firefox"
|
|
9347
|
-
}, {
|
|
9348
|
-
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
9349
|
-
}));
|
|
9350
|
-
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
9351
|
-
darwin: "microsoft edge",
|
|
9352
|
-
win32: "msedge",
|
|
9353
|
-
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
9354
|
-
}, {
|
|
9355
|
-
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
9356
|
-
}));
|
|
9357
|
-
defineLazyProperty(apps, "browser", () => "browser");
|
|
9358
|
-
defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
|
|
9359
|
-
var open_default = open;
|
|
9360
8929
|
|
|
9361
8930
|
// server/styles.tsx
|
|
9362
8931
|
var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
@@ -9508,7 +9077,7 @@ async function startDevServer() {
|
|
|
9508
9077
|
}
|
|
9509
9078
|
let app = null;
|
|
9510
9079
|
try {
|
|
9511
|
-
app = (await vite.ssrLoadModule(
|
|
9080
|
+
app = (await vite.ssrLoadModule(path.join(appDir, "bootstrap.ts"))).app;
|
|
9512
9081
|
} catch (err) {
|
|
9513
9082
|
return new Response(renderErrorPage(err), {
|
|
9514
9083
|
status: 500,
|
|
@@ -9556,7 +9125,6 @@ async function startDevServer() {
|
|
|
9556
9125
|
port: process.env.PORT || 5173
|
|
9557
9126
|
});
|
|
9558
9127
|
console.log(`Server started on http://localhost:${process.env.PORT || 5173}`);
|
|
9559
|
-
await open_default(`http://localhost:${process.env.PORT || 5173}`);
|
|
9560
9128
|
vite.watcher.on("change", async (file) => {
|
|
9561
9129
|
if (file.includes("app/views")) {
|
|
9562
9130
|
return;
|
|
@@ -9570,7 +9138,7 @@ async function startDevServer() {
|
|
|
9570
9138
|
return server;
|
|
9571
9139
|
}
|
|
9572
9140
|
var rootDir = process.cwd();
|
|
9573
|
-
var appDir =
|
|
9141
|
+
var appDir = path.join(rootDir, "app");
|
|
9574
9142
|
|
|
9575
9143
|
// server/prod.ts
|
|
9576
9144
|
import {join} from "path";
|
|
@@ -10444,7 +10012,7 @@ var appDir2 = join(rootDir2, "app");
|
|
|
10444
10012
|
var distDir = join(rootDir2, "dist");
|
|
10445
10013
|
|
|
10446
10014
|
// bin/createRollupInput.ts
|
|
10447
|
-
import
|
|
10015
|
+
import path2 from "path";
|
|
10448
10016
|
|
|
10449
10017
|
// client/helpers/flattenComponentTree.ts
|
|
10450
10018
|
function flattenComponentTree(componentTree) {
|
|
@@ -10457,7 +10025,7 @@ function flattenComponentTree(componentTree) {
|
|
|
10457
10025
|
|
|
10458
10026
|
// bin/createRollupInput.ts
|
|
10459
10027
|
async function createRollupInput_default() {
|
|
10460
|
-
const { app } = await import(
|
|
10028
|
+
const { app } = await import(path2.resolve("./app/bootstrap.ts"));
|
|
10461
10029
|
const entries = app.getComponentTree();
|
|
10462
10030
|
function getEntries(componentTree) {
|
|
10463
10031
|
const out = [];
|
|
@@ -10499,8 +10067,8 @@ program.command("dev").action(async () => {
|
|
|
10499
10067
|
program.command("build").action(async () => {
|
|
10500
10068
|
process.env.NODE_ENV = "production";
|
|
10501
10069
|
await createRollupInput_default();
|
|
10502
|
-
const rootDir3 =
|
|
10503
|
-
const appDir3 =
|
|
10070
|
+
const rootDir3 = path3.resolve(process.cwd());
|
|
10071
|
+
const appDir3 = path3.join(rootDir3, "app");
|
|
10504
10072
|
console.log("Building client...");
|
|
10505
10073
|
await $`vite build --outDir dist/client`;
|
|
10506
10074
|
console.log("Building server...");
|