0.0.20 • Published 2 years ago

wasl v0.0.20

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
2 years ago

wasl

The Web Application Specification Language (WASL)

What is WASL?

wasl is a specification language for defining web applications.

wasl is written in JSON Schema and validated using Ajv. Typescript types are generaged using json-schema-to-typescript. It inherits heavily from the package.json file from Node.js, though includes a new graph key/value pair to declare application logic and associations with other code files.

Each version of wasl is archived in the versions folder of this repository.

Errors vs Warnings

Errors mean that the WASL file will not run.

Warnings indicate that there is suboptimal syntax in the files themselves. However, these are corrected to load the file and don't impact loaded object format.

Features

  • Validation of original JSON files and loaded objects against the JSON Schema
  • Automatic importing of code specified using the src key (anywhere in the WASL file!)

WASL Example Syntax

{
    "graph": {
        "nodes": {
            "first": {
                "src": "first.wasl.json",
                "offload": false,
                "extensions": {
                    "arbitrary": {
                        "x": 1080,
                        "y": 720
                    }
                }
            } ,
            "second": {} 
        },
        "edges": {
            "first": {
                "second" :{
                    "protocol": "none"
                }
            } 
        }
    }
}

On activation, exports of files linked through "src" keys (throughout the entire WASL file) are flattened to their object.

Limitations

With the way that WASL handles remote importing (using remote-esm), files that are not directly linked to (e.g. index.wasl.json links to https://example.com/index.js which imports function.js, our indirect link) cannot share references or modify them during runtime unless you use reference mode.

Contributing

Note: Use Node v16.15.0 or higher (which support import assertions for JSON files) to run the tests

Acknowledgments

wasl was developed for brainsatplay, along with graphscript and visualscript, to construct interactive, high-performance web applications as directed acyclic graphs (DAGs).

0.0.20

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.0

2 years ago