@floegence/floe-webapp-core 0.78.4 → 0.78.8

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": "@floegence/floe-webapp-core",
3
- "version": "0.78.4",
3
+ "version": "0.78.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -6,21 +6,20 @@ import { readdirSync, readFileSync } from 'node:fs';
6
6
  const require = createRequire(import.meta.url);
7
7
  const root = dirname(require.resolve('pdfjs-dist/package.json'));
8
8
  const version = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')).version;
9
- const prefix = `pdf-assets/${version}/`;
9
+ const prefix = `pdf-assets/${version}/legacy/`;
10
10
  const files = new Map();
11
- function collect(directory) {
11
+ function collect(directory, outputDirectory = directory) {
12
12
  for (const entry of readdirSync(join(root, directory), { withFileTypes: true })) {
13
13
  const file = join(directory, entry.name);
14
- if (entry.isDirectory()) collect(file);
15
- else files.set(file.replaceAll('\\', '/'), join(root, file));
14
+ const output = join(outputDirectory, entry.name);
15
+ if (entry.isDirectory()) collect(file, output);
16
+ else files.set(output.replaceAll('\\', '/'), join(root, file));
16
17
  }
17
18
  }
18
- for (const directory of ['cmaps', 'standard_fonts', 'wasm', 'iccs', 'web/images']) collect(directory);
19
- files.set('pdf.worker.min.mjs', join(root, 'build/pdf.worker.min.mjs'));
19
+ for (const directory of ['cmaps', 'standard_fonts', 'wasm', 'iccs']) collect(directory);
20
+ collect('legacy/web/images', 'images');
21
+ files.set('pdf.worker.min.mjs', join(root, 'legacy/build/pdf.worker.min.mjs'));
20
22
  files.set('LICENSE', join(root, 'LICENSE'));
21
- for (const [name, path] of [...files]) if (name.startsWith('web/')) {
22
- files.delete(name); files.set(name.slice(4), path);
23
- }
24
23
 
25
24
  /** Vite-compatible asset plugin. Keeps workers, CMaps, fonts, codecs and their
26
25
  * original notices self-hosted and versioned, outside the initial JS graph. */