@file-viewer/asset-installer 3.1.1 → 3.2.0

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.en.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # @file-viewer/asset-installer
2
2
 
3
- Public internal helper for independently versioned File Viewer capability asset packs. It performs contained, transactional merges and writes one SHA-256 receipt per asset package. It does not contain renderer assets.
3
+ Runtime package version 3.2.0.
4
+
5
+ Usage and API documentation: https://doc.file-viewer.app/
6
+
7
+ The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # @file-viewer/asset-installer
2
2
 
3
- Internal public helper used by independently versioned capability asset packs. It performs contained, transactional merges and writes per-package SHA-256 receipts. It carries no renderer assets itself.
3
+ Runtime package version 3.2.0.
4
+
5
+ Usage and API documentation: https://doc.file-viewer.app/
6
+
7
+ The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
package/dist/index.d.ts CHANGED
@@ -15,7 +15,6 @@ export interface CapabilityAssetReceiptFile {
15
15
  path: string;
16
16
  size: number;
17
17
  sha256: string;
18
- /** managed includes a path shared by two File Viewer asset owners. */
19
18
  ownership: 'managed' | 'shared';
20
19
  }
21
20
  export interface CapabilityAssetReceipt {
@@ -101,7 +100,6 @@ export declare function uninstallFileViewerCapabilityAssetPack(targetDirInput: s
101
100
  targetDir: string;
102
101
  removedFiles: string[];
103
102
  }>;
104
- /** Shared implementation for the stable bin shipped by each independent asset-owner package. */
105
103
  export declare function runFileViewerAssetPackCli(packRootInput: string, args: string[]): Promise<{
106
104
  help: true;
107
105
  text: string;
package/dist/index.js CHANGED
@@ -48,7 +48,6 @@ const nearestExistingParent = async (path) => {
48
48
  }
49
49
  }
50
50
  };
51
- /** Resolve through the nearest existing ancestor once, then keep every later path inside that canonical root. */
52
51
  const prepareTargetDir = async (targetDirInput) => {
53
52
  const requested = resolve(targetDirInput);
54
53
  const { existing, missing } = await nearestExistingParent(requested);
@@ -184,7 +183,6 @@ const parseLockState = async (path) => {
184
183
  };
185
184
  const restoreQuarantinedLock = async (quarantinePath, originalPath) => {
186
185
  try {
187
- // An atomic no-replace restore cannot overwrite a newer claimant.
188
186
  await link(quarantinePath, originalPath);
189
187
  await rm(quarantinePath, { force: true });
190
188
  }
@@ -223,7 +221,6 @@ const reclaimStaleAuxiliaryLock = async (targetDir, path) => {
223
221
  await restoreQuarantinedLock(quarantinePath, path);
224
222
  }
225
223
  catch {
226
- // Keep the quarantined inode and fail closed if another process won.
227
224
  }
228
225
  }
229
226
  throw error;
@@ -287,9 +284,6 @@ const quarantineStaleAssetLock = async (targetDir, lockPath) => {
287
284
  try {
288
285
  if (!(await parseLockState(lockPath)).stale)
289
286
  return false;
290
- // The reaper claim ensures no second stale branch can race this rename.
291
- // New contenders may create a fresh lock after the rename, but cleanup only
292
- // touches the uniquely named quarantined inode.
293
287
  await rename(lockPath, quarantinePath);
294
288
  await rm(quarantinePath, { force: true });
295
289
  return true;
@@ -1038,7 +1032,6 @@ export async function uninstallFileViewerCapabilityAssetPack(targetDirInput, own
1038
1032
  await releaseAssetLock(lock);
1039
1033
  }
1040
1034
  }
1041
- /** Shared implementation for the stable bin shipped by each independent asset-owner package. */
1042
1035
  export async function runFileViewerAssetPackCli(packRootInput, args) {
1043
1036
  const packRoot = resolve(packRootInput);
1044
1037
  const packageJson = JSON.parse((await readNoFollow(resolve(packRoot, 'package.json'))).toString('utf8'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/asset-installer",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Small transactional installer shared by independently shipped File Viewer capability asset packs.",
@@ -18,14 +18,14 @@
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "files": [
21
- "dist",
22
- "README.md",
23
- "README.en.md"
21
+ "dist/cli.d.ts",
22
+ "dist/cli.js",
23
+ "dist/index.d.ts",
24
+ "dist/index.js",
25
+ "LICENSE",
26
+ "README.en.md",
27
+ "README.md"
24
28
  ],
25
- "devDependencies": {
26
- "@types/node": "^26.5.1",
27
- "typescript": "^6.0.3"
28
- },
29
29
  "engines": {
30
30
  "node": ">=20"
31
31
  },
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
38
- "url": "git+https://github.com/flyfish-dev/file-viewer.git",
39
- "directory": "packages/tools/asset-installer"
38
+ "url": "git+https://github.com/flyfish-dev/file-viewer.git"
40
39
  },
41
40
  "license": "Apache-2.0",
42
- "scripts": {
43
- "build": "tsc -p tsconfig.json && node ../../build-support/ensure-node-bin.mjs packages/tools/asset-installer/dist/cli.js",
44
- "type-check": "tsc -p tsconfig.json --noEmit",
45
- "test": "node --test test/*.test.mjs"
41
+ "fileViewer": {
42
+ "distribution": {
43
+ "schemaVersion": 1,
44
+ "mode": "runtime-only"
45
+ }
46
46
  }
47
- }
47
+ }