mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 14:00:01 -04:00
add copyright notice to libcurl js bundle
This commit is contained in:
parent
a4c075b497
commit
a5a537423e
8 changed files with 24 additions and 11 deletions
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
|
@ -20,10 +20,6 @@ jobs:
|
||||||
working-directory: ./client
|
working-directory: ./client
|
||||||
run: ./build.sh all
|
run: ./build.sh all
|
||||||
|
|
||||||
- name: run tests
|
|
||||||
working-directory: ./client
|
|
||||||
run: ./tests/run.sh
|
|
||||||
|
|
||||||
- name: upload img
|
- name: upload img
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -116,7 +116,7 @@ This project is licensed under the GNU AGPL v3.
|
||||||
|
|
||||||
### Copyright Notice:
|
### Copyright Notice:
|
||||||
```
|
```
|
||||||
ading2210/libcurl.js - A port of libcurl to WASM for the browser.
|
ading2210/libcurl.js - A port of libcurl to WASM for use in the browser.
|
||||||
Copyright (C) 2023 ading2210
|
Copyright (C) 2023 ading2210
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|
|
@ -75,7 +75,7 @@ cp $JAVSCRIPT_DIR/main.js $OUT_FILE
|
||||||
sed -i "/__emscripten_output__/r $MODULE_FILE" $OUT_FILE
|
sed -i "/__emscripten_output__/r $MODULE_FILE" $OUT_FILE
|
||||||
rm $MODULE_FILE
|
rm $MODULE_FILE
|
||||||
|
|
||||||
#set version number
|
#add version number and copyright notice
|
||||||
VERSION=$(cat package.json | jq -r '.version')
|
VERSION=$(cat package.json | jq -r '.version')
|
||||||
sed -i "s/__library_version__/$VERSION/" $OUT_FILE
|
sed -i "s/__library_version__/$VERSION/" $OUT_FILE
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ sed -i "/__extra_libraries__/r $WISP_CLIENT/polyfill.js" $OUT_FILE
|
||||||
sed -i "/__extra_libraries__/r $WISP_CLIENT/wisp.js" $OUT_FILE
|
sed -i "/__extra_libraries__/r $WISP_CLIENT/wisp.js" $OUT_FILE
|
||||||
sed -i "/__extra_libraries__/r $JAVSCRIPT_DIR/messages.js" $OUT_FILE
|
sed -i "/__extra_libraries__/r $JAVSCRIPT_DIR/messages.js" $OUT_FILE
|
||||||
sed -i "/__extra_libraries__/r $JAVSCRIPT_DIR/websocket.js" $OUT_FILE
|
sed -i "/__extra_libraries__/r $JAVSCRIPT_DIR/websocket.js" $OUT_FILE
|
||||||
|
sed -i "/__extra_libraries__/r $JAVSCRIPT_DIR/copyright.js" $OUT_FILE
|
||||||
|
|
||||||
#apply patches
|
#apply patches
|
||||||
python3 tools/patch_js.py $FRAGMENTS_DIR $OUT_FILE
|
python3 tools/patch_js.py $FRAGMENTS_DIR $OUT_FILE
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("libcurl_load", ()=>{
|
document.addEventListener("libcurl_load", ()=>{
|
||||||
libcurl.set_websocket(`wss://${location.hostname}/ws/`);
|
libcurl.set_websocket(`wss://${location.hostname}/ws/`);
|
||||||
console.log("libcurl.js ready!");
|
console.log(`loaded libcurl.js v${libcurl.version.lib}`);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
15
client/javascript/copyright.js
Normal file
15
client/javascript/copyright.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const copyright_notice = `ading2210/libcurl.js - A port of libcurl to WASM for use in the browser.
|
||||||
|
Copyright (C) 2023 ading2210
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.`;
|
|
@ -310,12 +310,14 @@ return {
|
||||||
wisp: _wisp_connections,
|
wisp: _wisp_connections,
|
||||||
WebSocket: CurlWebSocket,
|
WebSocket: CurlWebSocket,
|
||||||
|
|
||||||
|
get copyright() {return copyright_notice},
|
||||||
get version() {return get_version()},
|
get version() {return get_version()},
|
||||||
|
get ready() {return wasm_ready},
|
||||||
|
|
||||||
get stdout() {return out},
|
get stdout() {return out},
|
||||||
set stdout(callback) {out = callback},
|
set stdout(callback) {out = callback},
|
||||||
get stderr() {return err},
|
get stderr() {return err},
|
||||||
set stderr(callback) {err = callback},
|
set stderr(callback) {err = callback}
|
||||||
get ready() {return wasm_ready}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})()
|
})()
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "libcurl.js",
|
"name": "libcurl.js",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
|
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
|
||||||
"main": "libcurl.mjs",
|
"main": "libcurl.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#publish libcurl.js as an npm package
|
#publish libcurl.js as an npm package
|
||||||
|
|
||||||
./build.sh all
|
./build.sh all
|
||||||
tests/run.sh
|
|
||||||
|
|
||||||
cp package.json out
|
cp package.json out
|
||||||
cp ../README.md out
|
cp ../README.md out
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue