Commit Graph
256 Commits
Author SHA1 Message Date
+1 766fb96ff2 Adding support for hosting with URL prefix (#1357)
* Adding support for hosting with URL prefix to make reverse-proxy setup on sub-path possible

* Adjusting recent changes to auth.html (changing to relative URLs)  after rebasing from upstream

* Adjusting service_worker and application manifest to support URL-prefix

* Add notes on Space Lua Pattern Matching (#1366)

* Remove common/space_lua/stdlib/math.md (#1371)

* Escape pipe symbol in string.gsub (#1370)

* feat: configure vim in CONFIG (#1369)

* Fix week calculation (#1368)

* Add more tests for week calculation

* Fix week calculation

* Add more tests

* Implement Lua built-in function os.difftime (#1367)

* Implement Lua built-in function os.difftime

* Test os.difftime

---------

Co-authored-by: Zef Hemel <zef@zef.me>

* Fix index page naming during server initialization (#1365)

* Allow non-zero shell exit codes (#1377)

* Generate version from git describe at build time (#1374)

* Generate version from git describe at build time

* Add 2.0-beta prefix

* Use Deno.Command instead of Deno.run

* Add missing case to math.random and check arguments (#1372)

* Fix paragraphs for the tag page (#1376)

* Render a predefined string for empty markdown table instead of pipe characters (#1387)

* Fix string.find (#1390)

* Fetch tags and history for proper version string generation (#1388)

* Fix support for disabling shortcuts (#1393)

* Add GitHub Actions Cache to reduce build times (#1394)

* Order strings in queries using collation algorithm (#1391)

Configurable with queryCollation, default value maintains old behaviour.
Added tests, schema, example settings, and documentation to query page.

Close: #614
Close: #1316

* Utility function to handle empty query results and templates (#1386)

* Add global Lua function 'some'

Moved documentation for 'each' function to non-standard section.

* Revert "Add optional argument to template.each for empty collection output (#1359)"

This reverts commit b73dadec67.

* Reimplement #1359 using 'some' function

* Update Lua to event.listEvents to match plugos syscall (#1397)

The documentation, example, and other function names use
`event.listEvents`, but `event.list` is being registered with the
client.

* Update widget header to not overflow container (#1410)

Also add a 10px margin below the header to maintain consistent spacing
around the widget contents.

* fix: case insensitive admonitions by default (#1409)

* fix: closing bracket is missing (#1408)

* Add optional priority attribute to PageCreatingContent (#1392)

* Add optional priority attribute to PageCreatingContent

* Minor simplification

* Fix comments

* Revert changes

* Add pageEventHandlers

* Use UTC year, month, and date for strings lacking time components (#1403)

* feat: allow CONFIG.md in any directory (#1398)

* fix: bundle external dependencies (#1379)

* Deno bump

* Copy-edit splash screen text (#1413)

* Fixes #1401 by implementing Lua's select

* Fixes offline capability of PWA (I hope).

Now storing config in localStorage.

* fix lint

* Reduce blast radius of Lua errors

* Fixes #1411: adds 'priority' setting for space style

* Refactor: Merging common/ into web/

* Fixes #1400

* Improves #1312 by rendering Lua expressions (but not widgets)

* Fix minor typos, add configuration to the docs

---------

Co-authored-by: wbhouston <wmbhouston@gmail.com>
Co-authored-by: Lennart Ochel <lennart.ochel@outlook.com>
Co-authored-by: Matthias Benaets <89214559+MatthiasBenaets@users.noreply.github.com>
Co-authored-by: Zef Hemel <zef@zef.me>
Co-authored-by: Marek S. Łukasiewicz <marek@lukasiewicz.tech>
Co-authored-by: Ivan Alejandro <ivanalejandro0@gmail.com>
Co-authored-by: Albert-Jan de Vries <aj+github@albert-jandevries.nl>
Co-authored-by: Cole Stowell <121599022+costowell@users.noreply.github.com>
Co-authored-by: Jim Tittsler <jimt@onjapan.net>
2025-06-04 15:15:14 +02:00
Zef Hemel bf2e0cdb87 Refactor: Merging common/ into web/ 2025-06-04 14:01:59 +02:00
Matthias BenaetsandGitHub c23402ded6 feat: allow CONFIG.md in any directory (#1398) 2025-05-26 20:05:42 +02:00
Lennart OchelandGitHub 71ba757534 Fix index page naming during server initialization (#1365) 2025-05-04 20:54:25 +02:00
Zef Hemel a7191d540a Expose htmlEscape function for external use and integrate it into the HTTP server response handling to sanitize DESCRIPTION values. 2025-03-31 16:03:35 +02:00
Zef Hemel 453cb912d9 Refactor Lua built-in functions for improved type handling
- Updated `ipairsFunction` and `pairsFunction` to accept both `LuaTable` and array types, enhancing flexibility.
- Modified `eachFunction` to support arrays, ensuring consistent behavior across different data structures.
- Added type checks and adjusted key retrieval logic for better compatibility with JavaScript objects.
2025-03-30 15:03:57 +02:00
Zef Hemel f429e1f7b2 Attempt to address /.config auth issues 2025-03-29 19:20:11 +01:00
Zef Hemel 1703020a8a feat: Add logout option to client wipe functionality
- Add optional logout parameter to system.wipeClient

- Add new 'Clear Local Storage & Logout' command

- Update API to support logout parameter

- Clean up server code comments
2025-03-28 13:45:39 +01:00
Zef Hemel 96f299bf8a Shell streaming support (Lua) 2025-03-27 17:04:15 +01:00
Zef Hemel 706588cd56 Bringing in config and config docs 2025-03-26 17:46:35 +01:00
Zef Hemel 254d6e6379 Ripped out use of Deno KV and other unstable features 2025-03-24 20:21:17 +01:00
Zef Hemel ac5a839ea8 Moving some endpoints 2025-03-22 07:32:27 +01:00
Zef Hemel dbfc5995f3 More thorough removal of federation 2025-03-21 16:12:10 +01:00
Zef Hemel fa8f07a123 Kinda working 2025-03-21 16:12:10 +01:00
Zef Hemel d50ddc2357 First very rough pass of cleanup 2025-03-21 16:12:07 +01:00
Zef Hemel ac5c0d676e Fix typecheck 2025-03-20 09:24:04 +01:00
stagandGitHub 66e4498159 Content-Type header in HTTP custom endpoint response handlers are now respected (#1300)
Before the commit, adding a Content-Type header in the reponse from the handler of a http:request:foobar event would be ignored and set to text/plain because of using ctx.text to return the request. ctx.text will set Content-Type to text/plain.

Now, if a Content-Type header is detected it will use a plain ctx.body response which does not alter Content-Type.
2025-03-20 09:19:53 +01:00
Zef Hemel 418138f9c9 Lint fixes 2025-03-14 10:37:30 +01:00
Zef Hemel def7bf6a2f Hono dependency upgrade 2025-03-14 10:02:25 +01:00
Zef Hemel 977f87864d Dependency bumps 2025-03-14 10:02:25 +01:00
Zef Hemel 29076afe95 Fix lint issues 2025-03-13 09:21:03 +01:00
Zef Hemel 808fdd13c0 Restrict sending CORS headers to non-dangerous HTTP methods 2025-03-13 09:10:20 +01:00
Zef Hemel 0a80c5c537 Collapse PageRef, DocumentRef and LocationRef into a single Ref type 2025-03-07 13:49:20 +01:00
Zef Hemel f0ed003066 Moved spaceIgnore to be a environment variable as well 2025-03-07 11:12:49 +01:00
Zef Hemel 1dc1103b2a Moved indexPage configuration to SB_INDEX_PAGE env variable instead
Added /.config endpoint to more dynamically influence the configuration
2025-03-07 10:56:45 +01:00
MrMugameandGitHub e61a447d98 Implementing #913 (#1230)
Implemented custom editors
2025-03-06 15:11:17 +01:00
Zef Hemel 9e0925beff Fix lint issues 2025-02-22 11:50:44 +01:00
Zef Hemel 5ca0e98300 Upgrade to deno 2.2 2025-02-20 07:53:14 +01:00
Zef Hemel 5111b5a380 http.request Lua syscall 2025-02-13 21:12:00 +01:00
Zef Hemel 44a1ce698e Support plugs to register their own syscalls, using syscall (see the index plug for an example) 2025-02-07 15:16:57 +01:00
Zef Hemel 9f8ac92464 Fix federation proxy to IP 2025-02-06 21:02:57 +01:00
Zef Hemel e1c997616c Support ${lua expression} in templates 2025-02-06 11:58:27 +01:00
Zef Hemel e44b2776df Fix to federation proxy for non-GET requests 2025-02-06 08:36:06 +01:00
Zef Hemel 6078452a6c Breaking Lua API changes:
* tpl -> template.new
* define_command -> command.define
* define_event_listener -> event.listen
* tag -> index.tag

Updated in the docs
2025-01-19 14:32:11 +01:00
Zef Hemel 83550c1623 Exposing Objects indexing as syscalls 2025-01-17 10:41:02 +01:00
Zef Hemel 55f5a465c8 Lua query fixes 2025-01-16 15:33:18 +01:00
Zef HemelandGitHub 61f82869e9 Lua integrated query work (#1205)
* Lua query embeddings
2025-01-12 16:54:04 +01:00
Martin MauchandGitHub 6e421ca20e Fix passing URL parameters when proxying (#1168) 2024-12-14 09:58:41 +01:00
Zef Hemel 51fc5952bc Some enhancement of the lockout mechanism 2024-11-15 16:56:54 +01:00
Peter WestonandGitHub 046a0df868 Simple protection against brute force attacks (#1152) 2024-11-15 16:51:18 +01:00
aekaisatoandGitHub 64bbe67912 Create "remember me" functionality for basic auth, which sets an unexpiring jwt and refreshes the cookie during requests (#1132)
* Create "remember me" functionality for basic auth, which sets an unexpiring jwt and refreshes the cookie during requests
2024-10-28 14:09:32 +01:00
Zef Hemel 6a30284bab Migration to Deno 2.0 2024-10-10 12:52:28 +02:00
Zef Hemel 3cf7b72ebb First integration of Lua into the core (via space-lua code blocks) 2024-10-03 17:55:51 +02:00
Zef Hemel cb88eae885 Attempt to fix auth proxies by making redirects manual #1028 2024-09-25 13:25:15 +02:00
Zef Hemel f7fe7cadbc Revert "Attempt to fix auth proxies by making redirects manual #1028"
This reverts commit d6fb5e0c29.
2024-09-11 21:18:27 +02:00
Zef Hemel d6fb5e0c29 Attempt to fix auth proxies by making redirects manual #1028 2024-09-09 18:36:54 +02:00
Zef HemelandGitHub 80f9c14b96 Change how attribute indexing and completion works (#1061)
* Creation of separate aspring-page objects for pages linked to, but not created
* Show "No results" instead of broken markdown table for no query results
* Show schema validation errors
* Deno upgrade
* Adds config support to plugs (see examples)
* Moves all builtin schemas to plug config
* Adds core plug just for builtin schemas
* Changes how attributes are indexed and completed, now attempts to derive a JSON schema for ad hoc attributes
2024-08-24 12:35:09 +02:00
Zef Hemel b8081d970c Fixes #1049 centralizes page URL encoding and decoding 2024-08-20 09:38:56 +02:00
Zef Hemel cf054fa186 Should fix #1019 and #1035 2024-08-18 10:39:04 +02:00
Zef Hemel 074aa323c2 Initial schema implementation #104 2024-08-15 16:39:06 +02:00