@file-viewer/asset-installer 3.2.1 → 3.3.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 +2 -4
- package/README.md +2 -4
- package/README.zh-CN.md +5 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -7
- package/package.json +3 -2
package/README.en.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# @file-viewer/asset-installer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.md) · [简体中文](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
|
|
5
|
+
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.
|
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# @file-viewer/asset-installer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.md) · [简体中文](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The package's own license is Apache-2.0. Included third-party notices apply to their respective components.
|
|
5
|
+
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.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @file-viewer/asset-installer
|
|
2
|
+
|
|
3
|
+
[English](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.md) · [简体中文](https://github.com/flyfish-dev/file-viewer/blob/main/packages/tools/asset-installer/README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
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.
|
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.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Small transactional installer shared by independently shipped File Viewer capability asset packs.",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"dist/index.js",
|
|
25
25
|
"LICENSE",
|
|
26
26
|
"README.en.md",
|
|
27
|
-
"README.md"
|
|
27
|
+
"README.md",
|
|
28
|
+
"README.zh-CN.md"
|
|
28
29
|
],
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=20"
|