File tree Expand file tree Collapse file tree 3 files changed +16
-20
lines changed Expand file tree Collapse file tree 3 files changed +16
-20
lines changed Original file line number Diff line number Diff line change 1717 with :
1818 token : ${{ steps.get-token.outputs.token }}
1919 release-type : node
20- package-name : " @netlify/@netlify/zip-it-and-ship-it "
20+ package-name : " @netlify/binary-info "
2121 - uses : actions/checkout@v3
2222 if : ${{ steps.release.outputs.release_created }}
2323 - run :
2828 node-version : " *"
2929 registry-url : " https://registry.npmjs.org"
3030 if : ${{ steps.release.outputs.release_created }}
31- - run : wasm-pack build --target nodejs --release
31+ - run : wasm-pack build --target nodejs --release --scope=netlify
3232 if : ${{ steps.release.outputs.release_created }}
33- - run : wasm-pack publish
33+ - run : wasm-pack publish --access public
3434 if : ${{ steps.release.outputs.release_created }}
3535 env :
3636 NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change 11[package ]
2- name = " elf-cam "
2+ name = " binary-info "
33version = " 0.1.1"
44authors = [" David Calavera <david.calavera@gmail.com>" ]
55edition = " 2018"
6- repository = " https://github.com/netlify/elf-cam "
6+ repository = " https://github.com/netlify/binary-info "
77license = " Apache 2"
8- description = " elf-cam is a WebAssembly(WASM) module to extract very specific information from binary files built for Linux, also known as ELF files."
8+ description = " binary-info is a WebAssembly(WASM) module to extract very specific information from binary files."
99
1010[lib ]
1111crate-type = [" cdylib" , " rlib" ]
Original file line number Diff line number Diff line change 11## Introduction
22
3- elf-cam is a WebAssembly(WASM) module to extract very specific information from binary files built for Linux, also known as ELF files.
3+ @netlify/binary-info is a WebAssembly(WASM) module to extract very specific
4+ information from binary files.
45
5- It's used by other Netlify projects to detect Go and Rust binaries built for Netlify Functions.
6+ It's used by other Netlify projects to detect Go and Rust binaries built for
7+ Netlify Functions and its architecture and platform .
68
79## Usage
810
911``` js
1012import { readFile } = require(" fs" );
11- import * as elf from " elf-cam " ;
13+ import { detect , Runtime } from " @netlify/binary-info " ;
1214
1315const buffer = await readFile (path);
1416try {
15- const runtime = elf .detect (buffer);
16- switch (runtime) {
17- case elf . Runtime .Go : console .log (" Go binary file" ); break ;
18- case elf . Runtime .Rust : console .log (" Rust binary file" ); break ;
17+ const info = elf .detect (buffer);
18+ switch (info . runtime ) {
19+ case Runtime .Go : console .log (" Go binary file" ); break ;
20+ case Runtime .Rust : console .log (" Rust binary file" ); break ;
1921 default : console .log (" Unknown binary file" );
2022 }
2123} catch (error) {
2830### 🛠️ Build with ` wasm-pack build `
2931
3032```
31- wasm-pack build --target nodejs --release
32- ```
33-
34- ### 🎁 Publish to NPM with ` wasm-pack publish `
35-
36- ```
37- wasm-pack publish
33+ wasm-pack build --target nodejs --release --scope=netlify
3834```
You can’t perform that action at this time.
0 commit comments