From 2d177ec4e8e03497a0d28dc2bdbbf355bc0dd499 Mon Sep 17 00:00:00 2001 From: michael-0acf4 Date: Fri, 8 Nov 2024 13:21:37 +0300 Subject: [PATCH] chore!: license change to MPL Version 2.0 (#899) #### Migration notes All license headers has changed to MPL 2.0. - [x] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change --------- Signed-off-by: michael-0acf4 --- .pre-commit-config.yaml | 28 +- LICENSE.md | 378 ++++++++++++++++-- .../typegate/authentication/oauth2.tsx | 4 +- .../tutorials/metatype-basics/md2html.ts.src | 4 +- docs/metatype.dev/globals.d.ts | 4 +- .../src/components/BlogIntro/index.tsx | 4 +- .../src/components/ChoicePicker/index.tsx | 4 +- .../src/components/CompareLandscape.tsx | 4 +- .../src/components/DocButton/index.tsx | 4 +- .../src/components/Features/index.tsx | 4 +- .../src/components/Giscus/index.tsx | 4 +- .../src/components/MiniQL/index.tsx | 4 +- .../src/components/MiniQL/memory_store.ts | 4 +- .../src/components/Newsletter/index.tsx | 4 +- .../PythonPackageManagerTabs/index.tsx | 4 +- .../src/components/SDKTabs/index.tsx | 4 +- .../src/components/TGExample/index.tsx | 4 +- .../components/TsPackageManagerTabs/index.tsx | 4 +- .../src/components/animations/animated.tsx | 4 +- .../components/animations/animated_canvas.tsx | 4 +- .../src/components/animations/block.tsx | 4 +- .../src/components/animations/doublearrow.tsx | 4 +- .../src/components/animations/hooks.tsx | 4 +- .../src/components/animations/textarrow.tsx | 4 +- docs/metatype.dev/src/components/castles.tsx | 4 +- docs/metatype.dev/src/pages/index.tsx | 4 +- .../src/states/package_manager.ts | 4 +- docs/metatype.dev/src/states/sdk.ts | 4 +- examples/typegraphs/scripts/md2html.ts.src | 4 +- src/common/src/archive.rs | 4 +- src/common/src/graphql.rs | 4 +- src/common/src/grpc.rs | 4 +- src/common/src/lib.rs | 4 +- src/common/src/node.rs | 4 +- src/common/src/typegraph/mod.rs | 4 +- .../src/typegraph/parameter_transform.rs | 4 +- src/common/src/typegraph/runtimes/deno.rs | 4 +- src/common/src/typegraph/runtimes/graphql.rs | 4 +- src/common/src/typegraph/runtimes/grpc.rs | 4 +- src/common/src/typegraph/runtimes/http.rs | 4 +- src/common/src/typegraph/runtimes/kv.rs | 4 +- src/common/src/typegraph/runtimes/mod.rs | 4 +- src/common/src/typegraph/runtimes/prisma.rs | 4 +- src/common/src/typegraph/runtimes/python.rs | 4 +- src/common/src/typegraph/runtimes/random.rs | 4 +- src/common/src/typegraph/runtimes/s3.rs | 4 +- .../src/typegraph/runtimes/substantial.rs | 4 +- src/common/src/typegraph/runtimes/temporal.rs | 4 +- src/common/src/typegraph/runtimes/wasm.rs | 4 +- src/common/src/typegraph/types.rs | 4 +- src/common/src/typegraph/utils.rs | 4 +- src/common/src/typegraph/validator/common.rs | 4 +- src/common/src/typegraph/validator/input.rs | 4 +- src/common/src/typegraph/validator/mod.rs | 4 +- src/common/src/typegraph/validator/types.rs | 4 +- src/common/src/typegraph/validator/value.rs | 4 +- src/common/src/typegraph/visitor.rs | 4 +- src/metagen/fixtures/client_ts/main.ts | 4 +- src/metagen/fixtures/tg2.ts | 4 +- src/mt_deno/src/lib.rs | 4 +- src/pyrt_wit_wire/pyproject.toml | 2 +- src/typegate/engine/00_runtime.js | 10 +- src/typegate/engine/bindings.ts | 246 ++++++------ src/typegate/engine/build.rs | 4 +- src/typegate/engine/runtime.d.ts | 98 ++--- src/typegate/engine/src/ext.rs | 4 +- src/typegate/engine/src/lib.rs | 4 +- src/typegate/engine/src/runtimes.rs | 4 +- src/typegate/engine/src/runtimes/grpc.rs | 4 +- src/typegate/engine/src/runtimes/prisma.rs | 4 +- .../engine/src/runtimes/prisma/engine.rs | 4 +- .../engine/src/runtimes/prisma/migration.rs | 4 +- .../engine/src/runtimes/prisma/utils.rs | 4 +- .../engine/src/runtimes/substantial.rs | 4 +- src/typegate/engine/src/runtimes/temporal.rs | 4 +- src/typegate/engine/src/runtimes/wasm.rs | 4 +- .../engine/src/runtimes/wasm/conversion.rs | 4 +- src/typegate/engine/src/runtimes/wit_wire.rs | 4 +- src/typegate/engine/src/typegraph.rs | 4 +- src/typegate/src/config.ts | 15 +- src/typegate/src/config/loader.ts | 4 +- src/typegate/src/config/shared.ts | 8 +- src/typegate/src/config/types.ts | 4 +- src/typegate/src/crypto.ts | 4 +- src/typegate/src/engine/computation_engine.ts | 4 +- src/typegate/src/engine/planner/args.ts | 4 +- .../src/engine/planner/dependency_resolver.ts | 4 +- .../src/engine/planner/injection_utils.ts | 4 +- src/typegate/src/engine/planner/mod.ts | 4 +- .../engine/planner/parameter_transformer.ts | 4 +- src/typegate/src/engine/planner/policies.ts | 4 +- src/typegate/src/engine/query_engine.ts | 4 +- src/typegate/src/engine/stage_id.ts | 4 +- .../src/engine/typecheck/code_generator.ts | 4 +- src/typegate/src/engine/typecheck/common.ts | 4 +- .../typecheck/inline_validators/boolean.ts | 4 +- .../typecheck/inline_validators/common.ts | 4 +- .../inline_validators/constraints.ts | 4 +- .../typecheck/inline_validators/file.ts | 4 +- .../typecheck/inline_validators/list.ts | 4 +- .../engine/typecheck/inline_validators/mod.ts | 4 +- .../typecheck/inline_validators/number.ts | 4 +- .../typecheck/inline_validators/object.ts | 4 +- .../typecheck/inline_validators/string.ts | 4 +- src/typegate/src/engine/typecheck/input.ts | 4 +- .../src/engine/typecheck/matching_variant.ts | 4 +- src/typegate/src/engine/typecheck/result.ts | 76 ++-- src/typegate/src/errors.ts | 4 +- src/typegate/src/libs/jsonpath.ts | 4 +- src/typegate/src/log.ts | 4 +- src/typegate/src/main.ts | 4 +- src/typegate/src/runtimes/Runtime.ts | 13 +- src/typegate/src/runtimes/deno.ts | 4 +- src/typegate/src/runtimes/deno/deno.ts | 11 +- .../src/runtimes/deno/deno_messenger.ts | 4 +- .../src/runtimes/deno/shared_types.ts | 6 +- src/typegate/src/runtimes/deno/worker.ts | 8 +- src/typegate/src/runtimes/graphql.ts | 4 +- src/typegate/src/runtimes/grpc.ts | 4 +- src/typegate/src/runtimes/http.ts | 4 +- src/typegate/src/runtimes/kv.ts | 6 +- src/typegate/src/runtimes/mod.ts | 8 +- .../patterns/messenger/async_messenger.ts | 4 +- .../messenger/lazy_async_messenger.ts | 4 +- .../src/runtimes/patterns/messenger/types.ts | 4 +- src/typegate/src/runtimes/prisma.ts | 4 +- .../runtimes/prisma/hooks/generate_schema.ts | 48 ++- src/typegate/src/runtimes/prisma/hooks/mod.ts | 4 +- .../runtimes/prisma/hooks/run_migrations.ts | 4 +- src/typegate/src/runtimes/prisma/migration.ts | 4 +- src/typegate/src/runtimes/prisma/mod.ts | 4 +- src/typegate/src/runtimes/prisma/prisma.ts | 4 +- src/typegate/src/runtimes/prisma/types.ts | 4 +- src/typegate/src/runtimes/python.ts | 4 +- src/typegate/src/runtimes/random.ts | 4 +- src/typegate/src/runtimes/s3.ts | 4 +- src/typegate/src/runtimes/substantial.ts | 39 +- .../src/runtimes/substantial/agent.ts | 78 ++-- .../src/runtimes/substantial/deno_context.ts | 32 +- .../src/runtimes/substantial/types.ts | 6 +- .../src/runtimes/substantial/worker.ts | 43 +- .../substantial/workflow_worker_manager.ts | 24 +- src/typegate/src/runtimes/temporal.ts | 4 +- src/typegate/src/runtimes/typegate.ts | 4 +- src/typegate/src/runtimes/typegraph.ts | 4 +- .../runtimes/utils/graphql_forward_vars.ts | 4 +- .../src/runtimes/utils/graphql_inline_vars.ts | 4 +- src/typegate/src/runtimes/utils/http.ts | 4 +- src/typegate/src/runtimes/wasm_reflected.ts | 4 +- src/typegate/src/runtimes/wasm_wire.ts | 4 +- src/typegate/src/runtimes/wit_wire/mod.ts | 4 +- src/typegate/src/services/artifact_service.ts | 4 +- src/typegate/src/services/auth/cookies.ts | 4 +- src/typegate/src/services/auth/mod.ts | 4 +- .../src/services/auth/protocols/basic.ts | 4 +- .../src/services/auth/protocols/internal.ts | 4 +- .../src/services/auth/protocols/jwt.ts | 4 +- .../src/services/auth/protocols/oauth2.ts | 10 +- .../src/services/auth/protocols/protocol.ts | 4 +- src/typegate/src/services/auth/routes/mod.ts | 4 +- src/typegate/src/services/auth/routes/take.ts | 4 +- .../src/services/auth/routes/validate.ts | 4 +- src/typegate/src/services/graphql_service.ts | 9 +- src/typegate/src/services/info_service.ts | 4 +- src/typegate/src/services/middlewares.ts | 4 +- .../src/services/playground_service.ts | 4 +- src/typegate/src/services/responses.ts | 4 +- src/typegate/src/services/rest_service.ts | 4 +- src/typegate/src/sync/mod.ts | 4 +- src/typegate/src/sync/replicated_map.ts | 13 +- src/typegate/src/sync/typegraph.ts | 4 +- src/typegate/src/system_typegraphs.ts | 4 +- src/typegate/src/transports/graphql/gq.ts | 4 +- .../src/transports/graphql/graphql.ts | 4 +- .../src/transports/graphql/request_parser.ts | 4 +- .../src/transports/graphql/typegraph.ts | 4 +- src/typegate/src/transports/graphql/utils.ts | 4 +- .../transports/rest/rest_schema_generator.ts | 4 +- src/typegate/src/typegate/artifacts/local.ts | 6 +- src/typegate/src/typegate/artifacts/mod.ts | 4 +- src/typegate/src/typegate/artifacts/shared.ts | 30 +- src/typegate/src/typegate/hooks.ts | 4 +- src/typegate/src/typegate/memory_register.ts | 4 +- src/typegate/src/typegate/mod.ts | 4 +- src/typegate/src/typegate/no_limiter.ts | 4 +- src/typegate/src/typegate/rate_limiter.ts | 4 +- src/typegate/src/typegate/register.ts | 4 +- src/typegate/src/typegraph/mod.ts | 20 +- src/typegate/src/typegraph/type_node.ts | 4 +- src/typegate/src/typegraph/types.ts | 4 +- src/typegate/src/typegraph/utils.ts | 4 +- src/typegate/src/typegraph/versions.ts | 4 +- src/typegate/src/typegraph/visitor.ts | 4 +- src/typegate/src/typegraphs/introspection.py | 3 +- .../src/typegraphs/prisma_migration.py | 3 + src/typegate/src/typegraphs/typegate.py | 3 +- src/typegate/src/types.ts | 4 +- src/typegate/src/utils.ts | 18 +- src/typegate/src/utils/hash.ts | 4 +- src/typegate/src/worker_utils.ts | 8 +- src/typegate/standalone/src/config.rs | 4 +- src/typegate/standalone/src/logger.rs | 4 +- src/typegate/standalone/src/main.rs | 4 +- src/typegraph/deno/src/runtimes/python.ts | 10 +- .../deno/src/runtimes/substantial.ts | 12 +- src/typegraph/deno/src/tg_deploy.ts | 4 +- src/typegraph/deno/src/typegraph.ts | 1 - src/typegraph/deno/src/utils/func_utils.ts | 5 +- src/xtask/src/deno.rs | 4 +- src/xtask/src/main.rs | 4 +- tests/artifacts/artifacts_test.ts | 4 +- tests/auth/auth_test.ts | 4 +- tests/auto/auto_test.ts_ | 4 +- tests/auto/test/test.py | 3 +- tests/common_utils/proposition_test.ts | 4 +- tests/common_utils/url_test.ts | 4 +- tests/crypto/crypto_test.ts | 4 +- tests/dedup/tg.ts | 4 +- tests/docs/how-tos/prog_deploy/prog_deploy.ts | 4 +- .../how-tos/prog_deploy/prog_deploy_test.ts | 4 +- tests/docs/how-tos/prog_deploy/prog_remove.ts | 4 +- .../how-tos/prog_deploy/scripts/say_hello.ts | 4 +- tests/e2e/cli/deploy_test.ts | 4 +- tests/e2e/cli/dev_test.ts | 4 +- tests/e2e/cli/typegraphs/deps.ts | 3 + tests/e2e/cli/undeploy_test.ts | 4 +- tests/e2e/cli/watch_test.ts | 8 +- tests/e2e/nextjs/apollo/pages/api/apollo.ts | 4 +- tests/e2e/nextjs/apollo/tailwind.config.ts | 4 +- tests/e2e/nextjs/apollo_test.ts | 4 +- tests/e2e/published/published_test.ts | 4 +- tests/e2e/self_deploy/scripts/main.ts | 4 +- tests/e2e/self_deploy/self_deploy.ts | 4 +- tests/e2e/self_deploy/self_deploy_test.ts | 4 +- tests/e2e/templates/templates_test.ts | 4 +- .../__snapshots__/typegraph_test.ts.snap | 8 +- tests/e2e/typegraph/typegraph_test.ts | 4 +- .../e2e/typegraph/typegraphs/deno/complex.ts | 4 +- .../typegraphs/deno/multiple_runtimes.ts | 4 +- .../typegraphs/deno/scripts/three.ts | 4 +- tests/e2e/typegraph/typegraphs/deno/simple.ts | 4 +- .../typegraphs/python/scripts/three.ts | 4 +- tests/e2e/typegraph/validator_test.ts | 4 +- tests/e2e/website/website_test.ts | 4 +- tests/graphql/graphql_test.ts | 4 +- tests/graphql/request_parser_test.ts | 4 +- tests/http_utils/http_utils_test.ts | 4 +- tests/importers/importers_test.ts.disabled | 4 +- tests/injection/injection.ts | 4 +- tests/injection/injection_test.ts | 4 +- tests/injection/random_injection.ts | 4 +- tests/injection/random_injection_test.ts | 4 +- tests/internal/internal_test.ts | 4 +- tests/internal/py/logic.py | 4 +- tests/internal/ts/logic.ts | 4 +- tests/introspection/introspection_test.ts | 4 +- tests/introspection/union_either_test.ts | 4 +- tests/metagen/metagen_test.ts | 4 +- tests/metagen/typegraphs/identities/rs/lib.rs | 4 +- .../typegraphs/identities/ts/handlers.ts | 4 +- tests/metagen/typegraphs/metagen.ts | 4 +- tests/metagen/typegraphs/sample.ts | 4 +- tests/metagen/typegraphs/sample/ts/main.ts | 4 +- tests/misc/publish_test.ts | 4 +- tests/misc/typegate_config_test.ts.disabled | 4 +- tests/multi_typegraph/multi_typegraph.ts | 4 +- tests/multi_typegraph/multi_typegraph_test.ts | 4 +- tests/nesting/nesting_test.ts | 4 +- tests/params/apply_test.ts | 4 +- tests/planner/default_args_test.ts | 4 +- tests/planner/planner_test.ts | 4 +- tests/policies/policies_jwt_test.ts | 4 +- tests/policies/policies_test.ts | 4 +- tests/policies/ts/effects.ts | 4 +- tests/policies/ts/policies.ts | 4 +- tests/prisma_migrate/prisma_migrate_test.ts | 4 +- tests/query_parsers/query_parsers_test.ts | 4 +- tests/rate_limiter/rate_limiter_test.ts | 4 +- .../invalid_ref_test.ts | 4 +- tests/rest/custom/custom_loader.ts | 4 +- tests/rest/rest_custom_loader.ts | 4 +- tests/rest/rest_schema.ts | 4 +- tests/rest/rest_test.ts | 4 +- tests/runtimes/deno/deno_dep.ts | 4 +- tests/runtimes/deno/deno_dir.ts | 4 +- tests/runtimes/deno/deno_dir_test.ts | 4 +- .../runtimes/deno/deno_duplicate_artifact.ts | 4 +- tests/runtimes/deno/deno_glob_test.ts | 4 +- tests/runtimes/deno/deno_globs.ts | 4 +- tests/runtimes/deno/deno_sync_test.ts | 4 +- tests/runtimes/deno/deno_test.ts | 4 +- tests/runtimes/deno/deno_typescript.ts | 4 +- tests/runtimes/deno/dynamic/1.ts | 4 +- tests/runtimes/deno/dynamic/2.ts | 4 +- tests/runtimes/deno/reload/template.ts | 4 +- tests/runtimes/deno/ts/deno.ts | 4 +- tests/runtimes/deno/ts/dep/main.ts | 4 +- tests/runtimes/deno/ts/dep/nested/dep.ts | 4 +- tests/runtimes/deno/ts/math-npm.ts | 4 +- tests/runtimes/deno/ts/math.ts | 4 +- tests/runtimes/graphql/graphql_test.ts | 4 +- .../graphql/typegraphs/deno/graphql.ts | 4 +- tests/runtimes/grpc/geography.py | 4 +- tests/runtimes/grpc/grpc_test.ts | 4 +- tests/runtimes/grpc/helloworld.py | 4 +- tests/runtimes/grpc/helloworld.ts | 4 +- tests/runtimes/grpc/maths.py | 4 +- tests/runtimes/http/http_content_type_test.ts | 4 +- tests/runtimes/http/http_test.ts | 4 +- tests/runtimes/kv/kv.py | 4 +- tests/runtimes/kv/kv.ts | 4 +- tests/runtimes/kv/kv_test.ts | 4 +- .../prisma/full_prisma_mapping_test.ts | 4 +- .../runtimes/prisma/graphql_variables_test.ts | 4 +- tests/runtimes/prisma/mixed_runtime_test.ts | 4 +- tests/runtimes/prisma/multi_relations_test.ts | 4 +- .../runtimes/prisma/multiple_runtimes_test.ts | 4 +- tests/runtimes/prisma/normal_1_1.ts | 4 +- tests/runtimes/prisma/one_to_many_test.ts | 4 +- tests/runtimes/prisma/one_to_one_test.ts | 4 +- tests/runtimes/prisma/optional_1_n.ts | 4 +- .../runtimes/prisma/prisma_edgecases_test.ts | 4 +- tests/runtimes/prisma/prisma_test.ts | 4 +- tests/runtimes/prisma/query_builder_test.ts | 4 +- .../runtimes/prisma/schema_generation_test.ts | 4 +- tests/runtimes/python/python.ts | 4 +- tests/runtimes/python/python_dir.ts | 4 +- tests/runtimes/python/python_dir_test.ts | 4 +- .../python/python_duplicate_artifact.ts | 4 +- tests/runtimes/python/python_glob_test.ts | 4 +- tests/runtimes/python/python_globs.ts | 4 +- tests/runtimes/python/python_no_artifact.ts | 4 +- tests/runtimes/python/python_sync_test.ts | 4 +- tests/runtimes/python/python_test.ts | 4 +- tests/runtimes/random/random.ts | 4 +- tests/runtimes/random/random_test.ts | 4 +- tests/runtimes/s3/s3.ts | 4 +- tests/runtimes/s3/s3_test.ts | 4 +- tests/runtimes/substantial/kv_like_test.ts | 4 +- tests/runtimes/substantial/redis_test.ts | 4 +- tests/runtimes/temporal/temporal.ts | 4 +- tests/runtimes/temporal/temporal_test.ts | 4 +- tests/runtimes/temporal/worker/activities.ts | 4 +- tests/runtimes/temporal/worker/worker.ts | 4 +- tests/runtimes/temporal/worker/workflows.ts | 4 +- .../runtimes/typegate/typegate_prisma_test.ts | 4 +- .../typegate/typegate_runtime_test.ts | 4 +- tests/runtimes/wasm_reflected/rust/src/lib.rs | 4 +- .../runtimes/wasm_reflected/wasm_reflected.ts | 4 +- .../wasm_reflected/wasm_reflected_test.ts | 4 +- .../runtimes/wasm_reflected/wasm_sync_test.ts | 4 +- tests/runtimes/wasm_wire/rust/lib.rs | 4 +- tests/runtimes/wasm_wire/wasm_duplicate.ts | 4 +- tests/runtimes/wasm_wire/wasm_sync_test.ts | 4 +- tests/runtimes/wasm_wire/wasm_wire.ts | 4 +- tests/runtimes/wasm_wire/wasm_wire_test.ts | 4 +- tests/schema_validation/circular_test.ts | 4 +- tests/schema_validation/ts/circular.ts | 4 +- tests/simple/class_syntax_test.ts | 4 +- tests/simple/error_message_test.ts | 4 +- tests/simple/simple_test.ts | 4 +- tests/sync/sync_config_test.ts | 4 +- tests/sync/typegraph_sync_test.ts.disable | 4 +- tests/type_nodes/array_of_optional_test.ts | 4 +- tests/type_nodes/either_test.ts | 4 +- tests/type_nodes/ts/either/user_register.ts | 4 +- tests/type_nodes/ts/union/color_converter.ts | 4 +- tests/type_nodes/ts/union/phone_register.ts | 4 +- tests/type_nodes/ts/union/vec_normalizer.ts | 4 +- tests/type_nodes/union_node_attr_test.ts | 4 +- .../type_nodes/union_node_quantifier_test.ts | 4 +- tests/type_nodes/union_test.ts | 4 +- tests/typecheck/input_validator_test.ts | 4 +- tests/typecheck/reduce.ts | 4 +- tests/typecheck/reduce_syntax_test.ts | 4 +- tests/typecheck/type_alias_test.ts | 4 +- tests/typecheck/typecheck.py | 3 +- tests/typecheck/typecheck_test.ts | 4 +- tests/typegraph/version_test.ts | 4 +- tests/typename/typename_test.ts | 4 +- tests/utils/assert.ts | 4 +- tests/utils/autotest.ts | 4 +- tests/utils/bindings_test.ts | 4 +- tests/utils/database.ts | 4 +- tests/utils/date.ts | 4 +- tests/utils/dir.ts | 4 +- tests/utils/hooks.ts | 4 +- tests/utils/meta.ts | 4 +- tests/utils/migrations.ts | 4 +- tests/utils/mock_fetch.ts | 4 +- tests/utils/mod.ts | 4 +- tests/utils/process.ts | 4 +- tests/utils/query/file_extractor.ts | 4 +- tests/utils/query/graphql_query.ts | 4 +- tests/utils/query/mod.ts | 4 +- tests/utils/query/rest_query.ts | 4 +- tests/utils/router@0.0.5.ts | 4 +- tests/utils/s3.ts | 4 +- tests/utils/shell.ts | 4 +- tests/utils/single_register.ts | 4 +- tests/utils/test.ts | 4 +- tests/utils/test_module.ts | 4 +- tests/utils/tg_deploy_script.ts | 4 +- tests/vars/vars_test.ts | 4 +- tools/Dockerfile | 8 +- tools/Dockerfile.dockerignore | 2 +- tools/LICENSE-Elastic-2.0.md | 91 ----- tools/consts.ts | 4 +- tools/deps.ts | 4 +- tools/installs.ts | 4 +- tools/license-header-Elastic-2.0.txt | 2 - tools/tasks/build.ts | 4 +- tools/tasks/dev.ts | 4 +- tools/tasks/fetch.ts | 4 +- tools/tasks/gen.ts | 4 +- tools/tasks/install.ts | 4 +- tools/tasks/lint.ts | 4 +- tools/tasks/lock.ts | 4 +- tools/tasks/mod.ts | 19 +- tools/tasks/test.ts | 4 +- tools/test.ts | 4 +- tools/tree-view-web.ts | 4 +- tools/tree-view.ts | 4 +- tools/typegraph-size.ts | 4 +- tools/update.ts | 4 +- tools/utils.ts | 4 +- 426 files changed, 1639 insertions(+), 1358 deletions(-) delete mode 100644 tools/LICENSE-Elastic-2.0.md delete mode 100644 tools/license-header-Elastic-2.0.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0d648d2c1..b3b0e85b3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,19 +28,19 @@ repos: - id: deno-fmt name: Deno format language: system - entry: bash -c 'cd typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs,tests/metagen/typegraphs/sample/ts/client.ts && cd ../dev && deno fmt && cd ../typegraph/deno && deno fmt --ignore=node_modules,dist && cd ../../libs/metagen/src && deno fmt' + entry: bash -c 'cd src/typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs,tests/metagen/typegraphs/sample/ts/client.ts && cd ../../tools && deno fmt && cd ../src/typegraph/deno && deno fmt --ignore=node_modules,dist && cd ../../../src/metagen/src && deno fmt' pass_filenames: false types: - ts - files: ^(typegate|dev|typegraph/deno)/ + files: ^(src/typegate|tools|src/typegraph/deno)/ - id: deno-lint name: Deno lint language: system - entry: bash -c 'cd typegate && deno lint --rules-exclude=no-explicit-any --ignore=native,tmp,tests/e2e/nextjs && cd ../dev && deno lint && cd ../libs/metagen/src/ && deno lint' + entry: bash -c 'cd src/typegate && deno lint --rules-exclude=no-explicit-any --ignore=native,tmp,tests/e2e/nextjs && cd ../../tools && deno lint && cd ../src/metagen/src/ && deno lint' pass_filenames: false types: - ts - files: ^(typegate|dev)/ + files: ^(src/typegate|tools)/ - id: es-lint name: Eslint website language: system @@ -100,17 +100,17 @@ repos: name: "License MPL-2.0 python" args: #- --remove-header - - --license-filepath=dev/license-header-MPL-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=#" - "--skip-license-insertion-comment=no-auto-license-header" types_or: - python files: ^typegraph/ - id: insert-license - name: "License Elastic-2.0 rust" + name: "License MPL-2.0 rust" args: #- --remove-header - - --license-filepath=dev/license-header-Elastic-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=//" - "--skip-license-insertion-comment=no-auto-license-header" - "--skip-license-insertion-comment=@generated" @@ -121,38 +121,38 @@ repos: name: "License MPL-2.0 rust" args: #- --remove-header - - --license-filepath=dev/license-header-MPL-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=//" - "--skip-license-insertion-comment=no-auto-license-header" types_or: - rust files: ^(meta-cli|typegraph|libs/metagen)/ - id: insert-license - name: "License Elastic-2.0 deno" + name: "License MPL-2.0 deno" args: #- --remove-header - - --license-filepath=dev/license-header-Elastic-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=//" - "--skip-license-insertion-comment=no-auto-license-header" - "--skip-license-insertion-comment=@generated" types_or: - ts - files: ^(typegate|dev)/ + files: ^(typegate|tools)/ - id: insert-license name: "License MPL-2.0 deno" args: #- --remove-header - - --license-filepath=dev/license-header-MPL-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=//" - "--skip-license-insertion-comment=no-auto-license-header" types_or: - ts files: ^typegraph/ - id: insert-license - name: "License Elastic-2.0 typescript" + name: "License MPL-2.0 typescript" args: #- --remove-header - - --license-filepath=dev/license-header-Elastic-2.0.txt + - --license-filepath=tools/license-header-MPL-2.0.txt - "--comment-style=//" - "--skip-license-insertion-comment=no-auto-license-header" types_or: diff --git a/LICENSE.md b/LICENSE.md index f92a4d1827..9c9d472da2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,35 +1,359 @@ -# License +# Mozilla Public License Version 2.0 (MPL-2.0) -Copyright © Metatype OÜ. +1. Definitions -Portions of this repository are licensed as follows: +--- -- all third party components incorporated into the repository are licensed under - the original license provided by the owner of the applicable component (see - the license header of the relevant files) -- all content under `typegraph/` and `meta-cli/` is licensed under - [Mozilla Public License 2.0 (MPL-2.0)](./tools/LICENSE-MPL-2.0.md) -- all content outside the above-mentioned files or restrictions is available - under the [Elastic License 2.0 (Elastic-2.0)](./tools/LICENSE-Elastic-2.0.md) -- alternatively, the Metatype Commercial Licensing can take precedence in case - your usage requires ad-hoc clarifications (reach out!) +1.1. "Contributor" means each individual or legal entity that creates, +contributes to the creation of, or owns Covered Software. -**Are all of Metatype's components open source?** +1.2. "Contributor Version" means the combination of the Contributions of others +(if any) used by a Contributor and that particular Contributor's Contribution. -Strictly speaking, only the ones licensed under the MPL-2.0 license are. The -rest is not an open source software as define by the -[Open Source Initiative](https://opensource.org/osd). However, they belong to -the [Fair-code](https://faircode.io) family and promotes similar values (free to -use, distribution-friendly, open source code, easily extensible), yet allowing -to build a sustainable ecosystem for all around it. +1.3. "Contribution" means Covered Software of a particular Contributor. -We are strong believer in open source mindset and are committed to contribute -back as much as possible of the internals to the community as Metatype grows. +1.4. "Covered Software" means Source Code Form to which the initial Contributor +has attached the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case including +portions thereof. -**Conditions or obligations of the license is not clear enough for me or my -company, what can I do?** +1.5. "Incompatible With Secondary Licenses" means -Fair-code licenses may have some fuzzy license boundaries, and we definitely do -not want this to stop your usage. In case there is any doubt, please reach out -to our support for clarification. We will be pleased to help you build the -future with Metatype as a core element. + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" means any form of the work other than Source Code Form. + +1.7. "Larger Work" means a work that combines Covered Software with other +material, in a separate file or files, that is not Covered Software. + +1.8. "License" means this document. + +1.9. "Licensable" means having the right to grant, to the maximum extent +possible, whether at the time of the initial grant or subsequently, any and all +of the rights conveyed by this License. + +1.10. "Modifications" means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor means any patent claim(s), including +without limitation, method, process, and apparatus claims, in any patent +Licensable by such Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having made, import, +or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" means either the GNU General Public License, Version +2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" means the form of the work preferred for making +modifications. + +1.14. "You" (or "Your") means an individual or a legal entity exercising rights +under this License. For legal entities, "You" includes any entity that controls, +is controlled by, or is under common control with You. For purposes of this +definition, "control" means (a) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or otherwise, or (b) +ownership of more than fifty percent (50%) of the outstanding shares or +beneficial ownership of such entity. + +2. License Grants and Conditions + +--- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive +license: + +(a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, modify, +display, perform, distribute, and otherwise exploit its Contributions, either on +an unmodified basis, with Modifications, or as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer for sale, +have made, import, and otherwise transfer either its Contributions or its +Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution become +effective for each Contribution on the date the Contributor first distributes +such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under this +License. No additional rights or licenses will be implied from the distribution +or licensing of Covered Software under this License. Notwithstanding Section +2.1(b) above, no patent license is granted by a Contributor: + +(a) for any code that a Contributor has removed from Covered Software; or + +(b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its Contributions +with other software (except as part of its Contributor Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of its +Contributions. + +This License does not grant any rights in the trademarks, service marks, or +logos of any Contributor (except as may be necessary to comply with the notice +requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to distribute +the Covered Software under a subsequent version of this License (see Section +10.2) or under the terms of a Secondary License (if permitted under the terms of +Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its Contributions are +its original creation(s) or it has sufficient rights to grant the rights to its +Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under applicable +copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in +Section 2.1. + +3. Responsibilities + +--- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under the +terms of this License. You must inform recipients that the Source Code Form of +the Covered Software is governed by the terms of this License, and how they can +obtain a copy of this License. You may not attempt to alter or restrict the +recipients' rights in the Source Code Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code Form, as +described in Section 3.1, and You must inform recipients of the Executable Form +how they can obtain a copy of such Source Code Form by reasonable means in a +timely manner, at a charge no more than the cost of distribution to the +recipient; and + +(b) You may distribute such Executable Form under the terms of this License, or +sublicense it under different terms, provided that the license for the +Executable Form does not attempt to limit or alter the recipients' rights in the +Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, provided +that You also comply with the requirements of this License for the Covered +Software. If the Larger Work is a combination of Covered Software with a work +governed by one or more Secondary Licenses, and the Covered Software is not +Incompatible With Secondary Licenses, this License permits You to additionally +distribute such Covered Software under the terms of such Secondary License(s), +so that the recipient of the Larger Work may, at their option, further +distribute the Covered Software under the terms of either this License or such +Secondary License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices (including +copyright notices, patent notices, disclaimers of warranty, or limitations of +liability) contained within the Source Code Form of the Covered Software, except +that You may alter any license notices to the extent required to remedy known +factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, indemnity +or liability obligations to one or more recipients of Covered Software. However, +You may do so only on Your own behalf, and not on behalf of any Contributor. You +must make it absolutely clear that any such warranty, support, indemnity, or +liability obligation is offered by You alone, and You hereby agree to indemnify +every Contributor for any liability incurred by such Contributor as a result of +warranty, support, indemnity or liability terms You offer. You may include +additional disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + +--- + +If it is impossible for You to comply with any of the terms of this License with +respect to some or all of the Covered Software due to statute, judicial order, +or regulation then You must: (a) comply with the terms of this License to the +maximum extent possible; and (b) describe the limitations and the code they +affect. Such description must be placed in a text file included with all +distributions of the Covered Software under this License. Except to the extent +prohibited by statute or regulation, such description must be sufficiently +detailed for a recipient of ordinary skill to be able to understand it. + +5. Termination + +--- + +5.1. The rights granted under this License will terminate automatically if You +fail to comply with any of its terms. However, if You become compliant, then the +rights granted under this License from a particular Contributor are reinstated +(a) provisionally, unless and until such Contributor explicitly and finally +terminates Your grants, and (b) on an ongoing basis, if such Contributor fails +to notify You of the non-compliance by some reasonable means prior to 60 days +after You have come back into compliance. Moreover, Your grants from a +particular Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the first +time You have received notice of non-compliance with this License from such +Contributor, and You become compliant prior to 30 days after Your receipt of the +notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, counter-claims, and +cross-claims) alleging that a Contributor Version directly or indirectly +infringes any patent, then the rights granted to You by any and all Contributors +for the Covered Software under Section 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user +license agreements (excluding distributors and resellers) which have been +validly granted by You or Your distributors under this License prior to +termination shall survive termination. + +--- + +- + - +- + 6. Disclaimer of Warranty * +- ------------------------- * +- + - +- Covered Software is provided under this License on an "as is" * +- basis, without warranty of any kind, either expressed, implied, or * +- statutory, including, without limitation, warranties that the * +- Covered Software is free of defects, merchantable, fit for a * +- particular purpose or non-infringing. The entire risk as to the * +- quality and performance of the Covered Software is with You. * +- Should any Covered Software prove defective in any respect, You * +- (not any Contributor) assume the cost of any necessary servicing, * +- repair, or correction. This disclaimer of warranty constitutes an * +- essential part of this License. No use of any Covered Software is * +- authorized under this License except under this disclaimer. * +- + - + +--- + +--- + +- + - +- + 7. Limitation of Liability * +- -------------------------- * +- + - +- Under no circumstances and under no legal theory, whether tort * +- (including negligence), contract, or otherwise, shall any * +- Contributor, or anyone who distributes Covered Software as * +- permitted above, be liable to You for any direct, indirect, * +- special, incidental, or consequential damages of any character * +- including, without limitation, damages for lost profits, loss of * +- goodwill, work stoppage, computer failure or malfunction, or any * +- and all other commercial damages or losses, even if such party * +- shall have been informed of the possibility of such damages. This * +- limitation of liability shall not apply to liability for death or * +- personal injury resulting from such party's negligence to the * +- extent applicable law prohibits such limitation. Some * +- jurisdictions do not allow the exclusion or limitation of * +- incidental or consequential damages, so this exclusion and * +- limitation may not apply to You. * +- + - + +--- + +8. Litigation + +--- + +Any litigation relating to this License may be brought only in the courts of a +jurisdiction where the defendant maintains its principal place of business and +such litigation shall be governed by laws of that jurisdiction, without +reference to its conflict-of-law provisions. Nothing in this Section shall +prevent a party's ability to bring cross-claims or counter-claims. + +9. Miscellaneous + +--- + +This License represents the complete agreement concerning the subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it enforceable. +Any law or regulation which provides that the language of a contract shall be +construed against the drafter shall not be used to construe this License against +a Contributor. + +10. Versions of the License + +--- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section 10.3, +no one other than the license steward has the right to modify or publish new +versions of this License. Each version will be given a distinguishing version +number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version of the +License under which You originally received the Covered Software, or under the +terms of any subsequent version published by the license steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to create a +new license for such software, you may create and use a modified version of this +License if you rename the license and remove any references to the name of the +license steward (except to note that such modified license differs from this +License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + +If You choose to distribute Source Code Form that is Incompatible With Secondary +Licenses under the terms of this version of the License, the notice described in +Exhibit B of this License must be attached. + +## Exhibit A - Source Code Form License Notice + +This Source Code Form is subject to the terms of the Mozilla Public License, v. +2.0. If a copy of the MPL was not distributed with this file, You can obtain one +at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +## Exhibit B - "Incompatible With Secondary Licenses" Notice + +This Source Code Form is "Incompatible With Secondary Licenses", as defined by +the Mozilla Public License, v. 2.0. diff --git a/docs/metatype.dev/docs/reference/typegate/authentication/oauth2.tsx b/docs/metatype.dev/docs/reference/typegate/authentication/oauth2.tsx index 49663b0cb1..a555e6a6b2 100644 --- a/docs/metatype.dev/docs/reference/typegate/authentication/oauth2.tsx +++ b/docs/metatype.dev/docs/reference/typegate/authentication/oauth2.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { useCallback, useState } from "react"; import Link from "@docusaurus/Link"; diff --git a/docs/metatype.dev/docs/tutorials/metatype-basics/md2html.ts.src b/docs/metatype.dev/docs/tutorials/metatype-basics/md2html.ts.src index 63aa78ea51..0bb183ad42 100644 --- a/docs/metatype.dev/docs/tutorials/metatype-basics/md2html.ts.src +++ b/docs/metatype.dev/docs/tutorials/metatype-basics/md2html.ts.src @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as marked from "https://deno.land/x/marked/mod.ts"; diff --git a/docs/metatype.dev/globals.d.ts b/docs/metatype.dev/globals.d.ts index 3d2e322a14..6e901d07dc 100644 --- a/docs/metatype.dev/globals.d.ts +++ b/docs/metatype.dev/globals.d.ts @@ -1,4 +1,4 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 declare module "*.scss"; diff --git a/docs/metatype.dev/src/components/BlogIntro/index.tsx b/docs/metatype.dev/src/components/BlogIntro/index.tsx index 2e6c85ada1..c2b6bf7dfb 100644 --- a/docs/metatype.dev/src/components/BlogIntro/index.tsx +++ b/docs/metatype.dev/src/components/BlogIntro/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; diff --git a/docs/metatype.dev/src/components/ChoicePicker/index.tsx b/docs/metatype.dev/src/components/ChoicePicker/index.tsx index fefac3fd6e..f5d58e0429 100644 --- a/docs/metatype.dev/src/components/ChoicePicker/index.tsx +++ b/docs/metatype.dev/src/components/ChoicePicker/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { PropsWithChildren } from "react"; diff --git a/docs/metatype.dev/src/components/CompareLandscape.tsx b/docs/metatype.dev/src/components/CompareLandscape.tsx index 47777b580c..d42f6ac7c9 100644 --- a/docs/metatype.dev/src/components/CompareLandscape.tsx +++ b/docs/metatype.dev/src/components/CompareLandscape.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; diff --git a/docs/metatype.dev/src/components/DocButton/index.tsx b/docs/metatype.dev/src/components/DocButton/index.tsx index 69faba3c87..24fde09c18 100644 --- a/docs/metatype.dev/src/components/DocButton/index.tsx +++ b/docs/metatype.dev/src/components/DocButton/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; import PaginatorNavLink from "@theme/PaginatorNavLink"; diff --git a/docs/metatype.dev/src/components/Features/index.tsx b/docs/metatype.dev/src/components/Features/index.tsx index e8e32bdf6b..be240d5c25 100644 --- a/docs/metatype.dev/src/components/Features/index.tsx +++ b/docs/metatype.dev/src/components/Features/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /* eslint-disable @typescript-eslint/no-var-requires */ diff --git a/docs/metatype.dev/src/components/Giscus/index.tsx b/docs/metatype.dev/src/components/Giscus/index.tsx index b84c18444c..4d1d3c15e8 100644 --- a/docs/metatype.dev/src/components/Giscus/index.tsx +++ b/docs/metatype.dev/src/components/Giscus/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; import { default as Component } from "@giscus/react"; diff --git a/docs/metatype.dev/src/components/MiniQL/index.tsx b/docs/metatype.dev/src/components/MiniQL/index.tsx index 6b58ed1b56..e2efe2ef74 100644 --- a/docs/metatype.dev/src/components/MiniQL/index.tsx +++ b/docs/metatype.dev/src/components/MiniQL/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { useMemo, useState } from "react"; import { createGraphiQLFetcher } from "@graphiql/toolkit"; diff --git a/docs/metatype.dev/src/components/MiniQL/memory_store.ts b/docs/metatype.dev/src/components/MiniQL/memory_store.ts index fd1a0728b7..37ee910859 100644 --- a/docs/metatype.dev/src/components/MiniQL/memory_store.ts +++ b/docs/metatype.dev/src/components/MiniQL/memory_store.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export class MemoryStorage { private map: Map; diff --git a/docs/metatype.dev/src/components/Newsletter/index.tsx b/docs/metatype.dev/src/components/Newsletter/index.tsx index efcf5afe34..5c3f8b5720 100644 --- a/docs/metatype.dev/src/components/Newsletter/index.tsx +++ b/docs/metatype.dev/src/components/Newsletter/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { useMemo, useState } from "react"; import { ApolloClient, gql, InMemoryCache } from "@apollo/client"; diff --git a/docs/metatype.dev/src/components/PythonPackageManagerTabs/index.tsx b/docs/metatype.dev/src/components/PythonPackageManagerTabs/index.tsx index 9123232baa..d7de55e932 100644 --- a/docs/metatype.dev/src/components/PythonPackageManagerTabs/index.tsx +++ b/docs/metatype.dev/src/components/PythonPackageManagerTabs/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { PropsWithChildren } from "react"; import { usePythonPackageManager } from "../../states/package_manager"; diff --git a/docs/metatype.dev/src/components/SDKTabs/index.tsx b/docs/metatype.dev/src/components/SDKTabs/index.tsx index 1df20d596e..04630bae65 100644 --- a/docs/metatype.dev/src/components/SDKTabs/index.tsx +++ b/docs/metatype.dev/src/components/SDKTabs/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { PropsWithChildren } from "react"; import { SDK, useSDK } from "../../states/sdk"; diff --git a/docs/metatype.dev/src/components/TGExample/index.tsx b/docs/metatype.dev/src/components/TGExample/index.tsx index 351dd23afb..aee0d2380d 100644 --- a/docs/metatype.dev/src/components/TGExample/index.tsx +++ b/docs/metatype.dev/src/components/TGExample/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import MiniQL, { MiniQLProps } from "@site/src/components/MiniQL"; import React from "react"; diff --git a/docs/metatype.dev/src/components/TsPackageManagerTabs/index.tsx b/docs/metatype.dev/src/components/TsPackageManagerTabs/index.tsx index 926f2296ac..928dd619e1 100644 --- a/docs/metatype.dev/src/components/TsPackageManagerTabs/index.tsx +++ b/docs/metatype.dev/src/components/TsPackageManagerTabs/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React, { PropsWithChildren } from "react"; import { useTsPackageManager } from "../../states/package_manager"; diff --git a/docs/metatype.dev/src/components/animations/animated.tsx b/docs/metatype.dev/src/components/animations/animated.tsx index 84f0d1e061..41e17a92e0 100644 --- a/docs/metatype.dev/src/components/animations/animated.tsx +++ b/docs/metatype.dev/src/components/animations/animated.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; import { WithAnimated, a } from "@react-spring/konva"; diff --git a/docs/metatype.dev/src/components/animations/animated_canvas.tsx b/docs/metatype.dev/src/components/animations/animated_canvas.tsx index 4060a89137..1172cee9d3 100644 --- a/docs/metatype.dev/src/components/animations/animated_canvas.tsx +++ b/docs/metatype.dev/src/components/animations/animated_canvas.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; import { Stage } from "react-konva"; diff --git a/docs/metatype.dev/src/components/animations/block.tsx b/docs/metatype.dev/src/components/animations/block.tsx index 6e0485a969..b24ad98f75 100644 --- a/docs/metatype.dev/src/components/animations/block.tsx +++ b/docs/metatype.dev/src/components/animations/block.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import Konva from "konva"; import { RectConfig } from "konva/lib/shapes/Rect"; diff --git a/docs/metatype.dev/src/components/animations/doublearrow.tsx b/docs/metatype.dev/src/components/animations/doublearrow.tsx index 1b35c564af..0f3a6b0983 100644 --- a/docs/metatype.dev/src/components/animations/doublearrow.tsx +++ b/docs/metatype.dev/src/components/animations/doublearrow.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { ArrowConfig } from "konva/lib/shapes/Arrow"; import React from "react"; diff --git a/docs/metatype.dev/src/components/animations/hooks.tsx b/docs/metatype.dev/src/components/animations/hooks.tsx index c34f98fdbb..67d3b4801a 100644 --- a/docs/metatype.dev/src/components/animations/hooks.tsx +++ b/docs/metatype.dev/src/components/animations/hooks.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { KeyboardEvent, useEffect, useRef, useState } from "react"; import { useSpring, SpringValue, useSpringValue } from "@react-spring/konva"; diff --git a/docs/metatype.dev/src/components/animations/textarrow.tsx b/docs/metatype.dev/src/components/animations/textarrow.tsx index 1cfd5a8a05..748c56b40c 100644 --- a/docs/metatype.dev/src/components/animations/textarrow.tsx +++ b/docs/metatype.dev/src/components/animations/textarrow.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import Konva from "konva"; import React, { useEffect, useRef, useState } from "react"; diff --git a/docs/metatype.dev/src/components/castles.tsx b/docs/metatype.dev/src/components/castles.tsx index cda107b69f..8ed3bae23d 100644 --- a/docs/metatype.dev/src/components/castles.tsx +++ b/docs/metatype.dev/src/components/castles.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import React from "react"; diff --git a/docs/metatype.dev/src/pages/index.tsx b/docs/metatype.dev/src/pages/index.tsx index b17d926a3c..48be7509c0 100644 --- a/docs/metatype.dev/src/pages/index.tsx +++ b/docs/metatype.dev/src/pages/index.tsx @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /* eslint-disable @typescript-eslint/no-var-requires */ diff --git a/docs/metatype.dev/src/states/package_manager.ts b/docs/metatype.dev/src/states/package_manager.ts index fb8343fc70..d369d7a644 100644 --- a/docs/metatype.dev/src/states/package_manager.ts +++ b/docs/metatype.dev/src/states/package_manager.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { atom, useAtom } from "jotai"; import { atomWithLocation } from "jotai-location"; diff --git a/docs/metatype.dev/src/states/sdk.ts b/docs/metatype.dev/src/states/sdk.ts index a7a86cb9fc..7724b28c7e 100644 --- a/docs/metatype.dev/src/states/sdk.ts +++ b/docs/metatype.dev/src/states/sdk.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { atom, useAtom } from "jotai"; import { atomWithStorage, createJSONStorage } from "jotai/utils"; diff --git a/examples/typegraphs/scripts/md2html.ts.src b/examples/typegraphs/scripts/md2html.ts.src index 63aa78ea51..0bb183ad42 100644 --- a/examples/typegraphs/scripts/md2html.ts.src +++ b/examples/typegraphs/scripts/md2html.ts.src @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as marked from "https://deno.land/x/marked/mod.ts"; diff --git a/src/common/src/archive.rs b/src/common/src/archive.rs index 1aa5f8f5e2..ad39d098e4 100644 --- a/src/common/src/archive.rs +++ b/src/common/src/archive.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use anyhow::{Context, Result}; use base64::{engine::general_purpose::STANDARD, Engine}; diff --git a/src/common/src/graphql.rs b/src/common/src/graphql.rs index 5c0ce16c89..fd88c3f741 100644 --- a/src/common/src/graphql.rs +++ b/src/common/src/graphql.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use anyhow::{bail, Result}; use async_trait::async_trait; diff --git a/src/common/src/grpc.rs b/src/common/src/grpc.rs index ec76f685c5..d2de2bf9dd 100644 --- a/src/common/src/grpc.rs +++ b/src/common/src/grpc.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use anyhow::{Context, Result}; diff --git a/src/common/src/lib.rs b/src/common/src/lib.rs index 9e9eee51cb..013467534d 100644 --- a/src/common/src/lib.rs +++ b/src/common/src/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 pub mod archive; pub mod grpc; diff --git a/src/common/src/node.rs b/src/common/src/node.rs index 894dc95c84..92b105a879 100644 --- a/src/common/src/node.rs +++ b/src/common/src/node.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use anyhow::{Context, Result}; use indoc::indoc; diff --git a/src/common/src/typegraph/mod.rs b/src/common/src/typegraph/mod.rs index 989e56440a..1dd4d9556f 100644 --- a/src/common/src/typegraph/mod.rs +++ b/src/common/src/typegraph/mod.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 pub mod parameter_transform; pub mod runtimes; diff --git a/src/common/src/typegraph/parameter_transform.rs b/src/common/src/typegraph/parameter_transform.rs index 523c3f1a39..045836319c 100644 --- a/src/common/src/typegraph/parameter_transform.rs +++ b/src/common/src/typegraph/parameter_transform.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::collections::HashMap; diff --git a/src/common/src/typegraph/runtimes/deno.rs b/src/common/src/typegraph/runtimes/deno.rs index e04eaf34d3..c370c06d7f 100644 --- a/src/common/src/typegraph/runtimes/deno.rs +++ b/src/common/src/typegraph/runtimes/deno.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use indexmap::IndexMap; use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/graphql.rs b/src/common/src/typegraph/runtimes/graphql.rs index dbdca32ce6..f258543c96 100644 --- a/src/common/src/typegraph/runtimes/graphql.rs +++ b/src/common/src/typegraph/runtimes/graphql.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/grpc.rs b/src/common/src/typegraph/runtimes/grpc.rs index 02826f08ff..cc94490685 100644 --- a/src/common/src/typegraph/runtimes/grpc.rs +++ b/src/common/src/typegraph/runtimes/grpc.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/http.rs b/src/common/src/typegraph/runtimes/http.rs index f7b38e2831..bdcd8a74a6 100644 --- a/src/common/src/typegraph/runtimes/http.rs +++ b/src/common/src/typegraph/runtimes/http.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/kv.rs b/src/common/src/typegraph/runtimes/kv.rs index 8767a97b92..3bc29f67d5 100644 --- a/src/common/src/typegraph/runtimes/kv.rs +++ b/src/common/src/typegraph/runtimes/kv.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/mod.rs b/src/common/src/typegraph/runtimes/mod.rs index 11882f2f80..4015509a57 100644 --- a/src/common/src/typegraph/runtimes/mod.rs +++ b/src/common/src/typegraph/runtimes/mod.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::path::PathBuf; diff --git a/src/common/src/typegraph/runtimes/prisma.rs b/src/common/src/typegraph/runtimes/prisma.rs index 2213d16f5b..ea0ca494df 100644 --- a/src/common/src/typegraph/runtimes/prisma.rs +++ b/src/common/src/typegraph/runtimes/prisma.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; diff --git a/src/common/src/typegraph/runtimes/python.rs b/src/common/src/typegraph/runtimes/python.rs index 01c3f7156b..61a825f739 100644 --- a/src/common/src/typegraph/runtimes/python.rs +++ b/src/common/src/typegraph/runtimes/python.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::path::PathBuf; diff --git a/src/common/src/typegraph/runtimes/random.rs b/src/common/src/typegraph/runtimes/random.rs index 3d8e036547..4b446a9d09 100644 --- a/src/common/src/typegraph/runtimes/random.rs +++ b/src/common/src/typegraph/runtimes/random.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/s3.rs b/src/common/src/typegraph/runtimes/s3.rs index e6ca882e66..e2db166bed 100644 --- a/src/common/src/typegraph/runtimes/s3.rs +++ b/src/common/src/typegraph/runtimes/s3.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; diff --git a/src/common/src/typegraph/runtimes/substantial.rs b/src/common/src/typegraph/runtimes/substantial.rs index e88bb8fd16..91797bbb18 100644 --- a/src/common/src/typegraph/runtimes/substantial.rs +++ b/src/common/src/typegraph/runtimes/substantial.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::path::PathBuf; diff --git a/src/common/src/typegraph/runtimes/temporal.rs b/src/common/src/typegraph/runtimes/temporal.rs index 38357e172e..cc5bf84d79 100644 --- a/src/common/src/typegraph/runtimes/temporal.rs +++ b/src/common/src/typegraph/runtimes/temporal.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; diff --git a/src/common/src/typegraph/runtimes/wasm.rs b/src/common/src/typegraph/runtimes/wasm.rs index 737c4d6703..1fd32bf3c8 100644 --- a/src/common/src/typegraph/runtimes/wasm.rs +++ b/src/common/src/typegraph/runtimes/wasm.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use serde::{Deserialize, Serialize}; use std::path::PathBuf; diff --git a/src/common/src/typegraph/types.rs b/src/common/src/typegraph/types.rs index 58f3f7faa1..8827536d60 100644 --- a/src/common/src/typegraph/types.rs +++ b/src/common/src/typegraph/types.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::collections::BTreeMap; diff --git a/src/common/src/typegraph/utils.rs b/src/common/src/typegraph/utils.rs index 73a21fe733..73d5a6c2a3 100644 --- a/src/common/src/typegraph/utils.rs +++ b/src/common/src/typegraph/utils.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::typegraph::{runtimes::TGRuntime, Typegraph}; use anyhow::{bail, Result}; diff --git a/src/common/src/typegraph/validator/common.rs b/src/common/src/typegraph/validator/common.rs index f67ea5a05c..e499478878 100644 --- a/src/common/src/typegraph/validator/common.rs +++ b/src/common/src/typegraph/validator/common.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::typegraph::{EitherTypeData, TypeNode, Typegraph, UnionTypeData}; diff --git a/src/common/src/typegraph/validator/input.rs b/src/common/src/typegraph/validator/input.rs index fe4c23c0ed..eac871462b 100644 --- a/src/common/src/typegraph/validator/input.rs +++ b/src/common/src/typegraph/validator/input.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::typegraph::{ visitor::{CurrentNode, TypeVisitor, VisitResult}, diff --git a/src/common/src/typegraph/validator/mod.rs b/src/common/src/typegraph/validator/mod.rs index 5d40ab583c..2b95ff865f 100644 --- a/src/common/src/typegraph/validator/mod.rs +++ b/src/common/src/typegraph/validator/mod.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod common; mod injection; diff --git a/src/common/src/typegraph/validator/types.rs b/src/common/src/typegraph/validator/types.rs index bee20a8803..9d1a62b909 100644 --- a/src/common/src/typegraph/validator/types.rs +++ b/src/common/src/typegraph/validator/types.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::typegraph::{ EitherTypeData, FileTypeData, FloatTypeData, IntegerTypeData, ListTypeData, ObjectTypeData, diff --git a/src/common/src/typegraph/validator/value.rs b/src/common/src/typegraph/validator/value.rs index dc9527ce40..bab4c599cd 100644 --- a/src/common/src/typegraph/validator/value.rs +++ b/src/common/src/typegraph/validator/value.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::collections::HashSet; diff --git a/src/common/src/typegraph/visitor.rs b/src/common/src/typegraph/visitor.rs index 996ffa055c..b7ddd05b5c 100644 --- a/src/common/src/typegraph/visitor.rs +++ b/src/common/src/typegraph/visitor.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use indexmap::IndexMap; use std::{ diff --git a/src/metagen/fixtures/client_ts/main.ts b/src/metagen/fixtures/client_ts/main.ts index e8abfc47e1..5213ad7eb1 100644 --- a/src/metagen/fixtures/client_ts/main.ts +++ b/src/metagen/fixtures/client_ts/main.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { alias, PreparedArgs, QueryGraph } from "./client.ts"; diff --git a/src/metagen/fixtures/tg2.ts b/src/metagen/fixtures/tg2.ts index 88d1f62a98..caf28480fe 100644 --- a/src/metagen/fixtures/tg2.ts +++ b/src/metagen/fixtures/tg2.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/src/mt_deno/src/lib.rs b/src/mt_deno/src/lib.rs index b7c969190e..14fee91c01 100644 --- a/src/mt_deno/src/lib.rs +++ b/src/mt_deno/src/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 #![allow(dead_code, clippy::let_and_return)] diff --git a/src/pyrt_wit_wire/pyproject.toml b/src/pyrt_wit_wire/pyproject.toml index 9a99d15ecd..d25807c3c0 100644 --- a/src/pyrt_wit_wire/pyproject.toml +++ b/src/pyrt_wit_wire/pyproject.toml @@ -2,7 +2,7 @@ name = "pyrt_wit_wire" version = "0.5.0-rc.4" description = "Wasm component implementing the PythonRuntime host using wit_wire protocol." -license = "Elastic-2.0" +license = "MPL-2.0" readme = "README.md" [tool.poetry.dependencies] diff --git a/src/typegate/engine/00_runtime.js b/src/typegate/engine/00_runtime.js index 412d71c056..caf7bb7e74 100644 --- a/src/typegate/engine/00_runtime.js +++ b/src/typegate/engine/00_runtime.js @@ -73,8 +73,12 @@ const Meta = { metadataAppend: getOp("op_sub_metadata_append"), metadataWriteWorkflowLink: getOp("op_sub_metadata_write_workflow_link"), metadataReadWorkflowLinks: getOp("op_sub_metadata_read_workflow_links"), - metadataWriteParentChildLink: getOp("op_sub_metadata_write_parent_child_link"), - metadataEnumerateAllChildren: getOp("op_sub_metadata_enumerate_all_children"), + metadataWriteParentChildLink: getOp( + "op_sub_metadata_write_parent_child_link", + ), + metadataEnumerateAllChildren: getOp( + "op_sub_metadata_enumerate_all_children", + ), }, grpc: { register: getOp("op_grpc_register"), @@ -83,6 +87,4 @@ const Meta = { }, }; - - globalThis.Meta = Meta; diff --git a/src/typegate/engine/bindings.ts b/src/typegate/engine/bindings.ts index 3c125c6fcb..c4d1e5d0b8 100644 --- a/src/typegate/engine/bindings.ts +++ b/src/typegate/engine/bindings.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { CallGrpcMethodInput, @@ -32,15 +32,15 @@ export type FormatCodeInp = { }; export type FormatCodeOut = | { - Ok: { - formatted_code: string; - }; - } + Ok: { + formatted_code: string; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export type ValidateInput = { // deno-lint-ignore no-explicit-any @@ -51,7 +51,7 @@ export type ValidateResult = { }; export function validate_prisma_runtime_data( - a0: ValidateInput + a0: ValidateInput, ): ValidateResult { try { Meta.validatePrismaRuntimeData(a0.obj); @@ -65,18 +65,18 @@ export type TypegraphValidateInp = { }; export type TypegraphValidateOut = | { - Valid: { - json: string; - }; - } + Valid: { + json: string; + }; + } | { - NotValid: { - reason: string; - }; + NotValid: { + reason: string; }; + }; export function typegraph_validate( - a0: TypegraphValidateInp + a0: TypegraphValidateInp, ): TypegraphValidateOut { try { const res = Meta.typegraphValidate(a0.json); @@ -91,15 +91,15 @@ export function typegraph_validate( } export type WasiOutput = | { - Ok: { - res: string; - }; - } + Ok: { + res: string; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export function wasmtime_wit(a0: WasmInput): Promise { try { @@ -113,13 +113,13 @@ export function wasmtime_wit(a0: WasmInput): Promise { export type TemporalRegisterOutput = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function temporal_register( - a0: TemporalRegisterInput + a0: TemporalRegisterInput, ): Promise { try { await Meta.temporal.clientRegister(a0); @@ -135,13 +135,13 @@ export type TemporalUnregisterInput = { export type TemporalUnregisterOutput = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export function temporal_unregister( - a0: TemporalUnregisterInput + a0: TemporalUnregisterInput, ): Promise { try { Meta.temporal.clientUnregister(a0.client_id); @@ -153,17 +153,17 @@ export function temporal_unregister( export type TemporalWorkflowStartOutput = | { - Ok: { - run_id: string; - }; - } + Ok: { + run_id: string; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function temporal_workflow_start( - a0: TemporalWorkflowStartInput + a0: TemporalWorkflowStartInput, ): Promise { try { const out = await Meta.temporal.workflowStart(a0); @@ -176,13 +176,13 @@ export async function temporal_workflow_start( export type TemporalWorkflowSignalOutput = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function temporal_workflow_signal( - a0: TemporalWorkflowSignalInput + a0: TemporalWorkflowSignalInput, ): Promise { try { await Meta.temporal.workflowSignal(a0); @@ -194,16 +194,16 @@ export async function temporal_workflow_signal( export type TemporalWorkflowDescribeRes = | { - Ok: TemporalWorkflowDescribeOutput; - } + Ok: TemporalWorkflowDescribeOutput; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function temporal_workflow_describe( - a0: TemporalWorkflowDescribeInput + a0: TemporalWorkflowDescribeInput, ): Promise { try { const out = await Meta.temporal.workflowDescribe(a0); @@ -215,18 +215,18 @@ export async function temporal_workflow_describe( export type TemporalWorkflowQueryOutput = | { - Ok: { - data: Array; - }; - } + Ok: { + data: Array; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function temporal_workflow_query( - a0: TemporalWorkflowQueryInput + a0: TemporalWorkflowQueryInput, ): Promise { try { const out = await Meta.temporal.workflowQuery(a0); @@ -239,13 +239,13 @@ export async function temporal_workflow_query( export type PrismaRegisterEngineOut = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function prisma_register_engine( - a0: PrismaRegisterEngineInp + a0: PrismaRegisterEngineInp, ): Promise { try { await Meta.prisma.registerEngine(a0); @@ -261,13 +261,13 @@ export type PrismaUnregisterEngineInp = { export type PrismaUnregisterEngineOut = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function prisma_unregister_engine( - a0: PrismaUnregisterEngineInp + a0: PrismaUnregisterEngineInp, ): Promise { try { await Meta.prisma.unregisterEngine(a0.engine_name); @@ -279,17 +279,17 @@ export async function prisma_unregister_engine( export type PrismaQueryOut = | { - Ok: { - res: string; - }; - } + Ok: { + res: string; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function prisma_query( - a0: PrismaQueryInp + a0: PrismaQueryInp, ): Promise { try { const res = await Meta.prisma.query(a0); @@ -312,17 +312,17 @@ export type PrismaDiffInp = { }; export async function prisma_diff( - a0: PrismaDiffInp + a0: PrismaDiffInp, ): Promise<[string, ParsedDiff[]] | null | undefined> { return await Meta.prisma.diff(a0); } export type PrismaApplyResult = | { - Err: { - message: string; - }; - } + Err: { + message: string; + }; + } | PrismaApplyOut; export type PrismaDevInp = { datasource: string; @@ -332,7 +332,7 @@ export type PrismaDevInp = { }; export async function prisma_apply( - a0: PrismaDevInp + a0: PrismaDevInp, ): Promise { try { return (await Meta.prisma.apply(a0)) as PrismaApplyResult; @@ -347,14 +347,14 @@ export type PrismaDeployInp = { }; export type PrismaDeployRes = | { - Err: { - message: string; - }; - } + Err: { + message: string; + }; + } | { Ok: PrismaDeployOut }; export async function prisma_deploy( - a0: PrismaDeployInp + a0: PrismaDeployInp, ): Promise { try { const res = await Meta.prisma.deploy(a0); @@ -373,14 +373,14 @@ export type PrismaCreateInp = { }; export type PrismaCreateResult = | { - Err: { - message: string; - }; - } + Err: { + message: string; + }; + } | { Ok: PrismaCreateOut }; export async function prisma_create( - a0: PrismaCreateInp + a0: PrismaCreateInp, ): Promise { try { const res = await Meta.prisma.create(a0); @@ -394,17 +394,17 @@ export type PrismaResetInp = { }; export type PrismaResetResult = | { - Err: { - message: string; - }; - } + Err: { + message: string; + }; + } | { - Ok: { - reset: boolean; - }; + Ok: { + reset: boolean; }; + }; export async function prisma_reset( - a0: PrismaResetInp + a0: PrismaResetInp, ): Promise { try { const res = await Meta.prisma.reset(a0.datasource); @@ -420,10 +420,10 @@ export type UnpackInp = { export type UnpackResult = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export function unpack(a0: UnpackInp): UnpackResult { try { Meta.prisma.unpack(a0); @@ -438,15 +438,15 @@ export type ArchiveInp = { }; export type ArchiveResult = | { - Ok: { - base64: string | undefined | null; - }; - } + Ok: { + base64: string | undefined | null; + }; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export function archive(a0: ArchiveInp): ArchiveResult { try { const res = Meta.prisma.archive(a0.path); @@ -459,13 +459,13 @@ export function archive(a0: ArchiveInp): ArchiveResult { export type GrpcRegisterOutput = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function grpc_register( - a0: GrpcRegisterInput + a0: GrpcRegisterInput, ): Promise { try { await Meta.grpc.register(a0); @@ -482,13 +482,13 @@ export type GrpcUnregisterInput = { export type GrpcUnRegisterOutput = | "Ok" | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function grpc_unregister( - a0: GrpcUnregisterInput + a0: GrpcUnregisterInput, ): Promise { try { await Meta.grpc.unregister(a0.client_id); @@ -500,16 +500,16 @@ export async function grpc_unregister( export type CallGrpcMethodOutput = | { - Ok: string; - } + Ok: string; + } | { - Err: { - message: string; - }; + Err: { + message: string; }; + }; export async function call_grpc_method( - a0: CallGrpcMethodInput + a0: CallGrpcMethodInput, ): Promise { try { return { Ok: await Meta.grpc.callGrpcMethod(a0) }; diff --git a/src/typegate/engine/build.rs b/src/typegate/engine/build.rs index be0b024fec..006f51962c 100644 --- a/src/typegate/engine/build.rs +++ b/src/typegate/engine/build.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::path::PathBuf; diff --git a/src/typegate/engine/runtime.d.ts b/src/typegate/engine/runtime.d.ts index 109491903d..9b482ccd1b 100644 --- a/src/typegate/engine/runtime.d.ts +++ b/src/typegate/engine/runtime.d.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 declare global { const Meta: MetaNS; @@ -17,7 +17,7 @@ export type MetaNS = { unregisterEngine: (engine_name: string) => Promise; query: (inp: PrismaQueryInp) => Promise; diff: ( - inp: PrismaDiffInp + inp: PrismaDiffInp, ) => Promise<[string, ParsedDiff[]] | undefined | null>; apply: (inp: PrismaDevInp) => Promise; deploy: (inp: PrismaDeployInp) => Promise; @@ -34,7 +34,7 @@ export type MetaNS = { workflowSignal: (inp: TemporalWorkflowSignalInput) => Promise; workflowQuery: (inp: TemporalWorkflowQueryInput) => Promise>; workflowDescribe: ( - inp: TemporalWorkflowDescribeInput + inp: TemporalWorkflowDescribeInput, ) => Promise; }; @@ -43,12 +43,12 @@ export type MetaNS = { componentPath: string, instanceId: string, args: WitWireInitArgs, - cb: (op_name: string, json: string) => Promise + cb: (op_name: string, json: string) => Promise, ) => Promise; destroy: (instanceId: string) => Promise; handle: ( instanceId: string, - args: WitWireReq + args: WitWireReq, ) => Promise; }; @@ -63,7 +63,7 @@ export type MetaNS = { storePersistRun: (inp: PersistRunInput) => Promise; storeAddSchedule: (inp: AddScheduleInput) => Promise; storeReadSchedule: ( - inp: ReadOrCloseScheduleInput + inp: ReadOrCloseScheduleInput, ) => Promise; storeCloseSchedule: (inp: ReadOrCloseScheduleInput) => Promise; agentNextRun: (inp: NextRunInput) => Promise; @@ -72,18 +72,18 @@ export type MetaNS = { agentRenewLease: (inp: LeaseInput) => Promise; agentRemoveLease: (inp: LeaseInput) => Promise; metadataReadAll: ( - inp: ReadAllMetadataInput + inp: ReadAllMetadataInput, ) => Promise>; metadataAppend: (inp: AppendMetadataInput) => Promise; metadataWriteWorkflowLink: (inp: WriteLinkInput) => Promise; metadataReadWorkflowLinks: ( - inp: ReadWorkflowLinkInput + inp: ReadWorkflowLinkInput, ) => Promise>; metadataWriteParentChildLink: ( - inp: WriteParentChildLinkInput + inp: WriteParentChildLinkInput, ) => Promise; metadataEnumerateAllChildren: ( - inp: EnumerateAllChildrenInput + inp: EnumerateAllChildrenInput, ) => Promise>; }; }; @@ -116,16 +116,16 @@ interface PrismaDevInp { } type PrismaApplyOut = | { - ResetRequired: { - reset_reason: string; - }; - } + ResetRequired: { + reset_reason: string; + }; + } | { - Ok: { - applied_migrations: Array; - reset_reason: string | undefined | null; - }; + Ok: { + applied_migrations: Array; + reset_reason: string | undefined | null; }; + }; interface PrismaDeployOut { migration_count: number; applied_migrations: Array; @@ -237,14 +237,14 @@ export type WitWireReq = { export type WitWireHandleError = | { - InstanceNotFound: string; - } + InstanceNotFound: string; + } | { - ModuleErr: string; - } + ModuleErr: string; + } | { - MatErr: string; - }; + MatErr: string; + }; export type WitWireMatInfo = { op_name: string; @@ -261,29 +261,29 @@ export type WitWireInitArgs = { export type WitWireInitResponse = object; export type WitWireInitError = | { - VersionMismatch: string; - } + VersionMismatch: string; + } | { - UnexpectedMat: string; - } + UnexpectedMat: string; + } | { - ModuleErr: string; - } + ModuleErr: string; + } | { - Other: string; - }; + Other: string; + }; export type WitWireHandleResponse = | { - Ok: string; - } + Ok: string; + } | "NoHandler" | { - InJsonErr: string; - } + InJsonErr: string; + } | { - HandlerErr: string; - }; + HandlerErr: string; + }; export type GrpcRegisterInput = { proto_file_content: string; @@ -301,20 +301,20 @@ export type Backend = | { type: "fs" } | { type: "memory" } | { - type: "redis"; - connection_string: string; - }; + type: "redis"; + connection_string: string; + }; export type OperationEvent = | { type: "Sleep"; id: number; start: string; end: string } | { - type: "Save"; - id: number; - value: - | { type: "Retry"; wait_until: string; counter: number } - | { type: "Resolved"; payload: unknown } - | { type: "Failed"; err: unknown }; - } + type: "Save"; + id: number; + value: + | { type: "Retry"; wait_until: string; counter: number } + | { type: "Resolved"; payload: unknown } + | { type: "Failed"; err: unknown }; + } | { type: "Send"; event_name: string; value: unknown } | { type: "Stop"; result: unknown } | { type: "Start"; kwargs: Record } diff --git a/src/typegate/engine/src/ext.rs b/src/typegate/engine/src/ext.rs index 2f2ca8de81..72d4c13686 100644 --- a/src/typegate/engine/src/ext.rs +++ b/src/typegate/engine/src/ext.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; use crate::{ diff --git a/src/typegate/engine/src/lib.rs b/src/typegate/engine/src/lib.rs index 5d6ba03fcc..2145776f6b 100644 --- a/src/typegate/engine/src/lib.rs +++ b/src/typegate/engine/src/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod ext; mod runtimes; diff --git a/src/typegate/engine/src/runtimes.rs b/src/typegate/engine/src/runtimes.rs index 102d2704e1..463eadf0e0 100644 --- a/src/typegate/engine/src/runtimes.rs +++ b/src/typegate/engine/src/runtimes.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 pub mod grpc; pub mod prisma; diff --git a/src/typegate/engine/src/runtimes/grpc.rs b/src/typegate/engine/src/runtimes/grpc.rs index 0b87a39c55..276188ba0c 100644 --- a/src/typegate/engine/src/runtimes/grpc.rs +++ b/src/typegate/engine/src/runtimes/grpc.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::{cell::RefCell, ops::Deref, rc::Rc, str::FromStr, sync::Arc}; diff --git a/src/typegate/engine/src/runtimes/prisma.rs b/src/typegate/engine/src/runtimes/prisma.rs index 0d70ec4723..cb77a73c22 100644 --- a/src/typegate/engine/src/runtimes/prisma.rs +++ b/src/typegate/engine/src/runtimes/prisma.rs @@ -1,7 +1,7 @@ #![allow(clippy::not_unsafe_ptr_arg_deref)] -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 pub mod engine; pub mod engine_import; diff --git a/src/typegate/engine/src/runtimes/prisma/engine.rs b/src/typegate/engine/src/runtimes/prisma/engine.rs index 2c15dff5aa..9d8421905a 100644 --- a/src/typegate/engine/src/runtimes/prisma/engine.rs +++ b/src/typegate/engine/src/runtimes/prisma/engine.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; use std::{collections::BTreeMap, path::PathBuf, str::FromStr}; diff --git a/src/typegate/engine/src/runtimes/prisma/migration.rs b/src/typegate/engine/src/runtimes/prisma/migration.rs index 40f5cebb43..6e9d8bc73d 100644 --- a/src/typegate/engine/src/runtimes/prisma/migration.rs +++ b/src/typegate/engine/src/runtimes/prisma/migration.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // https://github.com/prisma/prisma-engines/blob/main/migration-engine/core/src/rpc.rs // https://github.com/prisma/prisma-engines/blob/main/migration-engine/core/src/api.rs diff --git a/src/typegate/engine/src/runtimes/prisma/utils.rs b/src/typegate/engine/src/runtimes/prisma/utils.rs index f9a533719e..a20a89c8ed 100644 --- a/src/typegate/engine/src/runtimes/prisma/utils.rs +++ b/src/typegate/engine/src/runtimes/prisma/utils.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use schema_connector::{BoxFuture, ConnectorHost, ConnectorResult}; use std::sync::{Arc, Mutex}; diff --git a/src/typegate/engine/src/runtimes/substantial.rs b/src/typegate/engine/src/runtimes/substantial.rs index 9420c61e34..416609319d 100644 --- a/src/typegate/engine/src/runtimes/substantial.rs +++ b/src/typegate/engine/src/runtimes/substantial.rs @@ -1,7 +1,7 @@ #![allow(clippy::not_unsafe_ptr_arg_deref)] -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; diff --git a/src/typegate/engine/src/runtimes/temporal.rs b/src/typegate/engine/src/runtimes/temporal.rs index 5484dbf590..f25945935e 100644 --- a/src/typegate/engine/src/runtimes/temporal.rs +++ b/src/typegate/engine/src/runtimes/temporal.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; diff --git a/src/typegate/engine/src/runtimes/wasm.rs b/src/typegate/engine/src/runtimes/wasm.rs index 6da88b34c7..98958932d8 100644 --- a/src/typegate/engine/src/runtimes/wasm.rs +++ b/src/typegate/engine/src/runtimes/wasm.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; #[rustfmt::skip] diff --git a/src/typegate/engine/src/runtimes/wasm/conversion.rs b/src/typegate/engine/src/runtimes/wasm/conversion.rs index 1b99ee1618..d93c26aa42 100644 --- a/src/typegate/engine/src/runtimes/wasm/conversion.rs +++ b/src/typegate/engine/src/runtimes/wasm/conversion.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use std::collections::HashSet; diff --git a/src/typegate/engine/src/runtimes/wit_wire.rs b/src/typegate/engine/src/runtimes/wit_wire.rs index c45c425fdf..e74bc1a151 100644 --- a/src/typegate/engine/src/runtimes/wit_wire.rs +++ b/src/typegate/engine/src/runtimes/wit_wire.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; use dashmap::DashMap; diff --git a/src/typegate/engine/src/typegraph.rs b/src/typegate/engine/src/typegraph.rs index fe21d67fe2..0451052bee 100644 --- a/src/typegate/engine/src/typegraph.rs +++ b/src/typegate/engine/src/typegraph.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use crate::interlude::*; use common::typegraph::{runtimes::prisma::PrismaRuntimeData, Typegraph}; diff --git a/src/typegate/src/config.ts b/src/typegate/src/config.ts index fdd487c15b..4d3fd33c87 100644 --- a/src/typegate/src/config.ts +++ b/src/typegate/src/config.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { z } from "zod"; @@ -26,7 +26,7 @@ async function getHostname() { return new TextDecoder().decode(stdout).trim(); } catch (_e) { console.debug( - `Not hostname binary found, falling back to env var HOSTNAME` + `Not hostname binary found, falling back to env var HOSTNAME`, ); return Deno.env.get("HOSTNAME") ?? "UNKNOWN_HOSTNAME"; } @@ -51,7 +51,7 @@ export const globalConfig = configOrExit( [ mapKeys(Deno.env.toObject(), (k: string) => k.toLowerCase()), parseArgs(Deno.args) as Record, - ] + ], ); export const defaultTypegateConfigBase = { @@ -70,7 +70,7 @@ const SYNC_PREFIX = "sync_"; function filterMapSyncKeys(obj: Record) { return mapKeys( filterKeys(obj, (k) => k.startsWith(SYNC_PREFIX)), - (k) => k.slice(SYNC_PREFIX.length) + (k) => k.slice(SYNC_PREFIX.length), ); } @@ -79,8 +79,9 @@ function envsAsConfig() { } function argsAsConfig() { - return mapKeys(parseArgs(Deno.args) as Record, (k) => - k.toLocaleLowerCase().replace("-", "_") + return mapKeys( + parseArgs(Deno.args) as Record, + (k) => k.toLocaleLowerCase().replace("-", "_"), ); } diff --git a/src/typegate/src/config/loader.ts b/src/typegate/src/config/loader.ts index 68b39dc43a..c8f71167c1 100644 --- a/src/typegate/src/config/loader.ts +++ b/src/typegate/src/config/loader.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { z } from "zod"; import { deepMerge } from "@std/collections/deep-merge"; diff --git a/src/typegate/src/config/shared.ts b/src/typegate/src/config/shared.ts index 95574de662..0865788fb0 100644 --- a/src/typegate/src/config/shared.ts +++ b/src/typegate/src/config/shared.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { sharedConfigSchema } from "./types.ts"; import { configOrExit } from "./loader.ts"; @@ -24,7 +24,7 @@ export const sharedConfig = await configOrExit( Object.fromEntries( envSharedWithWorkers .map((k) => [k.toLocaleLowerCase(), Deno.env.get(k)]) - .filter(([_, v]) => v !== undefined) + .filter(([_, v]) => v !== undefined), ), - ] + ], ); diff --git a/src/typegate/src/config/types.ts b/src/typegate/src/config/types.ts index a9a5ec634a..cf8cbd4225 100644 --- a/src/typegate/src/config/types.ts +++ b/src/typegate/src/config/types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { RefinementCtx, z } from "zod"; import { decodeBase64 } from "@std/encoding/base64"; diff --git a/src/typegate/src/crypto.ts b/src/typegate/src/crypto.ts index e34ddd0320..bf3a72b1b6 100644 --- a/src/typegate/src/crypto.ts +++ b/src/typegate/src/crypto.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { crypto } from "@std/crypto"; import { decodeBase64Url, encodeBase64Url } from "@std/encoding/base64url"; diff --git a/src/typegate/src/engine/computation_engine.ts b/src/typegate/src/engine/computation_engine.ts index a2cfb62db7..afeeb2a036 100644 --- a/src/typegate/src/engine/computation_engine.ts +++ b/src/typegate/src/engine/computation_engine.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { distinct } from "@std/collections/distinct"; import type { ComputeStage } from "./query_engine.ts"; diff --git a/src/typegate/src/engine/planner/args.ts b/src/typegate/src/engine/planner/args.ts index b034f4ebbe..f84452b2e5 100644 --- a/src/typegate/src/engine/planner/args.ts +++ b/src/typegate/src/engine/planner/args.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type * as ast from "graphql/ast"; import { Kind } from "graphql"; diff --git a/src/typegate/src/engine/planner/dependency_resolver.ts b/src/typegate/src/engine/planner/dependency_resolver.ts index fc3442ce8e..a055899f94 100644 --- a/src/typegate/src/engine/planner/dependency_resolver.ts +++ b/src/typegate/src/engine/planner/dependency_resolver.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ComputeStage } from "../query_engine.ts"; import { type FieldNode, Kind, type SelectionSetNode } from "graphql"; diff --git a/src/typegate/src/engine/planner/injection_utils.ts b/src/typegate/src/engine/planner/injection_utils.ts index 5acfe33c82..d253c5dbee 100644 --- a/src/typegate/src/engine/planner/injection_utils.ts +++ b/src/typegate/src/engine/planner/injection_utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { EffectType, InjectionData } from "../../typegraph/types.ts"; diff --git a/src/typegate/src/engine/planner/mod.ts b/src/typegate/src/engine/planner/mod.ts index a70bed4517..ed4709ef92 100644 --- a/src/typegate/src/engine/planner/mod.ts +++ b/src/typegate/src/engine/planner/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type * as ast from "graphql/ast"; import { type FieldNode, Kind } from "graphql"; diff --git a/src/typegate/src/engine/planner/parameter_transformer.ts b/src/typegate/src/engine/planner/parameter_transformer.ts index 80e66e815f..22b3b5b68e 100644 --- a/src/typegate/src/engine/planner/parameter_transformer.ts +++ b/src/typegate/src/engine/planner/parameter_transformer.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type QueryFn, QueryFunction } from "../../libs/jsonpath.ts"; import type { TypeGraph } from "../../typegraph/mod.ts"; diff --git a/src/typegate/src/engine/planner/policies.ts b/src/typegate/src/engine/planner/policies.ts index 48278dc7cf..d82cbcd8cc 100644 --- a/src/typegate/src/engine/planner/policies.ts +++ b/src/typegate/src/engine/planner/policies.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { DenoRuntime } from "../../runtimes/deno/deno.ts"; import type { TypeGraph } from "../../typegraph/mod.ts"; diff --git a/src/typegate/src/engine/query_engine.ts b/src/typegate/src/engine/query_engine.ts index d36f74018d..7be7ad412c 100644 --- a/src/typegate/src/engine/query_engine.ts +++ b/src/typegate/src/engine/query_engine.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { parse } from "graphql"; import type * as ast from "graphql/ast"; diff --git a/src/typegate/src/engine/stage_id.ts b/src/typegate/src/engine/stage_id.ts index 590034f81d..935645abd8 100644 --- a/src/typegate/src/engine/stage_id.ts +++ b/src/typegate/src/engine/stage_id.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function getChildId(parentId: string | null, node: string) { if (parentId === null || parentId === "") { diff --git a/src/typegate/src/engine/typecheck/code_generator.ts b/src/typegate/src/engine/typecheck/code_generator.ts index 66990d62ba..6a5473acd2 100644 --- a/src/typegate/src/engine/typecheck/code_generator.ts +++ b/src/typegate/src/engine/typecheck/code_generator.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type BooleanNode, diff --git a/src/typegate/src/engine/typecheck/common.ts b/src/typegate/src/engine/typecheck/common.ts index 5c2d6f4607..8a10101042 100644 --- a/src/typegate/src/engine/typecheck/common.ts +++ b/src/typegate/src/engine/typecheck/common.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { StringFormat } from "../../typegraph/types.ts"; import * as uuid from "@std/uuid"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/boolean.ts b/src/typegate/src/engine/typecheck/inline_validators/boolean.ts index 9085514b55..eec04768eb 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/boolean.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/boolean.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { BooleanNode } from "../../../typegraph/types.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/common.ts b/src/typegate/src/engine/typecheck/inline_validators/common.ts index edc360b35d..6a65592f32 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/common.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/common.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function check(condition: string, message: string) { return `if (!(${condition})) throw new Error(${message});`; diff --git a/src/typegate/src/engine/typecheck/inline_validators/constraints.ts b/src/typegate/src/engine/typecheck/inline_validators/constraints.ts index 1fd6296062..35a38cfff3 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/constraints.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/constraints.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeNode } from "../../../typegraph/type_node.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/file.ts b/src/typegate/src/engine/typecheck/inline_validators/file.ts index 70bd38da3f..be630b50ea 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/file.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/file.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { FileNode } from "../../../typegraph/types.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/list.ts b/src/typegate/src/engine/typecheck/inline_validators/list.ts index 2bea54163c..f1d6bdd523 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/list.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/list.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ListNode } from "../../../typegraph/type_node.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/mod.ts b/src/typegate/src/engine/typecheck/inline_validators/mod.ts index 074471e15f..1c5121f3fa 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/mod.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /// These validators are used to generate validator code to be inlined into /// the generated code. diff --git a/src/typegate/src/engine/typecheck/inline_validators/number.ts b/src/typegate/src/engine/typecheck/inline_validators/number.ts index f7168c43ee..8380ce7e50 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/number.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/number.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { FloatNode, IntegerNode } from "../../../typegraph/types.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/inline_validators/object.ts b/src/typegate/src/engine/typecheck/inline_validators/object.ts index ca51927a6a..6fba958b3e 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/object.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/object.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type ObjectNode, diff --git a/src/typegate/src/engine/typecheck/inline_validators/string.ts b/src/typegate/src/engine/typecheck/inline_validators/string.ts index c3edc88d92..1ca436dddc 100644 --- a/src/typegate/src/engine/typecheck/inline_validators/string.ts +++ b/src/typegate/src/engine/typecheck/inline_validators/string.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { StringNode } from "../../../typegraph/type_node.ts"; import { check } from "./common.ts"; diff --git a/src/typegate/src/engine/typecheck/input.ts b/src/typegate/src/engine/typecheck/input.ts index f128d04129..bbba81f1b5 100644 --- a/src/typegate/src/engine/typecheck/input.ts +++ b/src/typegate/src/engine/typecheck/input.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraph } from "../../typegraph/mod.ts"; import type { TypeNode } from "../../typegraph/types.ts"; diff --git a/src/typegate/src/engine/typecheck/matching_variant.ts b/src/typegate/src/engine/typecheck/matching_variant.ts index e1b4191fa3..2d59c882aa 100644 --- a/src/typegate/src/engine/typecheck/matching_variant.ts +++ b/src/typegate/src/engine/typecheck/matching_variant.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type EitherNode, diff --git a/src/typegate/src/engine/typecheck/result.ts b/src/typegate/src/engine/typecheck/result.ts index b528cfe574..760bb8a89f 100644 --- a/src/typegate/src/engine/typecheck/result.ts +++ b/src/typegate/src/engine/typecheck/result.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { FragmentDefs } from "../../transports/graphql/graphql.ts"; import type { @@ -30,7 +30,7 @@ import { export function generateValidator( tg: TypeGraph, operation: OperationDefinitionNode, - fragments: FragmentDefs + fragments: FragmentDefs, ): Validator { const code = new ResultValidationCompiler(tg, fragments).generate(operation); const validator = new Function(code)() as ValidatorFn; @@ -108,7 +108,7 @@ export class ResultValidationCompiler { } else if (isScalar(typeNode)) { if (entry.selectionSet != null) { throw new Error( - `Unexpected selection set for scalar type '${typeNode.type}' at '${entry.path}'` + `Unexpected selection set for scalar type '${typeNode.type}' at '${entry.path}'`, ); } @@ -135,7 +135,7 @@ export class ResultValidationCompiler { case "optional": { const itemValidatorName = this.validatorName( typeNode.item, - entry.selectionSet != null + entry.selectionSet != null, ); cg.generateOptionalValidator(typeNode, itemValidatorName); queue.push({ @@ -150,7 +150,7 @@ export class ResultValidationCompiler { case "list": { const itemValidatorName = this.validatorName( typeNode.items, - entry.selectionSet != null + entry.selectionSet != null, ); cg.generateArrayValidator(typeNode, itemValidatorName); queue.push({ @@ -163,11 +163,11 @@ export class ResultValidationCompiler { } case "object": { - const childEntries: Record = - this.getChildEntries(typeNode, entry); + const childEntries: Record = this + .getChildEntries(typeNode, entry); cg.generateObjectValidator( typeNode, - mapValues(childEntries, (e) => e.name) + mapValues(childEntries, (e) => e.name), ); queue.push(...Object.values(childEntries)); break; @@ -177,7 +177,7 @@ export class ResultValidationCompiler { const childEntries = this.getVariantEntries(typeNode.anyOf, entry); cg.generateUnionValidator( typeNode, - childEntries.map((e) => e.name) + childEntries.map((e) => e.name), ); queue.push(...childEntries); break; @@ -187,7 +187,7 @@ export class ResultValidationCompiler { const childEntries = this.getVariantEntries(typeNode.oneOf, entry); cg.generateEitherValidator( typeNode, - childEntries.map((e) => e.name) + childEntries.map((e) => e.name), ); queue.push(...childEntries); break; @@ -196,7 +196,7 @@ export class ResultValidationCompiler { case "function": { const outputValidator = this.validatorName( typeNode.output, - entry.selectionSet != null + entry.selectionSet != null, ); cg.line(`${outputValidator}(value, path, errors, context)`); queue.push({ @@ -217,7 +217,7 @@ export class ResultValidationCompiler { const fnBody = cg.reset().join("\n"); this.codes.set( fnName, - `function ${fnName}(value, path, errors, context) {\n${fnBody}\n}` + `function ${fnName}(value, path, errors, context) {\n${fnBody}\n}`, ); } @@ -231,7 +231,7 @@ export class ResultValidationCompiler { private getChildEntryFromFieldNode( typeNode: ObjectNode, entry: QueueEntry, - node: FieldNode + node: FieldNode, ): [string, QueueEntry] { const { name, selectionSet, alias } = node; const propName = alias?.value ?? name.value; @@ -279,7 +279,7 @@ export class ResultValidationCompiler { private getChildEntriesFromSelectionNode( typeNode: ObjectNode, entry: QueueEntry, - node: SelectionNode + node: SelectionNode, ): Array<[string, QueueEntry]> { switch (node.kind) { case Kind.FIELD: @@ -308,13 +308,13 @@ export class ResultValidationCompiler { private getChildEntries( typeNode: ObjectNode, - entry: QueueEntry + entry: QueueEntry, ): Record { if (entry.selectionSet?.selections) { return Object.fromEntries( entry.selectionSet!.selections.flatMap((node) => this.getChildEntriesFromSelectionNode(typeNode, entry, node) - ) + ), ); } @@ -324,21 +324,23 @@ export class ResultValidationCompiler { private getVariantEntries( variants: number[], - entry: QueueEntry + entry: QueueEntry, ): QueueEntry[] { const multilevelVariants = this.tg.typeUtils.flattenUnionVariants(variants); const selectableVariants = multilevelVariants.filter( (variant) => - !this.tg.typeUtils.isScalarOrListOfScalars(this.tg.type(variant)) + !this.tg.typeUtils.isScalarOrListOfScalars(this.tg.type(variant)), ); if (entry.selectionSet == null) { if (selectableVariants.length > 0) { const s = selectableVariants.length === 1 ? "" : "s"; const names = selectableVariants.map((idx) => this.tg.type(idx).title); throw new Error( - `at '${entry.path}': selection set required for type${s} ${names.join( - ", " - )}` + `at '${entry.path}': selection set required for type${s} ${ + names.join( + ", ", + ) + }`, ); } } @@ -347,18 +349,18 @@ export class ResultValidationCompiler { const variantSelections: Map = entry.selectionSet != null ? new Map( - entry.selectionSet.selections.map((node) => { - if ( - node.kind !== Kind.INLINE_FRAGMENT || - node.typeCondition == null - ) { - throw new Error( - `at '${entry.path}': selection nodes must be inline fragments with type condition` - ); - } - return [node.typeCondition.name.value, node]; - }) - ) + entry.selectionSet.selections.map((node) => { + if ( + node.kind !== Kind.INLINE_FRAGMENT || + node.typeCondition == null + ) { + throw new Error( + `at '${entry.path}': selection nodes must be inline fragments with type condition`, + ); + } + return [node.typeCondition.name.value, node]; + }), + ) : new Map(); const entries: QueueEntry[] = variants.map((variantIdx) => { @@ -371,7 +373,7 @@ export class ResultValidationCompiler { if (selectionSet == null) { // TODO link to matching documentation page throw new Error( - `at '${entry.path}': variant type '${typeName}' must have a selection set on an inline fragment with type condition` + `at '${entry.path}': variant type '${typeName}' must have a selection set on an inline fragment with type condition`, ); } variantSelections.delete(typeName); @@ -385,7 +387,7 @@ export class ResultValidationCompiler { case Type.UNION: case Type.EITHER: { const nestedVariants = this.tg.typeUtils.getFlatUnionVariants( - typeNode as UnionNode | EitherNode + typeNode as UnionNode | EitherNode, ); return { name: this.validatorName(variantIdx, true), @@ -420,7 +422,7 @@ export class ResultValidationCompiler { if (variantSelections.size > 0) { const names = [...variantSelections.keys()].join(", "); throw new Error( - `at '${entry.path}': Unexpected type conditions: ${names}` + `at '${entry.path}': Unexpected type conditions: ${names}`, ); } return entries; diff --git a/src/typegate/src/errors.ts b/src/typegate/src/errors.ts index f34992294e..e460ac5621 100644 --- a/src/typegate/src/errors.ts +++ b/src/typegate/src/errors.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { basename, dirname } from "@std/url"; import { extname } from "@std/path"; diff --git a/src/typegate/src/libs/jsonpath.ts b/src/typegate/src/libs/jsonpath.ts index d2bcad72b7..c2c733c78b 100644 --- a/src/typegate/src/libs/jsonpath.ts +++ b/src/typegate/src/libs/jsonpath.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /** * JsonPath query compiler: jsonpath query to javascript function; diff --git a/src/typegate/src/log.ts b/src/typegate/src/log.ts index 9371866724..d1dbeef25f 100644 --- a/src/typegate/src/log.ts +++ b/src/typegate/src/log.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { ConsoleHandler, type LevelName, Logger } from "@std/log"; import { basename, dirname } from "@std/url"; diff --git a/src/typegate/src/main.ts b/src/typegate/src/main.ts index 53dfa22e96..f6e1f0e1e3 100644 --- a/src/typegate/src/main.ts +++ b/src/typegate/src/main.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { init_native } from "native"; diff --git a/src/typegate/src/runtimes/Runtime.ts b/src/typegate/src/runtimes/Runtime.ts index 3b0ef87d75..3c4c0d6e5f 100644 --- a/src/typegate/src/runtimes/Runtime.ts +++ b/src/typegate/src/runtimes/Runtime.ts @@ -1,9 +1,9 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ComputeStage } from "../engine/query_engine.ts"; import { equal } from "@std/assert/equal"; -import type { Resolver, ResolverArgs } from "../types.ts"; +import type { Resolver } from "../types.ts"; export abstract class Runtime { readonly id: string; @@ -65,10 +65,9 @@ export abstract class Runtime { materializedStages.push(...materializeRoot(s)); } else { materializedStages.push( - s.withResolver( - Runtime.resolveFromParent(s.props.node), - [s.props.parent!.id()], - ), + s.withResolver(Runtime.resolveFromParent(s.props.node), [ + s.props.parent!.id(), + ]), ); } } diff --git a/src/typegate/src/runtimes/deno.ts b/src/typegate/src/runtimes/deno.ts index acc0928409..5b2242b20e 100644 --- a/src/typegate/src/runtimes/deno.ts +++ b/src/typegate/src/runtimes/deno.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { DenoRuntime } from "./deno/deno.ts"; import { registerRuntime } from "./mod.ts"; diff --git a/src/typegate/src/runtimes/deno/deno.ts b/src/typegate/src/runtimes/deno/deno.ts index 92c4af3a8d..04d1e828cd 100644 --- a/src/typegate/src/runtimes/deno/deno.ts +++ b/src/typegate/src/runtimes/deno/deno.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ComputeStage } from "../../engine/query_engine.ts"; import type { TypeGraphDS, TypeMaterializer } from "../../typegraph/mod.ts"; @@ -13,9 +13,6 @@ import { DenoMessenger } from "./deno_messenger.ts"; import type { Task } from "./shared_types.ts"; import { path } from "compress/deps.ts"; import { globalConfig as config } from "../../config.ts"; -import { getLogger } from "../../log.ts"; - -const logger = getLogger(import.meta); const predefinedFuncs: Record>> = { identity: ({ _, ...args }) => args, @@ -188,9 +185,7 @@ export class DenoRuntime extends Runtime { const typename = getTypename(); - return [ - stage.withResolver(() => typename), - ]; + return [stage.withResolver(() => typename)]; } if (stage.props.materializer != null) { diff --git a/src/typegate/src/runtimes/deno/deno_messenger.ts b/src/typegate/src/runtimes/deno/deno_messenger.ts index 306ccd54e9..27050f26eb 100644 --- a/src/typegate/src/runtimes/deno/deno_messenger.ts +++ b/src/typegate/src/runtimes/deno/deno_messenger.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as Sentry from "sentry"; import { envSharedWithWorkers } from "../../config/shared.ts"; diff --git a/src/typegate/src/runtimes/deno/shared_types.ts b/src/typegate/src/runtimes/deno/shared_types.ts index 7bbb446fe0..acfdac9c4c 100644 --- a/src/typegate/src/runtimes/deno/shared_types.ts +++ b/src/typegate/src/runtimes/deno/shared_types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { Context } from "../../types.ts"; import type { EffectType } from "../../typegraph/types.ts"; @@ -70,6 +70,6 @@ export interface TaskExec { ( args: Record, context: TaskContext, - helpers: Record + helpers: Record, ): unknown; } diff --git a/src/typegate/src/runtimes/deno/worker.ts b/src/typegate/src/runtimes/deno/worker.ts index b2f76a4419..424e295374 100644 --- a/src/typegate/src/runtimes/deno/worker.ts +++ b/src/typegate/src/runtimes/deno/worker.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // bring the unstable WorkerOptions api into scope /// @@ -43,7 +43,7 @@ async function import_func(op: number, task: ImportFuncTask) { return await mod[name]( args, internals, - make_internal(internals, additionalHeaders) + make_internal(internals, additionalHeaders), ); } throw new Error(`"${name}" is not a valid method`); @@ -75,7 +75,7 @@ function register_func(_: null, task: RegisterFuncTask) { registry.set( op, - new Function(`"use strict"; ${fnCode}; return _my_lambda;`)() + new Function(`"use strict"; ${fnCode}; return _my_lambda;`)(), ); } diff --git a/src/typegate/src/runtimes/graphql.ts b/src/typegate/src/runtimes/graphql.ts index 5cf6116fa3..727a50b6b2 100644 --- a/src/typegate/src/runtimes/graphql.ts +++ b/src/typegate/src/runtimes/graphql.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { ComputeStage } from "../engine/query_engine.ts"; import { gq } from "../transports/graphql/gq.ts"; diff --git a/src/typegate/src/runtimes/grpc.ts b/src/typegate/src/runtimes/grpc.ts index 6b6c13058b..3fbb52b131 100644 --- a/src/typegate/src/runtimes/grpc.ts +++ b/src/typegate/src/runtimes/grpc.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import * as native from "native"; diff --git a/src/typegate/src/runtimes/http.ts b/src/typegate/src/runtimes/http.ts index e8db167641..79176e8fed 100644 --- a/src/typegate/src/runtimes/http.ts +++ b/src/typegate/src/runtimes/http.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { ComputeStage } from "../engine/query_engine.ts"; import { Runtime } from "./Runtime.ts"; diff --git a/src/typegate/src/runtimes/kv.ts b/src/typegate/src/runtimes/kv.ts index 7ceec77696..437c0f44cc 100644 --- a/src/typegate/src/runtimes/kv.ts +++ b/src/typegate/src/runtimes/kv.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { connect, parseURL, type Redis } from "redis"; import { ComputeStage } from "../engine/query_engine.ts"; @@ -10,8 +10,6 @@ import type { Resolver, RuntimeInitParams } from "../types.ts"; import { registerRuntime } from "./mod.ts"; import { Runtime } from "./Runtime.ts"; -const logger = getLogger(import.meta); - @registerRuntime("kv") export class KvRuntime extends Runtime { private logger: Logger; diff --git a/src/typegate/src/runtimes/mod.ts b/src/typegate/src/runtimes/mod.ts index 5abd627c45..88365dc200 100644 --- a/src/typegate/src/runtimes/mod.ts +++ b/src/typegate/src/runtimes/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { Runtime } from "./Runtime.ts"; import type { RuntimeInit, RuntimeInitParams } from "../types.ts"; @@ -11,7 +11,7 @@ interface RegistrableRuntime { } export function registerRuntime( - name: string + name: string, ): (runtime: T) => void { return (runtime: T) => { if (registeredRuntimes.has(name)) { @@ -23,7 +23,7 @@ export function registerRuntime( export async function initRuntime( name: string, - params: RuntimeInitParams + params: RuntimeInitParams, ): Promise { const init = registeredRuntimes.get(name); if (!init) { diff --git a/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts b/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts index 12d15287cc..d77a4c3604 100644 --- a/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts +++ b/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { getLogger } from "../../../log.ts"; import type { Answer, Message, TaskData } from "./types.ts"; diff --git a/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts b/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts index 5b7f37df30..e645734dad 100644 --- a/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts +++ b/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { getLogger } from "../../../log.ts"; import { maxi32 } from "../../../utils.ts"; diff --git a/src/typegate/src/runtimes/patterns/messenger/types.ts b/src/typegate/src/runtimes/patterns/messenger/types.ts index fd75e012b8..202d67a7c6 100644 --- a/src/typegate/src/runtimes/patterns/messenger/types.ts +++ b/src/typegate/src/runtimes/patterns/messenger/types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export interface Message { id: number; diff --git a/src/typegate/src/runtimes/prisma.ts b/src/typegate/src/runtimes/prisma.ts index 60fc178640..dac508a1e6 100644 --- a/src/typegate/src/runtimes/prisma.ts +++ b/src/typegate/src/runtimes/prisma.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { registerRuntime } from "./mod.ts"; import { PrismaRuntime } from "./prisma/mod.ts"; diff --git a/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts b/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts index cbc4711768..c4e9336185 100644 --- a/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts +++ b/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts @@ -1,12 +1,11 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Type, type TypeNode } from "../../../typegraph/type_node.ts"; import type { PushHandler } from "../../../typegate/hooks.ts"; import type { SecretManager, TypeGraphDS } from "../../../typegraph/mod.ts"; import type { Cardinality, - Injection, Model, Property, Relationship, @@ -108,9 +107,7 @@ class FieldBuilder { tags.push("@default(uuid())"); break; default: - throw new Error( - "unsupported auto attribute on type string", - ); + throw new Error("unsupported auto attribute on type string"); } break; case "Int": @@ -133,8 +130,8 @@ class FieldBuilder { case "relationship": { const quant = FieldBuilder.#quantifier(prop.cardinality); - const rel = this.relationships.find((r) => - r.name === prop.relationshipName + const rel = this.relationships.find( + (r) => r.name === prop.relationshipName, ); const tags: string[] = []; if (rel == null) { @@ -155,20 +152,21 @@ class FieldBuilder { case "left": { const toPascalCase = (s: string) => s[0].toUpperCase() + s.slice(1); - const leftModel = this.models.find((m) => - m.typeIdx === rel.left.type_idx + const leftModel = this.models.find( + (m) => m.typeIdx === rel.left.type_idx, ); if (leftModel == null) { throw new Error("left model not found"); } - const fields = leftModel.idFields.map((key) => - `${prop.key}${toPascalCase(key)}` + const fields = leftModel.idFields.map( + (key) => `${prop.key}${toPascalCase(key)}`, ); const fkeys = leftModel.idFields.map((key) => { const idProp = leftModel.props.find((p) => p.key === key)!; - const modelField = this.build( - { ...idProp, cardinality: prop.cardinality }, - ); + const modelField = this.build({ + ...idProp, + cardinality: prop.cardinality, + }); modelField.name = `${prop.key}${toPascalCase(modelField.name)}`; modelField.tags = modelField.tags.filter( (t) => !t.startsWith("@default"), @@ -269,7 +267,7 @@ class FieldBuilder { } const SUPPORTED_PROVIDERS = ["postgresql", "mysql", "mongodb"] as const; -type Provider = typeof SUPPORTED_PROVIDERS[number]; +type Provider = (typeof SUPPORTED_PROVIDERS)[number]; export class SchemaGenerator { #provider: Provider; @@ -316,7 +314,10 @@ export class SchemaGenerator { modelFields.push(field); modelFields.push(...field.fkeys); if (field.fkeys.length > 0) { - fkeysMap.set(field.name, field.fkeys.map((fkey) => fkey.name)); + fkeysMap.set( + field.name, + field.fkeys.map((fkey) => fkey.name), + ); } if ( field.fkeysUnique && @@ -342,17 +343,16 @@ export class SchemaGenerator { } // expand foreign keys - const uniqueConstraints = model.uniqueConstraints.map( - (constraint) => constraint.flatMap((key) => fkeysMap.get(key) ?? [key]), + const uniqueConstraints = model.uniqueConstraints.map((constraint) => + constraint.flatMap((key) => fkeysMap.get(key) ?? [key]) ); for (const constraint of uniqueConstraints) { const names = constraint.join(", "); tags.push(`@@unique([${names}])`); } - const formattedFields = modelFields.map((field) => - ` ${field.stringify()}\n` - ) + const formattedFields = modelFields + .map((field) => ` ${field.stringify()}\n`) .join(""); const formattedTags = tags.length > 0 ? "\n" + tags.map((tag) => ` ${tag}\n`).join("") @@ -362,9 +362,7 @@ export class SchemaGenerator { } generate() { - return this.#models.map((model) => this.generateModel(model)).join( - "\n\n", - ); + return this.#models.map((model) => this.generateModel(model)).join("\n\n"); } } diff --git a/src/typegate/src/runtimes/prisma/hooks/mod.ts b/src/typegate/src/runtimes/prisma/hooks/mod.ts index efc14133b9..8bcff2c031 100644 --- a/src/typegate/src/runtimes/prisma/hooks/mod.ts +++ b/src/typegate/src/runtimes/prisma/hooks/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export { runMigrations } from "./run_migrations.ts"; export { generateSchema } from "./generate_schema.ts"; diff --git a/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts b/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts index 31ccf54572..81555ef76f 100644 --- a/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts +++ b/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { PushFailure, diff --git a/src/typegate/src/runtimes/prisma/migration.ts b/src/typegate/src/runtimes/prisma/migration.ts index 3470edf927..eeea3a839e 100644 --- a/src/typegate/src/runtimes/prisma/migration.ts +++ b/src/typegate/src/runtimes/prisma/migration.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "../Runtime.ts"; import type { Resolver, ResolverArgs } from "../../types.ts"; diff --git a/src/typegate/src/runtimes/prisma/mod.ts b/src/typegate/src/runtimes/prisma/mod.ts index 8c277c5c93..1594aeaf4e 100644 --- a/src/typegate/src/runtimes/prisma/mod.ts +++ b/src/typegate/src/runtimes/prisma/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { PrismaRuntime } from "./prisma.ts"; import { PrismaMigrate, PrismaMigrationRuntime } from "./migration.ts"; diff --git a/src/typegate/src/runtimes/prisma/prisma.ts b/src/typegate/src/runtimes/prisma/prisma.ts index 9daf9cb847..c8e828a215 100644 --- a/src/typegate/src/runtimes/prisma/prisma.ts +++ b/src/typegate/src/runtimes/prisma/prisma.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "../Runtime.ts"; import * as native from "native"; diff --git a/src/typegate/src/runtimes/prisma/types.ts b/src/typegate/src/runtimes/prisma/types.ts index d84833b9cf..99b4717d27 100644 --- a/src/typegate/src/runtimes/prisma/types.ts +++ b/src/typegate/src/runtimes/prisma/types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { RuntimeDataBase } from "../../types.ts"; import type { PrismaRuntimeData, TGRuntime } from "../../typegraph/types.ts"; diff --git a/src/typegate/src/runtimes/python.ts b/src/typegate/src/runtimes/python.ts index 0514eefea7..a96df05138 100644 --- a/src/typegate/src/runtimes/python.ts +++ b/src/typegate/src/runtimes/python.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { registerRuntime } from "./mod.ts"; import { getLogger, type Logger } from "../log.ts"; diff --git a/src/typegate/src/runtimes/random.ts b/src/typegate/src/runtimes/random.ts index 91411413fa..0972a7db37 100644 --- a/src/typegate/src/runtimes/random.ts +++ b/src/typegate/src/runtimes/random.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import { ComputeStage } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/runtimes/s3.ts b/src/typegate/src/runtimes/s3.ts index 285cc896b0..b09f8dcb9b 100644 --- a/src/typegate/src/runtimes/s3.ts +++ b/src/typegate/src/runtimes/s3.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import type { ComputeStage } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/runtimes/substantial.ts b/src/typegate/src/runtimes/substantial.ts index 80886ecfdd..8d294555a3 100644 --- a/src/typegate/src/runtimes/substantial.ts +++ b/src/typegate/src/runtimes/substantial.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import { Resolver, RuntimeInitParams } from "../types.ts"; @@ -67,7 +67,7 @@ export class SubstantialRuntime extends Runtime { backend: Backend, queue: string, agent: Agent, - typegate: Typegate + typegate: Typegate, ) { super(typegraphName); this.logger = getLogger(`substantial:'${typegraphName}'`); @@ -131,7 +131,7 @@ export class SubstantialRuntime extends Runtime { tgName, tg.meta.artifacts, runtimeArgs.workflows, - typegate + typegate, ); agent.start(wfDescriptions); @@ -143,12 +143,12 @@ export class SubstantialRuntime extends Runtime { backend, queue, agent, - typegate + typegate, ); await instance.#prepareWorkflowFiles( tg.meta.artifacts, runtimeArgs.workflows, - typegate + typegate, ); return instance; @@ -224,8 +224,9 @@ export class SubstantialRuntime extends Runtime { return ({ name: workflowName }) => { this.#checkWorkflowExistOrThrow(workflowName); - const res = - this.agent.workerManager.getAllocatedResources(workflowName); + const res = this.agent.workerManager.getAllocatedResources( + workflowName, + ); return JSON.parse(JSON.stringify(res)); }; case "results": @@ -247,7 +248,7 @@ export class SubstantialRuntime extends Runtime { const schedule = new Date().toJSON(); logger.info( - `Start request "${workflowName}" received: new run "${runId}" should be scheduled.` + `Start request "${workflowName}" received: new run "${runId}" should be scheduled.`, ); await this.agent.schedule({ backend: this.backend, @@ -404,13 +405,13 @@ export class SubstantialRuntime extends Runtime { async #prepareWorkflowFiles( artifacts: Record, fileDescriptions: Array, - typegate: Typegate + typegate: Typegate, ) { const descriptions = await getWorkflowDescriptions( this.typegraphName, artifacts, fileDescriptions, - typegate + typegate, ); for (const wf of descriptions) { @@ -424,14 +425,16 @@ export class SubstantialRuntime extends Runtime { const closest = closestWord(name, known); if (closest) { throw new Error( - `workflow "${name}" does not exist, did you mean "${closest}"?` + `workflow "${name}" does not exist, did you mean "${closest}"?`, ); } throw new Error( - `workflow "${name}" does not exist, available workflows are ${known - .map((name) => `"${name}"`) - .join(", ")}` + `workflow "${name}" does not exist, available workflows are ${ + known + .map((name) => `"${name}"`) + .join(", ") + }`, ); } } @@ -441,7 +444,7 @@ async function getWorkflowDescriptions( typegraphName: string, artifacts: Record, descriptions: Array, - typegate: Typegate + typegate: Typegate, ) { const basePath = path.join(typegate.config.base.tmp_dir, "artifacts"); logger.info(`Resolved runtime artifacts at ${basePath}`); @@ -456,7 +459,7 @@ async function getWorkflowDescriptions( typegraphName, artifacts, description, - typegate + typegate, ); workflowDescriptions.push({ @@ -477,7 +480,7 @@ async function getWorkflowEntryPointPath( typegraphName: string, artifacts: Record, description: WorkflowFileDescription, - typegate: Typegate + typegate: Typegate, ) { const entryPoint = artifacts[description.file as string]; const deps = (description.deps as string[]).map((dep) => artifacts[dep]); diff --git a/src/typegate/src/runtimes/substantial/agent.ts b/src/typegate/src/runtimes/substantial/agent.ts index 966ce460f3..709d29faa2 100644 --- a/src/typegate/src/runtimes/substantial/agent.ts +++ b/src/typegate/src/runtimes/substantial/agent.ts @@ -2,17 +2,17 @@ import { AddScheduleInput, Backend, NextRun, - Run, ReadOrCloseScheduleInput, + Run, } from "../../../engine/runtime.js"; import { getLogger } from "../../log.ts"; import { TaskContext } from "../deno/shared_types.ts"; import { + appendIfOngoing, Interrupt, Result, WorkerData, WorkflowResult, - appendIfOngoing, } from "./types.ts"; import { RunId, WorkerManager } from "./workflow_worker_manager.ts"; @@ -39,7 +39,7 @@ export class Agent { private backend: Backend, private queue: string, private config: AgentConfig, - private internalTCtx: TaskContext + private internalTCtx: TaskContext, ) {} async schedule(input: AddScheduleInput) { @@ -56,7 +56,7 @@ export class Agent { }); } catch (err) { logger.warn( - `Failed writing log metadata for schedule "${schedule}" (${runId}), skipping it: ${err}` + `Failed writing log metadata for schedule "${schedule}" (${runId}), skipping it: ${err}`, ); } } @@ -89,9 +89,11 @@ export class Agent { this.workflows = workflows; logger.warn( - `Initializing agent to handle ${workflows - .map(({ name }) => name) - .join(", ")}` + `Initializing agent to handle ${ + workflows + .map(({ name }) => name) + .join(", ") + }`, ); this.pollIntervalHandle = setInterval(async () => { @@ -132,7 +134,7 @@ export class Agent { for (const workflow of this.workflows) { const requests = replayRequests.filter( - ({ run_id }) => Agent.parseWorkflowName(run_id) == workflow.name + ({ run_id }) => Agent.parseWorkflowName(run_id) == workflow.name, ); while (requests.length > 0) { @@ -143,7 +145,7 @@ export class Agent { await this.#replay(next, workflow); } catch (err) { logger.error( - `Replay failed for ${workflow.name} => ${JSON.stringify(next)}` + `Replay failed for ${workflow.name} => ${JSON.stringify(next)}`, ); logger.error(err); } finally { @@ -189,7 +191,7 @@ export class Agent { // necessarily represent the state of what is actually running on the current typegate node if (this.workerManager.isOngoing(next.run_id)) { logger.warn( - `skip triggering ${next.run_id} for the current tick as it is still ongoing` + `skip triggering ${next.run_id} for the current tick as it is still ongoing`, ); return; @@ -234,9 +236,11 @@ export class Agent { // A consequence of the above, a workflow is always triggered by gql { start(..) } // This can also occur if an event is sent from gql under a runId that is not valid (e.g. due to typo) logger.warn( - `First item in the operation list is not a Start, got "${JSON.stringify( - first - )}" instead. Closing the underlying schedule.` + `First item in the operation list is not a Start, got "${ + JSON.stringify( + first, + ) + }" instead. Closing the underlying schedule.`, ); await Meta.substantial.storeCloseSchedule(schedDef); @@ -251,12 +255,12 @@ export class Agent { run, next.schedule_date, first.event.kwargs, - this.internalTCtx + this.internalTCtx, ); this.workerManager.listen( next.run_id, - this.#eventResultHandlerFor(workflow.name, next.run_id) + this.#eventResultHandlerFor(workflow.name, next.run_id), ); } catch (err) { throw err; @@ -279,7 +283,7 @@ export class Agent { // All Worker/Runner non-user issue should fall here // Note: Should never throw (typegate will panic), this will run in a worker logger.error( - `result error for "${runId}": ${JSON.stringify(result.payload)}` + `result error for "${runId}": ${JSON.stringify(result.payload)}`, ); return; } @@ -307,7 +311,7 @@ export class Agent { startedAt, workflowName, runId, - ret + ret, ); break; } @@ -318,9 +322,9 @@ export class Agent { } default: logger.error( - `Fatal: invalid type ${ - answer.type - } sent by "${runId}": ${JSON.stringify(answer.data)}` + `Fatal: invalid type ${answer.type} sent by "${runId}": ${ + JSON.stringify(answer.data) + }`, ); } }; @@ -329,7 +333,7 @@ export class Agent { async #workflowHandleInterrupts( workflowName: string, runId: string, - { result, schedule, run }: WorkflowResult + { result, schedule, run }: WorkflowResult, ) { this.workerManager.destroyWorker(workflowName, runId); // ! @@ -378,14 +382,16 @@ export class Agent { startedAt: Date, workflowName: string, runId: string, - { result, kind, schedule, run }: WorkflowResult + { result, kind, schedule, run }: WorkflowResult, ) { this.workerManager.destroyWorker(workflowName, runId); logger.info( - `gracefull completion of "${runId}" (${kind}): ${JSON.stringify( - result - )} started at "${startedAt}"` + `gracefull completion of "${runId}" (${kind}): ${ + JSON.stringify( + result, + ) + } started at "${startedAt}"`, ); logger.info(`Append Stop ${runId}`); @@ -404,7 +410,7 @@ export class Agent { }); logger.info( - `Persist finalized records for "${workflowName}": ${result}" and closing everything..` + `Persist finalized records for "${workflowName}": ${result}" and closing everything..`, ); const _run = await Meta.substantial.storePersistRun({ @@ -451,13 +457,15 @@ function checkIfRunHasStopped(run: Run) { if (op.event.type == "Start") { if (life >= 1) { logger.error( - `bad logs: ${JSON.stringify( - run.operations.map(({ event }) => event.type) - )}` + `bad logs: ${ + JSON.stringify( + run.operations.map(({ event }) => event.type), + ) + }`, ); throw new Error( - `"${run.run_id}" has potentially corrupted logs, another run occured yet previous has not stopped` + `"${run.run_id}" has potentially corrupted logs, another run occured yet previous has not stopped`, ); } @@ -466,13 +474,15 @@ function checkIfRunHasStopped(run: Run) { } else if (op.event.type == "Stop") { if (life <= 0) { logger.error( - `bad logs: ${JSON.stringify( - run.operations.map(({ event }) => event.type) - )}` + `bad logs: ${ + JSON.stringify( + run.operations.map(({ event }) => event.type), + ) + }`, ); throw new Error( - `"${run.run_id}" has potentitally corrupted logs, attempted stopping already closed run, or run with a missing Start` + `"${run.run_id}" has potentitally corrupted logs, attempted stopping already closed run, or run with a missing Start`, ); } diff --git a/src/typegate/src/runtimes/substantial/deno_context.ts b/src/typegate/src/runtimes/substantial/deno_context.ts index 44a48f81e0..03e73edb5f 100644 --- a/src/typegate/src/runtimes/substantial/deno_context.ts +++ b/src/typegate/src/runtimes/substantial/deno_context.ts @@ -1,12 +1,12 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // FIXME: DO NOT IMPORT any file that refers to Meta, this will be instantiated in a Worker // import { sleep } from "../../utils.ts"; // will silently fail?? import { make_internal } from "../../worker_utils.ts"; import { TaskContext } from "../deno/shared_types.ts"; -import { Interrupt, OperationEvent, Run, appendIfOngoing } from "./types.ts"; +import { appendIfOngoing, Interrupt, OperationEvent, Run } from "./types.ts"; // const isTest = Deno.env.get("DENO_TESTING") === "true"; const testBaseUrl = Deno.env.get("TEST_OVERRIDE_GQL_ORIGIN"); @@ -14,13 +14,13 @@ const testBaseUrl = Deno.env.get("TEST_OVERRIDE_GQL_ORIGIN"); const additionalHeaders = { connection: "keep-alive" }; export class Context { - private id: number = 0; + private id = 0; gql: ReturnType; constructor( private run: Run, private kwargs: Record, - private internal: TaskContext + private internal: TaskContext, ) { this.gql = createGQLClient(internal); } @@ -86,7 +86,7 @@ export class Context { const strategy = new RetryStrategy( retry.maxRetries, retry.minBackoffMs, - retry.maxBackoffMs + retry.maxBackoffMs, ); const retriesLeft = Math.max(retry.maxRetries - currRetryCount, 0); @@ -170,7 +170,7 @@ export class Context { async handle( eventName: string, - fn: (received: unknown) => unknown | Promise + fn: (received: unknown) => unknown | Promise, ) { for (const { event } of this.run.operations) { if (event.type == "Send" && event.event_name == eventName) { @@ -208,7 +208,7 @@ export class Context { createWorkflowHandle(handleDef: SerializableWorkflowHandle) { if (!handleDef.runId) { throw new Error( - "Cannot create handle from a definition that was not run" + "Cannot create handle from a definition that was not run", ); } return new ChildWorkflowHandle(this, handleDef); @@ -227,11 +227,11 @@ interface SerializableWorkflowHandle { export class ChildWorkflowHandle { constructor( private ctx: Context, - public handleDef: SerializableWorkflowHandle + public handleDef: SerializableWorkflowHandle, ) {} async start(): Promise { - const { data } = await this.ctx.gql/**/ ` + const { data } = await this.ctx.gql /**/` mutation ($name: String!, $kwargs: String!) { _sub_internal_start(name: $name, kwargs: $kwargs) } @@ -243,7 +243,7 @@ export class ChildWorkflowHandle { this.handleDef.runId = (data as any)._sub_internal_start as string; this.#checkRunId(); - const { data: _ } = await this.ctx.gql/**/ ` + const { data: _ } = await this.ctx.gql /**/` mutation ($parent_run_id: String!, $child_run_id: String!) { _sub_internal_link_parent_child(parent_run_id: $parent_run_id, child_run_id: $child_run_id) } @@ -258,7 +258,7 @@ export class ChildWorkflowHandle { async result(): Promise { this.#checkRunId(); - const { data } = await this.ctx.gql/**/ ` + const { data } = await this.ctx.gql /**/` query ($name: String!) { _sub_internal_results(name: $name) { completed { @@ -292,7 +292,7 @@ export class ChildWorkflowHandle { async stop(): Promise { this.#checkRunId(); - const { data } = await this.ctx.gql/**/ ` + const { data } = await this.ctx.gql /**/` mutation ($run_id: String!) { _sub_internal_stop(run_id: $run_id) } @@ -306,7 +306,7 @@ export class ChildWorkflowHandle { async hasStopped(): Promise { this.#checkRunId(); - const { data } = await this.ctx.gql/**/ ` + const { data } = await this.ctx.gql /**/` query { _sub_internal_results(name: $name) { completed { @@ -329,7 +329,7 @@ export class ChildWorkflowHandle { #checkRunId() { if (!this.handleDef.runId) { throw new Error( - "Invalid state: run_id is not properly set, this could mean that the workflow was not started yet" + "Invalid state: run_id is not properly set, this could mean that the workflow was not started yet", ); } } @@ -371,7 +371,7 @@ class RetryStrategy { constructor( maxRetries: number, minBackoffMs?: number, - maxBackoffMs?: number + maxBackoffMs?: number, ) { this.maxRetries = maxRetries; this.minBackoffMs = minBackoffMs; diff --git a/src/typegate/src/runtimes/substantial/types.ts b/src/typegate/src/runtimes/substantial/types.ts index e7defcf5bd..c750130e6d 100644 --- a/src/typegate/src/runtimes/substantial/types.ts +++ b/src/typegate/src/runtimes/substantial/types.ts @@ -1,12 +1,12 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Operation, Run } from "../../../engine/runtime.js"; export type { + Backend, Operation, OperationEvent, Run, - Backend, } from "../../../engine/runtime.js"; export type AnyString = string & Record; diff --git a/src/typegate/src/runtimes/substantial/worker.ts b/src/typegate/src/runtimes/substantial/worker.ts index fcbc626421..bff137738a 100644 --- a/src/typegate/src/runtimes/substantial/worker.ts +++ b/src/typegate/src/runtimes/substantial/worker.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { errorToString } from "../../worker_utils.ts"; import { Context } from "./deno_context.ts"; @@ -32,27 +32,34 @@ self.onmessage = async function (event) { .then((wfResult: unknown) => { self.postMessage( Ok( - Msg(type, { - kind: "SUCCESS", - result: wfResult, - run: runCtx!.getRun(), - schedule, - } satisfies WorkflowResult) - ) + Msg( + type, + { + kind: "SUCCESS", + result: wfResult, + run: runCtx!.getRun(), + schedule, + } satisfies WorkflowResult, + ), + ), ); }) .catch((wfException: unknown) => { self.postMessage( Ok( - Msg(type, { - kind: "FAIL", - result: errorToString(wfException), - exception: - wfException instanceof Error ? wfException : undefined, - run: runCtx!.getRun(), - schedule, - } satisfies WorkflowResult) - ) + Msg( + type, + { + kind: "FAIL", + result: errorToString(wfException), + exception: wfException instanceof Error + ? wfException + : undefined, + run: runCtx!.getRun(), + schedule, + } satisfies WorkflowResult, + ), + ), ); }); break; diff --git a/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts b/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts index 795d20975a..62ff176d53 100644 --- a/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts +++ b/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { envSharedWithWorkers } from "../../config/shared.ts"; import { getLogger } from "../../log.ts"; @@ -48,7 +48,7 @@ export class WorkflowRecorder { name: WorkflowName, runId: RunId, worker: WorkerRecord, - startedAt: Date + startedAt: Date, ) { if (!this.workflowRuns.has(name)) { this.workflowRuns.set(name, new Set()); @@ -83,7 +83,7 @@ export class WorkflowRecorder { if (this.workflowRuns.has(name)) { if (!record) { logger.warn( - `"${runId}" associated with "${name}" does not exist or has been already destroyed` + `"${runId}" associated with "${name}" does not exist or has been already destroyed`, ); return false; } @@ -140,7 +140,7 @@ export class WorkerManager { modulePath, worker, }, - new Date() + new Date(), ); } @@ -151,10 +151,12 @@ export class WorkerManager { destroyAllWorkers() { this.recorder.destroyAllWorkers(); logger.warn( - `Destroyed workers for ${this.recorder - .getRegisteredWorkflowNames() - .map((w) => `"${w}"`) - .join(", ")}` + `Destroyed workers for ${ + this.recorder + .getRegisteredWorkflowNames() + .map((w) => `"${w}"`) + .join(", ") + }`, ); } @@ -181,7 +183,7 @@ export class WorkerManager { const rec = this.recorder.startedAtRecords.get(runId); if (!rec) { throw new Error( - `Invalid state: cannot find initial time for run "${runId}"` + `Invalid state: cannot find initial time for run "${runId}"`, ); } return rec; @@ -222,7 +224,7 @@ export class WorkerManager { storedRun: Run, schedule: string, kwargs: Record, - internalTCtx: TaskContext + internalTCtx: TaskContext, ) { this.#createWorker(name, workflowModPath, runId); this.trigger("START", runId, { diff --git a/src/typegate/src/runtimes/temporal.ts b/src/typegate/src/runtimes/temporal.ts index 7c4687a1f9..c3af66a796 100644 --- a/src/typegate/src/runtimes/temporal.ts +++ b/src/typegate/src/runtimes/temporal.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import * as native from "native"; diff --git a/src/typegate/src/runtimes/typegate.ts b/src/typegate/src/runtimes/typegate.ts index 81c8878280..bec4fea41a 100644 --- a/src/typegate/src/runtimes/typegate.ts +++ b/src/typegate/src/runtimes/typegate.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Runtime } from "./Runtime.ts"; import { ComputeStage } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/runtimes/typegraph.ts b/src/typegate/src/runtimes/typegraph.ts index b109a0df7e..36ef2fdc59 100644 --- a/src/typegate/src/runtimes/typegraph.ts +++ b/src/typegate/src/runtimes/typegraph.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { TypeGraph, diff --git a/src/typegate/src/runtimes/utils/graphql_forward_vars.ts b/src/typegate/src/runtimes/utils/graphql_forward_vars.ts index e16c113e3e..94dedd77af 100644 --- a/src/typegate/src/runtimes/utils/graphql_forward_vars.ts +++ b/src/typegate/src/runtimes/utils/graphql_forward_vars.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { ensure } from "../../utils.ts"; import type { ComputeStage } from "../../engine/query_engine.ts"; diff --git a/src/typegate/src/runtimes/utils/graphql_inline_vars.ts b/src/typegate/src/runtimes/utils/graphql_inline_vars.ts index 194a5a699e..3b6630a932 100644 --- a/src/typegate/src/runtimes/utils/graphql_inline_vars.ts +++ b/src/typegate/src/runtimes/utils/graphql_inline_vars.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { JSONValue } from "../../utils.ts"; import type { FromVars } from "../graphql.ts"; diff --git a/src/typegate/src/runtimes/utils/http.ts b/src/typegate/src/runtimes/utils/http.ts index 7610cf9679..a3a2d48fac 100644 --- a/src/typegate/src/runtimes/utils/http.ts +++ b/src/typegate/src/runtimes/utils/http.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export interface ReplaceDynamicPathParamsResult { pathname: string; diff --git a/src/typegate/src/runtimes/wasm_reflected.ts b/src/typegate/src/runtimes/wasm_reflected.ts index 724f646120..3b3b6286b8 100644 --- a/src/typegate/src/runtimes/wasm_reflected.ts +++ b/src/typegate/src/runtimes/wasm_reflected.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { registerRuntime } from "./mod.ts"; import { Runtime } from "./Runtime.ts"; diff --git a/src/typegate/src/runtimes/wasm_wire.ts b/src/typegate/src/runtimes/wasm_wire.ts index de143b7225..d6d9b549a1 100644 --- a/src/typegate/src/runtimes/wasm_wire.ts +++ b/src/typegate/src/runtimes/wasm_wire.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { registerRuntime } from "./mod.ts"; import { Runtime } from "./Runtime.ts"; diff --git a/src/typegate/src/runtimes/wit_wire/mod.ts b/src/typegate/src/runtimes/wit_wire/mod.ts index 5374ae7361..c0984b51fb 100644 --- a/src/typegate/src/runtimes/wit_wire/mod.ts +++ b/src/typegate/src/runtimes/wit_wire/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as zod from "zod"; import type { WitWireMatInfo } from "../../../engine/runtime.js"; diff --git a/src/typegate/src/services/artifact_service.ts b/src/typegate/src/services/artifact_service.ts index 555e118a72..1a9489a65c 100644 --- a/src/typegate/src/services/artifact_service.ts +++ b/src/typegate/src/services/artifact_service.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type ArtifactMeta, diff --git a/src/typegate/src/services/auth/cookies.ts b/src/typegate/src/services/auth/cookies.ts index aaf7b2c478..2a528e7204 100644 --- a/src/typegate/src/services/auth/cookies.ts +++ b/src/typegate/src/services/auth/cookies.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { deleteCookie, getCookies, setCookie } from "@std/http/cookie"; import type { TypegateCryptoKeys } from "../../crypto.ts"; diff --git a/src/typegate/src/services/auth/mod.ts b/src/typegate/src/services/auth/mod.ts index 0cd23a06a3..16175e4ea2 100644 --- a/src/typegate/src/services/auth/mod.ts +++ b/src/typegate/src/services/auth/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { JWTAuth } from "./protocols/jwt.ts"; import { BasicAuth } from "./protocols/basic.ts"; diff --git a/src/typegate/src/services/auth/protocols/basic.ts b/src/typegate/src/services/auth/protocols/basic.ts index f72f344e64..a6f52312be 100644 --- a/src/typegate/src/services/auth/protocols/basic.ts +++ b/src/typegate/src/services/auth/protocols/basic.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { SystemTypegraph } from "../../../system_typegraphs.ts"; import { b64decode } from "../../../utils.ts"; diff --git a/src/typegate/src/services/auth/protocols/internal.ts b/src/typegate/src/services/auth/protocols/internal.ts index b92959225b..bd1a82e832 100644 --- a/src/typegate/src/services/auth/protocols/internal.ts +++ b/src/typegate/src/services/auth/protocols/internal.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypegateCryptoKeys } from "../../../crypto.ts"; import { getLogger } from "../../../log.ts"; diff --git a/src/typegate/src/services/auth/protocols/jwt.ts b/src/typegate/src/services/auth/protocols/jwt.ts index 7d93e32a97..a4788268cb 100644 --- a/src/typegate/src/services/auth/protocols/jwt.ts +++ b/src/typegate/src/services/auth/protocols/jwt.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as jwt from "jwt"; import { getLogger } from "../../../log.ts"; diff --git a/src/typegate/src/services/auth/protocols/oauth2.ts b/src/typegate/src/services/auth/protocols/oauth2.ts index 0615565604..09729b4402 100644 --- a/src/typegate/src/services/auth/protocols/oauth2.ts +++ b/src/typegate/src/services/auth/protocols/oauth2.ts @@ -1,8 +1,12 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypegateConfigBase } from "../../../config.ts"; -import { OAuth2Client, type OAuth2ClientConfig, type Tokens } from "oauth2_client"; +import { + OAuth2Client, + type OAuth2ClientConfig, + type Tokens, +} from "oauth2_client"; import { randomUUID, type TypegateCryptoKeys } from "../../../crypto.ts"; import type { AdditionalAuthParams, JWTClaims } from "../mod.ts"; import { getLogger } from "../../../log.ts"; diff --git a/src/typegate/src/services/auth/protocols/protocol.ts b/src/typegate/src/services/auth/protocols/protocol.ts index cc2ce980cf..115d73db48 100644 --- a/src/typegate/src/services/auth/protocols/protocol.ts +++ b/src/typegate/src/services/auth/protocols/protocol.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { notFound } from "../../../services/responses.ts"; diff --git a/src/typegate/src/services/auth/routes/mod.ts b/src/typegate/src/services/auth/routes/mod.ts index 4fe31f2a22..c11247f0e0 100644 --- a/src/typegate/src/services/auth/routes/mod.ts +++ b/src/typegate/src/services/auth/routes/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { QueryEngine } from "../../../engine/query_engine.ts"; diff --git a/src/typegate/src/services/auth/routes/take.ts b/src/typegate/src/services/auth/routes/take.ts index bd29792060..53d8845686 100644 --- a/src/typegate/src/services/auth/routes/take.ts +++ b/src/typegate/src/services/auth/routes/take.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { getLogger } from "../../../log.ts"; import { clearCookie, getEncryptedCookie } from "../cookies.ts"; diff --git a/src/typegate/src/services/auth/routes/validate.ts b/src/typegate/src/services/auth/routes/validate.ts index 9ed4a8c6ca..7e97d9172e 100644 --- a/src/typegate/src/services/auth/routes/validate.ts +++ b/src/typegate/src/services/auth/routes/validate.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { RouteParams } from "./mod.ts"; diff --git a/src/typegate/src/services/graphql_service.ts b/src/typegate/src/services/graphql_service.ts index 7e0ce139e4..65be78f48e 100644 --- a/src/typegate/src/services/graphql_service.ts +++ b/src/typegate/src/services/graphql_service.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { getLogger } from "../log.ts"; import { parse } from "graphql"; @@ -9,7 +9,10 @@ import { type Operations, parseRequest, } from "../transports/graphql/request_parser.ts"; -import { findOperation, type FragmentDefs } from "../transports/graphql/graphql.ts"; +import { + findOperation, + type FragmentDefs, +} from "../transports/graphql/graphql.ts"; import { forceAnyToOption } from "../utils.ts"; import type { QueryEngine } from "../engine/query_engine.ts"; import type * as ast from "graphql/ast"; diff --git a/src/typegate/src/services/info_service.ts b/src/typegate/src/services/info_service.ts index 2883f0c874..932561d2cd 100644 --- a/src/typegate/src/services/info_service.ts +++ b/src/typegate/src/services/info_service.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export const handleInfo = ( _request: Request, diff --git a/src/typegate/src/services/middlewares.ts b/src/typegate/src/services/middlewares.ts index 04cb7eccfb..0d9b0b0234 100644 --- a/src/typegate/src/services/middlewares.ts +++ b/src/typegate/src/services/middlewares.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { globalConfig } from "../config.ts"; import type { QueryEngine } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/services/playground_service.ts b/src/typegate/src/services/playground_service.ts index b713f583c1..6b90403c9e 100644 --- a/src/typegate/src/services/playground_service.ts +++ b/src/typegate/src/services/playground_service.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { globalConfig } from "../config.ts"; import type { QueryEngine } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/services/responses.ts b/src/typegate/src/services/responses.ts index 98744c61d2..f188940bfa 100644 --- a/src/typegate/src/services/responses.ts +++ b/src/typegate/src/services/responses.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { JSONValue } from "../utils.ts"; import { BaseError, ErrorKind } from "../errors.ts"; diff --git a/src/typegate/src/services/rest_service.ts b/src/typegate/src/services/rest_service.ts index 15af7dab66..7bce7387d0 100644 --- a/src/typegate/src/services/rest_service.ts +++ b/src/typegate/src/services/rest_service.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { QueryEngine } from "../engine/query_engine.ts"; import { BadContext, ResolverError } from "../errors.ts"; diff --git a/src/typegate/src/sync/mod.ts b/src/typegate/src/sync/mod.ts index e0bcf40f75..5391384fae 100644 --- a/src/typegate/src/sync/mod.ts +++ b/src/typegate/src/sync/mod.ts @@ -1,4 +1,4 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // diff --git a/src/typegate/src/sync/replicated_map.ts b/src/typegate/src/sync/replicated_map.ts index 373b1923f0..b7317cb9c9 100644 --- a/src/typegate/src/sync/replicated_map.ts +++ b/src/typegate/src/sync/replicated_map.ts @@ -1,7 +1,12 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 - -import { connect, type Redis, type RedisConnectOptions, type XIdInput } from "redis"; +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +import { + connect, + type Redis, + type RedisConnectOptions, + type XIdInput, +} from "redis"; import * as Sentry from "sentry"; import { getLogger } from "../log.ts"; import { ensure } from "../utils.ts"; diff --git a/src/typegate/src/sync/typegraph.ts b/src/typegate/src/sync/typegraph.ts index 370596a950..232c57e08f 100644 --- a/src/typegate/src/sync/typegraph.ts +++ b/src/typegate/src/sync/typegraph.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { SecretManager, diff --git a/src/typegate/src/system_typegraphs.ts b/src/typegate/src/system_typegraphs.ts index 86c37772bc..3c4e934e8d 100644 --- a/src/typegate/src/system_typegraphs.ts +++ b/src/typegate/src/system_typegraphs.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { basename } from "@std/url"; import { fromFileUrl, toFileUrl } from "@std/path"; diff --git a/src/typegate/src/transports/graphql/gq.ts b/src/typegate/src/transports/graphql/gq.ts index 23e6e312ff..be04b0543a 100644 --- a/src/typegate/src/transports/graphql/gq.ts +++ b/src/typegate/src/transports/graphql/gq.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type * as ast from "graphql/ast"; diff --git a/src/typegate/src/transports/graphql/graphql.ts b/src/typegate/src/transports/graphql/graphql.ts index dc76f94d6a..dcaca7b1c7 100644 --- a/src/typegate/src/transports/graphql/graphql.ts +++ b/src/typegate/src/transports/graphql/graphql.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type * as ast from "graphql/ast"; import { Kind } from "graphql"; diff --git a/src/typegate/src/transports/graphql/request_parser.ts b/src/typegate/src/transports/graphql/request_parser.ts index 2f9d1c89f2..8a000250f8 100644 --- a/src/typegate/src/transports/graphql/request_parser.ts +++ b/src/typegate/src/transports/graphql/request_parser.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export interface Operations { query: string; diff --git a/src/typegate/src/transports/graphql/typegraph.ts b/src/typegate/src/transports/graphql/typegraph.ts index df08e087df..9c2f1ba890 100644 --- a/src/typegate/src/transports/graphql/typegraph.ts +++ b/src/typegate/src/transports/graphql/typegraph.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraphDS } from "../../typegraph/mod.ts"; import type { ObjectNode } from "../../typegraph/type_node.ts"; diff --git a/src/typegate/src/transports/graphql/utils.ts b/src/typegate/src/transports/graphql/utils.ts index 5de5b550c4..19ea210811 100644 --- a/src/typegate/src/transports/graphql/utils.ts +++ b/src/typegate/src/transports/graphql/utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraphDS } from "../../typegraph/mod.ts"; import type { TypeNode } from "../../typegraph/type_node.ts"; diff --git a/src/typegate/src/transports/rest/rest_schema_generator.ts b/src/typegate/src/transports/rest/rest_schema_generator.ts index e209d4e9f3..96dffff707 100644 --- a/src/typegate/src/transports/rest/rest_schema_generator.ts +++ b/src/typegate/src/transports/rest/rest_schema_generator.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraph } from "../../typegraph/mod.ts"; diff --git a/src/typegate/src/typegate/artifacts/local.ts b/src/typegate/src/typegate/artifacts/local.ts index 8d661c30e6..44e7ea0f52 100644 --- a/src/typegate/src/typegate/artifacts/local.ts +++ b/src/typegate/src/typegate/artifacts/local.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { resolve } from "@std/path/resolve"; import { HashTransformStream } from "../../utils/hash.ts"; @@ -60,7 +60,7 @@ export class LocalArtifactPersistence implements ArtifactPersistence { await Deno.remove(this.dirs.artifacts, { recursive: true }); } - async save(stream: ReadableStream, size: number): Promise { + async save(stream: ReadableStream, _size: number): Promise { const tmpFile = await Deno.makeTempFile({ dir: this.dirs.temp }); const file = await Deno.open(tmpFile, { write: true, truncate: true }); const hasher = createHash("sha256"); diff --git a/src/typegate/src/typegate/artifacts/mod.ts b/src/typegate/src/typegate/artifacts/mod.ts index e7ede30440..34fb655dab 100644 --- a/src/typegate/src/typegate/artifacts/mod.ts +++ b/src/typegate/src/typegate/artifacts/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { sha256, type TypegateCryptoKeys } from "../../crypto.ts"; import { getLogger } from "../../log.ts"; diff --git a/src/typegate/src/typegate/artifacts/shared.ts b/src/typegate/src/typegate/artifacts/shared.ts index 50055b290c..6871bc0d09 100644 --- a/src/typegate/src/typegate/artifacts/shared.ts +++ b/src/typegate/src/typegate/artifacts/shared.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { connect, type Redis, type RedisConnectOptions } from "redis"; import { getLogger } from "../../log.ts"; @@ -53,14 +53,19 @@ class SharedArtifactPersistence implements ArtifactPersistence { ): Promise { const localShadow = await LocalArtifactPersistence.init(baseDir); const s3 = new S3(syncConfig.s3); - return new SharedArtifactPersistence(localShadow, s3, syncConfig.s3Bucket, syncConfig); + return new SharedArtifactPersistence( + localShadow, + s3, + syncConfig.s3Bucket, + syncConfig, + ); } constructor( private localShadow: LocalArtifactPersistence, private s3: S3, private s3Bucket: string, - private syncConfig: SyncConfig + private syncConfig: SyncConfig, ) {} get dirs() { @@ -76,12 +81,13 @@ class SharedArtifactPersistence implements ArtifactPersistence { const hasher = createHash("sha256"); const stream2 = stream.pipeThrough(new HashTransformStream(hasher)); - + // temporary key is needed as we won't be able to get the hash sum of the file, // which we use as the key of the object, // before going through whole stream. - // so we create a temporary key to store the file/object and then copy the object after we have computed the hash. - const tempKey = resolveS3Key(this.s3Bucket, + // so we create a temporary key to store the file/object and then copy the object after we have computed the hash. + const tempKey = resolveS3Key( + this.s3Bucket, `tmp/${Math.random().toString(36).substring(2)}`, ); @@ -94,23 +100,23 @@ class SharedArtifactPersistence implements ArtifactPersistence { ContentLength: size, }, }); - + const _ = await upload.done(); - + const hash = hasher.digest("hex"); logger.info(`persisting artifact to S3: ${hash}`); - + await this.s3.copyObject({ Bucket: this.s3Bucket, CopySource: `${this.s3Bucket}/${tempKey}`, Key: resolveS3Key(this.s3Bucket, hash), }); - + await this.s3.deleteObject({ Bucket: this.s3Bucket, Key: tempKey, }); - + return hash; } diff --git a/src/typegate/src/typegate/hooks.ts b/src/typegate/src/typegate/hooks.ts index ca58c38858..5752773261 100644 --- a/src/typegate/src/typegate/hooks.ts +++ b/src/typegate/src/typegate/hooks.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { MessageEntry, Migrations } from "../typegate/register.ts"; import type { SecretManager, TypeGraphDS } from "../typegraph/mod.ts"; diff --git a/src/typegate/src/typegate/memory_register.ts b/src/typegate/src/typegate/memory_register.ts index a4fea212ad..5f2a8e1b89 100644 --- a/src/typegate/src/typegate/memory_register.ts +++ b/src/typegate/src/typegate/memory_register.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { QueryEngine } from "../engine/query_engine.ts"; import { Register } from "../typegate/register.ts"; diff --git a/src/typegate/src/typegate/mod.ts b/src/typegate/src/typegate/mod.ts index 0deb05fc9a..69c1d60a39 100644 --- a/src/typegate/src/typegate/mod.ts +++ b/src/typegate/src/typegate/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type Register, ReplicatedRegister } from "./register.ts"; import * as Sentry from "sentry"; diff --git a/src/typegate/src/typegate/no_limiter.ts b/src/typegate/src/typegate/no_limiter.ts index ef18dac12b..4d6f156393 100644 --- a/src/typegate/src/typegate/no_limiter.ts +++ b/src/typegate/src/typegate/no_limiter.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { RateLimiter } from "../typegate/rate_limiter.ts"; diff --git a/src/typegate/src/typegate/rate_limiter.ts b/src/typegate/src/typegate/rate_limiter.ts index 1c2629ad3c..46cc482859 100644 --- a/src/typegate/src/typegate/rate_limiter.ts +++ b/src/typegate/src/typegate/rate_limiter.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { connect, type Redis, type RedisConnectOptions } from "redis"; import type { QueryEngine } from "../engine/query_engine.ts"; diff --git a/src/typegate/src/typegate/register.ts b/src/typegate/src/typegate/register.ts index 917d41f7bd..42d3ebbdcb 100644 --- a/src/typegate/src/typegate/register.ts +++ b/src/typegate/src/typegate/register.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { QueryEngine } from "../engine/query_engine.ts"; import type { RedisConnectOptions, XIdInput } from "redis"; diff --git a/src/typegate/src/typegraph/mod.ts b/src/typegate/src/typegraph/mod.ts index 77d50c45ae..aaec624dba 100644 --- a/src/typegate/src/typegraph/mod.ts +++ b/src/typegate/src/typegraph/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type * as ast from "graphql/ast"; import { Kind } from "graphql"; @@ -222,7 +222,7 @@ export class TypeGraph implements AsyncDisposable { (mat) => mat.runtime === idx, ); - logger.info("initializing runtime {}", { name: runtime.name }) + logger.info("initializing runtime {}", { name: runtime.name }); return initRuntime(runtime.name, { typegate, typegraph, @@ -384,13 +384,13 @@ export class TypeGraph implements AsyncDisposable { } ensure( isObject(type) || - isInteger(type) || - isNumber(type) || - isBoolean(type) || - isFunction(type) || - isString(type) || - isUnion(type) || - isEither(type), + isInteger(type) || + isNumber(type) || + isBoolean(type) || + isFunction(type) || + isString(type) || + isUnion(type) || + isEither(type), `object expected but got ${type.type}`, ); return (x: any) => { diff --git a/src/typegate/src/typegraph/type_node.ts b/src/typegate/src/typegraph/type_node.ts index 105a120231..3aafdf7b91 100644 --- a/src/typegate/src/typegraph/type_node.ts +++ b/src/typegate/src/typegraph/type_node.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export const Type = { OPTIONAL: "optional", diff --git a/src/typegate/src/typegraph/types.ts b/src/typegate/src/typegraph/types.ts index 6607cc9515..edaaeb5c2c 100644 --- a/src/typegate/src/typegraph/types.ts +++ b/src/typegate/src/typegraph/types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // deno-lint-ignore-file no-explicit-any no-empty-interface diff --git a/src/typegate/src/typegraph/utils.ts b/src/typegate/src/typegraph/utils.ts index 1acd2c8a29..88bf0152be 100644 --- a/src/typegate/src/typegraph/utils.ts +++ b/src/typegate/src/typegraph/utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraph, TypeGraphDS } from "../typegraph/mod.ts"; import { diff --git a/src/typegate/src/typegraph/versions.ts b/src/typegate/src/typegraph/versions.ts index 26a2f0389e..ae16cf7a75 100644 --- a/src/typegate/src/typegraph/versions.ts +++ b/src/typegate/src/typegraph/versions.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { TypeGraph, type TypeGraphDS } from "../typegraph/mod.ts"; import { globalConfig } from "../config.ts"; diff --git a/src/typegate/src/typegraph/visitor.ts b/src/typegate/src/typegraph/visitor.ts index bfa44d7174..9b928f9fb9 100644 --- a/src/typegate/src/typegraph/visitor.ts +++ b/src/typegate/src/typegraph/visitor.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { TypeGraphDS } from "../typegraph/mod.ts"; import { Type, type TypeNode } from "./type_node.ts"; diff --git a/src/typegate/src/typegraphs/introspection.py b/src/typegate/src/typegraphs/introspection.py index c39358beee..1cef3dbe91 100644 --- a/src/typegate/src/typegraphs/introspection.py +++ b/src/typegate/src/typegraphs/introspection.py @@ -1,4 +1,5 @@ -# Copyright Metatype under the Elastic License 2.0. +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, Policy, fx, t, typegraph from typegraph.gen.exports.runtimes import ( diff --git a/src/typegate/src/typegraphs/prisma_migration.py b/src/typegate/src/typegraphs/prisma_migration.py index c15b1c66fa..ddc96df004 100644 --- a/src/typegate/src/typegraphs/prisma_migration.py +++ b/src/typegate/src/typegraphs/prisma_migration.py @@ -1,3 +1,6 @@ +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 + from typegraph import Graph, t, typegraph from typegraph.gen.exports.runtimes import ( PrismaMigrationOperation, diff --git a/src/typegate/src/typegraphs/typegate.py b/src/typegate/src/typegraphs/typegate.py index 581fb9e7ad..2b65527830 100644 --- a/src/typegate/src/typegraphs/typegate.py +++ b/src/typegate/src/typegraphs/typegate.py @@ -1,4 +1,5 @@ -# Copyright Metatype under the Elastic License 2.0. +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, fx, t, typegraph from typegraph.gen.exports.runtimes import TypegateOperation diff --git a/src/typegate/src/types.ts b/src/typegate/src/types.ts index a0d9600351..81d90949b6 100644 --- a/src/typegate/src/types.ts +++ b/src/typegate/src/types.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ComputeStage } from "./engine/query_engine.ts"; import type { Runtime } from "./runtimes/Runtime.ts"; diff --git a/src/typegate/src/utils.ts b/src/typegate/src/utils.ts index 5d6570fafc..8b98fd28a6 100644 --- a/src/typegate/src/utils.ts +++ b/src/typegate/src/utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { ComputeStage } from "./engine/query_engine.ts"; import type * as ast from "graphql/ast"; @@ -44,7 +44,7 @@ export const forceOptionToValue = (m: Option): T | undefined => { export const createUrl = ( base: string, path: string, - search_params?: URLSearchParams + search_params?: URLSearchParams, ): string => { if (!base.endsWith("/")) { base = base + "/"; @@ -74,7 +74,7 @@ export const createUrl = ( export function ensure( predicat: boolean, - message: string | (() => string) + message: string | (() => string), ): asserts predicat is true { if (!predicat) { throw Error(typeof message === "function" ? message() : message); @@ -83,7 +83,7 @@ export function ensure( export function ensureNonNullable( value: T, - message: string | (() => string) + message: string | (() => string), ): asserts value is NonNullable { if (value == null) { throw Error(typeof message === "function" ? message() : message); @@ -92,7 +92,7 @@ export function ensureNonNullable( export const collectFields = ( obj: Record, - fields: string[] + fields: string[], ) => { return fields.reduce((agg, f) => ({ ...agg, [f]: obj[f] }), {}); }; @@ -118,7 +118,7 @@ function isChildStage(parentId: string, stageId: string) { export function iterParentStages( stages: ComputeStage[], - cb: (stage: ComputeStage, children: ComputeStage[]) => void + cb: (stage: ComputeStage, children: ComputeStage[]) => void, ) { let cursor = 0; while (cursor < stages.length) { @@ -140,7 +140,7 @@ export const b64encode = (v: string): string => { }; export function nativeResult( - res: { Ok: R } | { Err: { message: string } } + res: { Ok: R } | { Err: { message: string } }, ): R { if ("Err" in res) { throw new Error(res.Err.message); @@ -163,7 +163,7 @@ export function closestWord( str: string, list: string[], ignoreCase = true, - maxDistance = 3 + maxDistance = 3, ) { if (list.length == 0) { return null; diff --git a/src/typegate/src/utils/hash.ts b/src/typegate/src/utils/hash.ts index 0cccff3499..ed451d0255 100644 --- a/src/typegate/src/utils/hash.ts +++ b/src/typegate/src/utils/hash.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // deno-lint-ignore no-external-import import type { Hash } from "node:crypto"; diff --git a/src/typegate/src/worker_utils.ts b/src/typegate/src/worker_utils.ts index 1eaa69d05e..f508c162fd 100644 --- a/src/typegate/src/worker_utils.ts +++ b/src/typegate/src/worker_utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // WARNING: Assume any content or state in this file will run inside a Web Worker @@ -7,7 +7,7 @@ import { TaskContext } from "./runtimes/deno/shared_types.ts"; export function make_internal( { meta: { url, token } }: TaskContext, - additionalHeaders: Record + additionalHeaders: Record, ) { const gql = (query: readonly string[], ...args: unknown[]) => { if (args.length > 0) { @@ -16,7 +16,7 @@ export function make_internal( // console.log(query); return { run: async ( - variables: Record + variables: Record, ): Promise> => { const res = await fetch(url, { method: "POST", diff --git a/src/typegate/standalone/src/config.rs b/src/typegate/standalone/src/config.rs index 305679d4ec..d8404042d9 100644 --- a/src/typegate/standalone/src/config.rs +++ b/src/typegate/standalone/src/config.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use envconfig::Envconfig; diff --git a/src/typegate/standalone/src/logger.rs b/src/typegate/standalone/src/logger.rs index 4e07a93b68..991efe4c6c 100644 --- a/src/typegate/standalone/src/logger.rs +++ b/src/typegate/standalone/src/logger.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 diff --git a/src/typegate/standalone/src/main.rs b/src/typegate/standalone/src/main.rs index bb51f0b4de..012dcb520c 100644 --- a/src/typegate/standalone/src/main.rs +++ b/src/typegate/standalone/src/main.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod config; mod logger; diff --git a/src/typegraph/deno/src/runtimes/python.ts b/src/typegraph/deno/src/runtimes/python.ts index 447c65d3cf..791a59306f 100644 --- a/src/typegraph/deno/src/runtimes/python.ts +++ b/src/typegraph/deno/src/runtimes/python.ts @@ -41,7 +41,7 @@ export class PythonRuntime extends Runtime { fromLambda< P extends Record = Record, I extends t.Struct

= t.Struct

, - O extends t.Typedef = t.Typedef + O extends t.Typedef = t.Typedef, >(inp: I, out: O, { code }: { code: string }): t.Func { const matId = runtimes.fromPythonLambda( { @@ -51,7 +51,7 @@ export class PythonRuntime extends Runtime { { fn: code, // not formatted runtime: this._id, - } + }, ); return t.func(inp, out, { @@ -64,7 +64,7 @@ export class PythonRuntime extends Runtime { fromDef< P extends Record = Record, I extends t.Struct

= t.Struct

, - O extends t.Typedef = t.Typedef + O extends t.Typedef = t.Typedef, >(inp: I, out: O, { code }: { code: string }): t.Func { const name = code.trim().match(/def\s+([A-Za-z0-9_]+)/)?.[1]; if (name == undefined) { @@ -79,7 +79,7 @@ export class PythonRuntime extends Runtime { name: name, fn: code, runtime: this._id, - } + }, ); return t.func(inp, out, { @@ -92,7 +92,7 @@ export class PythonRuntime extends Runtime { import( inp: I, out: O, - { name, module, deps = [], effect = fx.read(), secrets = [] }: PythonImport + { name, module, deps = [], effect = fx.read(), secrets = [] }: PythonImport, ): t.Func { const base = { runtime: this._id, diff --git a/src/typegraph/deno/src/runtimes/substantial.ts b/src/typegraph/deno/src/runtimes/substantial.ts index 4ad4145d6f..63687739c5 100644 --- a/src/typegraph/deno/src/runtimes/substantial.ts +++ b/src/typegraph/deno/src/runtimes/substantial.ts @@ -36,7 +36,7 @@ export class SubstantialRuntime extends Runtime { constructor( backend: SubstantialBackend, - fileDescriptions: Array + fileDescriptions: Array, ) { const id = runtimes.registerSubstantialRuntime({ backend, @@ -49,7 +49,7 @@ export class SubstantialRuntime extends Runtime { _genericSubstantialFunc( operation: SubstantialOperationType, funcArg?: Typedef, - funcOut?: Typedef + funcOut?: Typedef, ): Func { const data = { funcArg: funcArg?._id, @@ -65,7 +65,7 @@ export class SubstantialRuntime extends Runtime { { tag: "start", }, - kwargs + kwargs, ); } @@ -86,7 +86,7 @@ export class SubstantialRuntime extends Runtime { { tag: "send", }, - payload + payload, ); } @@ -108,7 +108,7 @@ export class SubstantialRuntime extends Runtime { tag: "results", }, undefined, - output + output, ); } @@ -141,7 +141,7 @@ export class WorkflowFile { private constructor( public readonly file: string, public readonly kind: WorkflowKind, - public deps: Array = [] + public deps: Array = [], ) {} static deno(file: string, deps: Array = []): WorkflowFile { diff --git a/src/typegraph/deno/src/tg_deploy.ts b/src/typegraph/deno/src/tg_deploy.ts index a748bd99d3..0443cae334 100644 --- a/src/typegraph/deno/src/tg_deploy.ts +++ b/src/typegraph/deno/src/tg_deploy.ts @@ -119,9 +119,9 @@ export async function tgDeploy( const addTypegraph = response.data.addTypegraph; - /* + /* // FIXME: failure field is used by interactive deployment - // which means errors need to be ignored here but this + // which means errors need to be ignored here but this // allows deployment errors in non-interactive scenarios if (addTypegraph.failure) { console.error(addTypegraph.failure); diff --git a/src/typegraph/deno/src/typegraph.ts b/src/typegraph/deno/src/typegraph.ts index efb015183a..1d7a4fd4e9 100644 --- a/src/typegraph/deno/src/typegraph.ts +++ b/src/typegraph/deno/src/typegraph.ts @@ -187,7 +187,6 @@ export async function typegraph( rate: rate ? { ...defaultRateFields, ...rate } : undefined, }; - core.initTypegraph({ name, dynamic, path, ...tgParams }); const g: TypegraphBuilderArgs = { diff --git a/src/typegraph/deno/src/utils/func_utils.ts b/src/typegraph/deno/src/utils/func_utils.ts index b227f4875a..bd02a69214 100644 --- a/src/typegraph/deno/src/utils/func_utils.ts +++ b/src/typegraph/deno/src/utils/func_utils.ts @@ -167,7 +167,10 @@ export async function execRequest( try { const response = await fetch(url, reqInit); if (!response.ok) { - log.error("error response json", await response.json().catch(_err => 'non json response')); + log.error( + "error response json", + await response.json().catch((_err) => "non json response"), + ); throw Error( `${errMsg}: request failed with status ${response.status} (${response.statusText})`, ); diff --git a/src/xtask/src/deno.rs b/src/xtask/src/deno.rs index c757a09264..2b94b6dbc0 100644 --- a/src/xtask/src/deno.rs +++ b/src/xtask/src/deno.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 use anyhow::Result; use clap::{Parser, Subcommand}; diff --git a/src/xtask/src/main.rs b/src/xtask/src/main.rs index 2c2081da0f..8c0d266ffa 100644 --- a/src/xtask/src/main.rs +++ b/src/xtask/src/main.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod deno; diff --git a/tests/artifacts/artifacts_test.ts b/tests/artifacts/artifacts_test.ts index cf88e10768..17fafc273b 100644 --- a/tests/artifacts/artifacts_test.ts +++ b/tests/artifacts/artifacts_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { join } from "@std/path/join"; diff --git a/tests/auth/auth_test.ts b/tests/auth/auth_test.ts index 830066e01f..1ee2f7502c 100644 --- a/tests/auth/auth_test.ts +++ b/tests/auth/auth_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals, assertStringIncludes } from "@std/assert"; import { execute, gql, Meta, sleep } from "../utils/mod.ts"; diff --git a/tests/auto/auto_test.ts_ b/tests/auto/auto_test.ts_ index 9f956d595b..ee91d22a1d 100644 --- a/tests/auto/auto_test.ts_ +++ b/tests/auto/auto_test.ts_ @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dirname, fromFileUrl, join } from "std/path/mod.ts"; import { Meta } from "../utils/mod.ts"; diff --git a/tests/auto/test/test.py b/tests/auto/test/test.py index bd655961c2..c71dccec53 100644 --- a/tests/auto/test/test.py +++ b/tests/auto/test/test.py @@ -1,4 +1,5 @@ -# Copyright Metatype under the Elastic License 2.0. +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import typegraph, Policy, t, Graph from typegraph.runtimes.deno import DenoRuntime diff --git a/tests/common_utils/proposition_test.ts b/tests/common_utils/proposition_test.ts index fa891fb704..0d67b0b5be 100644 --- a/tests/common_utils/proposition_test.ts +++ b/tests/common_utils/proposition_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals } from "@std/assert"; import { closestWord } from "@metatype/typegate/utils.ts"; diff --git a/tests/common_utils/url_test.ts b/tests/common_utils/url_test.ts index 85f8892759..b9917e9b3f 100644 --- a/tests/common_utils/url_test.ts +++ b/tests/common_utils/url_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals } from "@std/assert"; import { createUrl } from "@metatype/typegate/utils.ts"; diff --git a/tests/crypto/crypto_test.ts b/tests/crypto/crypto_test.ts index a77acc2472..fe794b1763 100644 --- a/tests/crypto/crypto_test.ts +++ b/tests/crypto/crypto_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { defaultTypegateConfigBase, diff --git a/tests/dedup/tg.ts b/tests/dedup/tg.ts index 19aaa2eec6..fcc495725c 100644 --- a/tests/dedup/tg.ts +++ b/tests/dedup/tg.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy.ts b/tests/docs/how-tos/prog_deploy/prog_deploy.ts index e19234d1e8..2f58409edf 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy.ts @@ -1,6 +1,6 @@ // skip:start -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // skip:end import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts index e9f11bdbee..b771a9fa29 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { MetaTest } from "../../../utils/test.ts"; diff --git a/tests/docs/how-tos/prog_deploy/prog_remove.ts b/tests/docs/how-tos/prog_deploy/prog_remove.ts index 7fdd936ae6..244aa5aa82 100644 --- a/tests/docs/how-tos/prog_deploy/prog_remove.ts +++ b/tests/docs/how-tos/prog_deploy/prog_remove.ts @@ -1,6 +1,6 @@ // skip:start -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // skip:end import { typegraph } from "@typegraph/sdk/index.ts"; diff --git a/tests/docs/how-tos/prog_deploy/scripts/say_hello.ts b/tests/docs/how-tos/prog_deploy/scripts/say_hello.ts index 620c7b8971..35e84061e2 100644 --- a/tests/docs/how-tos/prog_deploy/scripts/say_hello.ts +++ b/tests/docs/how-tos/prog_deploy/scripts/say_hello.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function sayHello() { return "Hell0"; diff --git a/tests/e2e/cli/deploy_test.ts b/tests/e2e/cli/deploy_test.ts index e45312c34a..18f783487e 100644 --- a/tests/e2e/cli/deploy_test.ts +++ b/tests/e2e/cli/deploy_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; import { TestModule } from "../../utils/test_module.ts"; diff --git a/tests/e2e/cli/dev_test.ts b/tests/e2e/cli/dev_test.ts index 1989b86399..245ae1838b 100644 --- a/tests/e2e/cli/dev_test.ts +++ b/tests/e2e/cli/dev_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta, sleep } from "test-utils/mod.ts"; import { join, resolve } from "@std/path"; diff --git a/tests/e2e/cli/typegraphs/deps.ts b/tests/e2e/cli/typegraphs/deps.ts index c1b11a0bb2..b5b9472d5c 100644 --- a/tests/e2e/cli/typegraphs/deps.ts +++ b/tests/e2e/cli/typegraphs/deps.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/e2e/cli/undeploy_test.ts b/tests/e2e/cli/undeploy_test.ts index 2a2494f2df..7fb63a9f66 100644 --- a/tests/e2e/cli/undeploy_test.ts +++ b/tests/e2e/cli/undeploy_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { TestModule } from "test-utils/test_module.ts"; diff --git a/tests/e2e/cli/watch_test.ts b/tests/e2e/cli/watch_test.ts index cad41cb819..e0c58c7b9d 100644 --- a/tests/e2e/cli/watch_test.ts +++ b/tests/e2e/cli/watch_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as path from "@std/path"; import { Meta } from "test-utils/mod.ts"; @@ -46,7 +46,7 @@ Meta.test({ name: "meta dev: watch artifacts" }, async (t) => { await t.should("deploy typegraph", async () => { await stderr.readWhile( - (line) => !line.includes("successfully deployed typegraph"), + (line) => !line.includes("successfully deployed typegraph") ); }); @@ -64,7 +64,7 @@ Meta.test({ name: "meta dev: watch artifacts" }, async (t) => { await t.should("re-deploy typegraph", async () => { await stderr.readWhile( - (line) => !line.includes("successfully deployed typegraph"), + (line) => !line.includes("successfully deployed typegraph") ); }); diff --git a/tests/e2e/nextjs/apollo/pages/api/apollo.ts b/tests/e2e/nextjs/apollo/pages/api/apollo.ts index 918934cbf1..098ffa0411 100644 --- a/tests/e2e/nextjs/apollo/pages/api/apollo.ts +++ b/tests/e2e/nextjs/apollo/pages/api/apollo.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { NextApiRequest, NextApiResponse } from "next"; import { ApolloClient, gql, InMemoryCache } from "@apollo/client/index"; diff --git a/tests/e2e/nextjs/apollo/tailwind.config.ts b/tests/e2e/nextjs/apollo/tailwind.config.ts index ee2151538d..e82281f92c 100644 --- a/tests/e2e/nextjs/apollo/tailwind.config.ts +++ b/tests/e2e/nextjs/apollo/tailwind.config.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { Config } from "tailwindcss"; diff --git a/tests/e2e/nextjs/apollo_test.ts b/tests/e2e/nextjs/apollo_test.ts index fd7437109f..4021afb168 100644 --- a/tests/e2e/nextjs/apollo_test.ts +++ b/tests/e2e/nextjs/apollo_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "../../utils/mod.ts"; import { diff --git a/tests/e2e/published/published_test.ts b/tests/e2e/published/published_test.ts index 338a70c0c4..e7f6092cb1 100644 --- a/tests/e2e/published/published_test.ts +++ b/tests/e2e/published/published_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { projectDir } from "@local/tools/utils.ts"; diff --git a/tests/e2e/self_deploy/scripts/main.ts b/tests/e2e/self_deploy/scripts/main.ts index fb47d1a825..c1a6b3126f 100644 --- a/tests/e2e/self_deploy/scripts/main.ts +++ b/tests/e2e/self_deploy/scripts/main.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function sayHello({ name }: any) { return `Hello ${name}`; diff --git a/tests/e2e/self_deploy/self_deploy.ts b/tests/e2e/self_deploy/self_deploy.ts index 72c085184c..c039be3c09 100644 --- a/tests/e2e/self_deploy/self_deploy.ts +++ b/tests/e2e/self_deploy/self_deploy.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/e2e/self_deploy/self_deploy_test.ts b/tests/e2e/self_deploy/self_deploy_test.ts index 933cee8668..2361ad0a32 100644 --- a/tests/e2e/self_deploy/self_deploy_test.ts +++ b/tests/e2e/self_deploy/self_deploy_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { BasicAuth, tgDeploy, tgRemove } from "@typegraph/sdk/tg_deploy.ts"; import { Meta } from "test-utils/mod.ts"; diff --git a/tests/e2e/templates/templates_test.ts b/tests/e2e/templates/templates_test.ts index b7f2760fa8..1de81e336a 100644 --- a/tests/e2e/templates/templates_test.ts +++ b/tests/e2e/templates/templates_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { newTempDir, workspaceDir } from "test-utils/dir.ts"; diff --git a/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap b/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap index 2f6d86db09..555023cea5 100644 --- a/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap +++ b/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap @@ -654,8 +654,8 @@ snapshot[`typegraphs creation 3`] = ` "artifacts": { "scripts/three.ts": { "path": "scripts/three.ts", - "hash": "564fe4792102c50aac9801faeb3c6402c49b1f7c7cbb22dc6d54886e45cfa3b2", - "size": 307 + "hash": "16352d61551cb6d6a8c54efb8179858a4aadb1110517a8dbbf9932a5d71bb51a", + "size": 318 } } } @@ -1317,8 +1317,8 @@ snapshot[`typegraphs creation 6`] = ` "artifacts": { "scripts/three.ts": { "path": "scripts/three.ts", - "hash": "564fe4792102c50aac9801faeb3c6402c49b1f7c7cbb22dc6d54886e45cfa3b2", - "size": 307 + "hash": "16352d61551cb6d6a8c54efb8179858a4aadb1110517a8dbbf9932a5d71bb51a", + "size": 318 } } } diff --git a/tests/e2e/typegraph/typegraph_test.ts b/tests/e2e/typegraph/typegraph_test.ts index 203cdce594..174b361f3e 100644 --- a/tests/e2e/typegraph/typegraph_test.ts +++ b/tests/e2e/typegraph/typegraph_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { expandGlob } from "@std/fs/expand-glob"; import { dirname, fromFileUrl } from "@std/path"; diff --git a/tests/e2e/typegraph/typegraphs/deno/complex.ts b/tests/e2e/typegraph/typegraphs/deno/complex.ts index b72fefd211..12cb5c0ced 100644 --- a/tests/e2e/typegraph/typegraphs/deno/complex.ts +++ b/tests/e2e/typegraph/typegraphs/deno/complex.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts b/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts index 965492d8f8..656c075689 100644 --- a/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts +++ b/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/e2e/typegraph/typegraphs/deno/scripts/three.ts b/tests/e2e/typegraph/typegraphs/deno/scripts/three.ts index c47af049a1..9f1c8a9005 100644 --- a/tests/e2e/typegraph/typegraphs/deno/scripts/three.ts +++ b/tests/e2e/typegraph/typegraphs/deno/scripts/three.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 interface ThreeInput { b: number; diff --git a/tests/e2e/typegraph/typegraphs/deno/simple.ts b/tests/e2e/typegraph/typegraphs/deno/simple.ts index 866c26a154..6f86e40797 100644 --- a/tests/e2e/typegraph/typegraphs/deno/simple.ts +++ b/tests/e2e/typegraph/typegraphs/deno/simple.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/e2e/typegraph/typegraphs/python/scripts/three.ts b/tests/e2e/typegraph/typegraphs/python/scripts/three.ts index c47af049a1..9f1c8a9005 100644 --- a/tests/e2e/typegraph/typegraphs/python/scripts/three.ts +++ b/tests/e2e/typegraph/typegraphs/python/scripts/three.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 interface ThreeInput { b: number; diff --git a/tests/e2e/typegraph/validator_test.ts b/tests/e2e/typegraph/validator_test.ts index b86a816488..6ddf7e2428 100644 --- a/tests/e2e/typegraph/validator_test.ts +++ b/tests/e2e/typegraph/validator_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { TestModule } from "test-utils/test_module.ts"; import { Meta } from "test-utils/mod.ts"; diff --git a/tests/e2e/website/website_test.ts b/tests/e2e/website/website_test.ts index 665fdf0f0c..fedb6c0b12 100644 --- a/tests/e2e/website/website_test.ts +++ b/tests/e2e/website/website_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { expandGlob } from "@std/fs/expand-glob"; import { basename, dirname, fromFileUrl, join } from "@std/path"; diff --git a/tests/graphql/graphql_test.ts b/tests/graphql/graphql_test.ts index 67d6583b25..efc9b90663 100644 --- a/tests/graphql/graphql_test.ts +++ b/tests/graphql/graphql_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/graphql/request_parser_test.ts b/tests/graphql/request_parser_test.ts index eff6a8c7f0..997312038b 100644 --- a/tests/graphql/request_parser_test.ts +++ b/tests/graphql/request_parser_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { FormDataParser } from "@metatype/typegate/transports/graphql/request_parser.ts"; import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/http_utils/http_utils_test.ts b/tests/http_utils/http_utils_test.ts index 8c157d8286..2bd76dab7f 100644 --- a/tests/http_utils/http_utils_test.ts +++ b/tests/http_utils/http_utils_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals } from "@std/assert"; import { replaceDynamicPathParams } from "@metatype/typegate/runtimes/utils/http.ts"; diff --git a/tests/importers/importers_test.ts.disabled b/tests/importers/importers_test.ts.disabled index ccac4cdf81..ee87b91ab5 100644 --- a/tests/importers/importers_test.ts.disabled +++ b/tests/importers/importers_test.ts.disabled @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { copyFile, gql, Meta } from "../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/injection/injection.ts b/tests/injection/injection.ts index 42cabf36e0..fc8bceebc9 100644 --- a/tests/injection/injection.ts +++ b/tests/injection/injection.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { CREATE, DELETE, READ, UPDATE } from "@typegraph/sdk/effects.ts"; diff --git a/tests/injection/injection_test.ts b/tests/injection/injection_test.ts index 8831ebad1f..9612b7222d 100644 --- a/tests/injection/injection_test.ts +++ b/tests/injection/injection_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import { assertRejects } from "@std/assert"; diff --git a/tests/injection/random_injection.ts b/tests/injection/random_injection.ts index dec1a051e0..2033b1eb81 100644 --- a/tests/injection/random_injection.ts +++ b/tests/injection/random_injection.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/injection/random_injection_test.ts b/tests/injection/random_injection_test.ts index 285ae8ff93..93061d16c4 100644 --- a/tests/injection/random_injection_test.ts +++ b/tests/injection/random_injection_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/internal/internal_test.ts b/tests/internal/internal_test.ts index 73643c224b..63aedcacce 100644 --- a/tests/internal/internal_test.ts +++ b/tests/internal/internal_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import { join } from "@std/path/join"; diff --git a/tests/internal/py/logic.py b/tests/internal/py/logic.py index c8ea39393c..f5d37da715 100644 --- a/tests/internal/py/logic.py +++ b/tests/internal/py/logic.py @@ -1,5 +1,5 @@ -# Copyright Metatype OÜ, licensed under the Elastic License 2.0. -# SPDX-License-Identifier: Elastic-2.0 +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from .logic_types import Ctx import json diff --git a/tests/internal/ts/logic.ts b/tests/internal/ts/logic.ts index 607b1e6b27..541b7e2333 100644 --- a/tests/internal/ts/logic.ts +++ b/tests/internal/ts/logic.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export const remoteSum = async ( { first, second }: any, diff --git a/tests/introspection/introspection_test.ts b/tests/introspection/introspection_test.ts index 2bb2212c87..5a7f8cea88 100644 --- a/tests/introspection/introspection_test.ts +++ b/tests/introspection/introspection_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/introspection/union_either_test.ts b/tests/introspection/union_either_test.ts index b1381ec320..38f0150257 100644 --- a/tests/introspection/union_either_test.ts +++ b/tests/introspection/union_either_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/metagen/metagen_test.ts b/tests/metagen/metagen_test.ts index 12ad310f80..59f16ed76e 100644 --- a/tests/metagen/metagen_test.ts +++ b/tests/metagen/metagen_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { join } from "@std/path/join"; diff --git a/tests/metagen/typegraphs/identities/rs/lib.rs b/tests/metagen/typegraphs/identities/rs/lib.rs index 0214d4a872..ac085da35b 100644 --- a/tests/metagen/typegraphs/identities/rs/lib.rs +++ b/tests/metagen/typegraphs/identities/rs/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod fdk; pub use fdk::*; diff --git a/tests/metagen/typegraphs/identities/ts/handlers.ts b/tests/metagen/typegraphs/identities/ts/handlers.ts index 3f9fad44c9..34e9c92c19 100644 --- a/tests/metagen/typegraphs/identities/ts/handlers.ts +++ b/tests/metagen/typegraphs/identities/ts/handlers.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { Composites, diff --git a/tests/metagen/typegraphs/metagen.ts b/tests/metagen/typegraphs/metagen.ts index 6f2b34d66a..82f82958b2 100644 --- a/tests/metagen/typegraphs/metagen.ts +++ b/tests/metagen/typegraphs/metagen.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; diff --git a/tests/metagen/typegraphs/sample.ts b/tests/metagen/typegraphs/sample.ts index 1ab9422a47..2699b7373f 100644 --- a/tests/metagen/typegraphs/sample.ts +++ b/tests/metagen/typegraphs/sample.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/metagen/typegraphs/sample/ts/main.ts b/tests/metagen/typegraphs/sample/ts/main.ts index 987577de1d..6416ac3ccf 100644 --- a/tests/metagen/typegraphs/sample/ts/main.ts +++ b/tests/metagen/typegraphs/sample/ts/main.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { alias, PreparedArgs, QueryGraph } from "./client.ts"; diff --git a/tests/misc/publish_test.ts b/tests/misc/publish_test.ts index c9aaf38b70..be4f50d7ce 100644 --- a/tests/misc/publish_test.ts +++ b/tests/misc/publish_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assert } from "@std/assert/assert"; import { exists } from "@std/fs/exists"; import { Meta } from "test-utils/mod.ts"; diff --git a/tests/misc/typegate_config_test.ts.disabled b/tests/misc/typegate_config_test.ts.disabled index 9ad04c7967..c9e02cfd6a 100644 --- a/tests/misc/typegate_config_test.ts.disabled +++ b/tests/misc/typegate_config_test.ts.disabled @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { assert } from "std/assert/mod.ts"; diff --git a/tests/multi_typegraph/multi_typegraph.ts b/tests/multi_typegraph/multi_typegraph.ts index 34957744b0..214030deaf 100644 --- a/tests/multi_typegraph/multi_typegraph.ts +++ b/tests/multi_typegraph/multi_typegraph.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; diff --git a/tests/multi_typegraph/multi_typegraph_test.ts b/tests/multi_typegraph/multi_typegraph_test.ts index 485dd4ef24..58d76bfa30 100644 --- a/tests/multi_typegraph/multi_typegraph_test.ts +++ b/tests/multi_typegraph/multi_typegraph_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/nesting/nesting_test.ts b/tests/nesting/nesting_test.ts index cc387f9a17..d71c0c5b23 100644 --- a/tests/nesting/nesting_test.ts +++ b/tests/nesting/nesting_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/params/apply_test.ts b/tests/params/apply_test.ts index 78e41f716f..5839ec91a9 100644 --- a/tests/params/apply_test.ts +++ b/tests/params/apply_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/planner/default_args_test.ts b/tests/planner/default_args_test.ts index 4a0bb847e6..6df4c5bfe6 100644 --- a/tests/planner/default_args_test.ts +++ b/tests/planner/default_args_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "test-utils/migrations.ts"; import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/planner/planner_test.ts b/tests/planner/planner_test.ts index d6e37985f4..c0797c6a32 100644 --- a/tests/planner/planner_test.ts +++ b/tests/planner/planner_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import { mapValues } from "@std/collections/map-values"; diff --git a/tests/policies/policies_jwt_test.ts b/tests/policies/policies_jwt_test.ts index 35b9802505..12f9b88cce 100644 --- a/tests/policies/policies_jwt_test.ts +++ b/tests/policies/policies_jwt_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; import * as jwt from "jwt"; diff --git a/tests/policies/policies_test.ts b/tests/policies/policies_test.ts index a2c40bfe15..988734b6a5 100644 --- a/tests/policies/policies_test.ts +++ b/tests/policies/policies_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { TypegateConfig } from "@metatype/typegate/config.ts"; import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/policies/ts/effects.ts b/tests/policies/ts/effects.ts index 96dfdacdb7..5e4ba665fd 100644 --- a/tests/policies/ts/effects.ts +++ b/tests/policies/ts/effects.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function currentUserOnly( args: Record>, diff --git a/tests/policies/ts/policies.ts b/tests/policies/ts/policies.ts index 97d71ea27c..f6ed021293 100644 --- a/tests/policies/ts/policies.ts +++ b/tests/policies/ts/policies.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 interface ReadSecretInput { username: string; diff --git a/tests/prisma_migrate/prisma_migrate_test.ts b/tests/prisma_migrate/prisma_migrate_test.ts index 6f899508ca..b145bb8738 100644 --- a/tests/prisma_migrate/prisma_migrate_test.ts +++ b/tests/prisma_migrate/prisma_migrate_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assert, diff --git a/tests/query_parsers/query_parsers_test.ts b/tests/query_parsers/query_parsers_test.ts index 1430f4ca2d..5198892175 100644 --- a/tests/query_parsers/query_parsers_test.ts +++ b/tests/query_parsers/query_parsers_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/rate_limiter/rate_limiter_test.ts b/tests/rate_limiter/rate_limiter_test.ts index dc5e6c8aee..8186954b7a 100644 --- a/tests/rate_limiter/rate_limiter_test.ts +++ b/tests/rate_limiter/rate_limiter_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { decrPosCmd, diff --git a/tests/regression/invalid_ref_error_message/invalid_ref_test.ts b/tests/regression/invalid_ref_error_message/invalid_ref_test.ts index f9633fb9c6..035a82cb59 100644 --- a/tests/regression/invalid_ref_error_message/invalid_ref_test.ts +++ b/tests/regression/invalid_ref_error_message/invalid_ref_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { assertRejects } from "@std/assert"; diff --git a/tests/rest/custom/custom_loader.ts b/tests/rest/custom/custom_loader.ts index 3db39d6999..9443d773cb 100644 --- a/tests/rest/custom/custom_loader.ts +++ b/tests/rest/custom/custom_loader.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dirname } from "@std/path/dirname"; import { resolve } from "@std/path/resolve"; diff --git a/tests/rest/rest_custom_loader.ts b/tests/rest/rest_custom_loader.ts index c4c10ed890..cd99d8628c 100644 --- a/tests/rest/rest_custom_loader.ts +++ b/tests/rest/rest_custom_loader.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/rest/rest_schema.ts b/tests/rest/rest_schema.ts index 5f3cca2843..81b6029431 100644 --- a/tests/rest/rest_schema.ts +++ b/tests/rest/rest_schema.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/rest/rest_test.ts b/tests/rest/rest_test.ts index 41a2e3e954..4e2a86a8d5 100644 --- a/tests/rest/rest_test.ts +++ b/tests/rest/rest_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals, assertStringIncludes } from "@std/assert"; import { gql, Meta, rest } from "../utils/mod.ts"; diff --git a/tests/runtimes/deno/deno_dep.ts b/tests/runtimes/deno/deno_dep.ts index a0f2be5763..b7e87da08c 100644 --- a/tests/runtimes/deno/deno_dep.ts +++ b/tests/runtimes/deno/deno_dep.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/runtimes/deno/deno_dir.ts b/tests/runtimes/deno/deno_dir.ts index 635090512c..11b352ebbd 100644 --- a/tests/runtimes/deno/deno_dir.ts +++ b/tests/runtimes/deno/deno_dir.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/runtimes/deno/deno_dir_test.ts b/tests/runtimes/deno/deno_dir_test.ts index 9139ee1a8d..04cea044c5 100644 --- a/tests/runtimes/deno/deno_dir_test.ts +++ b/tests/runtimes/deno/deno_dir_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/deno/deno_duplicate_artifact.ts b/tests/runtimes/deno/deno_duplicate_artifact.ts index 5705581152..077cef9327 100644 --- a/tests/runtimes/deno/deno_duplicate_artifact.ts +++ b/tests/runtimes/deno/deno_duplicate_artifact.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/runtimes/deno/deno_glob_test.ts b/tests/runtimes/deno/deno_glob_test.ts index ce5783aebe..6745dd7a37 100644 --- a/tests/runtimes/deno/deno_glob_test.ts +++ b/tests/runtimes/deno/deno_glob_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/deno/deno_globs.ts b/tests/runtimes/deno/deno_globs.ts index f95f7c7847..a4f2b6d1ee 100644 --- a/tests/runtimes/deno/deno_globs.ts +++ b/tests/runtimes/deno/deno_globs.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/runtimes/deno/deno_sync_test.ts b/tests/runtimes/deno/deno_sync_test.ts index a9e2477833..00278d92fc 100644 --- a/tests/runtimes/deno/deno_sync_test.ts +++ b/tests/runtimes/deno/deno_sync_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta, sleep } from "../../utils/mod.ts"; import * as path from "@std/path"; diff --git a/tests/runtimes/deno/deno_test.ts b/tests/runtimes/deno/deno_test.ts index 3e7498623d..cf18f285d7 100644 --- a/tests/runtimes/deno/deno_test.ts +++ b/tests/runtimes/deno/deno_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta, sleep } from "../../utils/mod.ts"; import * as path from "@std/path"; diff --git a/tests/runtimes/deno/deno_typescript.ts b/tests/runtimes/deno/deno_typescript.ts index f89bfdd1da..f6ef827028 100644 --- a/tests/runtimes/deno/deno_typescript.ts +++ b/tests/runtimes/deno/deno_typescript.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/runtimes/deno/dynamic/1.ts b/tests/runtimes/deno/dynamic/1.ts index f48fff673e..6bc53565e1 100644 --- a/tests/runtimes/deno/dynamic/1.ts +++ b/tests/runtimes/deno/dynamic/1.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function fire() { return 1; diff --git a/tests/runtimes/deno/dynamic/2.ts b/tests/runtimes/deno/dynamic/2.ts index 2504caf7f9..b733db6994 100644 --- a/tests/runtimes/deno/dynamic/2.ts +++ b/tests/runtimes/deno/dynamic/2.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function fire() { return 2; diff --git a/tests/runtimes/deno/reload/template.ts b/tests/runtimes/deno/reload/template.ts index 59f158c270..ac626f8a1d 100644 --- a/tests/runtimes/deno/reload/template.ts +++ b/tests/runtimes/deno/reload/template.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function fire() { return "REWRITE_ME"; diff --git a/tests/runtimes/deno/ts/deno.ts b/tests/runtimes/deno/ts/deno.ts index d35ef40976..5da50ea679 100644 --- a/tests/runtimes/deno/ts/deno.ts +++ b/tests/runtimes/deno/ts/deno.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 let count = 0; diff --git a/tests/runtimes/deno/ts/dep/main.ts b/tests/runtimes/deno/ts/dep/main.ts index e7dd4ccde1..ca26d7b12e 100644 --- a/tests/runtimes/deno/ts/dep/main.ts +++ b/tests/runtimes/deno/ts/dep/main.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { add } from "./nested/dep.ts"; diff --git a/tests/runtimes/deno/ts/dep/nested/dep.ts b/tests/runtimes/deno/ts/dep/nested/dep.ts index 14d1e32252..ce1ce3940c 100644 --- a/tests/runtimes/deno/ts/dep/nested/dep.ts +++ b/tests/runtimes/deno/ts/dep/nested/dep.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function add(a: number, b: number) { return a + b; diff --git a/tests/runtimes/deno/ts/math-npm.ts b/tests/runtimes/deno/ts/math-npm.ts index d1fc05e5e5..9c423f3f86 100644 --- a/tests/runtimes/deno/ts/math-npm.ts +++ b/tests/runtimes/deno/ts/math-npm.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // deno-lint-ignore no-external-import import * as MathJS from "npm:mathjs@11.11.1"; diff --git a/tests/runtimes/deno/ts/math.ts b/tests/runtimes/deno/ts/math.ts index 10871f4243..61ff5ef0f6 100644 --- a/tests/runtimes/deno/ts/math.ts +++ b/tests/runtimes/deno/ts/math.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // deno-lint-ignore no-external-import import * as MathLib from "https://deno.land/x/math@v1.1.0/mod.ts"; diff --git a/tests/runtimes/graphql/graphql_test.ts b/tests/runtimes/graphql/graphql_test.ts index 42fa61f826..81ce8c353f 100644 --- a/tests/runtimes/graphql/graphql_test.ts +++ b/tests/runtimes/graphql/graphql_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { removeMigrations } from "../../utils/migrations.ts"; diff --git a/tests/runtimes/graphql/typegraphs/deno/graphql.ts b/tests/runtimes/graphql/typegraphs/deno/graphql.ts index 3a71eb3537..a084eea1c3 100644 --- a/tests/runtimes/graphql/typegraphs/deno/graphql.ts +++ b/tests/runtimes/graphql/typegraphs/deno/graphql.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.ts"; diff --git a/tests/runtimes/grpc/geography.py b/tests/runtimes/grpc/geography.py index b5d6432bec..b6aa3fcc0d 100644 --- a/tests/runtimes/grpc/geography.py +++ b/tests/runtimes/grpc/geography.py @@ -1,5 +1,5 @@ -# Copyright Metatype OÜ, licensed under the Elastic License 2.0. -# SPDX-License-Identifier: Elastic-2.0 +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, Policy, typegraph from typegraph.runtimes.grpc import GrpcRuntime diff --git a/tests/runtimes/grpc/grpc_test.ts b/tests/runtimes/grpc/grpc_test.ts index a58c14e5df..c44c4a030b 100644 --- a/tests/runtimes/grpc/grpc_test.ts +++ b/tests/runtimes/grpc/grpc_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { MetaTest } from "../../utils/test.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/grpc/helloworld.py b/tests/runtimes/grpc/helloworld.py index 6888a2c1c1..d6fc480ab4 100644 --- a/tests/runtimes/grpc/helloworld.py +++ b/tests/runtimes/grpc/helloworld.py @@ -1,5 +1,5 @@ -# Copyright Metatype OÜ, licensed under the Elastic License 2.0. -# SPDX-License-Identifier: Elastic-2.0 +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, Policy, typegraph from typegraph.runtimes.grpc import GrpcRuntime diff --git a/tests/runtimes/grpc/helloworld.ts b/tests/runtimes/grpc/helloworld.ts index 58f2ccd6d1..4766b9f184 100644 --- a/tests/runtimes/grpc/helloworld.ts +++ b/tests/runtimes/grpc/helloworld.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, typegraph } from "@typegraph/sdk/index.ts"; import { GrpcRuntime } from "@typegraph/sdk/runtimes/grpc.ts"; diff --git a/tests/runtimes/grpc/maths.py b/tests/runtimes/grpc/maths.py index 216f185de0..d2e6a4ec53 100644 --- a/tests/runtimes/grpc/maths.py +++ b/tests/runtimes/grpc/maths.py @@ -1,5 +1,5 @@ -# Copyright Metatype OÜ, licensed under the Elastic License 2.0. -# SPDX-License-Identifier: Elastic-2.0 +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, Policy, typegraph from typegraph.runtimes.grpc import GrpcRuntime diff --git a/tests/runtimes/http/http_content_type_test.ts b/tests/runtimes/http/http_content_type_test.ts index 70dd0b5c77..0379013783 100644 --- a/tests/runtimes/http/http_content_type_test.ts +++ b/tests/runtimes/http/http_content_type_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/runtimes/http/http_test.ts b/tests/runtimes/http/http_test.ts index b0b0ef2c23..8d6505e7ce 100644 --- a/tests/runtimes/http/http_test.ts +++ b/tests/runtimes/http/http_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; import * as mf from "test/mock_fetch"; diff --git a/tests/runtimes/kv/kv.py b/tests/runtimes/kv/kv.py index b93a71ee08..45510c9991 100644 --- a/tests/runtimes/kv/kv.py +++ b/tests/runtimes/kv/kv.py @@ -1,5 +1,5 @@ -# Copyright Metatype OÜ, licensed under the Elastic License 2.0. -# SPDX-License-Identifier: Elastic-2.0 +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import Graph, Policy, typegraph from typegraph.runtimes.kv import KvRuntime diff --git a/tests/runtimes/kv/kv.ts b/tests/runtimes/kv/kv.ts index 5425c363a2..c238cfd098 100644 --- a/tests/runtimes/kv/kv.ts +++ b/tests/runtimes/kv/kv.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, typegraph } from "@typegraph/sdk/index.ts"; import { KvRuntime } from "@typegraph/sdk/runtimes/kv.ts"; diff --git a/tests/runtimes/kv/kv_test.ts b/tests/runtimes/kv/kv_test.ts index 3a1f9b2508..1bf6132a6d 100644 --- a/tests/runtimes/kv/kv_test.ts +++ b/tests/runtimes/kv/kv_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { MetaTest } from "../../utils/test.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/full_prisma_mapping_test.ts b/tests/runtimes/prisma/full_prisma_mapping_test.ts index 1cbc92e6f5..0fbda9e3bd 100644 --- a/tests/runtimes/prisma/full_prisma_mapping_test.ts +++ b/tests/runtimes/prisma/full_prisma_mapping_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/graphql_variables_test.ts b/tests/runtimes/prisma/graphql_variables_test.ts index 47a3d20cb0..8036ce1694 100644 --- a/tests/runtimes/prisma/graphql_variables_test.ts +++ b/tests/runtimes/prisma/graphql_variables_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { v4 } from "@std/uuid"; import { assert } from "@std/assert"; diff --git a/tests/runtimes/prisma/mixed_runtime_test.ts b/tests/runtimes/prisma/mixed_runtime_test.ts index 8c1607dd45..6640f09d4b 100644 --- a/tests/runtimes/prisma/mixed_runtime_test.ts +++ b/tests/runtimes/prisma/mixed_runtime_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/multi_relations_test.ts b/tests/runtimes/prisma/multi_relations_test.ts index 17a8037ede..542adfb3ca 100644 --- a/tests/runtimes/prisma/multi_relations_test.ts +++ b/tests/runtimes/prisma/multi_relations_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/multiple_runtimes_test.ts b/tests/runtimes/prisma/multiple_runtimes_test.ts index a4f1edc916..1bb3d8676a 100644 --- a/tests/runtimes/prisma/multiple_runtimes_test.ts +++ b/tests/runtimes/prisma/multiple_runtimes_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/normal_1_1.ts b/tests/runtimes/prisma/normal_1_1.ts index a0524fda84..74cee34d56 100644 --- a/tests/runtimes/prisma/normal_1_1.ts +++ b/tests/runtimes/prisma/normal_1_1.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; diff --git a/tests/runtimes/prisma/one_to_many_test.ts b/tests/runtimes/prisma/one_to_many_test.ts index 8bb9457063..2e850243dc 100644 --- a/tests/runtimes/prisma/one_to_many_test.ts +++ b/tests/runtimes/prisma/one_to_many_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { randomPGConnStr } from "../../utils/database.ts"; import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; diff --git a/tests/runtimes/prisma/one_to_one_test.ts b/tests/runtimes/prisma/one_to_one_test.ts index d919d6f032..24eac6f4cf 100644 --- a/tests/runtimes/prisma/one_to_one_test.ts +++ b/tests/runtimes/prisma/one_to_one_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { randomPGConnStr } from "../../utils/database.ts"; diff --git a/tests/runtimes/prisma/optional_1_n.ts b/tests/runtimes/prisma/optional_1_n.ts index c03321e5d1..e0fbdd0021 100644 --- a/tests/runtimes/prisma/optional_1_n.ts +++ b/tests/runtimes/prisma/optional_1_n.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; diff --git a/tests/runtimes/prisma/prisma_edgecases_test.ts b/tests/runtimes/prisma/prisma_edgecases_test.ts index d021316c9e..97bb0e75c1 100644 --- a/tests/runtimes/prisma/prisma_edgecases_test.ts +++ b/tests/runtimes/prisma/prisma_edgecases_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/prisma/prisma_test.ts b/tests/runtimes/prisma/prisma_test.ts index bf2e3b5b49..e774abb407 100644 --- a/tests/runtimes/prisma/prisma_test.ts +++ b/tests/runtimes/prisma/prisma_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { v4 } from "@std/uuid"; import { assert } from "@std/assert"; diff --git a/tests/runtimes/prisma/query_builder_test.ts b/tests/runtimes/prisma/query_builder_test.ts index 52c5115240..3f1b4dd971 100644 --- a/tests/runtimes/prisma/query_builder_test.ts +++ b/tests/runtimes/prisma/query_builder_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals } from "@std/assert"; import { PrismaRuntime } from "@metatype/typegate/runtimes/prisma/prisma.ts"; diff --git a/tests/runtimes/prisma/schema_generation_test.ts b/tests/runtimes/prisma/schema_generation_test.ts index dabbe3ea6e..44e8b3267b 100644 --- a/tests/runtimes/prisma/schema_generation_test.ts +++ b/tests/runtimes/prisma/schema_generation_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "../../utils/mod.ts"; import { serialize } from "../../utils/meta.ts"; diff --git a/tests/runtimes/python/python.ts b/tests/runtimes/python/python.ts index 807352bf34..f1f10930fc 100644 --- a/tests/runtimes/python/python.ts +++ b/tests/runtimes/python/python.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; diff --git a/tests/runtimes/python/python_dir.ts b/tests/runtimes/python/python_dir.ts index d3780fc927..81bde6d6ee 100644 --- a/tests/runtimes/python/python_dir.ts +++ b/tests/runtimes/python/python_dir.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; diff --git a/tests/runtimes/python/python_dir_test.ts b/tests/runtimes/python/python_dir_test.ts index 395c3a64e1..1303573e3e 100644 --- a/tests/runtimes/python/python_dir_test.ts +++ b/tests/runtimes/python/python_dir_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/python/python_duplicate_artifact.ts b/tests/runtimes/python/python_duplicate_artifact.ts index 2176fffa22..0e3c25a3de 100644 --- a/tests/runtimes/python/python_duplicate_artifact.ts +++ b/tests/runtimes/python/python_duplicate_artifact.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; diff --git a/tests/runtimes/python/python_glob_test.ts b/tests/runtimes/python/python_glob_test.ts index ebcf91f0dc..883bb61677 100644 --- a/tests/runtimes/python/python_glob_test.ts +++ b/tests/runtimes/python/python_glob_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/python/python_globs.ts b/tests/runtimes/python/python_globs.ts index c643e72ad3..a75d3c09cf 100644 --- a/tests/runtimes/python/python_globs.ts +++ b/tests/runtimes/python/python_globs.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; diff --git a/tests/runtimes/python/python_no_artifact.ts b/tests/runtimes/python/python_no_artifact.ts index dd67a90deb..42498207c3 100644 --- a/tests/runtimes/python/python_no_artifact.ts +++ b/tests/runtimes/python/python_no_artifact.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; diff --git a/tests/runtimes/python/python_sync_test.ts b/tests/runtimes/python/python_sync_test.ts index 0ad6a0c522..159d7c89c4 100644 --- a/tests/runtimes/python/python_sync_test.ts +++ b/tests/runtimes/python/python_sync_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta, sleep } from "../../utils/mod.ts"; import { connect } from "redis"; diff --git a/tests/runtimes/python/python_test.ts b/tests/runtimes/python/python_test.ts index 0e2bdf8c5f..93b378dd62 100644 --- a/tests/runtimes/python/python_test.ts +++ b/tests/runtimes/python/python_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assert, assertEquals } from "@std/assert"; import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/runtimes/random/random.ts b/tests/runtimes/random/random.ts index 15be0e5000..1e8be8c5ff 100644 --- a/tests/runtimes/random/random.ts +++ b/tests/runtimes/random/random.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; diff --git a/tests/runtimes/random/random_test.ts b/tests/runtimes/random/random_test.ts index 4975ca6e0e..b932a2839e 100644 --- a/tests/runtimes/random/random_test.ts +++ b/tests/runtimes/random/random_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/runtimes/s3/s3.ts b/tests/runtimes/s3/s3.ts index 4349502c54..25100ffc32 100644 --- a/tests/runtimes/s3/s3.ts +++ b/tests/runtimes/s3/s3.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { S3Runtime } from "@typegraph/sdk/providers/aws.ts"; diff --git a/tests/runtimes/s3/s3_test.ts b/tests/runtimes/s3/s3_test.ts index 715fa45cdf..77089c9e22 100644 --- a/tests/runtimes/s3/s3_test.ts +++ b/tests/runtimes/s3/s3_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertEquals, assertExists } from "@std/assert"; import { execute, gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/substantial/kv_like_test.ts b/tests/runtimes/substantial/kv_like_test.ts index 33e66b7774..efc3606dc6 100644 --- a/tests/runtimes/substantial/kv_like_test.ts +++ b/tests/runtimes/substantial/kv_like_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { basicTestTemplate, diff --git a/tests/runtimes/substantial/redis_test.ts b/tests/runtimes/substantial/redis_test.ts index 1732898635..daaccc953c 100644 --- a/tests/runtimes/substantial/redis_test.ts +++ b/tests/runtimes/substantial/redis_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { basicTestTemplate, diff --git a/tests/runtimes/temporal/temporal.ts b/tests/runtimes/temporal/temporal.ts index ed9a5b15f8..abc7d7b3b5 100644 --- a/tests/runtimes/temporal/temporal.ts +++ b/tests/runtimes/temporal/temporal.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.ts"; diff --git a/tests/runtimes/temporal/temporal_test.ts b/tests/runtimes/temporal/temporal_test.ts index 1f1937d72f..548f0a945c 100644 --- a/tests/runtimes/temporal/temporal_test.ts +++ b/tests/runtimes/temporal/temporal_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assertExists } from "@std/assert"; import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/runtimes/temporal/worker/activities.ts b/tests/runtimes/temporal/worker/activities.ts index aa73554274..55279b5518 100644 --- a/tests/runtimes/temporal/worker/activities.ts +++ b/tests/runtimes/temporal/worker/activities.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export function greet(name: string): Promise { return Promise.resolve(`Hello, ${name}!`); diff --git a/tests/runtimes/temporal/worker/worker.ts b/tests/runtimes/temporal/worker/worker.ts index e00a856049..122bea637a 100644 --- a/tests/runtimes/temporal/worker/worker.ts +++ b/tests/runtimes/temporal/worker/worker.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { NativeConnection, Worker } from "@temporalio/worker"; import * as activities from "./activities.js"; diff --git a/tests/runtimes/temporal/worker/workflows.ts b/tests/runtimes/temporal/worker/workflows.ts index cae07d2d8e..d7a45d3c9c 100644 --- a/tests/runtimes/temporal/worker/workflows.ts +++ b/tests/runtimes/temporal/worker/workflows.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import * as workflow from "@temporalio/workflow"; diff --git a/tests/runtimes/typegate/typegate_prisma_test.ts b/tests/runtimes/typegate/typegate_prisma_test.ts index bd85fff456..9f15a224d6 100644 --- a/tests/runtimes/typegate/typegate_prisma_test.ts +++ b/tests/runtimes/typegate/typegate_prisma_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/typegate/typegate_runtime_test.ts b/tests/runtimes/typegate/typegate_runtime_test.ts index 951661bfae..b6af04bf29 100644 --- a/tests/runtimes/typegate/typegate_runtime_test.ts +++ b/tests/runtimes/typegate/typegate_runtime_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dropSchemas, recreateMigrations } from "../../utils/migrations.ts"; import { gql, Meta } from "../../utils/mod.ts"; diff --git a/tests/runtimes/wasm_reflected/rust/src/lib.rs b/tests/runtimes/wasm_reflected/rust/src/lib.rs index 062dbe9f29..cd55df4bda 100644 --- a/tests/runtimes/wasm_reflected/rust/src/lib.rs +++ b/tests/runtimes/wasm_reflected/rust/src/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 wit_bindgen::generate!({ world: "host" }); diff --git a/tests/runtimes/wasm_reflected/wasm_reflected.ts b/tests/runtimes/wasm_reflected/wasm_reflected.ts index 3666bb28fa..a27601fbe8 100644 --- a/tests/runtimes/wasm_reflected/wasm_reflected.ts +++ b/tests/runtimes/wasm_reflected/wasm_reflected.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; diff --git a/tests/runtimes/wasm_reflected/wasm_reflected_test.ts b/tests/runtimes/wasm_reflected/wasm_reflected_test.ts index 5e4f979c5e..d7b65cedaf 100644 --- a/tests/runtimes/wasm_reflected/wasm_reflected_test.ts +++ b/tests/runtimes/wasm_reflected/wasm_reflected_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; diff --git a/tests/runtimes/wasm_reflected/wasm_sync_test.ts b/tests/runtimes/wasm_reflected/wasm_sync_test.ts index 4e317dea61..d2a72381e3 100644 --- a/tests/runtimes/wasm_reflected/wasm_sync_test.ts +++ b/tests/runtimes/wasm_reflected/wasm_sync_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; import { connect } from "redis"; diff --git a/tests/runtimes/wasm_wire/rust/lib.rs b/tests/runtimes/wasm_wire/rust/lib.rs index 712feac172..2520126106 100644 --- a/tests/runtimes/wasm_wire/rust/lib.rs +++ b/tests/runtimes/wasm_wire/rust/lib.rs @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 mod fdk; use anyhow::Context; diff --git a/tests/runtimes/wasm_wire/wasm_duplicate.ts b/tests/runtimes/wasm_wire/wasm_duplicate.ts index e6df4f8cda..6bc76fe1ae 100644 --- a/tests/runtimes/wasm_wire/wasm_duplicate.ts +++ b/tests/runtimes/wasm_wire/wasm_duplicate.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; diff --git a/tests/runtimes/wasm_wire/wasm_sync_test.ts b/tests/runtimes/wasm_wire/wasm_sync_test.ts index d22f4a9240..14f0414cf9 100644 --- a/tests/runtimes/wasm_wire/wasm_sync_test.ts +++ b/tests/runtimes/wasm_wire/wasm_sync_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; import { connect } from "redis"; diff --git a/tests/runtimes/wasm_wire/wasm_wire.ts b/tests/runtimes/wasm_wire/wasm_wire.ts index ed37fc4362..27bd7a34fe 100644 --- a/tests/runtimes/wasm_wire/wasm_wire.ts +++ b/tests/runtimes/wasm_wire/wasm_wire.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; diff --git a/tests/runtimes/wasm_wire/wasm_wire_test.ts b/tests/runtimes/wasm_wire/wasm_wire_test.ts index 93f4a31436..0a669e5b60 100644 --- a/tests/runtimes/wasm_wire/wasm_wire_test.ts +++ b/tests/runtimes/wasm_wire/wasm_wire_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; import { assert, assertEquals } from "@std/assert"; import { MetaTest } from "../../utils/test.ts"; diff --git a/tests/schema_validation/circular_test.ts b/tests/schema_validation/circular_test.ts index ae2c0abd7e..506f380a81 100644 --- a/tests/schema_validation/circular_test.ts +++ b/tests/schema_validation/circular_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/schema_validation/ts/circular.ts b/tests/schema_validation/ts/circular.ts index e6f3dd77f0..a9d015c440 100644 --- a/tests/schema_validation/ts/circular.ts +++ b/tests/schema_validation/ts/circular.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 type Stars = { count: string }; type Medals = { title: string; count: number }; diff --git a/tests/simple/class_syntax_test.ts b/tests/simple/class_syntax_test.ts index d2ae66f7f4..a9307836ae 100644 --- a/tests/simple/class_syntax_test.ts +++ b/tests/simple/class_syntax_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/simple/error_message_test.ts b/tests/simple/error_message_test.ts index 63aad337bb..5936d91e1a 100644 --- a/tests/simple/error_message_test.ts +++ b/tests/simple/error_message_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/simple/simple_test.ts b/tests/simple/simple_test.ts index fb3519ec26..d4d4358500 100644 --- a/tests/simple/simple_test.ts +++ b/tests/simple/simple_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/sync/sync_config_test.ts b/tests/sync/sync_config_test.ts index 81ab66a516..411654d319 100644 --- a/tests/sync/sync_config_test.ts +++ b/tests/sync/sync_config_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assert, assertEquals } from "@std/assert"; import { diff --git a/tests/sync/typegraph_sync_test.ts.disable b/tests/sync/typegraph_sync_test.ts.disable index f97f39fb73..0005743b4d 100644 --- a/tests/sync/typegraph_sync_test.ts.disable +++ b/tests/sync/typegraph_sync_test.ts.disable @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Meta } from "test-utils/mod.ts"; import { connect } from "redis"; diff --git a/tests/type_nodes/array_of_optional_test.ts b/tests/type_nodes/array_of_optional_test.ts index 3164934d20..45267b3f7c 100644 --- a/tests/type_nodes/array_of_optional_test.ts +++ b/tests/type_nodes/array_of_optional_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/type_nodes/either_test.ts b/tests/type_nodes/either_test.ts index 467aa13807..19fe8a952b 100644 --- a/tests/type_nodes/either_test.ts +++ b/tests/type_nodes/either_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/type_nodes/ts/either/user_register.ts b/tests/type_nodes/ts/either/user_register.ts index b4265890f1..4e8a2a8788 100644 --- a/tests/type_nodes/ts/either/user_register.ts +++ b/tests/type_nodes/ts/either/user_register.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 interface Regist_userInput { user: { diff --git a/tests/type_nodes/ts/union/color_converter.ts b/tests/type_nodes/ts/union/color_converter.ts index c60ca19335..09fa6d256a 100644 --- a/tests/type_nodes/ts/union/color_converter.ts +++ b/tests/type_nodes/ts/union/color_converter.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // deno-lint-ignore no-external-import import { diff --git a/tests/type_nodes/ts/union/phone_register.ts b/tests/type_nodes/ts/union/phone_register.ts index 510d93f25d..6ab15157ec 100644 --- a/tests/type_nodes/ts/union/phone_register.ts +++ b/tests/type_nodes/ts/union/phone_register.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 type OS = "Android" | "iOS"; diff --git a/tests/type_nodes/ts/union/vec_normalizer.ts b/tests/type_nodes/ts/union/vec_normalizer.ts index ab069ca5db..0d5d6633d3 100644 --- a/tests/type_nodes/ts/union/vec_normalizer.ts +++ b/tests/type_nodes/ts/union/vec_normalizer.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 type Color = { R: number; diff --git a/tests/type_nodes/union_node_attr_test.ts b/tests/type_nodes/union_node_attr_test.ts index 59e4f8646a..b1a004bc6d 100644 --- a/tests/type_nodes/union_node_attr_test.ts +++ b/tests/type_nodes/union_node_attr_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/type_nodes/union_node_quantifier_test.ts b/tests/type_nodes/union_node_quantifier_test.ts index 8836ce4e6b..f03f4433ff 100644 --- a/tests/type_nodes/union_node_quantifier_test.ts +++ b/tests/type_nodes/union_node_quantifier_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/type_nodes/union_test.ts b/tests/type_nodes/union_test.ts index e1ec8a5546..300eeeb4b8 100644 --- a/tests/type_nodes/union_test.ts +++ b/tests/type_nodes/union_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { JSONValue } from "@metatype/typegate/utils.ts"; import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/typecheck/input_validator_test.ts b/tests/typecheck/input_validator_test.ts index 54341c1d1a..67dc29b4e0 100644 --- a/tests/typecheck/input_validator_test.ts +++ b/tests/typecheck/input_validator_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/typecheck/reduce.ts b/tests/typecheck/reduce.ts index 735a780b77..5008e61c85 100644 --- a/tests/typecheck/reduce.ts +++ b/tests/typecheck/reduce.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; diff --git a/tests/typecheck/reduce_syntax_test.ts b/tests/typecheck/reduce_syntax_test.ts index 6c63fa1f43..07f7e6f8fd 100644 --- a/tests/typecheck/reduce_syntax_test.ts +++ b/tests/typecheck/reduce_syntax_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/typecheck/type_alias_test.ts b/tests/typecheck/type_alias_test.ts index b0a7691a1d..4233d0cdc8 100644 --- a/tests/typecheck/type_alias_test.ts +++ b/tests/typecheck/type_alias_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "test-utils/mod.ts"; import { dropSchemas, recreateMigrations } from "test-utils/migrations.ts"; diff --git a/tests/typecheck/typecheck.py b/tests/typecheck/typecheck.py index e01195b6da..dd42e8c9a5 100644 --- a/tests/typecheck/typecheck.py +++ b/tests/typecheck/typecheck.py @@ -1,4 +1,5 @@ -# Copyright Metatype under the Elastic License 2.0. +# Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +# SPDX-License-Identifier: MPL-2.0 from typegraph import typegraph, effects, Policy, t, Graph from typegraph.runtimes.deno import DenoRuntime diff --git a/tests/typecheck/typecheck_test.ts b/tests/typecheck/typecheck_test.ts index c351fd5186..653723be1c 100644 --- a/tests/typecheck/typecheck_test.ts +++ b/tests/typecheck/typecheck_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; import { assertThrows } from "@std/assert"; diff --git a/tests/typegraph/version_test.ts b/tests/typegraph/version_test.ts index b5b8530bbd..24e484c5f0 100644 --- a/tests/typegraph/version_test.ts +++ b/tests/typegraph/version_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { expandGlob } from "@std/fs/expand-glob"; import { Meta } from "../utils/mod.ts"; diff --git a/tests/typename/typename_test.ts b/tests/typename/typename_test.ts index 98a3bdc862..18a9912c0e 100644 --- a/tests/typename/typename_test.ts +++ b/tests/typename/typename_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { recreateMigrations } from "../utils/migrations.ts"; import { gql, Meta } from "../utils/mod.ts"; diff --git a/tests/utils/assert.ts b/tests/utils/assert.ts index 98cf7a2291..60a4de1b3e 100644 --- a/tests/utils/assert.ts +++ b/tests/utils/assert.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export interface LazyAssertOptions { timeoutMs: number; diff --git a/tests/utils/autotest.ts b/tests/utils/autotest.ts index 59486e3b83..2e9538d055 100644 --- a/tests/utils/autotest.ts +++ b/tests/utils/autotest.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dirname, join } from "@std/path"; diff --git a/tests/utils/bindings_test.ts b/tests/utils/bindings_test.ts index 4c9a0477b4..616c906034 100644 --- a/tests/utils/bindings_test.ts +++ b/tests/utils/bindings_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { get_version, diff --git a/tests/utils/database.ts b/tests/utils/database.ts index 74dc7d57d3..cda2649004 100644 --- a/tests/utils/database.ts +++ b/tests/utils/database.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import pg from "pg"; import { removeMigrations } from "test-utils/migrations.ts"; diff --git a/tests/utils/date.ts b/tests/utils/date.ts index 96ab452262..fab3f1241b 100644 --- a/tests/utils/date.ts +++ b/tests/utils/date.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 const OriginalDate = Date; diff --git a/tests/utils/dir.ts b/tests/utils/dir.ts index 2b5381c7b6..c090e54f5c 100644 --- a/tests/utils/dir.ts +++ b/tests/utils/dir.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { fromFileUrl, join } from "@std/path"; diff --git a/tests/utils/hooks.ts b/tests/utils/hooks.ts index 2e226c1b82..6f8c501b8c 100644 --- a/tests/utils/hooks.ts +++ b/tests/utils/hooks.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { SyncConfig } from "@metatype/typegate/config.ts"; import { createBucket, tryDeleteBucket } from "test-utils/s3.ts"; diff --git a/tests/utils/meta.ts b/tests/utils/meta.ts index 59e4c24a58..203371adbc 100644 --- a/tests/utils/meta.ts +++ b/tests/utils/meta.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { shell, ShellOptions, ShellOutput } from "./shell.ts"; diff --git a/tests/utils/migrations.ts b/tests/utils/migrations.ts index f5f42026ae..8d788a050d 100644 --- a/tests/utils/migrations.ts +++ b/tests/utils/migrations.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { join } from "@std/path"; diff --git a/tests/utils/mock_fetch.ts b/tests/utils/mock_fetch.ts index 080218b2a8..152464d196 100644 --- a/tests/utils/mock_fetch.ts +++ b/tests/utils/mock_fetch.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /* Lifted from https://github.com/clo4/deno_mock_fetch/blob/1ef9476b43b1b2b4cab0aaa576f713e8339f46b6/mod.ts diff --git a/tests/utils/mod.ts b/tests/utils/mod.ts index 4e6121c0b9..86567aa7e5 100644 --- a/tests/utils/mod.ts +++ b/tests/utils/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // import { SingleRegister } from "test-utils/single_register.ts"; // import { Typegate } from "@metatype/typegate/typegate/mod.ts"; diff --git a/tests/utils/process.ts b/tests/utils/process.ts index 892a9b6df7..7a36add6bf 100644 --- a/tests/utils/process.ts +++ b/tests/utils/process.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { TextLineStream } from "@local/tools/deps.ts"; import { deadline } from "@std/async/deadline"; diff --git a/tests/utils/query/file_extractor.ts b/tests/utils/query/file_extractor.ts index a0c1c65495..30834cb81c 100644 --- a/tests/utils/query/file_extractor.ts +++ b/tests/utils/query/file_extractor.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Variables } from "./mod.ts"; diff --git a/tests/utils/query/graphql_query.ts b/tests/utils/query/graphql_query.ts index e2fea956e0..a47695f8c5 100644 --- a/tests/utils/query/graphql_query.ts +++ b/tests/utils/query/graphql_query.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { FileExtractor } from "./file_extractor.ts"; diff --git a/tests/utils/query/mod.ts b/tests/utils/query/mod.ts index 9c198ad0f9..d2ffb92a04 100644 --- a/tests/utils/query/mod.ts +++ b/tests/utils/query/mod.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { assert, diff --git a/tests/utils/query/rest_query.ts b/tests/utils/query/rest_query.ts index d087be46d9..bcc64e7d88 100644 --- a/tests/utils/query/rest_query.ts +++ b/tests/utils/query/rest_query.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { Context, diff --git a/tests/utils/router@0.0.5.ts b/tests/utils/router@0.0.5.ts index 3576698489..b7c2522ba8 100644 --- a/tests/utils/router@0.0.5.ts +++ b/tests/utils/router@0.0.5.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // Copyright 2021 denosaurs. All rights reserved. MIT license. diff --git a/tests/utils/s3.ts b/tests/utils/s3.ts index d9e4747bab..4a6ac61b80 100644 --- a/tests/utils/s3.ts +++ b/tests/utils/s3.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { CreateBucketCommand, diff --git a/tests/utils/shell.ts b/tests/utils/shell.ts index 4d2c82a567..3824090044 100644 --- a/tests/utils/shell.ts +++ b/tests/utils/shell.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { testDir } from "./dir.ts"; diff --git a/tests/utils/single_register.ts b/tests/utils/single_register.ts index 8bb631b806..448fbbc4e3 100644 --- a/tests/utils/single_register.ts +++ b/tests/utils/single_register.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { QueryEngine } from "@metatype/typegate/engine/query_engine.ts"; import { Register } from "@metatype/typegate/typegate/register.ts"; diff --git a/tests/utils/test.ts b/tests/utils/test.ts index 12fef6bb04..78993d9f74 100644 --- a/tests/utils/test.ts +++ b/tests/utils/test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { SystemTypegraph } from "@metatype/typegate/system_typegraphs.ts"; import { dirname, extname, join } from "@std/path"; diff --git a/tests/utils/test_module.ts b/tests/utils/test_module.ts index 99da40cab8..6a7003c758 100644 --- a/tests/utils/test_module.ts +++ b/tests/utils/test_module.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { dirname, fromFileUrl } from "@std/path"; import { shell, ShellOptions, ShellOutput } from "./shell.ts"; diff --git a/tests/utils/tg_deploy_script.ts b/tests/utils/tg_deploy_script.ts index ed4be2fa65..229781d3a8 100644 --- a/tests/utils/tg_deploy_script.ts +++ b/tests/utils/tg_deploy_script.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy.ts"; import * as path from "@std/path"; diff --git a/tests/vars/vars_test.ts b/tests/vars/vars_test.ts index 008aa0d8ef..31692567b2 100644 --- a/tests/vars/vars_test.ts +++ b/tests/vars/vars_test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { gql, Meta } from "../utils/mod.ts"; diff --git a/tools/Dockerfile b/tools/Dockerfile index aa99c54dc8..42f0e227b4 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -75,9 +75,9 @@ COPY . . RUN . "$GHJK_ACTIVATE" \ && cargo build --profile $CARGO_PROFILE --package typegate --locked \ && ( \ - [ $CARGO_PROFILE = 'release' ] \ - && cp target/release/typegate typegate-bin \ - || cp target/debug/typegate typegate-bin \ + [ $CARGO_PROFILE = 'release' ] \ + && cp target/release/typegate typegate-bin \ + || cp target/debug/typegate typegate-bin \ ) RUN . "$GHJK_ACTIVATE" \ @@ -131,7 +131,7 @@ COPY --from=builder /app/src/typegate/deno.jsonc ./src/typegate/ COPY --from=builder /app/src/typegraph/deno/deno.json ./src/typegraph/deno/ COPY --from=builder /app/tests/deno.jsonc ./tests/ COPY --from=builder /app/examples/deno.jsonc ./examples/ -COPY tools/LICENSE-Elastic-2.0.md LICENSE.md +COPY tools/LICENSE-MPL-2.0.md LICENSE.md # writeable COPY --from=builder --chown=nonroot:nonroot /deno-dir /deno-dir diff --git a/tools/Dockerfile.dockerignore b/tools/Dockerfile.dockerignore index 9f797defd5..d7a2ead680 100644 --- a/tools/Dockerfile.dockerignore +++ b/tools/Dockerfile.dockerignore @@ -2,7 +2,7 @@ !tools/*.ts !tools/tasks/ -!tools/LICENSE-Elastic-2.0.md +!tools/LICENSE-MPL-2.0.md !src/common !src/meta-cli/Cargo.toml diff --git a/tools/LICENSE-Elastic-2.0.md b/tools/LICENSE-Elastic-2.0.md deleted file mode 100644 index e9e68bb9c3..0000000000 --- a/tools/LICENSE-Elastic-2.0.md +++ /dev/null @@ -1,91 +0,0 @@ -## Elastic License 2.0 (Elastic-2.0) - -### Acceptance - -By using the software, you agree to all of the terms and conditions below. - -### Copyright License - -The licensor grants you a non-exclusive, royalty-free, worldwide, -non-sublicensable, non-transferable license to use, copy, distribute, make -available, and prepare derivative works of the software, in each case subject to -the limitations and conditions below. - -### Limitations - -You may not provide the software to third parties as a hosted or managed -service, where the service provides users with access to any substantial set of -the features or functionality of the software. - -You may not move, change, disable, or circumvent the license key functionality -in the software, and you may not remove or obscure any functionality in the -software that is protected by the license key. - -You may not alter, remove, or obscure any licensing, copyright, or other notices -of the licensor in the software. Any use of the licensor’s trademarks is subject -to applicable law. - -### Patents - -The licensor grants you a license, under any patent claims the licensor can -license, or becomes able to license, to make, have made, use, sell, offer for -sale, import and have imported the software, in each case subject to the -limitations and conditions in this license. This license does not cover any -patent claims that you cause to be infringed by modifications or additions to -the software. If you or your company make any written claim that the software -infringes or contributes to infringement of any patent, your patent license for -the software granted under these terms ends immediately. If your company makes -such a claim, your patent license ends immediately for work on behalf of your -company. - -### Notices - -You must ensure that anyone who gets a copy of any part of the software from you -also gets a copy of these terms. - -If you modify the software, you must include in any modified copies of the -software prominent notices stating that you have modified the software. - -### No Other Rights - -These terms do not imply any licenses other than those expressly granted in -these terms. - -### Termination - -If you use the software in violation of these terms, such use is not licensed, -and your licenses will automatically terminate. If the licensor provides you -with a notice of your violation, and you cease all violation of this license no -later than 30 days after you receive that notice, your licenses will be -reinstated retroactively. However, if you violate these terms after such -reinstatement, any additional violation of these terms will cause your licenses -to terminate automatically and permanently. - -### No Liability - -_As far as the law allows, the software comes as is, without any warranty or -condition, and the licensor will not be liable to you for any damages arising -out of these terms or the use or nature of the software, under any kind of legal -claim._ - -### Definitions - -The **licensor** is the entity offering these terms, and the **software** is the -software the licensor makes available under these terms, including any portion -of it. - -**you** refers to the individual or entity agreeing to these terms. - -**your company** is any legal entity, sole proprietorship, or other kind of -organization that you work for, plus all organizations that have control over, -are under the control of, or are under common control with that organization. -**control** means ownership of substantially all the assets of an entity, or the -power to direct its management and policies by vote, contract, or otherwise. -Control can be direct or indirect. - -**your licenses** are all the licenses granted to you for the software under -these terms. - -**use** means anything you do with the software requiring one of your licenses. - -**trademark** means trademarks, service marks, and similar rights. diff --git a/tools/consts.ts b/tools/consts.ts index e3314d7a97..7b011efcee 100644 --- a/tools/consts.ts +++ b/tools/consts.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 export const METATYPE_VERSION = "0.5.0-rc.4"; export const PUBLISHED_VERSION = "0.5.0-rc.3"; diff --git a/tools/deps.ts b/tools/deps.ts index 8e7069d80b..2bd2bfb1e7 100644 --- a/tools/deps.ts +++ b/tools/deps.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 // FIXME: we can't use the import map in ghjk so we must // rely on a deps.ts diff --git a/tools/installs.ts b/tools/installs.ts index 0e99b20525..8fce5111a2 100644 --- a/tools/installs.ts +++ b/tools/installs.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { DENO_VERSION, PYTHON_VERSION, RUST_VERSION } from "./consts.ts"; import { ports } from "./deps.ts"; diff --git a/tools/license-header-Elastic-2.0.txt b/tools/license-header-Elastic-2.0.txt deleted file mode 100644 index cd12e09928..0000000000 --- a/tools/license-header-Elastic-2.0.txt +++ /dev/null @@ -1,2 +0,0 @@ -Copyright Metatype OÜ, licensed under the Elastic License 2.0. -SPDX-License-Identifier: Elastic-2.0 diff --git a/tools/tasks/build.ts b/tools/tasks/build.ts index b285c7918c..c7b02aaa42 100644 --- a/tools/tasks/build.ts +++ b/tools/tasks/build.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { DenoTaskDefArgs } from "../deps.ts"; diff --git a/tools/tasks/dev.ts b/tools/tasks/dev.ts index cdaeadcb5f..3d4c43296f 100644 --- a/tools/tasks/dev.ts +++ b/tools/tasks/dev.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { DenoTaskDefArgs } from "../deps.ts"; diff --git a/tools/tasks/fetch.ts b/tools/tasks/fetch.ts index 72c02c8099..8c625bf182 100644 --- a/tools/tasks/fetch.ts +++ b/tools/tasks/fetch.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { DenoTaskDefArgs } from "../deps.ts"; diff --git a/tools/tasks/gen.ts b/tools/tasks/gen.ts index 79af794885..bab72d4f4b 100644 --- a/tools/tasks/gen.ts +++ b/tools/tasks/gen.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import type { DenoTaskDefArgs } from "../deps.ts"; import { ports } from "../deps.ts"; diff --git a/tools/tasks/install.ts b/tools/tasks/install.ts index 4e39e033b5..584255b0e0 100644 --- a/tools/tasks/install.ts +++ b/tools/tasks/install.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type DenoTaskDefArgs, std_url } from "../deps.ts"; import { WASMTIME_VERSION } from "../consts.ts"; diff --git a/tools/tasks/lint.ts b/tools/tasks/lint.ts index 6837ea2def..7b19c02fdb 100644 --- a/tools/tasks/lint.ts +++ b/tools/tasks/lint.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { type DenoTaskDefArgs, ports } from "../deps.ts"; import installs from "../installs.ts"; diff --git a/tools/tasks/lock.ts b/tools/tasks/lock.ts index 8dc229d72d..c18325210c 100644 --- a/tools/tasks/lock.ts +++ b/tools/tasks/lock.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { copyLock, type DenoTaskDefArgs, parseArgs, sedLock } from "../deps.ts"; import * as consts from "../consts.ts"; diff --git a/tools/tasks/mod.ts b/tools/tasks/mod.ts index dd0274222f..1d5f38e19f 100644 --- a/tools/tasks/mod.ts +++ b/tools/tasks/mod.ts @@ -1,3 +1,6 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + import type { DenoTaskDefArgs } from "../deps.ts"; import tasksBuild from "./build.ts"; @@ -10,12 +13,12 @@ import tasksLock from "./lock.ts"; import tasksTest from "./test.ts"; export default { - ...tasksBuild, - ...tasksDev, - ...tasksFetch, - ...tasksGen, - ...tasksInstall, - ...tasksLint, - ...tasksLock, - ...tasksTest, + ...tasksBuild, + ...tasksDev, + ...tasksFetch, + ...tasksGen, + ...tasksInstall, + ...tasksLint, + ...tasksLock, + ...tasksTest, } satisfies Record; diff --git a/tools/tasks/test.ts b/tools/tasks/test.ts index 649c9e4fc3..58e3b103dc 100644 --- a/tools/tasks/test.ts +++ b/tools/tasks/test.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { testE2eCli } from "../test.ts"; import type { DenoTaskDefArgs } from "../deps.ts"; diff --git a/tools/test.ts b/tools/test.ts index 2f616b621f..014ca1c32d 100755 --- a/tools/test.ts +++ b/tools/test.ts @@ -1,7 +1,7 @@ #!/bin/env -S ghjk deno run -A -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /** * A utility script to run tests. diff --git a/tools/tree-view-web.ts b/tools/tree-view-web.ts index e8e036deb6..26b2a2b5fe 100755 --- a/tools/tree-view-web.ts +++ b/tools/tree-view-web.ts @@ -1,7 +1,7 @@ #!/bin/env -S ghjk deno run -A -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /** * Usage: diff --git a/tools/tree-view.ts b/tools/tree-view.ts index 200fc71d10..22ef1b83e3 100755 --- a/tools/tree-view.ts +++ b/tools/tree-view.ts @@ -1,7 +1,7 @@ #!/bin/env -S ghjk deno run -A -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 /** * Usage: diff --git a/tools/typegraph-size.ts b/tools/typegraph-size.ts index 1a153c909f..c730e12a59 100644 --- a/tools/typegraph-size.ts +++ b/tools/typegraph-size.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { projectDir, runOrExit } from "./utils.ts"; import { bytes, formatDuration, resolve } from "./deps.ts"; diff --git a/tools/update.ts b/tools/update.ts index 149e3fbb89..a3718003f1 100755 --- a/tools/update.ts +++ b/tools/update.ts @@ -1,7 +1,7 @@ #!/bin/env -S ghjk deno run -A --config=typegate/deno.jsonc -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { $, diff --git a/tools/utils.ts b/tools/utils.ts index 172c7efda5..96558d1f19 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -1,5 +1,5 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 import { copySync, dirname, fromFileUrl, join, resolve } from "./deps.ts";