Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
console
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
console
Commits
a96136b3
Commit
a96136b3
authored
Jul 14, 2025
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use tar -I
parent
3f7750af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
console-api/src/packager/packager.service.ts
console-api/src/packager/packager.service.ts
+3
-2
console-api/src/packager/zstd-params.ts
console-api/src/packager/zstd-params.ts
+1
-0
No files found.
console-api/src/packager/packager.service.ts
View file @
a96136b3
...
@@ -17,6 +17,7 @@ import { createHash } from 'crypto';
...
@@ -17,6 +17,7 @@ import { createHash } from 'crypto';
import
PQueue
from
'
p-queue
'
;
import
PQueue
from
'
p-queue
'
;
import
{
LockService
}
from
'
src/lock/lock.service
'
;
import
{
LockService
}
from
'
src/lock/lock.service
'
;
import
{
InjectRedis
,
Redis
}
from
'
@nestjs-modules/ioredis
'
;
import
{
InjectRedis
,
Redis
}
from
'
@nestjs-modules/ioredis
'
;
import
{
getZstdParams
}
from
'
./zstd-params
'
;
interface
FileWithHash
{
interface
FileWithHash
{
file
:
readdirp
.
EntryInfo
;
file
:
readdirp
.
EntryInfo
;
...
@@ -119,7 +120,7 @@ export class PackagerService extends ConsoleLogger {
...
@@ -119,7 +120,7 @@ export class PackagerService extends ConsoleLogger {
this
.
log
(
`Extracting package to
${
extractRoot
}
.`
);
this
.
log
(
`Extracting package to
${
extractRoot
}
.`
);
stream
.
resume
();
stream
.
resume
();
//stream.on('data', (data) => this.log(`data => ${data}`));
//stream.on('data', (data) => this.log(`data => ${data}`));
await
this
.
spawnAsync
(
'
tar
'
,
[
'
--zstd
'
,
'
-xf
'
,
'
-
'
],
{
cwd
:
extractRoot
},
stream
);
await
this
.
spawnAsync
(
'
tar
'
,
[
...
getZstdParams
()
,
'
-xf
'
,
'
-
'
],
{
cwd
:
extractRoot
},
stream
);
this
.
log
(
`Package extracted to
${
extractRoot
}
.`
);
this
.
log
(
`Package extracted to
${
extractRoot
}
.`
);
...
@@ -231,7 +232,7 @@ export class PackagerService extends ConsoleLogger {
...
@@ -231,7 +232,7 @@ export class PackagerService extends ConsoleLogger {
const
files
=
archiveTask
.
filePaths
;
const
files
=
archiveTask
.
filePaths
;
this
.
log
(
`Packaging archive
${
archiveName
}
with
${
archiveTask
.
exactFilePaths
.
length
}
files.`
);
this
.
log
(
`Packaging archive
${
archiveName
}
with
${
archiveTask
.
exactFilePaths
.
length
}
files.`
);
const
child
=
child_process
.
spawn
(
'
tar
'
,
[
'
--zstd
'
,
'
-cf
'
,
'
-
'
].
concat
(
files
),
{
const
child
=
child_process
.
spawn
(
'
tar
'
,
[
...
getZstdParams
()
,
'
-cf
'
,
'
-
'
].
concat
(
files
),
{
cwd
:
root
,
cwd
:
root
,
});
});
const
childPromise
=
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
const
childPromise
=
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
...
...
console-api/src/packager/zstd-params.ts
0 → 100644
View file @
a96136b3
export
const
getZstdParams
=
()
=>
[
'
-I
'
,
'
zstd -T0
'
]
nanahira
@nanahira
mentioned in commit
0def4684
·
Jul 14, 2025
mentioned in commit
0def4684
mentioned in commit 0def46843aa52f7dc850659dfd93da201baa6133
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment