@apprua/mcp 1.0.0 → 1.0.1
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/THIRD_PARTY_LICENSES.txt +1 -1
- package/dist/server.mjs +15 -11
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Apprua connector 1.0.
|
|
1
|
+
Apprua connector 1.0.1. Copyright the Apprua authors. License: AGPL-3.0-only.
|
|
2
2
|
This file also contains the following libraries, each under its own license:
|
|
3
3
|
|
|
4
4
|
@isaacs/fs-minipass 4.0.1 (ISC)
|
package/dist/server.mjs
CHANGED
|
@@ -8107,7 +8107,7 @@ var require_ignore = __commonJS({
|
|
|
8107
8107
|
});
|
|
8108
8108
|
|
|
8109
8109
|
// src/server.ts
|
|
8110
|
-
import { existsSync as existsSync2, mkdirSync, mkdtempSync as mkdtempSync2,
|
|
8110
|
+
import { existsSync as existsSync2, mkdirSync, mkdtempSync as mkdtempSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
|
|
8111
8111
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
8112
8112
|
import { dirname, join as join2, resolve as resolve2 } from "node:path";
|
|
8113
8113
|
|
|
@@ -40552,6 +40552,17 @@ import { readdir } from "node:fs/promises";
|
|
|
40552
40552
|
import { homedir, tmpdir } from "node:os";
|
|
40553
40553
|
import { join, parse as parse3, relative, resolve, sep } from "node:path";
|
|
40554
40554
|
var STATE_FILE = ".apprua.json";
|
|
40555
|
+
var APP_NAME_RE = /^[a-z][a-z0-9-]{2,30}$/;
|
|
40556
|
+
function readState(dir) {
|
|
40557
|
+
try {
|
|
40558
|
+
const s3 = JSON.parse(readFileSync2(join(dir, STATE_FILE), "utf8"));
|
|
40559
|
+
if (typeof s3?.app !== "string" || !APP_NAME_RE.test(s3.app)) return {};
|
|
40560
|
+
if (typeof s3?.commit !== "string" || !/^[0-9a-f]{7,40}$/.test(s3.commit)) return { app: s3.app };
|
|
40561
|
+
return { app: s3.app, commit: s3.commit };
|
|
40562
|
+
} catch {
|
|
40563
|
+
return {};
|
|
40564
|
+
}
|
|
40565
|
+
}
|
|
40555
40566
|
var ALWAYS_EXCLUDED = [
|
|
40556
40567
|
"node_modules/",
|
|
40557
40568
|
".git/",
|
|
@@ -40660,7 +40671,7 @@ async function packFolder(root) {
|
|
|
40660
40671
|
|
|
40661
40672
|
// src/server.ts
|
|
40662
40673
|
var BRAND = process.env.APPRUA_BRAND ?? "Apprua";
|
|
40663
|
-
var server = new McpServer({ name: "apprua", version: "1.0.
|
|
40674
|
+
var server = new McpServer({ name: "apprua", version: "1.0.1" });
|
|
40664
40675
|
var ok = (text) => ({ content: [{ type: "text", text }] });
|
|
40665
40676
|
var fail = (text) => ({ content: [{ type: "text", text }], isError: true });
|
|
40666
40677
|
var json2 = (v2) => JSON.stringify(v2, null, 2);
|
|
@@ -40673,14 +40684,7 @@ Details: ${json2(e.details)}` : ""}`);
|
|
|
40673
40684
|
return fail(`Error: ${e.message}`);
|
|
40674
40685
|
}
|
|
40675
40686
|
}
|
|
40676
|
-
var appName = external_exports.string().regex(
|
|
40677
|
-
var readState = (dir) => {
|
|
40678
|
-
try {
|
|
40679
|
-
return JSON.parse(readFileSync3(join2(dir, STATE_FILE), "utf8"));
|
|
40680
|
-
} catch {
|
|
40681
|
-
return {};
|
|
40682
|
-
}
|
|
40683
|
-
};
|
|
40687
|
+
var appName = external_exports.string().regex(APP_NAME_RE).describe('App name = sub-domain, e.g. "my-notes" (lowercase letters, digits, dashes)');
|
|
40684
40688
|
var saveState = (dir, r) => {
|
|
40685
40689
|
if (r.commit) writeFileSync(join2(dir, STATE_FILE), json2({ app: r.app, url: r.url, commit: r.commit }));
|
|
40686
40690
|
};
|
|
@@ -40932,7 +40936,7 @@ if (me2.role === "admin") {
|
|
|
40932
40936
|
await server.connect(new StdioServerTransport());
|
|
40933
40937
|
|
|
40934
40938
|
/*
|
|
40935
|
-
Apprua connector 1.0.
|
|
40939
|
+
Apprua connector 1.0.1. Copyright the Apprua authors. License: AGPL-3.0-only.
|
|
40936
40940
|
This file also contains the following libraries, each under its own license:
|
|
40937
40941
|
|
|
40938
40942
|
@isaacs/fs-minipass 4.0.1 (ISC)
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apprua/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"mcpName": "io.github.apprua/apprua",
|
|
4
5
|
"description": "Apprua connector for AI apps (MCP): publish the apps you build with AI on your own Apprua server, from Claude, Codex, Cursor, VS Code and any app that supports MCP.",
|
|
5
6
|
"author": "The Apprua authors",
|
|
6
7
|
"license": "AGPL-3.0-only",
|