nappup 1.8.0 → 1.8.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -4
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "git+https://github.com/44billion/nappup.git"
7
7
  },
8
8
  "license": "MIT",
9
- "version": "1.8.0",
9
+ "version": "1.8.1",
10
10
  "description": "Nostr App Uploader",
11
11
  "type": "module",
12
12
  "scripts": {
package/src/index.js CHANGED
@@ -340,7 +340,7 @@ async function uploadSiteManifest ({ dTag, channel, fileMetadata, uploadService,
340
340
  draft: 35130 // vibe coded preview
341
341
  }[channel] ?? 35128
342
342
 
343
- const pathTags = fileMetadata.map(v => ['path', v.rootHash, v.filename, v.mimeType])
343
+ const pathTags = fileMetadata.map(v => ['path', v.filename, v.rootHash])
344
344
  const tags = [
345
345
  ['d', dTag],
346
346
  ...pathTags,
@@ -369,11 +369,11 @@ async function uploadSiteManifest ({ dTag, channel, fileMetadata, uploadService,
369
369
 
370
370
  if (!shouldReupload && mostRecentEvent) {
371
371
  const recentPathTags = mostRecentEvent.tags
372
- .filter(t => t[0] === 'path' && t[2] !== '.well-known/napp.json')
372
+ .filter(t => t[0] === 'path' && t[1] !== '.well-known/napp.json')
373
373
  .sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
374
374
 
375
375
  const currentPathTags = pathTags
376
- .filter(t => t[2] !== '.well-known/napp.json')
376
+ .filter(t => t[1] !== '.well-known/napp.json')
377
377
  .sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
378
378
 
379
379
  const recentServiceTag = mostRecentEvent.tags.find(t => t[0] === 'service')
@@ -381,7 +381,7 @@ async function uploadSiteManifest ({ dTag, channel, fileMetadata, uploadService,
381
381
 
382
382
  const isSame = !serviceChanged && currentPathTags.length === recentPathTags.length && currentPathTags.every((t, i) => {
383
383
  const rt = recentPathTags[i]
384
- return rt.length >= 4 && rt[1] === t[1] && rt[2] === t[2] && rt[3] === t[3]
384
+ return rt.length >= 3 && rt[1] === t[1] && rt[2] === t[2]
385
385
  })
386
386
 
387
387
  if (isSame) {