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

Next #971

Closed
wants to merge 1,179 commits into from
Closed

Next #971

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1179 commits
Select commit Hold shift + click to select a range
4d3c393
factor(core): fix syntax issues, types
heapwolf Jun 29, 2024
02749c6
factor(core): integrate conduit into core
heapwolf Jun 29, 2024
e3b44a5
refactor(core): integrate conduit with dgram
heapwolf Jul 1, 2024
229d2d3
factor(api): add condition for non-legacy sockets
heapwolf Jul 1, 2024
d252eaf
refactor(api): ensure dgram uses runInAsyncScope as well as publishes…
heapwolf Jul 1, 2024
084c4e4
refactor(core): correct conduit decode, allow ios
heapwolf Jul 9, 2024
51771be
fix(api): fixes regression in cache
heapwolf Jul 9, 2024
1ccbe83
chore(api): update protocol
heapwolf Jul 9, 2024
2422e5c
chore(api): update protocol
heapwolf Jul 9, 2024
e862bc2
chore(api): update protocol
heapwolf Jul 9, 2024
b359c93
chore(api): update protocol
heapwolf Jul 10, 2024
4130fbd
chore(api): update protocol, allow specifying worker
heapwolf Jul 10, 2024
e376b98
fix(window): fix struct init members
jwerle Jul 10, 2024
54b179c
fix(ipc): detect more bad 'ipc:' URIs
jwerle Jul 10, 2024
83cd891
refactor(core): introduce lifecycle methods, fix 'CoreConduit::open'
jwerle Jul 10, 2024
c51e7b9
refactor(app): use 'resume/pause' Core lifecycle methods
jwerle Jul 10, 2024
da1eb3a
refactor(cli): provide 'socket_*' C extern impls
jwerle Jul 10, 2024
ea7c12c
refactor(api/internal/conduit.js): introduce reconnect logic and life…
jwerle Jul 10, 2024
ec74cc8
refactor(api/latica): clean up lint
jwerle Jul 10, 2024
488021d
refactor(api/dgram.js): clean up conduit usage
jwerle Jul 10, 2024
6f91240
chore(api): generate types + docs
jwerle Jul 10, 2024
d8d188e
fix(app): fix typo
jwerle Jul 10, 2024
8d92571
fix(app): set 'applicationInstance' to 'nullptr'
jwerle Jul 10, 2024
4a5ec13
refactor(desktop): do not destroy window manager in shutdown
jwerle Jul 10, 2024
3893d8f
refactor(window): check if 'app' is a 'nullptr'
jwerle Jul 10, 2024
ce95747
fix(api/fetch): attempt to pass untyped buffer
chrisfarms Jul 3, 2024
4450206
fix(api/internal): url.protocol can be undefined
chrisfarms Jul 3, 2024
045c633
refactor(core): conduit cleanup, more diagnostics
jwerle Jul 11, 2024
5198e47
refactor(api/internal/conduit.js): improve reconnect logic
jwerle Jul 11, 2024
4aa415d
refactor(src/app/app.cc): do not pause core on macos desktop
jwerle Jul 12, 2024
7ededcc
refactor(core/modules/conduit): call callback in 'start() when actual…
jwerle Jul 12, 2024
76def96
refactor(ipc/routes): introduce 'internal.conduit.*' routes
jwerle Jul 12, 2024
0aed4eb
fix(window/linux): fix permissions logic
jwerle Jul 12, 2024
84b6c4e
fix(api): process, timers, conduit
jwerle Jul 12, 2024
f630c8d
chore(): set version to '0.6.0-next'
jwerle Jul 12, 2024
5ea2c6b
chore(api): generate types + docs
jwerle Jul 12, 2024
df2ae30
refactor(core): improve logs
heapwolf Jul 12, 2024
9398964
refactor(core): improve logging on macos
heapwolf Jul 13, 2024
9839eeb
refactor(window): consolidate 'applicationurl' handler
jwerle Jul 12, 2024
49b1dd0
refactor(ipc): track 'readyState' for 'Window' from 'document'
jwerle Jul 12, 2024
3b394ac
refactor(app): handle 'applicationurl' on android correctly
jwerle Jul 12, 2024
f4f08f6
refactor(app): remove pending application URL state
jwerle Jul 15, 2024
f89699c
refactor(core/modules/platform.cc): do not use loop dispatch
jwerle Jul 15, 2024
70e426b
refactor(desktop/main): simplify app url handler on linux
jwerle Jul 15, 2024
b6b91ed
refactor(ipc): handle 'readystatechange' on 'Window'
jwerle Jul 15, 2024
42e5411
refactor(window): introduce 'onReadyStateChange' callback
jwerle Jul 15, 2024
1e6a5bd
fix(cli): guard apple
jwerle Jul 15, 2024
0d5e899
reafactor(cli): include bundle id in log predicate
heapwolf Jul 15, 2024
2f27db9
docs(api): use more appropriate naming
jwerle Jul 15, 2024
6754986
fix(bin/generate-docs.js): handle offline
jwerle Jul 15, 2024
1cdd6ab
fix(api/location.js): normalize origin protocol for 'socket:location'
jwerle Jul 15, 2024
636fb2d
refactor(api/process): move 'signal.js' to 'process/signal.js'
jwerle Jul 15, 2024
acaaac5
fix(api): fix 'process/signal.js' imports
jwerle Jul 16, 2024
7093b2c
refactor(app): conslidate pause/resume logic into 'App'
jwerle Jul 16, 2024
bae7c55
refactor(desktop/main): verify pid when launching second instance
jwerle Jul 16, 2024
cef088f
refactor(ipc,platform): clean up + more types
jwerle Jul 16, 2024
fe3817d
chore(api): update protocol
heapwolf Jul 16, 2024
0b9cb74
chore(api): update protocol to improve logging
heapwolf Jul 17, 2024
8c35d17
chore(api): update protocol to allow specifying ranges in sync
heapwolf Jul 18, 2024
4a46b8f
chore(api): lint
heapwolf Jul 18, 2024
170cbae
fix(ipc/preload.cc): ensure correct values in webview from preload
jwerle Jul 18, 2024
306cfc4
refactor(core/modules/conduit): introduce 'isActive()', msleep after …
jwerle Jul 18, 2024
9496128
refactor(core/modules/diagnostics): improve 'conduit' diagnostics
jwerle Jul 18, 2024
19376a2
refactor(ipc/routes): include 'active' status in 'internal.conduit.st…
jwerle Jul 18, 2024
47b3de1
chore(api): generate docs
heapwolf Jul 18, 2024
288d6ae
fix(core/modules/platform): fix 'CorePlatform::openExternal'
jwerle Jul 18, 2024
51d39d2
refactor(platform/android): clean up, more android platform types
jwerle Jul 18, 2024
49ce80f
refactor(core/modules/platform): call 'openExternal' for android
jwerle Jul 18, 2024
6b37ad6
refactor(app): introduce 'openExternal' on app activity
jwerle Jul 18, 2024
f693911
chore(api): update protocol
heapwolf Jul 18, 2024
1214fac
feature(api): expose max cache time in protocol
heapwolf Jul 19, 2024
658b358
refactor(window): introduce 'WindowManager::emit'
jwerle Jul 22, 2024
f3295b0
refactor(app): emit events for 'pause' and 'resume' on windows
jwerle Jul 22, 2024
ae2b489
refactor(core/modules/conduit): msleep in start if already active
jwerle Jul 22, 2024
8564451
fix(ipc/routes): fix 'internal.conduit.*' return values
jwerle Jul 22, 2024
d5b31ae
refactor(api/application.js): handle pause/resume state, dispatch app…
jwerle Jul 22, 2024
544fc60
fix(api/dgram.js): check if conduit exists before creating
jwerle Jul 22, 2024
725b78a
feat(api/hooks.js): introduce 'onApplicationResume' and 'onApplicatio…
jwerle Jul 22, 2024
024901b
refactor(api/internal/conduit.js): improve reconnect logic, handle pa…
jwerle Jul 22, 2024
f0693fe
refactor(api/internal/init.js): propagate application events to workers
jwerle Jul 22, 2024
f865381
refactor(api/internal/worker.js): improve event proxies
jwerle Jul 22, 2024
fbc8c08
chore(api): generate types + docs
jwerle Jul 22, 2024
40cb7ab
refactor(window): more window manager APIs on android
jwerle Jul 23, 2024
73a29fd
feat(core/modules/permissions): consolidate permissions APIs
jwerle Jul 23, 2024
720537c
refactor(ipc): clean up permissions/notifications routing
jwerle Jul 23, 2024
768d01c
refactor(core): various core module improvements and android impls
jwerle Jul 23, 2024
b8284e0
refactor(cli): clean up
jwerle Jul 23, 2024
99b42e7
refactor(app): introduce android notifications API again, improve lif…
jwerle Jul 23, 2024
2c97540
refactor(api/commonjs/loader.js): disable 'withCredentials' for android
jwerle Jul 23, 2024
2860450
refactor(api/ipc.js): clean up
jwerle Jul 23, 2024
35d5168
refactor(api/internal/init.js): init shared worker context window
jwerle Jul 23, 2024
dd88763
refactor(api/internal/conduit.js): more internal conduit state imporo…
jwerle Jul 23, 2024
d2e8235
refactor(api/internal/init.js): clean up lint
jwerle Jul 23, 2024
0bacf08
chore(api): generate types + docs
jwerle Jul 23, 2024
4f1c0f5
fix(window/linux): fix 'Notifcations' API
jwerle Jul 23, 2024
4c90cf2
refactor(permissions): fix typos and introduce more permissions to qu…
jwerle Jul 23, 2024
c3c726b
chore(core/webview): clenan up
jwerle Jul 24, 2024
f5b9e1a
refactor(api/internal/permissions.js): handle 'microphone' and 'camer…
jwerle Jul 24, 2024
25abe2e
chore(api): generate types
jwerle Jul 24, 2024
3c49816
refactor(cli/templates): use 'DayNight' theme on android
jwerle Jul 24, 2024
0bf46da
chore(api): update protocol
heapwolf Jul 24, 2024
793b721
fix(cli): fix race on shutdown from cli
jwerle Jul 25, 2024
55fedc7
fix(core/module): fix remove/dispatch crash
jwerle Jul 25, 2024
0ac8810
fix(window/linux): various fixes
jwerle Jul 25, 2024
2fe05fa
chore(app): clean up
jwerle Jul 25, 2024
50c495d
refactor(cli): clean up 'AndroidManifest.xml' template
jwerle Jul 25, 2024
52ac4ac
fix(window): fix dialog impl on android
jwerle Jul 25, 2024
be8d49b
refactor(api/dgram.js): consider detached array buffers
jwerle Jul 25, 2024
7ce2400
chore(api/dgram.js): fix typo
jwerle Jul 25, 2024
2fd9629
feat(core/modules/media_devices): introduce 'CoreMediaDevices' module
jwerle Jul 26, 2024
b5c409f
refactor(core/modules/permissions): handle 'camera' and 'microphone' …
jwerle Jul 26, 2024
76523a3
refactor(app): handle 'camera' and 'microphone' permissions on androi…
jwerle Jul 26, 2024
1ee214e
refactor(api/internal/permissions.js): handle 'camera' and 'microphon…
jwerle Jul 26, 2024
e19628f
feat(platform/android): introduce 'ContentResolver' platform API
jwerle Jul 30, 2024
73d57d9
refactor(core/modules/{fs,platform}): handle android assets/content i…
jwerle Jul 30, 2024
42bc77c
refactor(window): clean up, handle async javascript, imrpove android …
jwerle Jul 30, 2024
a32c567
refactor(core/{resource,url}): improve URL, handle android assets/con…
jwerle Jul 30, 2024
f81e1a5
refactor(app): configure well known paths correctly on android
jwerle Jul 30, 2024
a390985
chore(ipc): clean up
jwerle Jul 30, 2024
fed82a5
refctor(bin/publish-npm-modules.sh): symlink kotlin files when requested
jwerle Jul 30, 2024
40e6cf9
fix(api/dgram.js): check if buffer is detached before calling callback
jwerle Jul 30, 2024
e3e971e
feat(api/fs/web.js): support 'File.prototype.slice'
jwerle Jul 30, 2024
c46eac2
fix(api/internal/error.js): fix error stack building on android
jwerle Jul 30, 2024
59259ef
fix(api/ipc.js): do not set 'responseType' for sync XHR in document mode
jwerle Jul 30, 2024
1032e0e
feat(api/path.js): introduce 'path.MEDIA'
jwerle Jul 30, 2024
fa01fed
refacvtor(api/url.js): support 'content:' and 'android.reource:' sche…
jwerle Jul 30, 2024
2d2e458
chore(api): generate types + docs
jwerle Jul 30, 2024
050d66f
fix(api/ipc.js): typeof check 'globalThis.primordials'
jwerle Jul 30, 2024
54ef3bf
fix(window/apple): fix bad var use
jwerle Jul 30, 2024
e234d7f
chore(api): generate types
jwerle Jul 30, 2024
317bcf9
refactor(ipc/preload): handle already defined preload
jwerle Jul 30, 2024
cd939df
fix(window/apple): ensure runtime preload is injected
jwerle Jul 30, 2024
e53cef5
refactor(ipc/bridge): ensure preload is injected on android ipc bridge
jwerle Jul 30, 2024
a2c4b16
refactor(window): ensure preload is injected on android/linux/windows
jwerle Jul 30, 2024
55ef5b6
fix(core/resource): fix 'music/media' well known paths
jwerle Jul 30, 2024
7baec2a
fix(ipc/preload): fix typo
jwerle Jul 30, 2024
267abf9
fix(window): fix 'IPC::Preload' misuse
jwerle Jul 30, 2024
0b34f0c
refator(window/android): introduce 'getPreloadUserScript()'
jwerle Jul 31, 2024
84c309e
refactor(platform/android/content_resolver): clean up
jwerle Jul 31, 2024
ca2dbaf
refactor(ipc): introduce 'mime.lookup' route
jwerle Jul 31, 2024
222c796
fix(core/resource): handle 'url' in copy/move, fix mimeType for conte…
jwerle Jul 31, 2024
ee75431
refactor(app): clean up
jwerle Jul 31, 2024
c8d7036
fix(api/util.js): handle non-string error 'stack'
jwerle Jul 31, 2024
db30ec7
refactor(api/mime): query IPC for more results
jwerle Jul 31, 2024
bdb9c36
fix(api/internal/error.js): fix 'stack' value
jwerle Jul 31, 2024
187a7d1
refactor(api/fs): handle 'URL' file names
jwerle Jul 31, 2024
a3d355e
fix(api/dgram.js): check for detached array buffer in callback
jwerle Jul 31, 2024
e93807a
chore(api): generate types + docs
jwerle Jul 31, 2024
7a875ac
fix(core/modules/conduit): do not use private UV APIs, fix mem leak
jwerle Aug 1, 2024
235154e
fix(ipc/bridge): explicit opt-out of auth component on 'npm:' URIs to…
jwerle Aug 1, 2024
1871449
fix(window/win): fix typos
jwerle Aug 1, 2024
63d9b23
chore(clib.json): remove 'src' array
jwerle Aug 2, 2024
54449f6
refactor(api/commonjs): handle package export fields as arrays
jwerle Aug 4, 2024
7fb5520
fix(api/npm/service-worker.js): improve 'export default' detection
jwerle Aug 4, 2024
32dc291
chore(api): generate types
jwerle Aug 4, 2024
4cfcb69
fix(cli): remove sleep in signal handler
jwerle Aug 4, 2024
b581372
fix(core): fix 'fs.*' resources paths
jwerle Aug 4, 2024
ddc92e3
refactor(desktop/extension/linux): clean up
jwerle Aug 4, 2024
ad032ee
fix(api/commonjs/package.js): handle implicit entry exports object
jwerle Aug 4, 2024
22d75c6
refactor(api/fs): handle 'FileSystemFileHandle' and 'FileSystemDirect…
jwerle Aug 4, 2024
777346d
refactor(api/internal/pickers.js): ensure directory handle is opened
jwerle Aug 4, 2024
9d33479
chore(api): generate types + docs
jwerle Aug 4, 2024
46547fa
fix(api/dgram.js): fix send callback '...args' spread
jwerle Aug 6, 2024
3145619
fix(core/modules/fs): fix path string usage
jwerle Aug 7, 2024
4bb9f0a
fix(api/npm/service-worker.js): fix 'export default' syntax detection
jwerle Aug 7, 2024
e7cdb64
refactor(bin/clean.sh): clean env by default
jwerle Aug 8, 2024
55cfe7f
fix(bin/install.sh): advise 'cmake' when needed
jwerle Aug 8, 2024
f938623
chore(api): update protocol
heapwolf Aug 8, 2024
03dfbbf
fix(core/modules/notifications): fix start/resume state and block la…
jwerle Aug 8, 2024
3ecdbef
fix(core): start/stop notification timers
jwerle Aug 8, 2024
c05a259
fix(cli): fix watcher crash
jwerle Aug 8, 2024
931932a
fix(core/modules/notifications): check if default icon exists
jwerle Aug 9, 2024
1fdc9ae
refactor(ipc/bridge): set cache control for resource assets
jwerle Aug 9, 2024
7370513
refactor(api/notification.js): improve global Symbol usage
jwerle Aug 9, 2024
3716cc9
chore(api): generate types
jwerle Aug 9, 2024
91b4784
fix(core/webview,window/apple): fix fullscreen API on apple
jwerle Aug 9, 2024
ae0bf75
fix(core/webview): fix resetting layout after fullscreen exit
jwerle Aug 12, 2024
5c94a38
refactor(cli): clean up
jwerle Aug 12, 2024
853a0dd
refactor(app): emit pause/resume events right away, dispatch core pau…
jwerle Aug 12, 2024
17e1134
fix(window/apple): fix window style constraints and bad 'eval()'
jwerle Aug 12, 2024
f2a34a2
fix(app): fix pause dispatch
jwerle Aug 12, 2024
d0da967
refactor(window/apple): clean up
jwerle Aug 17, 2024
c4cfb18
refaactor(ipc/scheme_handlers): remove unused mutex
jwerle Aug 17, 2024
c7a21ce
refactor(desktop/main): clean up
jwerle Aug 17, 2024
f22613d
refactor(core/socket): improve close logic
jwerle Aug 17, 2024
f82e753
refactor(core): consolidate mutexes
jwerle Aug 17, 2024
733c624
refactor(core): wait for async dispatch to dequeue, close loop in 'st…
jwerle Aug 17, 2024
4cfdff5
refactor(core/modules/diagnostics): include handles in 'uv' diagnostic
jwerle Aug 17, 2024
0f09705
fix(cli): fix asset compilation target for ios
jwerle Aug 17, 2024
354a83d
chore(app): clean up
jwerle Aug 17, 2024
48389bb
refactor(core/modules/conduit): close server and clients correctly
jwerle Aug 17, 2024
4eb02cf
refactor(api/dgram.js): improve conduit usage lifecycles
jwerle Aug 17, 2024
b702a5f
refactor(api/diagnostics/runtime.js): allow selector syntax in 'query()'
jwerle Aug 17, 2024
54ea7e3
refactor(api/internal/conduit.js): improve conduit lifecycles and rec…
jwerle Aug 17, 2024
38e58d1
refactor(core): improve loop lifecycles
jwerle Aug 17, 2024
034860f
refactor(cli): improve signal handler
jwerle Aug 17, 2024
4be1427
refactor(app/app.kt): handle default image icon
jwerle Aug 17, 2024
51d1908
refactor(ipc): use better core predicate names
jwerle Aug 17, 2024
50b547c
fix(core/modules/conduit): set default frame buffer values
jwerle Aug 17, 2024
5e062a3
chore(package.json): introduce 'clean' script
jwerle Aug 17, 2024
60cc12b
chore(): clean up
jwerle Aug 17, 2024
7247af2
refactor(app): use 'https:' window navigation on android
jwerle Aug 18, 2024
ff3741e
refactor(ipc/scheme_handlers): handle 'runtime-xhr-seq' header
jwerle Aug 18, 2024
644c829
refactor(api/vm.js): use pathname instead of URL for window
jwerle Aug 19, 2024
fb62083
chore(api/url/index.js): clean up jsdoc
jwerle Aug 19, 2024
f13e10e
refactor(api/shared-worker/index.js): use pathname instead of URL for…
jwerle Aug 19, 2024
80a9ec5
refactor(api/service-worker/worker.js): cache protocol data
jwerle Aug 19, 2024
0de5f84
fix(api/location.js): handle 'null' origins
jwerle Aug 19, 2024
6ff6df1
fix(api/commonjs/loader.js): fix ref cycle
jwerle Aug 19, 2024
d9dcd6b
fix(api/ipc.js): allow POST/PUT/PATCH for android protocol handlers
jwerle Aug 19, 2024
4aaf1db
chore(api/internal/conduit.js): clean up lint
jwerle Aug 19, 2024
157db56
chore(api): generate types + docs
jwerle Aug 19, 2024
3a299cd
fix(api/ipc.js): improve ipc port/channel impl
jwerle Aug 20, 2024
bdbf6e6
fix(api/vm): fix context argument and shared worker impl
jwerle Aug 20, 2024
f03c470
fix(api/shared-worker/worker.js): tracker active connections, replace…
jwerle Aug 20, 2024
d442799
chore(api): generate types + docs
jwerle Aug 20, 2024
e43d1b4
chore(api/ipc.js): clean up lint
jwerle Aug 20, 2024
ce1c87c
fix(core): do not wait for dispatch queue drain on linux
jwerle Aug 20, 2024
ea51055
refactor(desktop/main): improve signal handling dispatch
jwerle Aug 20, 2024
493fafc
fix(window/linux): check if application exists before destruction
jwerle Aug 20, 2024
c9c6d91
fix(api/fs/web.js): make 'getFile' async
jwerle Aug 20, 2024
7526c7f
fix(api/internal/primitives.js): fix 'FormData' append/set for 'Objec…
jwerle Aug 20, 2024
c75bfaa
fix(window/manager.cc): allow 'http' requests on linux again
jwerle Aug 20, 2024
1ce44c9
fix(api/ipc.js): fix early primordials check
jwerle Aug 20, 2024
5869745
fix(api/fs/web.js): fix 'slice()' for 'File' factory impl
jwerle Aug 20, 2024
062f993
fix(api/fs): fix incorrect 'readFileSync' default encoding
jwerle Aug 20, 2024
bb48605
chore(api): generate types + docs
jwerle Aug 20, 2024
4642235
chore(api/internal/primitives.js): lint
jwerle Aug 20, 2024
829fa04
chore(api): update protocol
heapwolf Aug 21, 2024
17409a4
fix(cli): set verbose output default to false
jwerle Aug 21, 2024
71fa3b2
fix(cli): fix '--verbose' flag
jwerle Aug 21, 2024
88114f3
refactor(window/linux): make back/forward gesture navigation configur…
jwerle Aug 22, 2024
4caf2a4
refactor(window/apple): make back/forward gesture navigation configur…
jwerle Aug 22, 2024
1af17c7
refactor(window/win): make back/forward gesture navigation configurable
jwerle Aug 22, 2024
f216eb5
fix(api/internal/init.js): fix blob imie type
jwerle Aug 26, 2024
c67c917
fix(api/location.js): fix location URL
jwerle Aug 26, 2024
28297cd
refactor(ipc/preload): include client host/port and platform
jwerle Aug 26, 2024
1d5b6a1
fix(api/worker_threads.js): fix worker threads URL
jwerle Aug 26, 2024
0fe3a5d
fix(api/shared-worker/index.js): ensure 'process' is imported
jwerle Aug 26, 2024
576d326
chore(api): generate types + docs
jwerle Aug 26, 2024
33242a1
fix(cli): fix zip package paths for linux
jwerle Aug 30, 2024
f23d919
fix(ipc/preload): verify origin before doing some preload calls
jwerle Sep 2, 2024
d8dcbc4
refactor(ipc/preload): check client dev host
jwerle Sep 2, 2024
fdef531
fix(preload): fix missing paren
heapwolf Sep 2, 2024
3fde2cb
fix(api/commonjs/loader.js): remove 'withCredentials'
jwerle Sep 3, 2024
5942876
fix(api/internal/serialize.js): track 'seen' later
jwerle Sep 3, 2024
2c21d37
refactor(core): set 'isPaused = false' in 'runEventLoop' too
jwerle Sep 3, 2024
7517c7d
chore(desktop/extension/linux): clean up
jwerle Sep 3, 2024
a044592
fix(ipc): fix '__args.client.parent' security error
jwerle Sep 3, 2024
8f99776
chore(api): generate types
jwerle Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Diagnostics:
Suppress: 'pp_including_mainfile_in_preamble'
6 changes: 3 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
"es6": true
},
"sourceType": "module"
}
}
104 changes: 70 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,54 @@ The `Socket runtime CLI` outputs hybrid native-web apps that combine your code w

