Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Feb 9, 2024
1 parent 4e5b8d0 commit 041d96e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: threeal/[email protected]
with:
c-compiler: emcc
options: CMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
options: CMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build build
- name: Install Project
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
${CMAKE_SOURCE_DIR}/LICENSE-2.0.txt
js/package.json
js/index.d.ts
js/index.d.cts
js/LICENSE
js/README.md
${CMAKE_SOURCE_DIR}/README.md
${CMAKE_CURRENT_BINARY_DIR}/index.cjs
${CMAKE_CURRENT_BINARY_DIR}/index.mjs
DESTINATION pkg
Expand Down
Empty file removed src/js/README.md
Empty file.
8 changes: 8 additions & 0 deletions src/js/index.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default _default;
declare function _default(): {
readonly scrub: () => void;
readonly exportState: () => ArrayBufferLike;
readonly importState: (state: AllowSharedBufferSource) => void;
readonly update: (data: AllowSharedBufferSource) => void;
readonly finish: () => ArrayBufferLike;
};
12 changes: 8 additions & 4 deletions src/js/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@exact-realty/sha2",
"author": "Exact Realty Limited",
"keywords": ["sha256", "sha2", "hash", "digst"],
"description": "SHA2 implementation with exportable state",
"version": "1.0.0",
"keywords": ["sha256", "sha2", "hash", "digest"],
"description": "SHA-2 implementation with exportable state",
"version": "1.0.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -13,6 +13,7 @@
"LICENSE-2.0.txt",
"index.cjs",
"index.d.ts",
"index.d.cts",
"index.mjs"
],
"type": "module",
Expand All @@ -21,7 +22,10 @@
"types": "./index.d.ts",
"exports": {
".": {
"types": "./index.d.ts",
"types": {
"import": "./index.d.ts",
"require": "./index.d.cts"
},
"import": "./index.mjs",
"require": "./index.cjs"
}
Expand Down

0 comments on commit 041d96e

Please sign in to comment.