deno-library / compress Goto Github PK
View Code? Open in Web Editor NEWcompress and uncompress for Deno
License: MIT License
compress and uncompress for Deno
License: MIT License
The tar.uncompress()
function does not work because it attempts to write to a file that doesn't exist. I'll create a quick pull request once I find and fix the issue!
Check file:///Users/username/Downloads/test/mod.ts
error: Uncaught (in promise) NotFound: No such file or directory (os error 2)
throw new ErrorClass(res.err.message);
^
at processResponse (deno:core/core.js:213:11)
at Object.jsonOpAsync (deno:core/core.js:231:12)
at async Object.open (deno:runtime/js/30_files.js:45:17)
at async Module.uncompress (https://deno.land/x/[email protected]/tar/mod.ts:13:18)
Can you add zip support using https://github.com/moncefplastin07/deno-zip ?
Thanks.
Hello, I upgrade deno to 1.4.0 and found deno is complaining about this library.
And I found, in Deno 1.4.0 Deno.FsFile.rid
and Deno.close
are marked as deprecated, but this library is still using it.
And that come from "https://deno.land/[email protected]/archive/tar.ts" list in deps.ts
, please upgrade the version.
For debug purposes I'd like to list the files as they are progressed in compression and decompression by setting a verbose flag. It would be helpful if this lib would provide such.
I have a Laravel project folder called MY-PROJECT
that contains several files with deep folder structure:
+ MY-PROJECT
| + app
| |- ...
| + bootstrap
| |- ...
| + database
| | + factories
| | |- UserFactory.php
| | + migrations
| | |- ...
| |- .gitignore
| + public
| |- ...
| + resources
| |- ...
| + routes
| |- ...
| + scripts
| |- ...
| + storage
| |- ...
| + tests
| |- ...
|- .editorconfig
|- .env
|- .env.example
|- .gitignore
|- .rnd
|- artisan
|- composer.json
|- composer.lock
|- my.cnf
|- my.cnf.example
|- phpunit.xml
|- README.md
|- server.php
|- webpack.mix.js
I try to compress it like this:
await tgz.compress('/Users/user/MY-PROJECT', '/Users/user/MY-PROJECT.tar.gz', {
excludeSrc: true // doesn't matter if true or false
})
and it fails:
error: Uncaught (in promise) NotFound: No such file or directory (os error 2), stat '/Users/user/MY-PROJECT/database/my.cnf.example'
const stat = await Deno.stat(filePath);
^
at async Object.stat (deno:runtime/js/30_fs.js:228:17)
at async appendFolder (https://deno.land/x/[email protected]/tar/mod.ts:41:22)
at async Module.compress (https://deno.land/x/[email protected]/tar/mod.ts:70:7)
at async Module.compress (https://deno.land/x/[email protected]/tgz/mod.ts:27:3)
The recursion seems not to work right as of now.
$% deno --version
deno 1.19.3 (release, x86_64-apple-darwin)
v8 9.9.115.8
typescript 4.5.2
compress v0.4.1
compress v0.3.9
deno v1.13.2
Thank you for your effort, very useful utility.
When I try to tar.compress
or tgz.compress
on a directory including several subdirs and 23289 files I got the following error:
Uncaught RangeError: Maximum call stack size exceeded
at Tar.getReader (https://deno.land/[email protected]/archive/tar.ts:450:12)
at Module.compress (https://deno.land/x/[email protected]/tar/mod.ts:79:23)
I did not change any V8 options. Probably recursion is not suitable in this case.
I'm wondering if there is a way for me to send it pipe into it. By sending it individual strings and it compresses it all up. Instead of having to write it to a file then use the package to compress that file.
Hi!
There are errors on compile like that:
error: TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error
~~~~~~~~~~~~~~~~~~~
at https://deno.land/[email protected]/node/events.ts:100:7
...
Could you please update dependencies? Should help I guess.
Thank you in advance!
When running my project with this library included using deno 1.8.3 I get this error:
TS2322 [ERROR]: Type 'number' is not assignable to type 'Uint8Array'.
if (readed === null) return readed;
at https://deno.land/x/[email protected]/utils/uint8.ts:16:24
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.