Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.7.0 #4

Merged
merged 10 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Test
on:
push:
paths-ignore:
- '**/README.md'
- '**/LICENSE.md'
- '**/.*'
- docs/**
branches:
- main
pull_request:
paths-ignore:
- '**/README.md'
- '**/LICENSE.md'
- '**/.*'
- docs/**

# Cancel previous runs of the same workflow on the same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test archive-wasm
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
platforms: linux/amd64
driver-opts: |
image=moby/buildkit:master
network=host

- name: Install test dependencies
run: |
set -euxo pipefail

sudo apt-get update
sudo apt-get install -y \
zip \
xz-utils \
lz4 \
gzip \
lzop \
zstd \
bzip2 \
libarchive-tools \
xorriso \
pax

curl -L "https://www.rarlab.com/rar/rarlinux-x64-701.tar.gz" \
| tar -xzf- -C "${HOME}"

sudo mv "${HOME}/rar"/{rar,unrar} /usr/bin
sudo mv "${HOME}/rar/default.sfx" /usr/lib/default.sfx

curl -L "https://www.7-zip.org/a/7z2407-linux-x64.tar.xz" \
| tar -xJf- -C "$HOME"

sudo mv "$HOME"/{7zz,7zzs} /usr/bin

- name: Build and test archive-wasm
run: |
set -euxo pipefail

npm i
npm run buildtest
8 changes: 6 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
**archive-wasm** • **Docs**

---

# archive-wasm

## Modules

- [archive-wasm](modules/archive_wasm.md)
- [archive-wasm/src/fs.mjs](modules/archive_wasm_src_fs_mjs.md)
- [archive-wasm](archive-wasm/README.md)
- [archive-wasm/src/fs.mjs](archive-wasm/src/fs.mjs/README.md)
42 changes: 42 additions & 0 deletions docs/archive-wasm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[**archive-wasm**](../README.md) • **Docs**

---

# archive-wasm

## File

Idiomatic JavaScript API for extracting most archive files with LibArchive

## Index

### Enumerations

- [EntryTypeName](enumerations/EntryTypeName.md)

### Classes

- [ArchiveError](classes/ArchiveError.md)
- [ExceedSizeLimitError](classes/ExceedSizeLimitError.md)
- [FailedError](classes/FailedError.md)
- [FatalError](classes/FatalError.md)
- [FileReadError](classes/FileReadError.md)
- [NullError](classes/NullError.md)
- [PassphraseError](classes/PassphraseError.md)
- [RetryError](classes/RetryError.md)

### Interfaces

- [Entry](interfaces/Entry.md)
- [ExtractAllExclusiveOpts](interfaces/ExtractAllExclusiveOpts.md)
- [ExtractOpts](interfaces/ExtractOpts.md)

### Type Aliases

- [ExtractAllOpts](type-aliases/ExtractAllOpts.md)

### Functions

- [disableWarning](functions/disableWarning.md)
- [extract](functions/extract.md)
- [extractAll](functions/extractAll.md)
149 changes: 149 additions & 0 deletions docs/archive-wasm/classes/ArchiveError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[**archive-wasm**](../../README.md) • **Docs**

---

# Class: ArchiveError

## Extends

- `Error`

## Extended by

- [`NullError`](NullError.md)
- [`RetryError`](RetryError.md)
- [`FatalError`](FatalError.md)
- [`FailedError`](FailedError.md)
- [`FileReadError`](FileReadError.md)
- [`PassphraseError`](PassphraseError.md)
- [`ExceedSizeLimitError`](ExceedSizeLimitError.md)

## Constructors

### new ArchiveError()

> **new ArchiveError**(`code`, `message`?): [`ArchiveError`](ArchiveError.md)

Main error class

#### Parameters

• **code**: `number`

Error code

• **message?**: `string`

Error message

#### Returns

[`ArchiveError`](ArchiveError.md)

#### Overrides

`Error.constructor`

## Properties

### cause?

> `optional` **cause**: `unknown`

#### Inherited from

`Error.cause`

---

### code

> **code**: `number`

---

### message

> **message**: `string`

#### Inherited from

`Error.message`

---

### name

> **name**: `string`

#### Inherited from

`Error.name`

---

### stack?

> `optional` **stack**: `string`

#### Inherited from

`Error.stack`

---

### prepareStackTrace()?

> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`

Optional override for formatting stack traces

#### Parameters

• **err**: `Error`

• **stackTraces**: `CallSite`[]

#### Returns

`any`

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

#### Inherited from

`Error.prepareStackTrace`

---

### stackTraceLimit

> `static` **stackTraceLimit**: `number`

#### Inherited from

`Error.stackTraceLimit`

## Methods

### captureStackTrace()

> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`

Create .stack property on a target object

#### Parameters

• **targetObject**: `object`

• **constructorOpt?**: `Function`

#### Returns

`void`

#### Inherited from

`Error.captureStackTrace`
Loading