### Compatibility Matrix

Socket Supports both ESM and CommonJS

> [!NOTE]
> Socket supports many of the Node.js APIs. It is **NOT** a drop in replacement for Node.js, nor will it ever be since socket is for building software and node.js is for building servers. Below is a high level overview of partially supported APIs and modules.

| Module | Node.js | Socket |
| ----------------- | ---------- | --------- |
| assert | ✔︎ | ⏱ |
| async/await | ✔︎ | ✔︎ |
| buffer | ✔︎ | ✔︎️ |
| child_process | ✔︎ | ✔︎️ \* |
| console | ✔︎ | ✔︎ |
| crypto | ✔︎ | ✔︎ \* |
| dgram | ✔︎ | ✔︎️ |
| dns | ✔︎ | ✔︎️ |
| os | ✔︎ | ✔︎️ |
| encoding | ✔︎ | ✔︎ |
| events | ✔︎ | ✔︎ |
| fetch | ✔︎ | ✔︎ |
| fs/promises | ✔︎ | ✔︎ |
| fs | ✔︎ | ✔︎ |
| path | ✔︎ | ✔︎ |
| process | ✔︎ | ✔︎ |
| streams | ✔︎ | ✔︎ |
| string_decoder | ✔︎ | ⏱ |
| test | ✔︎ | ✔︎️ |
| timers | ✔︎ | ⏱ |
| uuid | ✔︎ | ⏱ |
| vm | ✔︎ | ✔︎ |
| ESM | ✔︎ | ✔︎ |
| CJS | ✔︎ | ✔︎ |
| URL | ✔︎ | ✔︎ |

