feat(smartfs): Integrate @push.rocks/smartfs and wire SmartFileFactory.nodeFs to return a real SmartFs instance
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-11-29 - 13.1.0 - feat(smartfs)
|
||||||
|
Integrate @push.rocks/smartfs and wire SmartFileFactory.nodeFs to return a real SmartFs instance
|
||||||
|
|
||||||
|
- Add runtime dependency @push.rocks/smartfs@^1.1.0 to package.json (previous peerDependency removed).
|
||||||
|
- Export smartfs from ts/plugins.ts so internal modules can access SmartFs and providers.
|
||||||
|
- Implement SmartFileFactory.nodeFs() to instantiate plugins.smartfs.SmartFs with SmartFsProviderNode and return a factory bound to that SmartFs.
|
||||||
|
- Enable factory-created SmartFile/StreamFile/VirtualDirectory instances to use the bound SmartFs for filesystem operations (read/write/streams).
|
||||||
|
|
||||||
## 2025-11-22 - 13.0.1 - fix(smartfile)
|
## 2025-11-22 - 13.0.1 - fix(smartfile)
|
||||||
Stream and filesystem integrations: remove fs-extra, switch to fs/promises.rename, add Web WritableStream compatibility, and use smartFs recursive directory methods; update plugins exports and README.
|
Stream and filesystem integrations: remove fs-extra, switch to fs/promises.rename, add Web WritableStream compatibility, and use smartFs recursive directory methods; update plugins exports and README.
|
||||||
|
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -50,15 +50,8 @@
|
|||||||
"@push.rocks/smartstream": "^3.2.5",
|
"@push.rocks/smartstream": "^3.2.5",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"glob": "^11.0.3",
|
"glob": "^11.0.3",
|
||||||
"js-yaml": "^4.1.0"
|
"js-yaml": "^4.1.0",
|
||||||
},
|
"@push.rocks/smartfs": "^1.1.0"
|
||||||
"peerDependencies": {
|
|
||||||
"@push.rocks/smartfs": "^1.0.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"@push.rocks/smartfs": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.6.4",
|
"@git.zone/tsbuild": "^2.6.4",
|
||||||
|
|||||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -18,7 +18,7 @@ importers:
|
|||||||
specifier: ^1.0.7
|
specifier: ^1.0.7
|
||||||
version: 1.0.7
|
version: 1.0.7
|
||||||
'@push.rocks/smartfs':
|
'@push.rocks/smartfs':
|
||||||
specifier: ^1.0.0
|
specifier: ^1.1.0
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
'@push.rocks/smarthash':
|
'@push.rocks/smarthash':
|
||||||
specifier: ^3.2.3
|
specifier: ^3.2.3
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartfile',
|
name: '@push.rocks/smartfile',
|
||||||
version: '13.0.1',
|
version: '13.1.0',
|
||||||
description: 'High-level file representation classes (SmartFile, StreamFile, VirtualDirectory) for efficient in-memory file management in Node.js using TypeScript. Works seamlessly with @push.rocks/smartfs for filesystem operations.'
|
description: 'High-level file representation classes (SmartFile, StreamFile, VirtualDirectory) for efficient in-memory file management in Node.js using TypeScript. Works seamlessly with @push.rocks/smartfs for filesystem operations.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ export class SmartFileFactory {
|
|||||||
* Creates a default factory using Node.js filesystem provider
|
* Creates a default factory using Node.js filesystem provider
|
||||||
*/
|
*/
|
||||||
public static nodeFs(): SmartFileFactory {
|
public static nodeFs(): SmartFileFactory {
|
||||||
// Temporarily using a placeholder - will be replaced with actual SmartFs initialization
|
const smartFs = new plugins.smartfs.SmartFs(new plugins.smartfs.SmartFsProviderNode());
|
||||||
// const smartFs = new SmartFs(new SmartFsProviderNode());
|
|
||||||
const smartFs = null; // Placeholder
|
|
||||||
return new SmartFileFactory(smartFs);
|
return new SmartFileFactory(smartFs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export { fs, fsPromises, path, stream };
|
|||||||
import * as lik from '@push.rocks/lik';
|
import * as lik from '@push.rocks/lik';
|
||||||
import * as smartfileInterfaces from '@push.rocks/smartfile-interfaces';
|
import * as smartfileInterfaces from '@push.rocks/smartfile-interfaces';
|
||||||
import * as smartdelay from '@push.rocks/smartdelay';
|
import * as smartdelay from '@push.rocks/smartdelay';
|
||||||
|
import * as smartfs from '@push.rocks/smartfs';
|
||||||
import * as smarthash from '@push.rocks/smarthash';
|
import * as smarthash from '@push.rocks/smarthash';
|
||||||
import * as smartjson from '@push.rocks/smartjson';
|
import * as smartjson from '@push.rocks/smartjson';
|
||||||
import * as smartmime from '@push.rocks/smartmime';
|
import * as smartmime from '@push.rocks/smartmime';
|
||||||
@@ -22,6 +23,7 @@ export {
|
|||||||
lik,
|
lik,
|
||||||
smartfileInterfaces,
|
smartfileInterfaces,
|
||||||
smartdelay,
|
smartdelay,
|
||||||
|
smartfs,
|
||||||
smarthash,
|
smarthash,
|
||||||
smartjson,
|
smartjson,
|
||||||
smartmime,
|
smartmime,
|
||||||
|
|||||||
Reference in New Issue
Block a user