mnfst-publish 0.1.13 → 0.1.15
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 +2 -2
- package/manifest.publish.mjs +17 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,5 +15,5 @@ project, zips it gitignore-aware, uploads it, and prints the live URL.
|
|
|
15
15
|
Flags: `--staging` / `--production` (default), `--no-render`, `--promote`,
|
|
16
16
|
`--source render|spa` (auto-detected), `--key <key>`, `--mcp <url>`.
|
|
17
17
|
|
|
18
|
-
Zero dependencies, cross-platform (pure-Node zip). `.env`, `.env.*`,
|
|
19
|
-
|
|
18
|
+
Zero dependencies, cross-platform (pure-Node zip). `.env`, `.env.*`, `.claude/`,
|
|
19
|
+
keys and credential files are never uploaded.
|
package/manifest.publish.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { deflateRawSync } from 'node:zlib';
|
|
|
12
12
|
import { readFileSync, existsSync, statSync, readdirSync } from 'node:fs';
|
|
13
13
|
import { join, dirname, relative, sep } from 'node:path';
|
|
14
14
|
|
|
15
|
-
const DEFAULT_MCP = 'https://
|
|
15
|
+
const DEFAULT_MCP = 'https://mcp.manifestx.dev/mcp';
|
|
16
16
|
|
|
17
17
|
function log(msg) {
|
|
18
18
|
process.stdout.write(msg + '\n');
|
|
@@ -191,15 +191,20 @@ async function callTool(url, key, name, args) {
|
|
|
191
191
|
|
|
192
192
|
// Never ship local config or secrets — matched at ANY depth (by path segment /
|
|
193
193
|
// basename), not just the project root. A nested `api/.env` or `sub/.claude/…`
|
|
194
|
-
// must be excluded too.
|
|
194
|
+
// must be excluded too. Mirrors the server's ingest drop list.
|
|
195
195
|
const EXCLUDED_DIRS = new Set(['.git', 'node_modules', '.claude']);
|
|
196
|
+
const SECRET_DIRS = new Set(['.ssh', '.aws', '.wrangler']);
|
|
197
|
+
const SECRET_FILES = new Set([
|
|
198
|
+
'.npmrc', '.yarnrc', '.yarnrc.yml', '.pypirc', '.netrc', '_netrc', '.git-credentials', '.htpasswd',
|
|
199
|
+
'.dev.vars', 'id_rsa', 'id_dsa', 'id_ecdsa', 'id_ed25519', '.ds_store',
|
|
200
|
+
]);
|
|
196
201
|
export function isExcludedPath(rel) {
|
|
197
|
-
const parts = rel.split('/');
|
|
198
|
-
if (parts.some((p) => EXCLUDED_DIRS.has(p))) return true;
|
|
202
|
+
const parts = rel.toLowerCase().split('/');
|
|
203
|
+
if (parts.some((p) => EXCLUDED_DIRS.has(p) || SECRET_DIRS.has(p))) return true;
|
|
199
204
|
const base = parts[parts.length - 1];
|
|
200
205
|
if (base === '.env' || base.startsWith('.env.')) return true; // .env, .env.local, .env.prod …
|
|
201
|
-
if (base
|
|
202
|
-
if (/\.(pem|key|p12|pfx)$/i.test(base)) return true;
|
|
206
|
+
if (SECRET_FILES.has(base) || base.startsWith('.dev.vars.') || base.startsWith('env.local.')) return true;
|
|
207
|
+
if (/\.(pem|key|p12|pfx|jks|keystore)$/i.test(base)) return true;
|
|
203
208
|
return false;
|
|
204
209
|
}
|
|
205
210
|
|
|
@@ -708,8 +713,12 @@ export async function main() {
|
|
|
708
713
|
try {
|
|
709
714
|
const u = new URL(uploadUrl);
|
|
710
715
|
const mcpHost = new URL(url).host;
|
|
711
|
-
|
|
712
|
-
|
|
716
|
+
// Same host as the configured MCP, or the canonical first-party host — a
|
|
717
|
+
// project whose .mcp.json still points at the legacy workers.dev URL gets
|
|
718
|
+
// upload links minted on mcp.manifestx.dev during the domain migration.
|
|
719
|
+
const canonical = new URL(DEFAULT_MCP).host;
|
|
720
|
+
if (u.protocol !== 'https:' || (u.host !== mcpHost && u.host !== canonical)) {
|
|
721
|
+
fail(`refusing to upload to an unexpected endpoint (${u.protocol}//${u.host}); expected https://${mcpHost} or https://${canonical}.`);
|
|
713
722
|
}
|
|
714
723
|
} catch {
|
|
715
724
|
fail('the upload URL returned by the server was malformed.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnfst-publish",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "One-command managed publishing for Manifest projects — render, zip, upload, live URL.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/
|
|
33
|
+
"url": "git+https://github.com/Manifest-X/Manifest.git",
|
|
34
34
|
"directory": "packages/publish"
|
|
35
35
|
}
|
|
36
36
|
}
|