_⏱ = planned support_
_\* = Supported but Works differently; may be refactored to match the nodejs API_
_\*\* = Use fetch instead_
> Socket supports many of the Node.js APIs. It is **NOT** a drop in replacement for Node.js, it most likely wont ever be since Socket is for building software and node.js is for building servers. Below is a high level overview of fully or partially supported APIs and modules.

| Module | Node.js | Socket |
| ----------------- | ---------- | -------- |
| assert | √ | ⏱ |
| async_hooks | √ | √ |
| buffer | √ | √ |
| child_process | √ | √ |
| cluster | √ | § |
| console | √ | √ |
| crypto | √ | √ \* |
| dgram (udp) | √ | √ |
| diagnostics_channel | √ | √ |
| dns | √ | √ |
| encoding | √ | √ |
| events | √ | √ |
| fetch | √ | √ |
| fs | √ | √ |
| fs/promises | √ | √ |
| http | √ | √ |
| http2 | √ | √ |
| https | √ | √ |
| inspector | √ | ⏱ |
| module | √ | √ |
| net | √ | ⏱ |
| os | √ | √ |
| path | √ | √ |
| process | √ | √ |
| streams | √ | √ |
| string_decoder | √ | √ |
| test | √ | √ |
| timers | √ | √ |
| tls | √ | ⏱ |
| tty | √ | √ |
| URL | √ | √ |
| uuid | √ | ⏱ ☀︎ |
| vm | √ | √ |
| worker_threads | √ | √ |

