diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..93654f2b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,32 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: bug
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Environment**
+ - OS: [e.g. macOS, Windows, Ubuntu]
+ - Language [e.g. AssemblyScript, Go]
+ - Version [e.g. v0.xx]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..bbcbbe7d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 00000000..4d373795
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,10 @@
+# Description
+Please explain the changes you made here.
+
+# Checklist
+- [ ] Code compiles correctly and linting passes locally
+- [ ] Tests for new functionality and regression tests for bug fixes added
+- [ ] Documentation added or updated
+- [ ] Entry added to the `CHANGELOG.md` file describing and linking to this PR
+
+Thank you for your contribution to the Modus project!
diff --git a/.markdownlint.json b/.markdownlint.json
new file mode 100644
index 00000000..f2d969fe
--- /dev/null
+++ b/.markdownlint.json
@@ -0,0 +1,5 @@
+{
+ "default": true,
+ "MD013": false,
+ "MD034": false
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 24cf1bc4..068dfa12 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -9,6 +9,7 @@
"preLaunchTask": "go: generate code",
"program": "${workspaceFolder}/runtime",
"env": {
+ "MODUS_ENV": "dev",
"MODUS_DEBUG": "true",
"MODUS_DB": "postgresql://postgres:postgres@localhost:5433/my-runtime-db?sslmode=disable"
},
@@ -22,6 +23,7 @@
"preLaunchTask": "go: generate code",
"program": "${workspaceFolder}/runtime",
"env": {
+ "MODUS_ENV": "dev",
"MODUS_DEBUG": "true",
"AWS_REGION": "us-west-2",
"AWS_PROFILE": "sandbox",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c023464..733fbdaf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
# Change Log
-## UNRELEASED
+## UNRELEASED (work in progress)
+
+_NOTE: This is the first fully open-source release, using the name "Modus" for the framework.
+"Hypermode" still refers to the company and the commercial hosting platform - but not the framework.
+In previous releases, the name "Hypermode" was used for all three._
- Migrate from Hypermode to Modus [#412](https://github.com/hypermodeinc/modus/pull/412)
- Import WasmExtractor code [#415](https://github.com/hypermodeinc/modus/pull/415)
@@ -11,6 +15,12 @@
- Remove HTTP Timeout, Add Context Timeout on Collections [#422](https://github.com/hypermodeinc/modus/pull/422)
- Add Modus AssemblyScript SDK [#423](https://github.com/hypermodeinc/modus/pull/423)
- Add models to Modus AssemblyScript SDK [#428](https://github.com/hypermodeinc/modus/pull/428)
+- Add Vectors SDK support [#431](https://github.com/hypermodeinc/modus/pull/431)
+- Update Readme files [#432](https://github.com/hypermodeinc/modus/pull/432)
+- Fix vulnerability in AssemblyScript SDK install script [#435](https://github.com/hypermodeinc/modus/pull/435)
+- Fix potential array out of bounds in the runtime [#437](https://github.com/hypermodeinc/modus/pull/437)
+- Set minimum Go version to 1.23.0 [#438](https://github.com/hypermodeinc/modus/pull/438)
+- Change default for environment setting [#439](https://github.com/hypermodeinc/modus/pull/439)
## 2024-10-02 - Version 0.12.7
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..bec106a7
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+# Contributing to Modus
+
+TODO
diff --git a/README.md b/README.md
index 2812f61f..51c6cd0d 100644
--- a/README.md
+++ b/README.md
@@ -1,209 +1,65 @@
-
-
-
+
+[![chat](https://img.shields.io/discord/1267579648657850441)](https://discord.gg/NJQ4bJpffF)
# Modus
-## TODO - rewrite this whole file in the context of Modus
+Modus is an open-source, serverless framework for building intelligent functions and APIs, powered by WebAssembly.
-This repository contains the source code for the _Hypermode Runtime_.
-The Runtime loads and executes _plugins_ containing _Hypermode Functions_.
+This repository contains the Modus source code, including the Modus runtime, SDKs, CLI, and introductory examples.
-To get started with Hypermode Functions written in AssemblyScript, visit the
-`functions-as` repository.
+_Please note that prior to version 0.13.0, Modus was simply referred to as "Hypermode". Please bear with us if you find name conflicts while we are in transition!_
-## Command Line Parameters
+## Getting Started
-When starting the Runtime, you can use the following command line parameters:
+To get started using Modus, please refer to [the Modus docs](https://docs.hypermode.com/modus) site.
-- `--port` - The HTTP port to listen on. Defaults to `8686`.
-- `--modelHost` - The base DNS of the host endpoint to the model server.
-- `--storagePath` - The path to a directory used for local storage.
- - Linux / OSX default: `$HOME/.hypermode`
- - Windows default: `%APPDATA%\Hypermode`
-- `--useAwsSecrets` - Use AWS Secrets Manager for API keys and other secrets.
-- `--useAwsStorage` - Use AWS S3 for storage instead of the local filesystem.
-- `--s3bucket` - The S3 bucket to use, if using AWS storage.
-- `--s3path` - The path within the S3 bucket to use, if using AWS storage.
-- `--refresh` - The refresh interval to reload any changes. Defaults to `5s`.
-- `--jsonlogs` - Use JSON format for logging.
+## Open Source
-_Note: You can use either `-` or `--` prefixes, and you use either a space or `=` to provide values._
+Modus is developed by [Hypermode](https://hypermode.com/) as an open-source project, integral but independent from Hypermode.
+We welcome external contributions! See the [CONTRIBUTING.md](./CONTRIBUTING.md) file if you would like to get involved!
-## Environment Variables
+## Programming Languages
-The following environment variables are used by the Hypermode Runtime:
+Since Modus is based on WebAssembly, you can write Modus apps in various programming languages.
+Each language offers the full capabilities of the Modus framework.
-- `ENVIRONMENT` - The name of the environment, such as `dev`, `stage`, or `prod`. Defaults to `dev` when not specified.
-- `NAMESPACE` - Used in non-dev (ie. stage/prod) environments to retrieve the Kubernetes namespace for the Hypermode backend.
-- `HYPERMODE_METADATA_DB` - Used in dev environment only, to set a connection string to a local Postgres database to use for Hypermode metadata.
+Currently, the supported languages you may choose from are:
-### Local Secrets
+- [AssemblyScript](https://www.assemblyscript.org/) - A TypeScript-like language designed for WebAssembly.
+ - If you are primarily used to writing front-end web apps, you'll feel at home with AssemblyScript.
-When running locally, in addition to the above, secrets are passed by environment variable using the following convention:
+- [Go](https://go.dev/) - A general-purpose programming language originally designed by Google.
+ - If you are primarily used to writing back-end apps, you'll likely prefer to use Go.
-```
-HYPERMODE__
-```
+Additional programming languages may be supported in the future.
-- Substitute `` for the upper-cased name of the model, replacing hyphens (`-`) with underscores (`_`).
-- Substitute `` for the upper-cased name of the secret variable used in the manifest.
+## Hosting
-For example, if the manifest contains the host entry:
+We have designed Hypermode to be the best place to run your Modus app.
+Hypermode hosting plans include features you might expect, such as professional support, telemetry, and high availability.
+They also include specialty features such as model hosting that are purposefully designed to work in tandem with Modus apps.
+Thus, for the best experience, please consider hosting your Modus apps on Hypermode.
+See [hypermode.com](https://hypermode.com/) for details and pricing.
-```json
-"my-api": {
- "endpoint":"https://api.example.com/",
- "headers": {
- "Authorization": "Bearer {{AUTH_TOKEN}}"
- }
-},
-```
+As Modus is a free, open-source framework, you’re welcome to run your Modus apps on your own hardware or on any
+hosting platform that meets your needs. However, please understand that we cannot directly support issues related
+to third-party hosting.
-... then the corresponding environment variable name would be `HYPERMODE_MY_API_AUTH_TOKEN`.
-The value of that environment variable would be used as the bearer token for any requests to that host.
+## Support
-### Using a `.env` file
+Hypermode paid hosting plans include standard or premium support that covers both Hypermode and Modus, with response-time guarantees.
+Click the _support_ link after signing in to Hypermode, or email help@hypermode.com for paid support if you are a Hypermode customer.
-While environment variables can be set through traditional mechanisms, they can also (optionally)
-be set in a file called `.env`, placed in the plugins path. The file should be a simple list of
-key/value pairs for each environment variable you want to set when the Runtime is loaded.
+For free community-based support (without a response-time guarantee), or if you'd just like to share your experiences with
+Modus or Hypermode, please chat with us on [Discord](https://discord.gg/NJQ4bJpffF).
+We'd be happy to hear from you!
-For example:
+If you believe you have found a bug in Modus, please file a [Github issue](https://github.com/hypermodeinc/modus/issues)
+so we can triage the problem and route it to our engineers as efficiently as possible.
-```
-HYPERMODE_FOO=abc123
-HYPERMODE_BAR=xyz456
-```
+## License
-## Building the Runtime
+Modus and its components are Copyright 2024 Hypermode Inc., and licensed under the terms of the Apache License, Version 2.0.
+See the [LICENSE](./LICENSE) file for a complete copy of the license.
-Ensure that you have Go installed in your dev environment.
-The required minimum major version is specified in the [go.mod](./go.mod) file.
-It is recommended to use the latest patch version available, and keep current.
-
-Then, you can do any of the following:
-
-- You can run directly from source code:
-
- ```sh
- go run .
- ```
-
-- You can compile the source code and run the output:
-
- ```sh
- go build
- ./hypruntime
- ```
-
-- You can run and debug the source code in VS Code, using the VS Code debugger.
-
-## Docker Setup
-
-To build a Docker image for the Hypermode Runtime:
-
-```sh
-docker build -t hypermode/runtime .
-```
-
-When running the image via Docker Desktop, keep in mind:
-
-- You may wish to give the container a specific name using `--name`.
-- Port `8686` should be exposed.
-- If using local storage, you'll need to map the container's `/root/.hypermode` folder to your own `~/.hypermode` folder.
-- You may need to pass command line parameters and/or set environment variables.
-
-For example:
-
-```sh
-docker run --name hypruntime \
- -p 8686:8686 \
- -v ~/.hypermode:/root/.hypermode hypermode/runtime
-```
-
-_Note, if you have previously created a container with the same name, then delete it first with `docker rm hypruntime`._
-
-## AWS Setup
-
-If configured to do so, the Hypermode Runtime may access AWS resources.
-If you are debugging locally, set up an AWS profile.
-
-```sh
-export AWS_PROFILE=sandbox
-```
-
-Declare the `sandbox` profile in `~/.aws/config` as follows:
-
-```ini
-[profile sandbox]
-sso_start_url = https://d-92674fec42.awsapps.com/start#
-sso_region = us-west-2
-sso_account_id = 436061841671
-sso_role_name = AWSPowerUserAccess
-region = us-west-2
-```
-
-Then run `aws sso login --profile sandbox` to login to the profile.
-
-After SSO login you can start the Runtime, either from the VS Code debugger
-using the `Hypermode Runtime (AWS)` launch profile, or from the command line as follows:
-
-```sh
-export AWS_SDK_LOAD_CONFIG=true
-export AWS_PROFILE=sandbox
-./hypruntime \
- --useAwsSecrets \
- --useAwsStorage \
- --s3bucket=sandbox-runtime-storage \
- --s3path=shared
-```
-
-You can omit the exports if the environment variables are already set.
-You can also use any S3 bucket or path you like. If a path is not specified, the Runtime will look for files in the root of the bucket.
-
-_The shared sandbox is intended for temporary use. In production, each customer's backend gets a separate path within a single bucket._
-
-## Using Model Inference History Locally
-
-To set up the model inference history table, run the following command, which will start a local postgres instance.
-
-```sh
-cd tools/local
-docker-compose up
-```
-
-Next, you will need to apply the database schema using the [golang-migrate](https://github.com/golang-migrate/migrate) utility.
-
-On MacOS, you can install this utility with the following:
-
-```sh
-brew install golang-migrate
-```
-
-Then, you can apply the migration as follows:
-
-```sh
-export POSTGRESQL_URL='postgresql://postgres:postgres@localhost:5433/my-runtime-db?sslmode=disable'
-migrate -database ${POSTGRESQL_URL} -path db/migrations up
-```
-
-Now any model inference will be logged in the `inferences` table in the `my-runtime-db` database.
-
-## Unit Testing
-
-Unit tests are created using Go's [built-in unit test support](https://go.dev/doc/tutorial/add-a-test).
-
-To run all tests in the project:
-
-```sh
-go test ./...
-```
-
-Or, you can just run tests in specific folders. For example:
-
-```sh
-go test ./functions
-```
-
-Tests can also be run from VS Code's Testing panel, and are run automatically for pull requests.
+If you have any questions about Modus licensing, or need an alternate license or other arrangement, please contact us at hello@hypermode.com.
diff --git a/go.mod b/go.mod
index d56ec9da..ecd2543c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/hypermodeinc/modus
-go 1.23
+go 1.23.0
require (
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
diff --git a/pkg/manifest/collection.go b/pkg/manifest/collection.go
index 7c9f6ab4..68c90d15 100644
--- a/pkg/manifest/collection.go
+++ b/pkg/manifest/collection.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/dgraph.go b/pkg/manifest/dgraph.go
index aae1a53a..7d544a8e 100644
--- a/pkg/manifest/dgraph.go
+++ b/pkg/manifest/dgraph.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/http.go b/pkg/manifest/http.go
index 5d42908e..26ec89eb 100644
--- a/pkg/manifest/http.go
+++ b/pkg/manifest/http.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/manifest.go b/pkg/manifest/manifest.go
index 55498efc..7b1bb319 100644
--- a/pkg/manifest/manifest.go
+++ b/pkg/manifest/manifest.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/model.go b/pkg/manifest/model.go
index e308377a..3f035f47 100644
--- a/pkg/manifest/model.go
+++ b/pkg/manifest/model.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/postgresql.go b/pkg/manifest/postgresql.go
index 4893da85..68e35004 100644
--- a/pkg/manifest/postgresql.go
+++ b/pkg/manifest/postgresql.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/manifest/test/manifest_test.go b/pkg/manifest/test/manifest_test.go
index 72747cf1..0464432b 100644
--- a/pkg/manifest/test/manifest_test.go
+++ b/pkg/manifest/test/manifest_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/pkg/wasmextractor/wasmextractor.go b/pkg/wasmextractor/wasmextractor.go
index 65956ce8..d40b2223 100644
--- a/pkg/wasmextractor/wasmextractor.go
+++ b/pkg/wasmextractor/wasmextractor.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/Dockerfile b/runtime/Dockerfile
index 896e33f4..a778de8c 100644
--- a/runtime/Dockerfile
+++ b/runtime/Dockerfile
@@ -14,7 +14,7 @@ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o modus_runtime
# build the container image
FROM ubuntu:22.04
-LABEL maintainer="Hypermode, Inc. "
+LABEL maintainer="Hypermode Inc. "
# add common tools
RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/runtime/README.md b/runtime/README.md
new file mode 100644
index 00000000..34abacc0
--- /dev/null
+++ b/runtime/README.md
@@ -0,0 +1,8 @@
+# Modus Runtime
+
+This directory contains the source code for the Modus runtime,
+which is responsible for loading and executing your Modus app.
+
+Unless you are contributing to the Modus project, you will not need to download this code directly.
+Instead, a compiled platform-specific binary of the Modus runtime will be downloaded and installed
+in your development environment by the Modus CLI, or used when hosting a Modus app in production.
diff --git a/runtime/aws/config.go b/runtime/aws/config.go
index 3a6044bf..549928fd 100644
--- a/runtime/aws/config.go
+++ b/runtime/aws/config.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/collection.go b/runtime/collections/collection.go
index a8f37dca..bf485001 100644
--- a/runtime/collections/collection.go
+++ b/runtime/collections/collection.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/collections.go b/runtime/collections/collections.go
index 10fb4a8e..f58c39eb 100644
--- a/runtime/collections/collections.go
+++ b/runtime/collections/collections.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/factory.go b/runtime/collections/factory.go
index 3091dda2..262f40b2 100644
--- a/runtime/collections/factory.go
+++ b/runtime/collections/factory.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/hnsw/vector_index.go b/runtime/collections/in_mem/hnsw/vector_index.go
index d917d2f5..d93b3137 100644
--- a/runtime/collections/in_mem/hnsw/vector_index.go
+++ b/runtime/collections/in_mem/hnsw/vector_index.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/hnsw/vector_index_test.go b/runtime/collections/in_mem/hnsw/vector_index_test.go
index 33f58748..8746bea5 100644
--- a/runtime/collections/in_mem/hnsw/vector_index_test.go
+++ b/runtime/collections/in_mem/hnsw/vector_index_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/sequential/vector_index.go b/runtime/collections/in_mem/sequential/vector_index.go
index abddf768..315ba819 100644
--- a/runtime/collections/in_mem/sequential/vector_index.go
+++ b/runtime/collections/in_mem/sequential/vector_index.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/sequential/vector_index_test.go b/runtime/collections/in_mem/sequential/vector_index_test.go
index 1382fabe..0f7a4013 100644
--- a/runtime/collections/in_mem/sequential/vector_index_test.go
+++ b/runtime/collections/in_mem/sequential/vector_index_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/text_index.go b/runtime/collections/in_mem/text_index.go
index 4f880757..2ed7afe4 100644
--- a/runtime/collections/in_mem/text_index.go
+++ b/runtime/collections/in_mem/text_index.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/in_mem/text_index_test.go b/runtime/collections/in_mem/text_index_test.go
index 12d8ca5e..a76e5e7d 100644
--- a/runtime/collections/in_mem/text_index_test.go
+++ b/runtime/collections/in_mem/text_index_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/index/helper.go b/runtime/collections/index/helper.go
index b989b49d..e642946c 100644
--- a/runtime/collections/index/helper.go
+++ b/runtime/collections/index/helper.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/index/index.go b/runtime/collections/index/index.go
index 39d39f97..2657854e 100644
--- a/runtime/collections/index/index.go
+++ b/runtime/collections/index/index.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/index/interfaces/interfaces.go b/runtime/collections/index/interfaces/interfaces.go
index 47d532ac..7544a289 100644
--- a/runtime/collections/index/interfaces/interfaces.go
+++ b/runtime/collections/index/interfaces/interfaces.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/index/search_path.go b/runtime/collections/index/search_path.go
index a1ae931f..f805572a 100644
--- a/runtime/collections/index/search_path.go
+++ b/runtime/collections/index/search_path.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/types.go b/runtime/collections/types.go
index 989d54f3..27ca1a2e 100644
--- a/runtime/collections/types.go
+++ b/runtime/collections/types.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/utils/heap.go b/runtime/collections/utils/heap.go
index f6c23d2d..6fc75126 100644
--- a/runtime/collections/utils/heap.go
+++ b/runtime/collections/utils/heap.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/utils/heap_test.go b/runtime/collections/utils/heap_test.go
index 163bd8c7..3e59a018 100644
--- a/runtime/collections/utils/heap_test.go
+++ b/runtime/collections/utils/heap_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/utils/helper.go b/runtime/collections/utils/helper.go
index 9106d62d..681b2886 100644
--- a/runtime/collections/utils/helper.go
+++ b/runtime/collections/utils/helper.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/utils/helper_test.go b/runtime/collections/utils/helper_test.go
index 067e3be9..f48cb15a 100644
--- a/runtime/collections/utils/helper_test.go
+++ b/runtime/collections/utils/helper_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/collections/vector.go b/runtime/collections/vector.go
index d5594ad2..d6a7a764 100644
--- a/runtime/collections/vector.go
+++ b/runtime/collections/vector.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/config/commandline.go b/runtime/config/commandline.go
index 76e0211c..9439abb7 100644
--- a/runtime/config/commandline.go
+++ b/runtime/config/commandline.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/config/config.go b/runtime/config/config.go
index 5f7586d8..04df2e17 100644
--- a/runtime/config/config.go
+++ b/runtime/config/config.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/config/environment.go b/runtime/config/environment.go
index 2079774e..d740089d 100644
--- a/runtime/config/environment.go
+++ b/runtime/config/environment.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
@@ -15,7 +15,20 @@ import (
"os/user"
)
-const devEnvironmentName = "dev"
+/*
+
+DESIGN NOTES:
+
+- The MODUS_ENV environment variable is used to determine the environment name.
+- We prefer to use short names, "prod", "stage", "dev", etc, but the actual value is arbitrary, so you can use longer names if you prefer.
+- If it is not set, the default environment name is "prod". This is a safe-by-default approach.
+- It is preferable to actually set the MODUS_ENV to the appropriate environment when running the application.
+- During development, the Modus CLI will set the MODUS_ENV to "dev" automatically.
+- The "dev" environment is special in several ways, such as relaxed security requirements, and omitting certain telemetry.
+- There is nothing special about "prod", other than it is the default.
+- You can also use "stage", "test", etc, as needed - but they will behave like "prod". The only difference is the name returned by the health endpoint, logs, and telemetry.
+
+*/
var environment string
var namespace string
@@ -25,14 +38,17 @@ func GetEnvironmentName() string {
}
func setEnvironmentName() {
- environment = os.Getenv("ENVIRONMENT")
+ environment = os.Getenv("MODUS_ENV")
+
+ // default to prod
if environment == "" {
- environment = devEnvironmentName
+ environment = "prod"
}
}
func IsDevEnvironment() bool {
- return environment == devEnvironmentName
+ // support either name (but prefer "dev")
+ return environment == "dev" || environment == "development"
}
func GetNamespace() string {
diff --git a/runtime/config/environment_test.go b/runtime/config/environment_test.go
new file mode 100644
index 00000000..b05ddc2b
--- /dev/null
+++ b/runtime/config/environment_test.go
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2024 Hypermode Inc.
+ * Licensed under the terms of the Apache License, Version 2.0
+ * See the LICENSE file that accompanied this code for further details.
+ *
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package config
+
+import (
+ "os"
+ "testing"
+)
+
+func TestEnvironmentNames(t *testing.T) {
+ tests := []struct {
+ name string
+ envValue string
+ expectedResult string
+ isDev bool
+ }{
+ {
+ name: "Environment variable not set",
+ envValue: "",
+ expectedResult: "prod",
+ isDev: false,
+ },
+ {
+ name: "Environment variable set to dev",
+ envValue: "dev",
+ expectedResult: "dev",
+ isDev: true,
+ },
+ {
+ name: "Environment variable set to development",
+ envValue: "development",
+ expectedResult: "development",
+ isDev: true,
+ },
+ {
+ name: "Environment variable set to stage",
+ envValue: "stage",
+ expectedResult: "stage",
+ isDev: false,
+ },
+ {
+ name: "Environment variable set to test",
+ envValue: "test",
+ expectedResult: "test",
+ isDev: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ os.Setenv("MODUS_ENV", tt.envValue)
+ setEnvironmentName()
+ result := GetEnvironmentName()
+ if result != tt.expectedResult {
+ t.Errorf("Expected environment to be %s, but got %s", tt.expectedResult, result)
+ }
+ if IsDevEnvironment() != tt.isDev {
+ t.Errorf("Expected IsDevEnvironment to be %v, but got %v", tt.isDev, IsDevEnvironment())
+ }
+ })
+ }
+}
diff --git a/runtime/config/version.go b/runtime/config/version.go
index 8069a599..65096190 100644
--- a/runtime/config/version.go
+++ b/runtime/config/version.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/db/db.go b/runtime/db/db.go
index 2f38b55b..3cbfe6d4 100644
--- a/runtime/db/db.go
+++ b/runtime/db/db.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/dgraphclient/dgraph.go b/runtime/dgraphclient/dgraph.go
index b93a8a40..531a68e9 100644
--- a/runtime/dgraphclient/dgraph.go
+++ b/runtime/dgraphclient/dgraph.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/dgraphclient/dgraphclient.go b/runtime/dgraphclient/dgraphclient.go
index 32d4adbd..2b5ea527 100644
--- a/runtime/dgraphclient/dgraphclient.go
+++ b/runtime/dgraphclient/dgraphclient.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/dgraphclient/registry.go b/runtime/dgraphclient/registry.go
index 4a60a54a..666d3a1a 100644
--- a/runtime/dgraphclient/registry.go
+++ b/runtime/dgraphclient/registry.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/dgraphclient/types.go b/runtime/dgraphclient/types.go
index 3f7d7a82..0cb8f787 100644
--- a/runtime/dgraphclient/types.go
+++ b/runtime/dgraphclient/types.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/functions/events.go b/runtime/functions/events.go
index d229da12..f32d7fc1 100644
--- a/runtime/functions/events.go
+++ b/runtime/functions/events.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/functions/fninfo.go b/runtime/functions/fninfo.go
index 35729184..e5a00e4f 100644
--- a/runtime/functions/fninfo.go
+++ b/runtime/functions/fninfo.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/functions/helpers.go b/runtime/functions/helpers.go
index bcbd2434..97fe77e9 100644
--- a/runtime/functions/helpers.go
+++ b/runtime/functions/helpers.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/functions/registration.go b/runtime/functions/registration.go
index 6732b853..b747162e 100644
--- a/runtime/functions/registration.go
+++ b/runtime/functions/registration.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/go.mod b/runtime/go.mod
index ecf6decc..12606311 100644
--- a/runtime/go.mod
+++ b/runtime/go.mod
@@ -1,6 +1,6 @@
module github.com/hypermodeinc/modus/runtime
-go 1.23
+go 1.23.0
require github.com/hypermodeinc/modus v0.0.0
diff --git a/runtime/graphql/datasource/configuration.go b/runtime/graphql/datasource/configuration.go
index ec7f466e..6ac10c68 100644
--- a/runtime/graphql/datasource/configuration.go
+++ b/runtime/graphql/datasource/configuration.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/datasource/factory.go b/runtime/graphql/datasource/factory.go
index 9b00ea14..2352663a 100644
--- a/runtime/graphql/datasource/factory.go
+++ b/runtime/graphql/datasource/factory.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/datasource/planner.go b/runtime/graphql/datasource/planner.go
index db64a3aa..e8d0b404 100644
--- a/runtime/graphql/datasource/planner.go
+++ b/runtime/graphql/datasource/planner.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/datasource/source.go b/runtime/graphql/datasource/source.go
index ae1ecb86..783955e4 100644
--- a/runtime/graphql/datasource/source.go
+++ b/runtime/graphql/datasource/source.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/engine/engine.go b/runtime/graphql/engine/engine.go
index 8965036f..04ddc252 100644
--- a/runtime/graphql/engine/engine.go
+++ b/runtime/graphql/engine/engine.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/engine/logging.go b/runtime/graphql/engine/logging.go
index 6cf8cb50..0aa27bba 100644
--- a/runtime/graphql/engine/logging.go
+++ b/runtime/graphql/engine/logging.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/graphql.go b/runtime/graphql/graphql.go
index 7e9da4aa..d591c329 100644
--- a/runtime/graphql/graphql.go
+++ b/runtime/graphql/graphql.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/schemagen/filters.go b/runtime/graphql/schemagen/filters.go
index 63d6b2cc..26a36ac9 100644
--- a/runtime/graphql/schemagen/filters.go
+++ b/runtime/graphql/schemagen/filters.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/schemagen/schemagen.go b/runtime/graphql/schemagen/schemagen.go
index e40eb8db..a7afec9d 100644
--- a/runtime/graphql/schemagen/schemagen.go
+++ b/runtime/graphql/schemagen/schemagen.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/schemagen/schemagen_as_test.go b/runtime/graphql/schemagen/schemagen_as_test.go
index 7e53c610..5cd1a3dc 100644
--- a/runtime/graphql/schemagen/schemagen_as_test.go
+++ b/runtime/graphql/schemagen/schemagen_as_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphql/schemagen/schemagen_go_test.go b/runtime/graphql/schemagen/schemagen_go_test.go
index 814da295..ee39648c 100644
--- a/runtime/graphql/schemagen/schemagen_go_test.go
+++ b/runtime/graphql/schemagen/schemagen_go_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/graphqlclient/graphqlclient.go b/runtime/graphqlclient/graphqlclient.go
index be6c1794..1c4b6ff6 100644
--- a/runtime/graphqlclient/graphqlclient.go
+++ b/runtime/graphqlclient/graphqlclient.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/collections.go b/runtime/hostfunctions/collections.go
index c863f960..c7a14afb 100644
--- a/runtime/hostfunctions/collections.go
+++ b/runtime/hostfunctions/collections.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/compatibility/compatibility.go b/runtime/hostfunctions/compatibility/compatibility.go
index d6a8f66b..f18e5c34 100644
--- a/runtime/hostfunctions/compatibility/compatibility.go
+++ b/runtime/hostfunctions/compatibility/compatibility.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/compatibility/compatibility_test.go b/runtime/hostfunctions/compatibility/compatibility_test.go
index 099526f9..3291d0c2 100644
--- a/runtime/hostfunctions/compatibility/compatibility_test.go
+++ b/runtime/hostfunctions/compatibility/compatibility_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/database.go b/runtime/hostfunctions/database.go
index bbfadd4f..f41f12eb 100644
--- a/runtime/hostfunctions/database.go
+++ b/runtime/hostfunctions/database.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/dgraph.go b/runtime/hostfunctions/dgraph.go
index 121855ce..fb674032 100644
--- a/runtime/hostfunctions/dgraph.go
+++ b/runtime/hostfunctions/dgraph.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/graphql.go b/runtime/hostfunctions/graphql.go
index e291fb12..ad073ca5 100644
--- a/runtime/hostfunctions/graphql.go
+++ b/runtime/hostfunctions/graphql.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/hostfunctions.go b/runtime/hostfunctions/hostfunctions.go
index 697768f5..9a63a4fd 100644
--- a/runtime/hostfunctions/hostfunctions.go
+++ b/runtime/hostfunctions/hostfunctions.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/http.go b/runtime/hostfunctions/http.go
index c1699a86..01946c1c 100644
--- a/runtime/hostfunctions/http.go
+++ b/runtime/hostfunctions/http.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/legacy.go b/runtime/hostfunctions/legacy.go
index 5991457e..827b75ec 100644
--- a/runtime/hostfunctions/legacy.go
+++ b/runtime/hostfunctions/legacy.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/log.go b/runtime/hostfunctions/log.go
index 0f6e108d..b039ec27 100644
--- a/runtime/hostfunctions/log.go
+++ b/runtime/hostfunctions/log.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hostfunctions/models.go b/runtime/hostfunctions/models.go
index a72756e0..1feb0920 100644
--- a/runtime/hostfunctions/models.go
+++ b/runtime/hostfunctions/models.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/hosts/hosts.go b/runtime/hosts/hosts.go
index 381787dd..447ef18d 100644
--- a/runtime/hosts/hosts.go
+++ b/runtime/hosts/hosts.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/httpclient/fetch.go b/runtime/httpclient/fetch.go
index aa41bf33..d3cf6a18 100644
--- a/runtime/httpclient/fetch.go
+++ b/runtime/httpclient/fetch.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/httpclient/types.go b/runtime/httpclient/types.go
index e43c4549..64fa99d0 100644
--- a/runtime/httpclient/types.go
+++ b/runtime/httpclient/types.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/httpserver/server.go b/runtime/httpserver/server.go
index fb722feb..77d0ea69 100644
--- a/runtime/httpserver/server.go
+++ b/runtime/httpserver/server.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/integration_tests/postgresql_integration_test.go b/runtime/integration_tests/postgresql_integration_test.go
index b43ca194..f5330db9 100644
--- a/runtime/integration_tests/postgresql_integration_test.go
+++ b/runtime/integration_tests/postgresql_integration_test.go
@@ -1,11 +1,11 @@
//go:build integration
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/executionplan.go b/runtime/langsupport/executionplan.go
index 7c1e7a53..654200e5 100644
--- a/runtime/langsupport/executionplan.go
+++ b/runtime/langsupport/executionplan.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/langtypeinfo.go b/runtime/langsupport/langtypeinfo.go
index 6608ec51..2c89b5fb 100644
--- a/runtime/langsupport/langtypeinfo.go
+++ b/runtime/langsupport/langtypeinfo.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/language.go b/runtime/langsupport/language.go
index 5e629167..c834b5d3 100644
--- a/runtime/langsupport/language.go
+++ b/runtime/langsupport/language.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/planner.go b/runtime/langsupport/planner.go
index cc925e10..73ffbd37 100644
--- a/runtime/langsupport/planner.go
+++ b/runtime/langsupport/planner.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/primitives/converters.go b/runtime/langsupport/primitives/converters.go
index 86f40883..17eceeef 100644
--- a/runtime/langsupport/primitives/converters.go
+++ b/runtime/langsupport/primitives/converters.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/primitives/decoders.go b/runtime/langsupport/primitives/decoders.go
index cf60de8f..e4e0fdbb 100644
--- a/runtime/langsupport/primitives/decoders.go
+++ b/runtime/langsupport/primitives/decoders.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/primitives/encoders.go b/runtime/langsupport/primitives/encoders.go
index 39a38dc2..731b62ba 100644
--- a/runtime/langsupport/primitives/encoders.go
+++ b/runtime/langsupport/primitives/encoders.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/primitives/readers.go b/runtime/langsupport/primitives/readers.go
index c204cad6..d8a7527d 100644
--- a/runtime/langsupport/primitives/readers.go
+++ b/runtime/langsupport/primitives/readers.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/primitives/writers.go b/runtime/langsupport/primitives/writers.go
index 1fedd6b6..1d406e6b 100644
--- a/runtime/langsupport/primitives/writers.go
+++ b/runtime/langsupport/primitives/writers.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/typehandler.go b/runtime/langsupport/typehandler.go
index 0c4dc7e8..23abe169 100644
--- a/runtime/langsupport/typehandler.go
+++ b/runtime/langsupport/typehandler.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/typeinfo.go b/runtime/langsupport/typeinfo.go
index b8a38ba8..6e69a2bb 100644
--- a/runtime/langsupport/typeinfo.go
+++ b/runtime/langsupport/typeinfo.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/utils.go b/runtime/langsupport/utils.go
index 4aff6205..1a0a1e1f 100644
--- a/runtime/langsupport/utils.go
+++ b/runtime/langsupport/utils.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/langsupport/wasmadapter.go b/runtime/langsupport/wasmadapter.go
index d97f2d03..13d3bead 100644
--- a/runtime/langsupport/wasmadapter.go
+++ b/runtime/langsupport/wasmadapter.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/adapter.go b/runtime/languages/assemblyscript/adapter.go
index 2e7d1584..90e1c9a0 100644
--- a/runtime/languages/assemblyscript/adapter.go
+++ b/runtime/languages/assemblyscript/adapter.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_arraybuffers.go b/runtime/languages/assemblyscript/handler_arraybuffers.go
index cb389213..a7a59740 100644
--- a/runtime/languages/assemblyscript/handler_arraybuffers.go
+++ b/runtime/languages/assemblyscript/handler_arraybuffers.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_arrays.go b/runtime/languages/assemblyscript/handler_arrays.go
index 2fef2b61..1c613681 100644
--- a/runtime/languages/assemblyscript/handler_arrays.go
+++ b/runtime/languages/assemblyscript/handler_arrays.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_classes.go b/runtime/languages/assemblyscript/handler_classes.go
index 588646ee..a043b4ac 100644
--- a/runtime/languages/assemblyscript/handler_classes.go
+++ b/runtime/languages/assemblyscript/handler_classes.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_dates.go b/runtime/languages/assemblyscript/handler_dates.go
index e5c2725e..7d364e63 100644
--- a/runtime/languages/assemblyscript/handler_dates.go
+++ b/runtime/languages/assemblyscript/handler_dates.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_maps.go b/runtime/languages/assemblyscript/handler_maps.go
index 061cbd08..70cf3272 100644
--- a/runtime/languages/assemblyscript/handler_maps.go
+++ b/runtime/languages/assemblyscript/handler_maps.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_objects.go b/runtime/languages/assemblyscript/handler_objects.go
index 4a93ae0d..1e7a4160 100644
--- a/runtime/languages/assemblyscript/handler_objects.go
+++ b/runtime/languages/assemblyscript/handler_objects.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_primitivearrays.go b/runtime/languages/assemblyscript/handler_primitivearrays.go
index 316d90bc..f8f178c0 100644
--- a/runtime/languages/assemblyscript/handler_primitivearrays.go
+++ b/runtime/languages/assemblyscript/handler_primitivearrays.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_primitives.go b/runtime/languages/assemblyscript/handler_primitives.go
index b6c63b0f..7b173de7 100644
--- a/runtime/languages/assemblyscript/handler_primitives.go
+++ b/runtime/languages/assemblyscript/handler_primitives.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_strings.go b/runtime/languages/assemblyscript/handler_strings.go
index a0cbc8d7..e98ab6c3 100644
--- a/runtime/languages/assemblyscript/handler_strings.go
+++ b/runtime/languages/assemblyscript/handler_strings.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/handler_typedarrays.go b/runtime/languages/assemblyscript/handler_typedarrays.go
index 64a73855..61bc77d6 100644
--- a/runtime/languages/assemblyscript/handler_typedarrays.go
+++ b/runtime/languages/assemblyscript/handler_typedarrays.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/hash/hash.go b/runtime/languages/assemblyscript/hash/hash.go
index ede95a79..43e48019 100644
--- a/runtime/languages/assemblyscript/hash/hash.go
+++ b/runtime/languages/assemblyscript/hash/hash.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/planner.go b/runtime/languages/assemblyscript/planner.go
index cb6b5db9..cb0c2d8a 100644
--- a/runtime/languages/assemblyscript/planner.go
+++ b/runtime/languages/assemblyscript/planner.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/testdata/assembly/arraybuffers.ts b/runtime/languages/assemblyscript/testdata/assembly/arraybuffers.ts
index 364c181c..846e6b79 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/arraybuffers.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/arraybuffers.ts
@@ -1,27 +1,27 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function testArrayBufferInput(buffer: ArrayBuffer): void {
- const view = Uint8Array.wrap(buffer);
- assert(view.length == 4);
- assert(view[0] == 1);
- assert(view[1] == 2);
- assert(view[2] == 3);
- assert(view[3] == 4);
+ const view = Uint8Array.wrap(buffer);
+ assert(view.length == 4);
+ assert(view[0] == 1);
+ assert(view[1] == 2);
+ assert(view[2] == 3);
+ assert(view[3] == 4);
}
export function testArrayBufferOutput(): ArrayBuffer {
- const buffer = new ArrayBuffer(4);
- const view = Uint8Array.wrap(buffer);
- view[0] = 1;
- view[1] = 2;
- view[2] = 3;
- view[3] = 4;
- return buffer;
+ const buffer = new ArrayBuffer(4);
+ const view = Uint8Array.wrap(buffer);
+ view[0] = 1;
+ view[1] = 2;
+ view[2] = 3;
+ view[3] = 4;
+ return buffer;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/arrays.ts b/runtime/languages/assemblyscript/testdata/assembly/arrays.ts
index 7e17c49c..d8a16e64 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/arrays.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/arrays.ts
@@ -1,107 +1,111 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function testArrayOutput_i8(): i8[] {
- return [1, 2, 3];
+ return [1, 2, 3];
}
export function testArrayInput_i8(arr: i8[]): void {
- assert(arr.length == 3);
- assert(arr[0] == 1);
- assert(arr[1] == 2);
- assert(arr[2] == 3);
+ assert(arr.length == 3);
+ assert(arr[0] == 1);
+ assert(arr[1] == 2);
+ assert(arr[2] == 3);
}
export function testArrayOutput_i8_empty(): i8[] {
- return [];
+ return [];
}
export function testArrayInput_i8_empty(arr: i8[]): void {
- assert(arr.length == 0);
+ assert(arr.length == 0);
}
export function testArrayOutput_i8_null(): i8[] | null {
- return null;
+ return null;
}
export function testArrayInput_i8_null(arr: i8[] | null): void {
- assert(arr == null);
+ assert(arr == null);
}
export function testArrayInput_i32(arr: i32[]): void {
- assert(arr.length == 3);
- assert(arr[0] == 1);
- assert(arr[1] == 2);
- assert(arr[2] == 3);
+ assert(arr.length == 3);
+ assert(arr[0] == 1);
+ assert(arr[1] == 2);
+ assert(arr[2] == 3);
}
export function testArrayOutput_i32(): i32[] {
- return [1, 2, 3];
+ return [1, 2, 3];
}
export function testArrayInput_f32(arr: f32[]): void {
- assert(arr.length == 3);
- assert(arr[0] == 1);
- assert(arr[1] == 2);
- assert(arr[2] == 3);
+ assert(arr.length == 3);
+ assert(arr[0] == 1);
+ assert(arr[1] == 2);
+ assert(arr[2] == 3);
}
export function testArrayOutput_f32(): f32[] {
- return [1, 2, 3];
+ return [1, 2, 3];
}
export function testArrayInput_string(arr: string[]): void {
- assert(arr.length == 3);
- assert(arr[0] == "abc");
- assert(arr[1] == "def");
- assert(arr[2] == "ghi");
+ assert(arr.length == 3);
+ assert(arr[0] == "abc");
+ assert(arr[1] == "def");
+ assert(arr[2] == "ghi");
}
export function testArrayOutput_string(): string[] {
- return ["abc", "def", "ghi"];
+ return ["abc", "def", "ghi"];
}
export function testArrayInput_string_2d(arr: string[][]): void {
- assert(arr.length == 3);
- assert(arr[0].length == 3);
- assert(arr[0][0] == "abc");
- assert(arr[0][1] == "def");
- assert(arr[0][2] == "ghi");
- assert(arr[1].length == 3);
- assert(arr[1][0] == "jkl");
- assert(arr[1][1] == "mno");
- assert(arr[1][2] == "pqr");
- assert(arr[2].length == 3);
- assert(arr[2][0] == "stu");
- assert(arr[2][1] == "vwx");
- assert(arr[2][2] == "yz");
+ assert(arr.length == 3);
+ assert(arr[0].length == 3);
+ assert(arr[0][0] == "abc");
+ assert(arr[0][1] == "def");
+ assert(arr[0][2] == "ghi");
+ assert(arr[1].length == 3);
+ assert(arr[1][0] == "jkl");
+ assert(arr[1][1] == "mno");
+ assert(arr[1][2] == "pqr");
+ assert(arr[2].length == 3);
+ assert(arr[2][0] == "stu");
+ assert(arr[2][1] == "vwx");
+ assert(arr[2][2] == "yz");
}
export function testArrayOutput_string_2d(): string[][] {
- return [["abc", "def", "ghi"], ["jkl", "mno", "pqr"], ["stu", "vwx", "yz"]];
+ return [
+ ["abc", "def", "ghi"],
+ ["jkl", "mno", "pqr"],
+ ["stu", "vwx", "yz"],
+ ];
}
export function testArrayInput_string_2d_empty(arr: string[][]): void {
- assert(arr.length == 0);
+ assert(arr.length == 0);
}
export function testArrayOutput_string_2d_empty(): string[][] {
- return [];
+ return [];
}
class TestObject1 {
- constructor(public a: i32, public b: i32) { }
+ constructor(public a: i32, public b: i32) {}
}
export function testArrayIteration(arr: TestObject1[]): void {
- for (let i = 0; i < arr.length; i++) {
- let obj = arr[i];
- console.log(`[${i}]: a=${obj.a}, b=${obj.b}`);
- }
+ for (let i = 0; i < arr.length; i++) {
+ let obj = arr[i];
+ console.log(`[${i}]: a=${obj.a}, b=${obj.b}`);
+ }
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/classes.ts b/runtime/languages/assemblyscript/testdata/assembly/classes.ts
index 00dd6e9d..4125e4d6 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/classes.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/classes.ts
@@ -1,72 +1,72 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
class TestClass1 {
- a!: bool;
+ a!: bool;
}
class TestClass1_map {
- a!: bool;
+ a!: bool;
}
class TestClass2 {
- a!: bool;
- b!: isize;
+ a!: bool;
+ b!: isize;
}
class TestClass2_map {
- a!: bool;
- b!: isize;
+ a!: bool;
+ b!: isize;
}
class TestClass3 {
- a!: bool;
- b!: isize;
- c!: string;
+ a!: bool;
+ b!: isize;
+ c!: string;
}
class TestClass3_map {
- a!: bool;
- b!: isize;
- c!: string;
+ a!: bool;
+ b!: isize;
+ c!: string;
}
class TestClass4 {
- a!: bool;
- b!: isize;
- c!: string | null;
+ a!: bool;
+ b!: isize;
+ c!: string | null;
}
class TestClass4_map {
- a!: bool;
- b!: isize;
- c!: string | null;
+ a!: bool;
+ b!: isize;
+ c!: string | null;
}
class TestClass5 {
- a!: bool;
- b!: TestClass3;
+ a!: bool;
+ b!: TestClass3;
}
class TestClass5_map {
- a!: bool;
- b!: TestClass3_map;
+ a!: bool;
+ b!: TestClass3_map;
}
class TestRecursiveClass {
- a!: bool;
- b!: TestRecursiveClass | null;
+ a!: bool;
+ b!: TestRecursiveClass | null;
}
class TestRecursiveClass_map {
- a!: bool;
- b!: TestRecursiveClass_map | null;
+ a!: bool;
+ b!: TestRecursiveClass_map | null;
}
const testClass1 = { a: true };
@@ -90,110 +90,109 @@ const testRecursiveClass_map = { a: true };
testRecursiveClass_map.b = testRecursiveClass_map;
export function testClassInput1(o: TestClass1): void {
- assert(o.a == testClass1.a);
+ assert(o.a == testClass1.a);
}
export function testClassOutput1(): TestClass1 {
- return testClass1;
+ return testClass1;
}
export function testClassOutput1_map(): TestClass1_map {
- return testClass1_map;
+ return testClass1_map;
}
export function testClassInput2(o: TestClass2): void {
- assert(o.a == testClass2.a);
- assert(o.b == testClass2.b);
+ assert(o.a == testClass2.a);
+ assert(o.b == testClass2.b);
}
export function testClassOutput2(): TestClass2 {
- return testClass2;
+ return testClass2;
}
export function testClassOutput2_map(): TestClass2_map {
- return testClass2_map;
+ return testClass2_map;
}
export function testClassInput3(o: TestClass3): void {
- assert(o.a == testClass3.a);
- assert(o.b == testClass3.b);
- assert(o.c == testClass3.c);
+ assert(o.a == testClass3.a);
+ assert(o.b == testClass3.b);
+ assert(o.c == testClass3.c);
}
export function testClassOutput3(): TestClass3 {
- return testClass3;
+ return testClass3;
}
export function testClassOutput3_map(): TestClass3_map {
- return testClass3_map;
+ return testClass3_map;
}
-
export function testClassInput4_withNull(o: TestClass4): void {
- assert(o.a == testClass4_withNull.a);
- assert(o.b == testClass4_withNull.b);
- assert(o.c == testClass4_withNull.c);
+ assert(o.a == testClass4_withNull.a);
+ assert(o.b == testClass4_withNull.b);
+ assert(o.c == testClass4_withNull.c);
}
export function testClassOutput4(): TestClass4 {
- return testClass4;
+ return testClass4;
}
export function testClassOutput4_map(): TestClass4_map {
- return testClass4_map;
+ return testClass4_map;
}
export function testClassInput4(o: TestClass4): void {
- assert(o.a == testClass4.a);
- assert(o.b == testClass4.b);
- assert(o.c == testClass4.c);
+ assert(o.a == testClass4.a);
+ assert(o.b == testClass4.b);
+ assert(o.c == testClass4.c);
}
export function testClassOutput4_withNull(): TestClass4 {
- return testClass4_withNull;
+ return testClass4_withNull;
}
export function testClassOutput4_map_withNull(): TestClass4_map {
- return testClass4_map_withNull;
+ return testClass4_map_withNull;
}
export function testClassInput5(o: TestClass5): void {
- assert(o.a == testClass5.a);
- assert(o.b.a == testClass5.b.a);
- assert(o.b.b == testClass5.b.b);
- assert(o.b.c == testClass5.b.c);
+ assert(o.a == testClass5.a);
+ assert(o.b.a == testClass5.b.a);
+ assert(o.b.b == testClass5.b.b);
+ assert(o.b.c == testClass5.b.c);
}
export function testClassOutput5(): TestClass5 {
- return testClass5;
+ return testClass5;
}
export function testClassOutput5_map(): TestClass5_map {
- return testClass5_map;
+ return testClass5_map;
}
export function testRecursiveClassInput(o: TestRecursiveClass): void {
- assert(o.a == testRecursiveClass.a);
- assert(o.b == testRecursiveClass.b);
+ assert(o.a == testRecursiveClass.a);
+ assert(o.b == testRecursiveClass.b);
}
export function testRecursiveClassOutput(): TestRecursiveClass {
- return testRecursiveClass;
+ return testRecursiveClass;
}
export function testNullableClassInput1(o: TestClass1 | null): void {
- assert(o != null);
- assert(o!.a == testClass1.a);
+ assert(o != null);
+ assert(o!.a == testClass1.a);
}
export function testNullableClassOutput1(): TestClass1 | null {
- return testClass1;
+ return testClass1;
}
export function testNullableClassInput1_null(o: TestClass1 | null): void {
- assert(o == null);
+ assert(o == null);
}
export function testNullableClassOutput1_null(): TestClass1 | null {
- return null;
+ return null;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/dates.ts b/runtime/languages/assemblyscript/testdata/assembly/dates.ts
index c39c4932..5e199f1b 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/dates.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/dates.ts
@@ -1,38 +1,38 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
const testTime = Date.parse("2024-12-31T23:59:59.999Z").getTime();
export function testDateInput(d: Date): void {
- const ts = d.getTime();
- assert(ts == testTime, `Expected ${testTime}, got ${ts}`);
+ const ts = d.getTime();
+ assert(ts == testTime, `Expected ${testTime}, got ${ts}`);
}
export function testDateOutput(): Date {
- return new Date(testTime);
+ return new Date(testTime);
}
export function testNullDateInput(d: Date | null): void {
- assert(d != null, `Expected non-null, got null`);
+ assert(d != null, `Expected non-null, got null`);
- const ts = d!.getTime();
- assert(ts == testTime, `Expected ${testTime}, got ${ts}`);
+ const ts = d!.getTime();
+ assert(ts == testTime, `Expected ${testTime}, got ${ts}`);
}
export function testNullDateOutput(): Date | null {
- return new Date(testTime);
+ return new Date(testTime);
}
export function testNullDateInput_null(d: Date | null): void {
- assert(d == null, `Expected null, got ${d!.getTime()}`);
+ assert(d == null, `Expected null, got ${d!.getTime()}`);
}
export function testNullDateOutput_null(): Date | null {
- return null;
+ return null;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/env.ts b/runtime/languages/assemblyscript/testdata/assembly/env.ts
index 859798c7..9b96fef4 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/env.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/env.ts
@@ -1,25 +1,25 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function now(): i64 {
- return Date.now();
+ return Date.now();
}
export function spin(duration: i64): i64 {
- const start = performance.now();
+ const start = performance.now();
- let d = Date.now();
- while (Date.now() - d <= duration) {
- // do nothing
- }
+ let d = Date.now();
+ while (Date.now() - d <= duration) {
+ // do nothing
+ }
- const end = performance.now();
+ const end = performance.now();
- return i64(end - start);
+ return i64(end - start);
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/hostfns.ts b/runtime/languages/assemblyscript/testdata/assembly/hostfns.ts
index 12ce9fa3..33d9a14e 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/hostfns.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/hostfns.ts
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/testdata/assembly/index.ts b/runtime/languages/assemblyscript/testdata/assembly/index.ts
index 48f64dd2..f2203538 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/index.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/index.ts
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/testdata/assembly/maps.ts b/runtime/languages/assemblyscript/testdata/assembly/maps.ts
index 36469ca1..71d24fbe 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/maps.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/maps.ts
@@ -1,125 +1,140 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function testMapInput_u8_string(m: Map): void {
- assert(m.size == 3, "expected size 3");
+ assert(m.size == 3, "expected size 3");
- assert(m.has(1), "expected key 1 to be present");
- assert(m.get(1) == "a", "expected value for key 1 to be 'a'");
+ assert(m.has(1), "expected key 1 to be present");
+ assert(m.get(1) == "a", "expected value for key 1 to be 'a'");
- assert(m.has(2), "expected key 2 to be present");
- assert(m.get(2) == "b", "expected value for key 2 to be 'b'");
+ assert(m.has(2), "expected key 2 to be present");
+ assert(m.get(2) == "b", "expected value for key 2 to be 'b'");
- assert(m.has(3), "expected key 3 to be present");
- assert(m.get(3) == "c", "expected value for key 3 to be 'c'");
+ assert(m.has(3), "expected key 3 to be present");
+ assert(m.get(3) == "c", "expected value for key 3 to be 'c'");
}
export function testMapOutput_u8_string(): Map {
- const m = new Map();
- m.set(1, "a");
- m.set(2, "b");
- m.set(3, "c");
- return m;
+ const m = new Map();
+ m.set(1, "a");
+ m.set(2, "b");
+ m.set(3, "c");
+ return m;
}
export function testMapInput_string_string(m: Map): void {
- assert(m.size == 3, "expected size 3");
+ assert(m.size == 3, "expected size 3");
- assert(m.has("a"), "expected key 'a' to be present");
- assert(m.get("a") == "1", "expected value for key 'a' to be '1'");
+ assert(m.has("a"), "expected key 'a' to be present");
+ assert(m.get("a") == "1", "expected value for key 'a' to be '1'");
- assert(m.has("b"), "expected key 'b' to be present");
- assert(m.get("b") == "2", "expected value for key 'b' to be '2'");
+ assert(m.has("b"), "expected key 'b' to be present");
+ assert(m.get("b") == "2", "expected value for key 'b' to be '2'");
- assert(m.has("c"), "expected key 'c' to be present");
- assert(m.get("c") == "3", "expected value for key 'c' to be '3'");
+ assert(m.has("c"), "expected key 'c' to be present");
+ assert(m.get("c") == "3", "expected value for key 'c' to be '3'");
}
export function testMapOutput_string_string(): Map {
- const m = new Map();
- m.set("a", "1");
- m.set("b", "2");
- m.set("c", "3");
- return m;
+ const m = new Map();
+ m.set("a", "1");
+ m.set("b", "2");
+ m.set("c", "3");
+ return m;
}
-export function testNullableMapInput_string_string(m: Map | null): void {
- assert(m != null, "expected non-null map");
- assert(m!.size == 3, "expected size 3");
+export function testNullableMapInput_string_string(
+ m: Map | null
+): void {
+ assert(m != null, "expected non-null map");
+ assert(m!.size == 3, "expected size 3");
- assert(m!.has("a"), "expected key 'a' to be present");
- assert(m!.get("a") == "1", "expected value for key 'a' to be '1'");
+ assert(m!.has("a"), "expected key 'a' to be present");
+ assert(m!.get("a") == "1", "expected value for key 'a' to be '1'");
- assert(m!.has("b"), "expected key 'b' to be present");
- assert(m!.get("b") == "2", "expected value for key 'b' to be '2'");
+ assert(m!.has("b"), "expected key 'b' to be present");
+ assert(m!.get("b") == "2", "expected value for key 'b' to be '2'");
- assert(m!.has("c"), "expected key 'c' to be present");
- assert(m!.get("c") == "3", "expected value for key 'c' to be '3'");
+ assert(m!.has("c"), "expected key 'c' to be present");
+ assert(m!.get("c") == "3", "expected value for key 'c' to be '3'");
}
-export function testNullableMapInput_string_string_null(m: Map | null): void {
- assert(m == null, "expected null map");
+export function testNullableMapInput_string_string_null(
+ m: Map | null
+): void {
+ assert(m == null, "expected null map");
}
-export function testNullableMapOutput_string_string(): Map | null {
- const m = new Map();
- m.set("a", "1");
- m.set("b", "2");
- m.set("c", "3");
- return m;
+export function testNullableMapOutput_string_string(): Map<
+ string,
+ string
+> | null {
+ const m = new Map();
+ m.set("a", "1");
+ m.set("b", "2");
+ m.set("c", "3");
+ return m;
}
-export function testNullableMapOutput_string_string_null(): Map | null {
- return null;
+export function testNullableMapOutput_string_string_null(): Map<
+ string,
+ string
+> | null {
+ return null;
}
export function testIterateMap_string_string(m: Map): void {
- const keys = m.keys();
- const values = m.values();
- for (let i = 0; i < m.size; i++) {
- const key = keys[i];
- const value = values[i];
- console.log(key + " => " + value);
- }
+ const keys = m.keys();
+ const values = m.values();
+ for (let i = 0; i < m.size; i++) {
+ const key = keys[i];
+ const value = values[i];
+ console.log(key + " => " + value);
+ }
}
-export function testMapLookup_string_string(m: Map, key: string): string | null {
- if (m.has(key)) {
- return m.get(key);
- }
- return null;
+export function testMapLookup_string_string(
+ m: Map,
+ key: string
+): string | null {
+ if (m.has(key)) {
+ return m.get(key);
+ }
+ return null;
}
class TestClassWithMap {
- m!: Map;
+ m!: Map;
}
-export function testClassContainingMapInput_string_string(c: TestClassWithMap): void {
- assert(c != null, "expected non-null class");
- assert(c.m != null, "expected non-null map");
- assert(c.m.size == 3, "expected size 3");
+export function testClassContainingMapInput_string_string(
+ c: TestClassWithMap
+): void {
+ assert(c != null, "expected non-null class");
+ assert(c.m != null, "expected non-null map");
+ assert(c.m.size == 3, "expected size 3");
- assert(c.m.has("a"), "expected key 'a' to be present");
- assert(c.m.get("a") == "1", "expected value for key 'a' to be '1'");
+ assert(c.m.has("a"), "expected key 'a' to be present");
+ assert(c.m.get("a") == "1", "expected value for key 'a' to be '1'");
- assert(c.m.has("b"), "expected key 'b' to be present");
- assert(c.m.get("b") == "2", "expected value for key 'b' to be '2'");
+ assert(c.m.has("b"), "expected key 'b' to be present");
+ assert(c.m.get("b") == "2", "expected value for key 'b' to be '2'");
- assert(c.m.has("c"), "expected key 'c' to be present");
- assert(c.m.get("c") == "3", "expected value for key 'c' to be '3'");
+ assert(c.m.has("c"), "expected key 'c' to be present");
+ assert(c.m.get("c") == "3", "expected value for key 'c' to be '3'");
}
export function testClassContainingMapOutput_string_string(): TestClassWithMap {
- const c = new TestClassWithMap();
- c.m = new Map();
- c.m.set("a", "1");
- c.m.set("b", "2");
- c.m.set("c", "3");
- return c;
+ const c = new TestClassWithMap();
+ c.m = new Map();
+ c.m.set("a", "1");
+ c.m.set("b", "2");
+ c.m.set("c", "3");
+ return c;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/primitives.ts b/runtime/languages/assemblyscript/testdata/assembly/primitives.ts
index 0c2fbd27..ecb317be 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/primitives.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/primitives.ts
@@ -1,216 +1,216 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function testBoolInput_false(b: bool): void {
- assert(b == false);
+ assert(b == false);
}
export function testBoolInput_true(b: bool): void {
- assert(b == true);
+ assert(b == true);
}
export function testBoolOutput_false(): bool {
- return false;
+ return false;
}
export function testBoolOutput_true(): bool {
- return true;
+ return true;
}
export function testI8Input_min(n: i8): void {
- assert(n == i8.MIN_VALUE);
+ assert(n == i8.MIN_VALUE);
}
export function testI8Input_max(n: i8): void {
- assert(n == i8.MAX_VALUE);
+ assert(n == i8.MAX_VALUE);
}
export function testI8Output_min(): i8 {
- return i8.MIN_VALUE;
+ return i8.MIN_VALUE;
}
export function testI8Output_max(): i8 {
- return i8.MAX_VALUE;
+ return i8.MAX_VALUE;
}
export function testI16Input_min(n: i16): void {
- assert(n == i16.MIN_VALUE);
+ assert(n == i16.MIN_VALUE);
}
export function testI16Input_max(n: i16): void {
- assert(n == i16.MAX_VALUE);
+ assert(n == i16.MAX_VALUE);
}
export function testI16Output_min(): i16 {
- return i16.MIN_VALUE;
+ return i16.MIN_VALUE;
}
export function testI16Output_max(): i16 {
- return i16.MAX_VALUE;
+ return i16.MAX_VALUE;
}
export function testI32Input_min(n: i32): void {
- assert(n == i32.MIN_VALUE);
+ assert(n == i32.MIN_VALUE);
}
export function testI32Input_max(n: i32): void {
- assert(n == i32.MAX_VALUE);
+ assert(n == i32.MAX_VALUE);
}
export function testI32Output_min(): i32 {
- return i32.MIN_VALUE;
+ return i32.MIN_VALUE;
}
export function testI32Output_max(): i32 {
- return i32.MAX_VALUE;
+ return i32.MAX_VALUE;
}
export function testI64Input_min(n: i64): void {
- assert(n == i64.MIN_VALUE);
+ assert(n == i64.MIN_VALUE);
}
export function testI64Input_max(n: i64): void {
- assert(n == i64.MAX_VALUE);
+ assert(n == i64.MAX_VALUE);
}
export function testI64Output_min(): i64 {
- return i64.MIN_VALUE;
+ return i64.MIN_VALUE;
}
export function testI64Output_max(): i64 {
- return i64.MAX_VALUE;
+ return i64.MAX_VALUE;
}
export function testISizeInput_min(n: isize): void {
- assert(n == isize.MIN_VALUE);
+ assert(n == isize.MIN_VALUE);
}
export function testISizeInput_max(n: isize): void {
- assert(n == isize.MAX_VALUE);
+ assert(n == isize.MAX_VALUE);
}
export function testISizeOutput_min(): isize {
- return isize.MIN_VALUE;
+ return isize.MIN_VALUE;
}
export function testISizeOutput_max(): isize {
- return isize.MAX_VALUE;
+ return isize.MAX_VALUE;
}
export function testU8Input_min(n: u8): void {
- assert(n == u8.MIN_VALUE);
+ assert(n == u8.MIN_VALUE);
}
export function testU8Input_max(n: u8): void {
- assert(n == u8.MAX_VALUE);
+ assert(n == u8.MAX_VALUE);
}
export function testU8Output_min(): u8 {
- return u8.MIN_VALUE;
+ return u8.MIN_VALUE;
}
export function testU8Output_max(): u8 {
- return u8.MAX_VALUE;
+ return u8.MAX_VALUE;
}
export function testU16Input_min(n: u16): void {
- assert(n == u16.MIN_VALUE);
+ assert(n == u16.MIN_VALUE);
}
export function testU16Input_max(n: u16): void {
- assert(n == u16.MAX_VALUE);
+ assert(n == u16.MAX_VALUE);
}
export function testU16Output_min(): u16 {
- return u16.MIN_VALUE;
+ return u16.MIN_VALUE;
}
export function testU16Output_max(): u16 {
- return u16.MAX_VALUE;
+ return u16.MAX_VALUE;
}
export function testU32Input_min(n: u32): void {
- assert(n == u32.MIN_VALUE);
+ assert(n == u32.MIN_VALUE);
}
export function testU32Input_max(n: u32): void {
- assert(n == u32.MAX_VALUE);
+ assert(n == u32.MAX_VALUE);
}
export function testU32Output_min(): u32 {
- return u32.MIN_VALUE;
+ return u32.MIN_VALUE;
}
export function testU32Output_max(): u32 {
- return u32.MAX_VALUE;
+ return u32.MAX_VALUE;
}
export function testU64Input_min(n: u64): void {
- assert(n == u64.MIN_VALUE);
+ assert(n == u64.MIN_VALUE);
}
export function testU64Input_max(n: u64): void {
- assert(n == u64.MAX_VALUE);
+ assert(n == u64.MAX_VALUE);
}
export function testU64Output_min(): u64 {
- return u64.MIN_VALUE;
+ return u64.MIN_VALUE;
}
export function testU64Output_max(): u64 {
- return u64.MAX_VALUE;
+ return u64.MAX_VALUE;
}
export function testUSizeInput_min(n: usize): void {
- assert(n == usize.MIN_VALUE);
+ assert(n == usize.MIN_VALUE);
}
export function testUSizeInput_max(n: usize): void {
- assert(n == usize.MAX_VALUE);
+ assert(n == usize.MAX_VALUE);
}
export function testUSizeOutput_min(): usize {
- return usize.MIN_VALUE;
+ return usize.MIN_VALUE;
}
export function testUSizeOutput_max(): usize {
- return usize.MAX_VALUE;
+ return usize.MAX_VALUE;
}
export function testF32Input_min(n: f32): void {
- assert(n == f32.MIN_VALUE);
+ assert(n == f32.MIN_VALUE);
}
export function testF32Input_max(n: f32): void {
- assert(n == f32.MAX_VALUE);
+ assert(n == f32.MAX_VALUE);
}
export function testF32Output_min(): f32 {
- return f32.MIN_VALUE;
+ return f32.MIN_VALUE;
}
export function testF32Output_max(): f32 {
- return f32.MAX_VALUE;
+ return f32.MAX_VALUE;
}
export function testF64Input_min(n: f64): void {
- assert(n == f64.MIN_VALUE);
+ assert(n == f64.MIN_VALUE);
}
export function testF64Input_max(n: f64): void {
- assert(n == f64.MAX_VALUE);
+ assert(n == f64.MAX_VALUE);
}
export function testF64Output_min(): f64 {
- return f64.MIN_VALUE;
+ return f64.MIN_VALUE;
}
export function testF64Output_max(): f64 {
- return f64.MAX_VALUE;
+ return f64.MAX_VALUE;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/strings.ts b/runtime/languages/assemblyscript/testdata/assembly/strings.ts
index 1ef033b8..7de9085e 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/strings.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/strings.ts
@@ -1,51 +1,51 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
// "Hello World" in Japanese
-const testString = "こんにちは、世界"
+const testString = "こんにちは、世界";
export function testStringInput(s: string): void {
- assert(s == testString);
+ assert(s == testString);
}
export function testStringOutput(): string {
- return testString;
+ return testString;
}
export function testStringInput_empty(s: string): void {
- assert(s == "");
+ assert(s == "");
}
export function testStringOutput_empty(): string {
- return "";
+ return "";
}
export function testNullStringInput(s: string | null): void {
- assert(s == testString);
+ assert(s == testString);
}
export function testNullStringOutput(): string | null {
- return testString;
+ return testString;
}
export function testNullStringInput_empty(s: string | null): void {
- assert(s == "");
+ assert(s == "");
}
export function testNullStringOutput_empty(): string | null {
- return "";
+ return "";
}
export function testNullStringInput_null(s: string | null): void {
- assert(s == null);
+ assert(s == null);
}
export function testNullStringOutput_null(): string | null {
- return null;
+ return null;
}
diff --git a/runtime/languages/assemblyscript/testdata/assembly/typedarrays.ts b/runtime/languages/assemblyscript/testdata/assembly/typedarrays.ts
index 50d91690..895966fc 100644
--- a/runtime/languages/assemblyscript/testdata/assembly/typedarrays.ts
+++ b/runtime/languages/assemblyscript/testdata/assembly/typedarrays.ts
@@ -1,178 +1,178 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
export function testInt8ArrayInput(view: Int8Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testInt8ArrayOutput(): Int8Array {
- const view = new Int8Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Int8Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testInt16ArrayInput(view: Int16Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testInt16ArrayOutput(): Int16Array {
- const view = new Int16Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Int16Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testInt32ArrayInput(view: Int32Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testInt32ArrayOutput(): Int32Array {
- const view = new Int32Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Int32Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testInt64ArrayInput(view: Int64Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testInt64ArrayOutput(): Int64Array {
- const view = new Int64Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Int64Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testUint8ArrayInput(view: Uint8Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testUint8ArrayInput_empty(view: Uint8Array): void {
- assert(view.length == 0);
+ assert(view.length == 0);
}
export function testUint8ArrayInput_null(view: Uint8Array | null): void {
- assert(view == null);
+ assert(view == null);
}
export function testUint8ArrayOutput(): Uint8Array {
- const view = new Uint8Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Uint8Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testUint8ArrayOutput_empty(): Uint8Array {
- return new Uint8Array(0);
+ return new Uint8Array(0);
}
export function testUint8ArrayOutput_null(): Uint8Array | null {
- return null;
+ return null;
}
export function testUint8ClampedArrayInput(view: Uint8ClampedArray): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testUint8ClampedArrayOutput(): Uint8ClampedArray {
- const view = new Uint8ClampedArray(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Uint8ClampedArray(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testUint16ArrayInput(view: Uint16Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testUint16ArrayOutput(): Uint16Array {
- const view = new Uint16Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Uint16Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testUint32ArrayInput(view: Uint32Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testUint32ArrayOutput(): Uint32Array {
- const view = new Uint32Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Uint32Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testUint64ArrayInput(view: Uint64Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testUint64ArrayOutput(): Uint64Array {
- const view = new Uint64Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Uint64Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testFloat32ArrayInput(view: Float32Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testFloat32ArrayOutput(): Float32Array {
- const view = new Float32Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Float32Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
export function testFloat64ArrayInput(view: Float64Array): void {
- assert(view.length == 4);
- assert(view[0] == 0);
- assert(view[1] == 1);
- assert(view[2] == 2);
- assert(view[3] == 3);
+ assert(view.length == 4);
+ assert(view[0] == 0);
+ assert(view[1] == 1);
+ assert(view[2] == 2);
+ assert(view[3] == 3);
}
export function testFloat64ArrayOutput(): Float64Array {
- const view = new Float64Array(4);
- view.set([0, 1, 2, 3]);
- return view;
+ const view = new Float64Array(4);
+ view.set([0, 1, 2, 3]);
+ return view;
}
diff --git a/runtime/languages/assemblyscript/tests/arraybuffers_test.go b/runtime/languages/assemblyscript/tests/arraybuffers_test.go
index b37905e2..df77686c 100644
--- a/runtime/languages/assemblyscript/tests/arraybuffers_test.go
+++ b/runtime/languages/assemblyscript/tests/arraybuffers_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/tests/arrays_test.go b/runtime/languages/assemblyscript/tests/arrays_test.go
index 29c85fa3..ba78727b 100644
--- a/runtime/languages/assemblyscript/tests/arrays_test.go
+++ b/runtime/languages/assemblyscript/tests/arrays_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/tests/classes_test.go b/runtime/languages/assemblyscript/tests/classes_test.go
index 5428ef5e..f16fc83c 100644
--- a/runtime/languages/assemblyscript/tests/classes_test.go
+++ b/runtime/languages/assemblyscript/tests/classes_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/tests/dates_test.go b/runtime/languages/assemblyscript/tests/dates_test.go
index 66c12612..770b03be 100644
--- a/runtime/languages/assemblyscript/tests/dates_test.go
+++ b/runtime/languages/assemblyscript/tests/dates_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/tests/env_test.go b/runtime/languages/assemblyscript/tests/env_test.go
index 5910ce28..de0b6ba2 100644
--- a/runtime/languages/assemblyscript/tests/env_test.go
+++ b/runtime/languages/assemblyscript/tests/env_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.
+ * SPDX-FileCopyrightText: 2024 Hypermode Inc.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/runtime/languages/assemblyscript/tests/hostfns_test.go b/runtime/languages/assemblyscript/tests/hostfns_test.go
index 94257a55..6b606a77 100644
--- a/runtime/languages/assemblyscript/tests/hostfns_test.go
+++ b/runtime/languages/assemblyscript/tests/hostfns_test.go
@@ -1,9 +1,9 @@
/*
- * Copyright 2024 Hypermode, Inc.
+ * Copyright 2024 Hypermode Inc.
* Licensed under the terms of the Apache License, Version 2.0
* See the LICENSE file that accompanied this code for further details.
*
- * SPDX-FileCopyrightText: 2024 Hypermode, Inc.