paperclipai 0.2.2 → 0.2.4
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/README.md +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="#quickstart"><strong>Quickstart</strong></a> ·
|
|
7
|
-
<a href="https://paperclip.
|
|
7
|
+
<a href="https://paperclip.ing/docs"><strong>Docs</strong></a> ·
|
|
8
8
|
<a href="https://github.com/paperclipai/paperclip"><strong>GitHub</strong></a> ·
|
|
9
9
|
<a href="https://discord.gg/paperclip"><strong>Discord</strong></a>
|
|
10
10
|
</p>
|
package/dist/index.js
CHANGED
|
@@ -4409,6 +4409,12 @@ function formatError(err) {
|
|
|
4409
4409
|
return String(err);
|
|
4410
4410
|
}
|
|
4411
4411
|
}
|
|
4412
|
+
function isModuleNotFoundError(err) {
|
|
4413
|
+
if (!(err instanceof Error)) return false;
|
|
4414
|
+
const code = err.code;
|
|
4415
|
+
if (code === "ERR_MODULE_NOT_FOUND") return true;
|
|
4416
|
+
return err.message.includes("Cannot find module");
|
|
4417
|
+
}
|
|
4412
4418
|
function maybeEnableUiDevMiddleware(entrypoint) {
|
|
4413
4419
|
if (process.env.PAPERCLIP_UI_DEV_MIDDLEWARE !== void 0) return;
|
|
4414
4420
|
const normalized = entrypoint.replaceAll("\\", "/");
|
|
@@ -4427,9 +4433,15 @@ async function importServerEntry() {
|
|
|
4427
4433
|
try {
|
|
4428
4434
|
await import("@paperclipai/server");
|
|
4429
4435
|
} catch (err) {
|
|
4430
|
-
|
|
4431
|
-
|
|
4436
|
+
if (isModuleNotFoundError(err)) {
|
|
4437
|
+
throw new Error(
|
|
4438
|
+
`Could not locate a Paperclip server entrypoint.
|
|
4432
4439
|
Tried: ${devEntry}, @paperclipai/server
|
|
4440
|
+
${formatError(err)}`
|
|
4441
|
+
);
|
|
4442
|
+
}
|
|
4443
|
+
throw new Error(
|
|
4444
|
+
`Paperclip server failed to start.
|
|
4433
4445
|
${formatError(err)}`
|
|
4434
4446
|
);
|
|
4435
4447
|
}
|
|
@@ -6983,7 +6995,7 @@ function applyDataDirOverride(options, support = {}) {
|
|
|
6983
6995
|
// src/index.ts
|
|
6984
6996
|
var program = new Command();
|
|
6985
6997
|
var DATA_DIR_OPTION_HELP = "Paperclip data directory root (isolates state from ~/.paperclip)";
|
|
6986
|
-
program.name("paperclipai").description("Paperclip CLI \u2014 setup, diagnose, and configure your instance").version("0.2.
|
|
6998
|
+
program.name("paperclipai").description("Paperclip CLI \u2014 setup, diagnose, and configure your instance").version("0.2.4");
|
|
6987
6999
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
6988
7000
|
const options = actionCommand.optsWithGlobals();
|
|
6989
7001
|
const optionNames = new Set(actionCommand.options.map((option) => option.attributeName()));
|