| Symbol | Meaning |
| :----: | :-------------------------------------------------------------------------- |
| ⏱ | Planned support |
| § | Not Relevant or not necessary since socket doesn't require high-concurrency |
| \* | Supported but Works differently; may be refactored to match the nodejs API |
| ☀︎ | Use `crypto.randomUUID()` instead |


### FAQ
Expand All @@ -67,14 +81,36 @@ Check the FAQs on our [Website](https://socketsupply.co/guides/#faq) to learn mo
`Create Socket App` is similar to React's `Create React App`, we provide a few basic boilerplates and some strong opinions so you can get coding on a production-quality app as quickly as possible.
Please check [create-socket-app Repo](https://github.com/socketsupply/create-socket-app) to get started and to learn more.
You can also check our `Examples` in the [Examples Repo](https://github.com/socketsupply/socket-examples).

§§§

### Documentation

The full documentation can be found on the [Socket Runtime](https://socketsupply.co/) website.
The `Socket Runtime` documentation covers Socket APIs, includes examples, multiple guides (`Apple`, `Desktop`, and `Mobile`), `P2P` documentation, and more.


### Development

If you are developing socket, and you want your apps to point to your dev branch.


#### Step 1

```bash
cd ~/projects/socket # navigate into the location where you cloned this repo
./bin/uninstall.sh # remove existing installation
npm rm -g @socketsupply/socket # remove any global links or prior global npm installs
npm run relink # this will call `./bin/publish-npm-modules.sh --link` (accepts NO_ANDROID=1, NO_IOS=1, and DEBUG=1)
```

#### Step 2

```bash
cd ~/projects/<myapp> # navigate into your project (replacing <myapp> with whatever it's actually called
npm link @socketsupply/socket # link socket and you'll be ready to go.
```


### Testing

`Socket` provides a built-in `test runner` similar to `node:test` which outputs the test results in [TAP](https://testanything.org/) format.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.4
0.6.0-next
97 changes: 61 additions & 36 deletions api/CONFIG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<!-- This file is generated by bin/docs-generator/config.js -->
<!-- Do not edit this file directly. -->

# Configuration basics
# Configuration
## Overview

The configuration file is a simple INI `socket.ini` file in the root of the project.
The file is read on startup and the values are used to configure the project.
Sometimes it's useful to overide the values in `socket.ini` or keep some of the values local (e.g. `[ios] simulator_device`)
or secret (e.g. `[ios] codesign_identity`, `[ios] provisioning_profile`, etc.)
This can be done by creating a file called `.sscrc` in the root of the project.
It is possible to override both Command Line Interface (CLI) and Configuration File (INI) options.

The configuration file is an INI file (`socket.ini`) in the root of every Socket runtime project.
The file is read at compile time. Sometimes it's useful to overide its values or keep some of the
values locally, only on your computer (e.g. `[ios] simulator_device`) or secrets
(e.g. `[ios] codesign_identity`, `[ios] provisioning_profile`, etc.); this can be done by
creating a file called `.sscrc` in the root of the project. It is possible to override both
Command Line Interface (CLI) and Configuration File (INI) options.

Example:

Expand All @@ -33,7 +35,7 @@ platform = ios ; override the `ssc build --platform` CLI option
[settings.ios] ; override the `[ios]` section in `socket.ini`

codesign_identity = "iPhone Developer: John Doe (XXXXXXXXXX)"
distribution_method = "ad-hoc"
distribution_method = "release-testing"
provisioning_profile = "johndoe.mobileprovision"
simulator_device = "iPhone 15"
```
Expand All @@ -45,7 +47,7 @@ simulator_device = "iPhone 15"
Use the full path instead.
</tonic-toaster-inline>

# `build`
### `build`

Key | Default Value | Description
:--- | :--- | :---
Expand All @@ -58,39 +60,49 @@ name | | The name of the program and executable to be output. Can't contain sp
output | "build" | The binary output path. It's recommended to add this path to .gitignore.
script | | The build script. It runs before the `[build] copy` phase.

# `build.script`
### `build.script`

Key | Default Value | Description
:--- | :--- | :---
forward_arguments | false | If true, it will pass build arguments to the build script. WARNING: this could be deprecated in the future.

# `build.watch`
### `build.watch`

Key | Default Value | Description
:--- | :--- | :---
sources[] | | Configure your project to watch for sources that could change when running `ssc`. Could be a string or an array of strings

# `webview`
### `webview`

Key | Default Value | Description
:--- | :--- | :---
headers[] | "" |
root | "/" | Make root open index.html
default_index | "" | Set default 'index.html' path to open for implicit routes
watch | false | Tell the webview to watch for changes in its resources
headers[] | "" | Custom headers injected on all webview routes

# `webview.watch`
### `webview.watch`

Key | Default Value | Description
:--- | :--- | :---
reload | true | Configure webview to reload when a file changes
service_worker_reload_timeout | 500 | Timeout in milliseconds to wait for service worker to reload before reloading webview

# `webview.navigator.mounts`
### `webview.navigator.mounts`

Key | Default Value | Description
:--- | :--- | :---
$HOST_HOME/directory-in-home-folder/ | |
$HOST_CONTAINER/directory-app-container/ | |
$HOST_PROCESS_WORKING_DIRECTORY/directory-in-app-process-working-directory/ | |

# `permissions`
### `webview.navigator.policies`

Key | Default Value | Description
:--- | :--- | :---
allowed[] | |

### `permissions`

Key | Default Value | Description
:--- | :--- | :---
Expand All @@ -107,13 +119,13 @@ allow_data_access | true | Allow/Disallow data access in application
allow_airplay | true | Allow/Disallow AirPlay access in application (macOS/iOS) only
allow_hotkeys | true | Allow/Disallow HotKey binding registration (desktop only)

# `debug`
### `debug`

Key | Default Value | Description
:--- | :--- | :---
flags | | Advanced Compiler Settings for debug purposes (ie C++ compiler -g, etc).

# `meta`
### `meta`

Key | Default Value | Description
:--- | :--- | :---
Expand All @@ -128,11 +140,10 @@ title | | The title of the app used in metadata files. This is NOT a window ti
type | "" | Builds an extension when set to "extension".
version | | A string that indicates the version of the application. It should be a semver triple like 1.2.3. Defaults to 1.0.0.

# `android`
### `android`

Key | Default Value | Description
:--- | :--- | :---
icon | | The icon to use for identifying your app on Android.
aapt_no_compress | | Extensions of files that will not be stored compressed in the APK.
enable_standard_ndk_build | | Enables gradle based ndk build rather than using external native build (standard ndk is the old slow way)
main_activity | | Name of the MainActivity class. Could be overwritten by custom native code.
Expand All @@ -142,85 +153,99 @@ native_cflags | | Used for adding custom source files and related compiler att
native_sources | |
native_makefile | |
sources | |
icon | | The icon to use for identifying your app on Android.
icon_sizes | | The various sizes and scales of the icons to create, required minimum are listed by default.

# `ios`
### `ios`

Key | Default Value | Description
:--- | :--- | :---
codesign_identity | | signing guide: https://socketsupply.co/guides/#ios-1
distribution_method | | Describes how Xcode should export the archive. Available options: app-store, package, ad-hoc, enterprise, development, and developer-id.
distribution_method | | Describes how Xcode should export the archive. Available options: app-store, package, release-testing, enterprise, development, and developer-id.
provisioning_profile | | A path to the provisioning profile used for signing iOS app.
simulator_device | | which device to target when building for the simulator.
nonexempt_encryption | false | Indicate to Apple if you are using encryption that is not exempt.
icon | | The icon to use for identifying your app on iOS.
icon_sizes | | The various sizes and scales of the icons to create, required minimum are listed by default.

# `linux`
### `linux`

Key | Default Value | Description
:--- | :--- | :---
categories | | Helps to make your app searchable in Linux desktop environments.
cmd | | The command to execute to spawn the "back-end" process.
icon | | The icon to use for identifying your app in Linux desktop environments.
icon_sizes | | The various sizes and scales of the icons to create, required minimum are listed by default.

# `mac`
### `mac`

Key | Default Value | Description
:--- | :--- | :---
category | | A category in the App Store
cmd | | The command to execute to spawn the "back-end" process.
icon | | The icon to use for identifying your app on MacOS.
codesign_identity | | TODO Signing guide: https://socketsupply.co/guides/#code-signing-certificates
codesign_paths | | Additional paths to codesign
minimum_supported_version | "13.0.0" | Minimum supported MacOS version
window_control_offsets | | If titlebar_style is "hiddenInset", this will determine the x and y offsets of the window controls (traffic lights).
icon | | The icon to use for identifying your app on MacOS.
icon_sizes | | The various sizes and scales of the icons to create, required minimum are listed by default.

# `native`
### `native`

Key | Default Value | Description
:--- | :--- | :---
files | | Files that should be added to the compile step.
headers | | Extra Headers

# `win`
### `win`

Key | Default Value | Description
:--- | :--- | :---
cmd | | The command to execute to spawn the “back-end” process.
icon | | The icon to use for identifying your app on Windows.
logo | | The icon to use for identifying your app on Windows, relative to copied path resources
pfx | | A relative path to the pfx file used for signing.
icon | | The signing information needed by the appx api. The icon to use for identifying your app on Windows.
icon_sizes | | The various sizes and scales of the icons to create, required minimum are listed by default.

# `window`
### `window`

Key | Default Value | Description
:--- | :--- | :---
height | | The initial height of the first window in pixels or as a percentage of the screen.
width | | The initial width of the first window in pixels or as a percentage of the screen.
backgroundColorDark | "" | The initial color of the window in dark mode. If not provided, matches the current theme.
backgroundColorLight | "" | The initial color of the window in light mode. If not provided, matches the current theme.
titlebar_style | "" | Determine if the titlebar style (hidden, hiddenInset)
max_height | 100% | Maximum height of the window in pixels or as a percentage of the screen.
max_width | 100% | Maximum width of the window in pixels or as a percentage of the screen.
min_height | 0 | Minimum height of the window in pixels or as a percentage of the screen.
min_width | 0 | Minimum width of the window in pixels or as a percentage of the screen.
resizable | true | If the window is resizable or not.
frameless | false | If the window has a title bar or not.
utility | false | If the window is utility window or not.
frameless | false | Determines if the window has a title bar and border.
resizable | true | Determines if the window is resizable.
maximizable | true | Determines if the window is maximizable.
minimizable | true | Determines if the window is minimizable.
closable | true | Determines if the window is closable.
utility | false | Determines the window is utility window.

# `window.alert`
### `window.alert`

Key | Default Value | Description
:--- | :--- | :---
title | | The title that appears in the 'alert', 'prompt', and 'confirm' dialogs. If this value is not present, then the application title is used instead. Currently only supported on iOS/macOS. defalut value = ""

# `application`
### `application`

Key | Default Value | Description
:--- | :--- | :---
agent | false | If agent is set to true, the app will not display in the tab/window switcher or dock/task-bar etc. Useful if you are building a tray-only app.

# `tray`
### `tray`

Key | Default Value | Description
:--- | :--- | :---
icon | | The icon to be displayed in the operating system tray. On Windows, you may need to use ICO format. defalut value = ""

# `headless`
### `headless`

Key | Default Value | Description
:--- | :--- | :---
Expand Down
Loading
Loading