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

Improve building native extensions #502

Merged
merged 42 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
95a106c
refactor(): wip
jwerle Jun 28, 2023
7e3b81d
refactor(): support external extension sources
jwerle Jul 7, 2023
b2a0c45
fix(include/socket/extension.h): fix 'sapi_process_spawn_kill' name
jwerle Jul 8, 2023
fc18af4
refactor(src/extension/process.cc): guard ios/ fix 'sapi_process_spaw…
jwerle Jul 8, 2023
9cc70d9
chore(.github/workflows/ci.yml): set 'VERBOSE=1' env var
jwerle Jul 8, 2023
11a83dd
fix(src/cli/cli.cc): convert path to string
jwerle Jul 8, 2023
7e6ee76
fix(bin/build-runtime-library.sh): include 'process/unix.cc' for android
jwerle Jul 8, 2023
e979a85
fix(src/cli/cli.cc): fix default 'CC' compiler
jwerle Jul 8, 2023
ba51b32
chore(.gitignore): ignore '*.o' files
jwerle Jul 10, 2023
9fcbcde
refactor(bin/cflags.sh): default visibility is hidden
jwerle Jul 10, 2023
3b42303
refactor(bin/install.sh): omit feature check in debug mode
jwerle Jul 10, 2023
650eaf6
refactor(include/socket/extension.h): remove 'const' for scalar types
jwerle Jul 10, 2023
0a4a065
chore(src/desktop/main.cc): clean up
jwerle Jul 10, 2023
6d35ec5
chore(src/extension/context.cc): remove 'const' for scalar types
jwerle Jul 10, 2023
76b1250
chore(src/extension/extension.cc): remove 'const' for scalar types
jwerle Jul 10, 2023
c4a4864
refactor(src/extension/ipc.cc): 'nullptr' check, return 'false' on fa…
jwerle Jul 10, 2023
796f95d
refactor(src/extension): remove 'const' for scalar types
jwerle Jul 10, 2023
35c7fea
refactor(test/src/application.js): handle '#' comments
jwerle Jul 10, 2023
c704dac
test(test/extension): use 'socket.ini' for extension
jwerle Jul 10, 2023
38b5890
refactor(src/cli): fix extension source for android
jwerle Jul 10, 2023
f018d2f
fix(src/extension/ipc.cc): fix context data
jwerle Jul 11, 2023
5c653b1
feat(src/common.hh): support default value in 'getEnv'
jwerle Jul 11, 2023
837caf9
refactor(bin/android-functions.sh): remove ABIs not worth supporting
jwerle Jul 11, 2023
8c319d4
refactor(src/cli/templates.hh): remove useless src addition
jwerle Jul 11, 2023
624dfbc
fix(src/cli/cli.cc): improve building android extensions
jwerle Jul 11, 2023
35538f2
fix(bin/cflags.sh): fix android errors for ndk path
jwerle Jul 11, 2023
d3c4a6a
fix(api/ipc.js): fix promise methods in proxy, handle nested data in …
jwerle Jul 11, 2023
d6936c8
refactor(api/ipc.js): include 'id' in 'Result'
jwerle Jul 12, 2023
c836a89
refactor(include/socket/extension.h): require 'message' for 'send_byt…
jwerle Jul 12, 2023
aeaa7d8
refactor(src/common.hh): mark 'init.cc' impls as extern/ fix '_WIN32'…
jwerle Jul 12, 2023
42f8202
refactor(src/core/bluetooth.cc): use 'Result' for bluetooth JSON
jwerle Jul 12, 2023
21bb2ee
refactor(src/desktop/main.cc): use 'Result' for window message results
jwerle Jul 12, 2023
187b6af
refactor(src/extension/ipc.cc): use 'message' to construct 'Result'
jwerle Jul 12, 2023
e5f9952
refactor(src/window/window.hh): support 'JSON' in 'resolvePromise'
jwerle Jul 12, 2023
a3b2361
fix(src/ipc): include 'id' in result JSON
jwerle Jul 12, 2023
1796cec
refactor(src/cli): support '--root' in 'print-build-dir' command
jwerle Jul 13, 2023
2429a9d
chore(api): generate docs and ts typings
jwerle Jul 13, 2023
f5d277b
chore(api): ignore 'ipc.Result' fields
jwerle Jul 14, 2023
a318a27
refactor(src/cli/cli.cc): clean up
jwerle Jul 14, 2023
4953d1f
fix(src/window/linux.cc): fix 'resolvePromise'
jwerle Jul 14, 2023
98fb238
fic(src/cli/cli.cc): add missing link flags
jwerle Jul 14, 2023
279db49
refactor(:src/cli/cli.cc): suggested changes from @chicoxyzzy
jwerle Jul 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
npm install && npm test
env:
CI: true
VERBOSE: 1
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }}

mac:
Expand Down Expand Up @@ -94,6 +95,7 @@ jobs:
npm install && npm test
env:
CI: true
VERBOSE: 1
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }}

windows:
Expand Down Expand Up @@ -143,6 +145,7 @@ jobs:
npm install && npm test
env:
CI: true
VERBOSE: 1
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }}

ios:
Expand Down Expand Up @@ -178,6 +181,7 @@ jobs:
npm install && npm run test:ios-simulator
env:
CI: true
VERBOSE: 1
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }}

android_macos:
Expand Down Expand Up @@ -289,6 +293,7 @@ jobs:
./bin/ci_version_check.sh
env:
CI: true
VERBOSE: 1
SSC_ANDROID_CI: true
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ build/
# Provisioning profile
*.mobileprovision
dist/
*.o
16 changes: 14 additions & 2 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,19 @@ External docs: https://nodejs.org/dist/latest-v16.x/docs/api/fs.html#fspromisesw
import { send } from 'socket:ipc'
```

## [`emit(name, value, target , options)`](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L1031)
### [undefined](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L796)

The unique ID for this result.

### [undefined](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L802)

An optional error in the result.

### [undefined](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L822)

Result headers, if given.

## [`emit(name, value, target , options)`](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L1043)

Emit event to be dispatched on `window` object.

Expand All @@ -1203,7 +1215,7 @@ Emit event to be dispatched on `window` object.
| options | Object | | true | |


## [`send(command, value, options)`](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L1090)
## [`send(command, value, options)`](https://github.com/socketsupply/socket/blob/master/api/ipc.js#L1102)

Sends an async IPC command request with parameters.

Expand Down