@everystack/cli 0.2.29 → 0.2.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/cli",
3
- "version": "0.2.29",
3
+ "version": "0.2.31",
4
4
  "description": "CLI and OTA updates for Expo apps on everystack",
5
5
  "license": "AGPL-3.0-only",
6
6
  "publishConfig": {
@@ -6,7 +6,7 @@ import { pipeline } from 'node:stream/promises';
6
6
  import { createWriteStream } from 'node:fs';
7
7
  import { spawn } from 'node:child_process';
8
8
  import { resolveConfig, type CliConfig } from '../config.js';
9
- import { uploadToS3, headS3, listS3, deleteS3, invokeAction } from '../aws.js';
9
+ import { uploadToS3, headS3, invokeAction } from '../aws.js';
10
10
  import { step, success, warn, fail, info } from '../output.js';
11
11
  import { exportApp } from '../utils/export.js';
12
12
  import { walkDirectory } from '../utils/walk.js';
@@ -486,7 +486,9 @@ export async function updateCommand(flags: UpdateFlags & Record<string, string>)
486
486
  }
487
487
  }
488
488
 
489
- // Write manifest (no-cache so CDN always revalidates)
489
+ // Write new manifest (no-cache so CDN always revalidates).
490
+ // Old fingerprinted assets are intentionally kept — emails and other
491
+ // rendered content reference them forever. Storage cost is negligible.
490
492
  const manifest = {
491
493
  version: 1,
492
494
  generatedAt: new Date().toISOString(),
@@ -501,19 +503,6 @@ export async function updateCommand(flags: UpdateFlags & Record<string, string>)
501
503
  'no-cache',
502
504
  );
503
505
 
504
- // Prune stale fingerprinted files
505
- const FINGERPRINT_RE = /-[0-9a-f]{8}\.[^.]+$/;
506
- const allKeys = await listS3(config.region, config.mediaBucket!);
507
- const currentValues = new Set(Object.values(manifestFiles));
508
- currentValues.add('media-manifest.json');
509
- const staleKeys = allKeys.filter(key =>
510
- FINGERPRINT_RE.test(key) && !currentValues.has(key)
511
- );
512
- if (staleKeys.length > 0) {
513
- await deleteS3(config.region, config.mediaBucket!, staleKeys);
514
- info(`Pruned ${staleKeys.length} stale media asset(s)`);
515
- }
516
-
517
506
  if (mediaUploaded > 0 || mediaSkipped > 0) {
518
507
  success(`Media: ${mediaUploaded} new, ${mediaSkipped} unchanged (skipped)`);
519
508
  }