This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Repository navigation
feat: New Deno runtime #665
Merged
Merged
Changes from 111 commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
d1e2e99
Add Deno runtime
d-gubert cb7864f
Add new runtime class
d-gubert 08a4233
wip
d-gubert d58a058
wip: migrated ast fixing algorithm
d-gubert 11b8d1f
Sanitize AST lib
d-gubert 2669abc
Fix reassignment recognition algorithm
d-gubert a7427e0
Add unit tests
d-gubert b733b5d
App instantiation with fake proxies
d-gubert 56d73ba
Add Deno's linter
d-gubert d358a85
Small polish to initialization process
d-gubert 4a4640f
Refactor before branching off
d-gubert 9e41f0e
Improve runtime API and JSON RPC related functions (#669)
d-gubert 8c28628
Adopt jsonrpc-lite package (#671)
d-gubert eb4a862
Create mocks to call accessors from Deno (#670)
d-gubert c10c691
Create the AppObjectRegistry (#673)
d-gubert 419ae51
Change deps to AppManager parameter for runtime and controller
d-gubert 8e2e905
Adapted config accessors (#675)
d-gubert f7e0eb1
Merge branch 'alpha' into feat/deno-runtime
d-gubert 4110cc4
Add Deno tests to CI
d-gubert 632c285
Fix job execution order in Github Actions
d-gubert 092f19b
Modify Accessors (#680)
d-gubert b574afb
Add ModifyUpdater accessors (#681)
d-gubert 1e36587
Add ModifyExtender accessors (#682)
d-gubert 1e4839b
Create logger (#674)
6f9da6f
Refactor app initialization (#684)
d-gubert 30d41d4
Refactor slashcommand execution to new Runtime API (#686)
d-gubert 0d8d413
Refactor app construct handler (#687)
d-gubert 213d6b1
Refactor app initialize method call (#688)
d-gubert 4a6c7e5
Prevent proxies from sending toJSON calls via IPC (#689)
d-gubert 0ed2fd6
Add handlers for App methods on Deno and refactor their usages on Nodβ¦
d-gubert 18cc8d2
Fix logger assignment to App instance on request handling
d-gubert 4a7a913
Fix handleInitialize import
d-gubert f09427e
feat: videoconf handler (#691)
5375ea4
Refactor listener methods (#692)
d-gubert 5a866c5
Add handlers for UIKit methods in Deno and refactor Manager usage (#693)
d-gubert e49d340
feat: add api handler (#694)
d9020f9
Refactor `IApp.getStatus` implementation and usages (#698)
d-gubert 0cb935f
Remove method `hasMethod` from ProxiedApp and its usages (#697)
d-gubert 5853a39
Fix imports in accessors, builders and extenders (#695)
d-gubert 66bf1f3
Scheduler handlers (#696)
d-gubert 9c553f0
Refactor getAppUserUsername usages (#699)
d-gubert c8cef26
Remove `getAccessors` from ProxiedApp (#700)
d-gubert 4cec6b7
refactor: remove app logger (#701)
9161cfa
Add publishing of deno tag for testing
d-gubert de6438f
Fix app construct handler (#702)
d-gubert a87b848
Debugging improvements and some ironing out (#703)
d-gubert 46be1ff
Improve incoming message handling on both Node and Deno (#704)
d-gubert 7e2c030
Deno logger and linting some files
d-gubert 97fc160
fix: add Buffer conversion for file uploads (#705)
241e6a6
Add a routine to stop the subprocess in the applicable situations (#706)
d-gubert ff5f4da
Fix batch (#707)
d-gubert 953d5d9
Fix batch (2) (#708)
d-gubert abe468b
fix: soft lock when an app uses its accessors (#709)
pierre-lehnen-rc 91a0e1e
fix: bridges (#711)
750a875
Added error handling for optional methods in listener manager (#713)
d-gubert 2d76d79
Add undo step to recover from installation errors (#712)
d-gubert 1f35719
fix: accessors proxy message (#715)
f3ce567
fix: buffer import (#716)
eecb6bc
Remove accessors being sent as parameters on settings event handlers β¦
d-gubert e393e25
Prevent timeout if subprocess not available for getStatus (#719)
d-gubert 91eb871
Add logs to app method handlers on Deno (#717)
d-gubert 7168ae7
Adopt msgpack to encode messages instead of JSON (#720)
d-gubert fe4aff4
fix: providedApiEndpoints (#721)
1a22439
fix: get providedApiEndpoints from registered endpoints (#722)
cb16119
Overwrite the name `console` when evaluating the app's code in Deno (β¦
d-gubert 88e17e5
Small refactors (#724)
d-gubert 0db022f
Fix codec and providedApiEndpoints (#725)
d-gubert 474f857
fix: scheduler execution (#726)
58534e5
Fix Deno not writing full messages to stdout (#727)
d-gubert af4c57d
Improve logs (#728)
d-gubert 9ca2c91
Remove unnecessary await in Node's message handler (#729)
d-gubert 056ab3d
Add Queue to Messenger (#730)
d-gubert d792f32
fix: remove buffer converter (#732)
3f845c8
Fix bridge response when result is undefined (#731)
d-gubert 41f88cd
fix: remove buffer (#733)
f89c7ba
Fix permissions for Deno subprocess when package is installed (#734)
d-gubert 8d09c7c
Grant networking permission to Deno subprocess (#736)
d-gubert 55ebc83
fix: wrap `room.usernames` with await (#737)
924e834
Bundle legacy apps (#743)
d-gubert f59a2bf
Add new Deno task definition and cache path (#683)
d-gubert 2331aed
fix: deno wrapper path (#744)
ac30850
fix: test api endpoint import (#745)
595df04
Merge remote-tracking branch 'origin/alpha' into feat/deno-runtime
d-gubert 24b3562
Add debug package (#746)
d-gubert 34cbbba
fix: handle api endpoint execution exceptions (#747)
b837ad1
Fix video conf provider calls (#748)
d-gubert 677ee3b
Add time debugger for requests
d-gubert 4b250cd
increase wait for app to build for debug
c550988
fix: http extend handlers (#751)
86c3b45
Fix imports in http accessors on Deno
d-gubert a2d1c2f
chore: ignore .deno folder
6b3df5a
test: remove since its on deno side
ac6d54a
Add ping method (#755)
d-gubert e1d5a42
Improve validation for process spawning
d-gubert e797c21
Add handler for 'error' event on child_process.spawn
d-gubert 6231a21
Merge commit 'origin/alpha' into feat/deno-runtime
d-gubert 28e4b41
Allow 'fs' module for compatibility
d-gubert 872526a
Improve ping (#758)
d-gubert efe62b0
test: mock videoConferenceBridge
b0e84e9
Revert the request timeout to the previous value
d-gubert 7ec1948
Improve ping time (#759)
d-gubert 9425792
Log execution time for failed requests as well
d-gubert 1399cd7
Improve debugging messages of accessor handler
d-gubert d327b75
Fix unhandled exception if ping times out
d-gubert daaff54
Fix creator and updater modifiers usage of the senderFn
d-gubert da47188
Allow Deno process to read NODE_EXTRA_CA_CERTS env var (#761)
d-gubert 39445db
Fix wrong method name in Deno Logger class
d-gubert 46f998e
Fix codec extension for buffer transfer
d-gubert a09ff8e
Merge remote-tracking branch 'origin/alpha' into feat/deno-runtime
d-gubert 5abe1d7
Comments for clarification
d-gubert bf642f9
Merge remote-tracking branch 'origin/alpha' into feat/deno-runtime
d-gubert 6e1b09a
Remove automation to publish the 'deno' tag
d-gubert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ | |
| /docs | ||
| /server | ||
| /lib | ||
| /deno-runtime | ||
| /.deno | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,8 @@ jspm_packages | |
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| .deno | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .deno/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| export type Maybe<T> = T | null | undefined; | ||
|
|
||
| export const AppObjectRegistry = new class { | ||
| registry: Record<string, unknown> = {}; | ||
|
|
||
| public get<T>(key: string): Maybe<T> { | ||
| return this.registry[key] as Maybe<T>; | ||
| } | ||
|
|
||
| public set(key: string, value: unknown): void { | ||
| this.registry[key] = value; | ||
| } | ||
|
|
||
| public has(key: string): boolean { | ||
| return key in this.registry; | ||
| } | ||
|
|
||
| public delete(key: string): void { | ||
| delete this.registry[key]; | ||
| } | ||
|
|
||
| public clear(): void { | ||
| this.registry = {}; | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| import type acorn from "./acorn.d.ts"; | ||
|
|
||
| export type FullWalkerCallback<TState> = ( | ||
| node: acorn.AnyNode, | ||
| state: TState, | ||
| type: string | ||
| ) => void | ||
|
|
||
| export type FullAncestorWalkerCallback<TState> = ( | ||
| node: acorn.AnyNode, | ||
| state: TState, | ||
| ancestors: acorn.AnyNode[], | ||
| type: string | ||
| ) => void | ||
|
|
||
| type AggregateType = { | ||
| Expression: acorn.Expression, | ||
| Statement: acorn.Statement, | ||
| Pattern: acorn.Pattern, | ||
| ForInit: acorn.VariableDeclaration | acorn.Expression | ||
| } | ||
|
|
||
| export type SimpleVisitors<TState> = { | ||
| [type in acorn.AnyNode["type"]]?: (node: Extract<acorn.AnyNode, { type: type }>, state: TState) => void | ||
| } & { | ||
| [type in keyof AggregateType]?: (node: AggregateType[type], state: TState) => void | ||
| } | ||
|
|
||
| export type AncestorVisitors<TState> = { | ||
| [type in acorn.AnyNode["type"]]?: ( node: Extract<acorn.AnyNode, { type: type }>, state: TState, ancestors: acorn.Node[] | ||
| ) => void | ||
| } & { | ||
| [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, ancestors: acorn.Node[]) => void | ||
| } | ||
|
|
||
| export type WalkerCallback<TState> = (node: acorn.Node, state: TState) => void | ||
|
|
||
| export type RecursiveVisitors<TState> = { | ||
| [type in acorn.AnyNode["type"]]?: ( node: Extract<acorn.AnyNode, { type: type }>, state: TState, callback: WalkerCallback<TState>) => void | ||
| } & { | ||
| [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, callback: WalkerCallback<TState>) => void | ||
| } | ||
|
|
||
| export type FindPredicate = (type: string, node: acorn.Node) => boolean | ||
|
|
||
| export interface Found<TState> { | ||
| node: acorn.Node, | ||
| state: TState | ||
| } | ||
|
|
||
| /** | ||
| * does a 'simple' walk over a tree | ||
| * @param node the AST node to walk | ||
| * @param visitors an object with properties whose names correspond to node types in the {@link https://github.com/estree/estree | ESTree spec}. The properties should contain functions that will be called with the node object and, if applicable the state at that point. | ||
| * @param base a walker algorithm | ||
| * @param state a start state. The default walker will simply visit all statements and expressions and not produce a meaningful state. (An example of a use of state is to track scope at each point in the tree.) | ||
| */ | ||
| export function simple<TState>( | ||
| node: acorn.Node, | ||
| visitors: SimpleVisitors<TState>, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): void | ||
|
|
||
| /** | ||
| * does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. | ||
| * @param node | ||
| * @param visitors | ||
| * @param base | ||
| * @param state | ||
| */ | ||
| export function ancestor<TState>( | ||
| node: acorn.Node, | ||
| visitors: AncestorVisitors<TState>, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): void | ||
|
|
||
| /** | ||
| * does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node. | ||
| * @param node | ||
| * @param state the start state | ||
| * @param functions contain an object that maps node types to walker functions | ||
| * @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used. | ||
| */ | ||
| export function recursive<TState>( | ||
| node: acorn.Node, | ||
| state: TState, | ||
| functions: RecursiveVisitors<TState>, | ||
| base?: RecursiveVisitors<TState> | ||
| ): void | ||
|
|
||
| /** | ||
| * does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node | ||
| * @param node | ||
| * @param callback | ||
| * @param base | ||
| * @param state | ||
| */ | ||
| export function full<TState>( | ||
| node: acorn.Node, | ||
| callback: FullWalkerCallback<TState>, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): void | ||
|
|
||
| /** | ||
| * does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. | ||
| * @param node | ||
| * @param callback | ||
| * @param base | ||
| * @param state | ||
| */ | ||
| export function fullAncestor<TState>( | ||
| node: acorn.AnyNode, | ||
| callback: FullAncestorWalkerCallback<TState>, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): void | ||
|
|
||
| /** | ||
| * builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}. | ||
| * @param functions | ||
| * @param base | ||
| */ | ||
| export function make<TState>( | ||
| functions: RecursiveVisitors<TState>, | ||
| base?: RecursiveVisitors<TState> | ||
| ): RecursiveVisitors<TState> | ||
|
|
||
| /** | ||
| * tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred. | ||
| * @param node | ||
| * @param start | ||
| * @param end | ||
| * @param type | ||
| * @param base | ||
| * @param state | ||
| */ | ||
| export function findNodeAt<TState>( | ||
| node: acorn.AnyNode, | ||
| start: number | undefined, | ||
| end?: number | undefined, | ||
| type?: FindPredicate | string, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): Found<TState> | undefined | ||
|
|
||
| /** | ||
| * like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position. | ||
| * @param node | ||
| * @param start | ||
| * @param type | ||
| * @param base | ||
| * @param state | ||
| */ | ||
| export function findNodeAround<TState>( | ||
| node: acorn.AnyNode, | ||
| start: number | undefined, | ||
| type?: FindPredicate | string, | ||
| base?: RecursiveVisitors<TState>, | ||
| state?: TState | ||
| ): Found<TState> | undefined | ||
|
|
||
| /** | ||
| * similar to {@link findNodeAround}, but will match all nodes after the given position (testing outer nodes before inner nodes). | ||
| */ | ||
| export const findNodeAfter: typeof findNodeAround | ||
|
|
||
| export const base: RecursiveVisitors<unknown> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.