mnfst-publish 0.1.12 → 0.1.14

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.
@@ -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://manifest-mcp.manifest-c5f.workers.dev/mcp';
15
+ const DEFAULT_MCP = 'https://mcp.manifestx.dev/mcp';
16
16
 
17
17
  function log(msg) {
18
18
  process.stdout.write(msg + '\n');
@@ -532,11 +532,15 @@ export function stampManifests(root, rels) {
532
532
  continue; // invalid JSON — ship as-is
533
533
  }
534
534
  const dir = mfRel.includes('/') ? mfRel.slice(0, mfRel.lastIndexOf('/') + 1) : '';
535
- const paths = [...(mf.preloadedComponents || []), ...(mf.components || [])]
535
+ const listed = [...(mf.preloadedComponents || []), ...(mf.components || [])]
536
536
  .filter((p) => typeof p === 'string' && !p.startsWith('http'))
537
537
  .map((p) => dir + p.replace(/^\/+/, ''))
538
- .filter((p) => relSet.has(p))
539
- .sort();
538
+ .filter((p) => relSet.has(p));
539
+ // Convention components (components/<name>.html, unlisted) load with the
540
+ // same ?v= stamp — hash them too so their edits bust caches.
541
+ const conventionRe = new RegExp('^' + dir.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + 'components/[^/]+\\.html$');
542
+ const convention = [...relSet].filter((p) => conventionRe.test(p));
543
+ const paths = [...new Set([...listed, ...convention])].sort();
540
544
  if (!paths.length) continue;
541
545
  const hash = createHash('sha256');
542
546
  for (const p of paths) {
@@ -704,8 +708,12 @@ export async function main() {
704
708
  try {
705
709
  const u = new URL(uploadUrl);
706
710
  const mcpHost = new URL(url).host;
707
- if (u.protocol !== 'https:' || u.host !== mcpHost) {
708
- fail(`refusing to upload to an unexpected endpoint (${u.protocol}//${u.host}); expected https://${mcpHost}.`);
711
+ // Same host as the configured MCP, or the canonical first-party host — a
712
+ // project whose .mcp.json still points at the legacy workers.dev URL gets
713
+ // upload links minted on mcp.manifestx.dev during the domain migration.
714
+ const canonical = new URL(DEFAULT_MCP).host;
715
+ if (u.protocol !== 'https:' || (u.host !== mcpHost && u.host !== canonical)) {
716
+ fail(`refusing to upload to an unexpected endpoint (${u.protocol}//${u.host}); expected https://${mcpHost} or https://${canonical}.`);
709
717
  }
710
718
  } catch {
711
719
  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.12",
3
+ "version": "0.1.14",
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/andrewmatlock/Manifest.git",
33
+ "url": "git+https://github.com/Manifest-X/Manifest.git",
34
34
  "directory": "packages/publish"
35
35
  }
36
36
  }