diff --git a/.check.exs b/.check.exs index 4858901..b9c898c 100644 --- a/.check.exs +++ b/.check.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + [ ## all available options with default values (see `mix check` docs for description) # parallel: true, @@ -12,7 +16,8 @@ # {:credo, "mix credo --format oneline"}, {:check_formatter, command: "mix spark.formatter --check"}, - {:doctor, false} + {:doctor, false}, + {:reuse, command: ["pipx", "run", "reuse", "lint", "-q"]} ## custom new tools may be added (mix tasks or arbitrary commands) # {:my_mix_task, command: "mix release", env: %{"MIX_ENV" => "prod"}}, diff --git a/.credo.exs b/.credo.exs index 9215ef2..80a85b8 100644 --- a/.credo.exs +++ b/.credo.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + # This file contains the configuration for Credo and you are probably reading # this after creating it with `mix credo.gen.config`. # diff --git a/.formatter.exs b/.formatter.exs index 34dda76..1110187 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + # Used by "mix format" spark_locals_without_parens = [ argument_names: 1, diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 597c8ec..e1b5ba1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + --- updates: - directory: / diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 0f6cfe0..c703c2a 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + name: CI on: push: @@ -10,5 +14,7 @@ on: jobs: ash-ci: uses: ash-project/ash/.github/workflows/ash-ci.yml@main + with: + reuse: true secrets: HEX_API_KEY: ${{ secrets.HEX_API_KEY }} diff --git a/.gitignore b/.gitignore index 3c0478f..7e99d17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + # The directory Mix will write compiled artifacts to. /_build/ diff --git a/.tool-versions b/.tool-versions index ec5d104..4b22124 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,4 @@ elixir 1.18.3-otp-27 erlang 27.3.3 nodejs 22.16.0 +pipx 1.8.0 diff --git a/.tool-versions.license b/.tool-versions.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/.tool-versions.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/AGENTS.md b/AGENTS.md index b5bde0b..c6b75c2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,3 +1,9 @@ + + # AshTypescript - AI Assistant Guide ## Project Overview diff --git a/CHANGELOG.md b/CHANGELOG.md index a6168e5..a94f184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ + + # Change Log All notable changes to this project will be documented in this file. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 4eb51a5..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Zachary Scott Daniel - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..d817195 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 888fbf5..704e194 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ + + Logo ![Elixir CI](https://github.com/ash-project/ash_typescript/workflows/CI/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Hex version badge](https://img.shields.io/hexpm/v/ash_typescript.svg)](https://hex.pm/packages/ash_typescript) [![Hexdocs badge](https://img.shields.io/badge/docs-hexdocs-purple)](https://hexdocs.pm/ash_typescript) +[![REUSE status](https://api.reuse.software/badge/github.com/ash-project/ash_typescript)](https://api.reuse.software/info/github.com/ash-project/ash_typescript) + # AshTypescript **🔥 Automatic TypeScript type generation for Ash resources and actions** diff --git a/agent-docs/architecture-decisions.md b/agent-docs/architecture-decisions.md index 6e67244..bf38724 100644 --- a/agent-docs/architecture-decisions.md +++ b/agent-docs/architecture-decisions.md @@ -1,3 +1,9 @@ + + # AshTypescript Architecture Changelog Key architectural decisions and their reasoning for AI assistant context. diff --git a/agent-docs/development-workflows.md b/agent-docs/development-workflows.md index fba96b2..2b4422b 100644 --- a/agent-docs/development-workflows.md +++ b/agent-docs/development-workflows.md @@ -1,3 +1,9 @@ + + # Development Workflows Essential development workflows and patterns for AshTypescript development. diff --git a/agent-docs/features/embedded-resources.md b/agent-docs/features/embedded-resources.md index 561e084..090621b 100644 --- a/agent-docs/features/embedded-resources.md +++ b/agent-docs/features/embedded-resources.md @@ -1,3 +1,9 @@ + + # Embedded Resources Architecture Implementation of embedded resources with relationship-like integration for AshTypescript development. diff --git a/agent-docs/features/field-argument-name-mapping.md b/agent-docs/features/field-argument-name-mapping.md index 49d688b..75eeae5 100644 --- a/agent-docs/features/field-argument-name-mapping.md +++ b/agent-docs/features/field-argument-name-mapping.md @@ -1,3 +1,9 @@ + + # Field and Argument Name Mapping Complete guide to mapping invalid Elixir field and argument names to valid TypeScript identifiers using `field_names`, `argument_names`, and `typescript_field_names` callback. diff --git a/agent-docs/features/rpc-pipeline.md b/agent-docs/features/rpc-pipeline.md index 4512f39..9190464 100644 --- a/agent-docs/features/rpc-pipeline.md +++ b/agent-docs/features/rpc-pipeline.md @@ -1,3 +1,9 @@ + + # RPC Pipeline Architecture ## Overview diff --git a/agent-docs/features/type-system.md b/agent-docs/features/type-system.md index 15030e0..f4fe3a3 100644 --- a/agent-docs/features/type-system.md +++ b/agent-docs/features/type-system.md @@ -1,3 +1,9 @@ + + # Type System and Type Inference Core type inference system architecture and schema-based classification for AshTypescript development. diff --git a/agent-docs/features/union-systems-core.md b/agent-docs/features/union-systems-core.md index c949d38..976f51b 100644 --- a/agent-docs/features/union-systems-core.md +++ b/agent-docs/features/union-systems-core.md @@ -1,3 +1,9 @@ + + # Union Systems - Core Implementation Core union field selection and storage mode architecture for AshTypescript development. diff --git a/agent-docs/features/zod-schemas.md b/agent-docs/features/zod-schemas.md index d5e69de..61e9208 100644 --- a/agent-docs/features/zod-schemas.md +++ b/agent-docs/features/zod-schemas.md @@ -1,3 +1,9 @@ + + # Zod Schema Generation Implementation Implementation of Zod validation schema generation for AshTypescript runtime validation. diff --git a/agent-docs/testing-and-validation.md b/agent-docs/testing-and-validation.md index e9b4e98..a5c5af9 100644 --- a/agent-docs/testing-and-validation.md +++ b/agent-docs/testing-and-validation.md @@ -1,3 +1,9 @@ + + # TypeScript Testing and Validation Comprehensive guide for testing organization and validation procedures for maintaining system stability. diff --git a/agent-docs/troubleshooting.md b/agent-docs/troubleshooting.md index bb09c5c..3ccf6c8 100644 --- a/agent-docs/troubleshooting.md +++ b/agent-docs/troubleshooting.md @@ -1,3 +1,9 @@ + + # AshTypescript Troubleshooting ## Quick Diagnosis diff --git a/config/config.exs b/config/config.exs index d0f9cbf..7cce7b0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + import Config # Default configuration for ash_typescript diff --git a/config/dev.exs b/config/dev.exs index a8145f8..4282a43 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + import Config config :git_ops, diff --git a/documentation/dsls/DSL-AshTypescript.Resource.md.license b/documentation/dsls/DSL-AshTypescript.Resource.md.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/documentation/dsls/DSL-AshTypescript.Resource.md.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/documentation/dsls/DSL-AshTypescript.Rpc.md.license b/documentation/dsls/DSL-AshTypescript.Rpc.md.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/documentation/dsls/DSL-AshTypescript.Rpc.md.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/lib/ash_typescript.ex b/lib/ash_typescript.ex index 3c740dd..a6995ea 100644 --- a/lib/ash_typescript.ex +++ b/lib/ash_typescript.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript do @moduledoc false end diff --git a/lib/ash_typescript/codegen.ex b/lib/ash_typescript/codegen.ex index 6ed73de..d9059d4 100644 --- a/lib/ash_typescript/codegen.ex +++ b/lib/ash_typescript/codegen.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Codegen do @moduledoc """ Main code generation module for TypeScript types and schemas from Ash resources. diff --git a/lib/ash_typescript/field_formatter.ex b/lib/ash_typescript/field_formatter.ex index 978d9c3..4230ded 100644 --- a/lib/ash_typescript/field_formatter.ex +++ b/lib/ash_typescript/field_formatter.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.FieldFormatter do @moduledoc """ Handles field name formatting for input parameters, output fields, and TypeScript generation. diff --git a/lib/ash_typescript/filter.ex b/lib/ash_typescript/filter.ex index 706fbf1..f2cb78c 100644 --- a/lib/ash_typescript/filter.ex +++ b/lib/ash_typescript/filter.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Filter do @moduledoc """ Generates TypeScript filter types for Ash resources. diff --git a/lib/ash_typescript/helpers.ex b/lib/ash_typescript/helpers.ex index 65f9826..c31ac15 100644 --- a/lib/ash_typescript/helpers.ex +++ b/lib/ash_typescript/helpers.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Helpers do @moduledoc """ Utility functions for string manipulation and transformations. diff --git a/lib/ash_typescript/resource.ex b/lib/ash_typescript/resource.ex index 8c58589..ee5213a 100644 --- a/lib/ash_typescript/resource.ex +++ b/lib/ash_typescript/resource.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource do @moduledoc """ Spark DSL extension for configuring TypeScript generation on Ash resources. diff --git a/lib/ash_typescript/resource/info.ex b/lib/ash_typescript/resource/info.ex index 42e32c8..f7498e6 100644 --- a/lib/ash_typescript/resource/info.ex +++ b/lib/ash_typescript/resource/info.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.Info do @moduledoc """ Provides introspection functions for AshTypescript.Resource configuration. diff --git a/lib/ash_typescript/resource/verify_field_names.ex b/lib/ash_typescript/resource/verify_field_names.ex index 8784266..771ec4b 100644 --- a/lib/ash_typescript/resource/verify_field_names.ex +++ b/lib/ash_typescript/resource/verify_field_names.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyFieldNames do @moduledoc """ Verifies that resource field names are valid for TypeScript generation. diff --git a/lib/ash_typescript/resource/verify_map_field_names.ex b/lib/ash_typescript/resource/verify_map_field_names.ex index 6927ceb..ad692f8 100644 --- a/lib/ash_typescript/resource/verify_map_field_names.ex +++ b/lib/ash_typescript/resource/verify_map_field_names.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyMapFieldNames do @moduledoc """ Verifies that field names in map, keyword, and tuple type constraints are valid for TypeScript. diff --git a/lib/ash_typescript/resource/verify_mapped_field_names.ex b/lib/ash_typescript/resource/verify_mapped_field_names.ex index 9ca8d05..7e223fd 100644 --- a/lib/ash_typescript/resource/verify_mapped_field_names.ex +++ b/lib/ash_typescript/resource/verify_mapped_field_names.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyMappedFieldNames do @moduledoc """ Verifies that field_names configuration is valid. diff --git a/lib/ash_typescript/resource/verify_unique_type_names.ex b/lib/ash_typescript/resource/verify_unique_type_names.ex index 290050c..31a79ac 100644 --- a/lib/ash_typescript/resource/verify_unique_type_names.ex +++ b/lib/ash_typescript/resource/verify_unique_type_names.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyUniqueTypeNames do @moduledoc """ Checks that all resources using AshTypescript.Resource have unique type_name values. diff --git a/lib/ash_typescript/rpc.ex b/lib/ash_typescript/rpc.ex index 60147a8..73ab077 100644 --- a/lib/ash_typescript/rpc.ex +++ b/lib/ash_typescript/rpc.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc do @moduledoc false diff --git a/lib/ash_typescript/rpc/codegen.ex b/lib/ash_typescript/rpc/codegen.ex index 320fefb..fe39087 100644 --- a/lib/ash_typescript/rpc/codegen.ex +++ b/lib/ash_typescript/rpc/codegen.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.Codegen do @moduledoc """ Generates TypeScript code for interacting with Ash resources via Rpc. diff --git a/lib/ash_typescript/rpc/error_builder.ex b/lib/ash_typescript/rpc/error_builder.ex index ded10a9..69fefce 100644 --- a/lib/ash_typescript/rpc/error_builder.ex +++ b/lib/ash_typescript/rpc/error_builder.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ErrorBuilder do @moduledoc """ Comprehensive error handling and message generation for the new RPC pipeline. diff --git a/lib/ash_typescript/rpc/info.ex b/lib/ash_typescript/rpc/info.ex index b742074..2de3ed9 100644 --- a/lib/ash_typescript/rpc/info.ex +++ b/lib/ash_typescript/rpc/info.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.Info do @moduledoc """ Provides introspection functions for AshTypescript.Rpc configuration. diff --git a/lib/ash_typescript/rpc/input_formatter.ex b/lib/ash_typescript/rpc/input_formatter.ex index 1fe1d79..b3bccdc 100644 --- a/lib/ash_typescript/rpc/input_formatter.ex +++ b/lib/ash_typescript/rpc/input_formatter.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.InputFormatter do @moduledoc """ Formats input data from client format to internal format. diff --git a/lib/ash_typescript/rpc/output_formatter.ex b/lib/ash_typescript/rpc/output_formatter.ex index b6029a6..5b02472 100644 --- a/lib/ash_typescript/rpc/output_formatter.ex +++ b/lib/ash_typescript/rpc/output_formatter.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.OutputFormatter do @moduledoc """ Formats output data from internal format to client format. diff --git a/lib/ash_typescript/rpc/pipeline.ex b/lib/ash_typescript/rpc/pipeline.ex index e99ee78..5b2e6b8 100644 --- a/lib/ash_typescript/rpc/pipeline.ex +++ b/lib/ash_typescript/rpc/pipeline.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.Pipeline do @moduledoc """ Implements the four-stage pipeline: diff --git a/lib/ash_typescript/rpc/request.ex b/lib/ash_typescript/rpc/request.ex index 1adb107..518f9e3 100644 --- a/lib/ash_typescript/rpc/request.ex +++ b/lib/ash_typescript/rpc/request.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.Request do @moduledoc """ Request data structure for the new RPC pipeline. diff --git a/lib/ash_typescript/rpc/requested_fields_processor.ex b/lib/ash_typescript/rpc/requested_fields_processor.ex index d94b174..b81bcb7 100644 --- a/lib/ash_typescript/rpc/requested_fields_processor.ex +++ b/lib/ash_typescript/rpc/requested_fields_processor.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessor do @moduledoc """ Processes requested fields for Ash resources, determining which fields should be selected diff --git a/lib/ash_typescript/rpc/result_processor.ex b/lib/ash_typescript/rpc/result_processor.ex index a651f90..068a1b9 100644 --- a/lib/ash_typescript/rpc/result_processor.ex +++ b/lib/ash_typescript/rpc/result_processor.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ResultProcessor do @moduledoc """ Extracts the requested fields from the returned result from an RPC action and diff --git a/lib/ash_typescript/rpc/validation_error_schemas.ex b/lib/ash_typescript/rpc/validation_error_schemas.ex index 97bfa27..fafd9cf 100644 --- a/lib/ash_typescript/rpc/validation_error_schemas.ex +++ b/lib/ash_typescript/rpc/validation_error_schemas.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ValidationErrorSchemas do @moduledoc """ Generates validation error schemas for TypeScript RPC clients. diff --git a/lib/ash_typescript/rpc/verify_rpc.ex b/lib/ash_typescript/rpc/verify_rpc.ex index 9b7c231..b80d001 100644 --- a/lib/ash_typescript/rpc/verify_rpc.ex +++ b/lib/ash_typescript/rpc/verify_rpc.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.VerifyRpc do @moduledoc """ Checks that all RPC actions and typed queries reference existing resource actions, diff --git a/lib/ash_typescript/rpc/zod_schema_generator.ex b/lib/ash_typescript/rpc/zod_schema_generator.ex index cfcc282..cc1cab2 100644 --- a/lib/ash_typescript/rpc/zod_schema_generator.ex +++ b/lib/ash_typescript/rpc/zod_schema_generator.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ZodSchemaGenerator do @moduledoc """ Generates Zod validation schemas for Ash resources and actions. diff --git a/lib/ash_typescript/verifier_checker.ex b/lib/ash_typescript/verifier_checker.ex index 40232bc..de3b844 100644 --- a/lib/ash_typescript/verifier_checker.ex +++ b/lib/ash_typescript/verifier_checker.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.VerifierChecker do @moduledoc """ Checks if any verifiers have failed for resources and domains. diff --git a/lib/mix/tasks/ash_typescript.codegen.ex b/lib/mix/tasks/ash_typescript.codegen.ex index 2f1f838..5e24884 100644 --- a/lib/mix/tasks/ash_typescript.codegen.ex +++ b/lib/mix/tasks/ash_typescript.codegen.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule Mix.Tasks.AshTypescript.Codegen do @moduledoc """ Generates TypeScript types for Ash Rpc-calls. diff --git a/lib/mix/tasks/ash_typescript.install.ex b/lib/mix/tasks/ash_typescript.install.ex index 9f7dcae..6956bc3 100644 --- a/lib/mix/tasks/ash_typescript.install.ex +++ b/lib/mix/tasks/ash_typescript.install.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + if Code.ensure_loaded?(Igniter) do defmodule Mix.Tasks.AshTypescript.Install do @shortdoc "Installs AshTypescript into a project. Should be called with `mix igniter.install ash_typescript`" diff --git a/lib/mix/tasks/ash_typescript.npm_install.ex b/lib/mix/tasks/ash_typescript.npm_install.ex index 88a4b2d..ae4828c 100644 --- a/lib/mix/tasks/ash_typescript.npm_install.ex +++ b/lib/mix/tasks/ash_typescript.npm_install.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule Mix.Tasks.AshTypescript.NpmInstall do @moduledoc false use Mix.Task diff --git a/logos/ash-typescript.png.license b/logos/ash-typescript.png.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/logos/ash-typescript.png.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/logos/small-logo.png.license b/logos/small-logo.png.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/logos/small-logo.png.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/mix.exs b/mix.exs index a638e07..a04f5b2 100644 --- a/mix.exs +++ b/mix.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.MixProject do use Mix.Project @@ -63,12 +67,20 @@ defmodule AshTypescript.MixProject do defp package do [ - name: :ash_typescript, + maintainers: [ + "Torkild Kjevik " + ], licenses: ["MIT"], files: ~w(lib .formatter.exs mix.exs README* CHANGELOG* documentation usage-rules.md), links: %{ - GitHub: "https://github.com/ash-project/ash_typescript" + "GitHub" => "https://github.com/ash-project/ash_typescript", + "Changelog" => "https://github.com/ash-project/ash_typescript/blob/main/CHANGELOG.md", + "Discord" => "https://discord.gg/HTHRaaVPUc", + "Website" => "https://ash-hq.org", + "Forum" => "https://elixirforum.com/c/elixir-framework-forums/ash-framework-forum", + "REUSE Compliance" => + "https://api.reuse.software/info/github.com/ash-project/ash_typescript" } ] end @@ -85,8 +97,7 @@ defmodule AshTypescript.MixProject do search_data: Spark.Docs.search_data_for(AshTypescript.Rpc)}, {"documentation/dsls/DSL-AshTypescript.Resource.md", search_data: Spark.Docs.search_data_for(AshTypescript.Resource)}, - "CHANGELOG.md", - "LICENSE" + "CHANGELOG.md" ], groups_for_extras: [ Tutorials: ~r'documentation/tutorials', diff --git a/mix.lock.license b/mix.lock.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/mix.lock.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/test/ash_typescript/aggregate_field_formatting_test.exs b/test/ash_typescript/aggregate_field_formatting_test.exs index aaa5595..29e0a14 100644 --- a/test/ash_typescript/aggregate_field_formatting_test.exs +++ b/test/ash_typescript/aggregate_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.AggregateFieldFormattingTest do @moduledoc """ Regression tests to ensure aggregate field formatting uses configured field formatters diff --git a/test/ash_typescript/calculation_field_formatting_test.exs b/test/ash_typescript/calculation_field_formatting_test.exs index bbbcbb5..0ffd8be 100644 --- a/test/ash_typescript/calculation_field_formatting_test.exs +++ b/test/ash_typescript/calculation_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.CalculationFieldFormattingTest do @moduledoc """ Regression tests to ensure calculation field formatting uses configured field formatters diff --git a/test/ash_typescript/custom_types_test.exs b/test/ash_typescript/custom_types_test.exs index 401b0b2..8dc603f 100644 --- a/test/ash_typescript/custom_types_test.exs +++ b/test/ash_typescript/custom_types_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.CustomTypesTest do use ExUnit.Case, async: false alias AshTypescript.Codegen diff --git a/test/ash_typescript/embedded_resource_field_formatting_test.exs b/test/ash_typescript/embedded_resource_field_formatting_test.exs index ca91f2d..ce99dee 100644 --- a/test/ash_typescript/embedded_resource_field_formatting_test.exs +++ b/test/ash_typescript/embedded_resource_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.EmbeddedResourceFieldFormattingTest do @moduledoc """ Regression tests to ensure embedded resource field formatting uses configured field formatters diff --git a/test/ash_typescript/field_formatting_comprehensive_test.exs b/test/ash_typescript/field_formatting_comprehensive_test.exs index 6fc78b7..fd93662 100644 --- a/test/ash_typescript/field_formatting_comprehensive_test.exs +++ b/test/ash_typescript/field_formatting_comprehensive_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.FieldFormattingComprehensiveTest do # async: false because we're modifying application config use ExUnit.Case, async: false diff --git a/test/ash_typescript/filter_formatting_test.exs b/test/ash_typescript/filter_formatting_test.exs index 9604c57..7b9a777 100644 --- a/test/ash_typescript/filter_formatting_test.exs +++ b/test/ash_typescript/filter_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.FilterFormattingTest do # async: false because we're modifying application config use ExUnit.Case, async: false diff --git a/test/ash_typescript/filter_mapped_fields_test.exs b/test/ash_typescript/filter_mapped_fields_test.exs index abf078e..5b3f008 100644 --- a/test/ash_typescript/filter_mapped_fields_test.exs +++ b/test/ash_typescript/filter_mapped_fields_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.FilterMappedFieldsTest do @moduledoc """ Tests for filter type generation with field name mapping. diff --git a/test/ash_typescript/relationship_field_formatting_test.exs b/test/ash_typescript/relationship_field_formatting_test.exs index 71d2c84..a97f155 100644 --- a/test/ash_typescript/relationship_field_formatting_test.exs +++ b/test/ash_typescript/relationship_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.RelationshipFieldFormattingTest do @moduledoc """ Regression tests to ensure relationship field formatting uses configured field formatters diff --git a/test/ash_typescript/resource/map_field_names_utility_test.exs b/test/ash_typescript/resource/map_field_names_utility_test.exs index 0e3d1d6..7f9d4e7 100644 --- a/test/ash_typescript/resource/map_field_names_utility_test.exs +++ b/test/ash_typescript/resource/map_field_names_utility_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.MapFieldNamesUtilityTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource/map_field_names_valid_test.exs b/test/ash_typescript/resource/map_field_names_valid_test.exs index 6a5de98..1c0403a 100644 --- a/test/ash_typescript/resource/map_field_names_valid_test.exs +++ b/test/ash_typescript/resource/map_field_names_valid_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.MapFieldNamesValidTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource/typescript_field_names_codegen_test.exs b/test/ash_typescript/resource/typescript_field_names_codegen_test.exs index 6576f16..787eeda 100644 --- a/test/ash_typescript/resource/typescript_field_names_codegen_test.exs +++ b/test/ash_typescript/resource/typescript_field_names_codegen_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.TypescriptFieldNamesCodegenTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource/typescript_field_names_test.exs b/test/ash_typescript/resource/typescript_field_names_test.exs index 86436f0..59d317b 100644 --- a/test/ash_typescript/resource/typescript_field_names_test.exs +++ b/test/ash_typescript/resource/typescript_field_names_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.TypescriptFieldNamesTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource/verify_map_field_names_test.exs b/test/ash_typescript/resource/verify_map_field_names_test.exs index b1d23c9..e739a82 100644 --- a/test/ash_typescript/resource/verify_map_field_names_test.exs +++ b/test/ash_typescript/resource/verify_map_field_names_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyMapFieldNamesTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource/verify_nested_map_field_names_test.exs b/test/ash_typescript/resource/verify_nested_map_field_names_test.exs index fce467d..19fe91b 100644 --- a/test/ash_typescript/resource/verify_nested_map_field_names_test.exs +++ b/test/ash_typescript/resource/verify_nested_map_field_names_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Resource.VerifyNestedMapFieldNamesTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/resource_schema_mapped_fields_test.exs b/test/ash_typescript/resource_schema_mapped_fields_test.exs index 440e42a..5087a78 100644 --- a/test/ash_typescript/resource_schema_mapped_fields_test.exs +++ b/test/ash_typescript/resource_schema_mapped_fields_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.ResourceSchemaMappedFieldsTest do @moduledoc """ Tests for resource schema generation with field name mapping. diff --git a/test/ash_typescript/rpc/calculation_field_selection_test.exs b/test/ash_typescript/rpc/calculation_field_selection_test.exs index cc0cb67..102bea7 100644 --- a/test/ash_typescript/rpc/calculation_field_selection_test.exs +++ b/test/ash_typescript/rpc/calculation_field_selection_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.CalculationFieldSelectionTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/calculations_test.exs b/test/ash_typescript/rpc/calculations_test.exs index dc4b821..fa9bc67 100644 --- a/test/ash_typescript/rpc/calculations_test.exs +++ b/test/ash_typescript/rpc/calculations_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.CalculationsTest do @moduledoc """ Tests for calculations through the refactored AshTypescript.Rpc module. diff --git a/test/ash_typescript/rpc/comprehensive_integration_test.exs b/test/ash_typescript/rpc/comprehensive_integration_test.exs index 09f2499..ae23301 100644 --- a/test/ash_typescript/rpc/comprehensive_integration_test.exs +++ b/test/ash_typescript/rpc/comprehensive_integration_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ComprehensiveIntegrationTest do @moduledoc """ Comprehensive integration tests for the refactored AshTypescript.Rpc module. diff --git a/test/ash_typescript/rpc/error_handling_test.exs b/test/ash_typescript/rpc/error_handling_test.exs index e5aeec9..f7a8ff4 100644 --- a/test/ash_typescript/rpc/error_handling_test.exs +++ b/test/ash_typescript/rpc/error_handling_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ErrorHandlingTest do use ExUnit.Case diff --git a/test/ash_typescript/rpc/error_scenarios_test.exs b/test/ash_typescript/rpc/error_scenarios_test.exs index d8e5f01..fef9213 100644 --- a/test/ash_typescript/rpc/error_scenarios_test.exs +++ b/test/ash_typescript/rpc/error_scenarios_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ErrorScenariosTest do @moduledoc """ Tests for comprehensive error handling through the refactored AshTypescript.Rpc module. diff --git a/test/ash_typescript/rpc/input_field_formatting_test.exs b/test/ash_typescript/rpc/input_field_formatting_test.exs index f9ac652..778a987 100644 --- a/test/ash_typescript/rpc/input_field_formatting_test.exs +++ b/test/ash_typescript/rpc/input_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.InputFieldFormattingTest do use ExUnit.Case, async: false alias AshTypescript.Test.TestHelpers diff --git a/test/ash_typescript/rpc/keyword_field_formatting_test.exs b/test/ash_typescript/rpc/keyword_field_formatting_test.exs index d970b03..da276ee 100644 --- a/test/ash_typescript/rpc/keyword_field_formatting_test.exs +++ b/test/ash_typescript/rpc/keyword_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.KeywordFieldFormattingTest do use ExUnit.Case, async: false alias AshTypescript.Test.TestHelpers diff --git a/test/ash_typescript/rpc/keyword_field_validation_test.exs b/test/ash_typescript/rpc/keyword_field_validation_test.exs index 26d9825..4e6c3b0 100644 --- a/test/ash_typescript/rpc/keyword_field_validation_test.exs +++ b/test/ash_typescript/rpc/keyword_field_validation_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.KeywordFieldValidationTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/output_field_formatting_test.exs b/test/ash_typescript/rpc/output_field_formatting_test.exs index ac0530f..a20894c 100644 --- a/test/ash_typescript/rpc/output_field_formatting_test.exs +++ b/test/ash_typescript/rpc/output_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.OutputFieldFormattingTest do use ExUnit.Case, async: false alias AshTypescript.Test.TestHelpers diff --git a/test/ash_typescript/rpc/pagination_advanced_test.exs b/test/ash_typescript/rpc/pagination_advanced_test.exs index 82b5e83..c4225ee 100644 --- a/test/ash_typescript/rpc/pagination_advanced_test.exs +++ b/test/ash_typescript/rpc/pagination_advanced_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.PaginationAdvancedTest do @moduledoc """ Tests for advanced pagination scenarios through the refactored AshTypescript.Rpc module. diff --git a/test/ash_typescript/rpc/requested_fields_processor_aggregates_test.exs b/test/ash_typescript/rpc/requested_fields_processor_aggregates_test.exs index a33bedd..c4e3d79 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_aggregates_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_aggregates_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorAggregatesTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_calculations_test.exs b/test/ash_typescript/rpc/requested_fields_processor_calculations_test.exs index bc4137d..9d35607 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_calculations_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_calculations_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorCalculationsTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_crud_test.exs b/test/ash_typescript/rpc/requested_fields_processor_crud_test.exs index 4e1c1da..4b69143 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_crud_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_crud_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorCrudTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_custom_types_test.exs b/test/ash_typescript/rpc/requested_fields_processor_custom_types_test.exs index 568b011..cee623f 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_custom_types_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_custom_types_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorCustomTypesTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_embedded_test.exs b/test/ash_typescript/rpc/requested_fields_processor_embedded_test.exs index 3012284..819e63a 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_embedded_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_embedded_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorEmbeddedTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_generic_actions_test.exs b/test/ash_typescript/rpc/requested_fields_processor_generic_actions_test.exs index fbeb5ef..25987b9 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_generic_actions_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_generic_actions_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorGenericActionsTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_keyword_test.exs b/test/ash_typescript/rpc/requested_fields_processor_keyword_test.exs index 6b6c2a2..0e33b8a 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_keyword_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_keyword_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorKeywordTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/requested_fields_processor_relationships_test.exs b/test/ash_typescript/rpc/requested_fields_processor_relationships_test.exs index 5e47da4..9d08ca5 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_relationships_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_relationships_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorRelationshipsTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_test.exs b/test/ash_typescript/rpc/requested_fields_processor_test.exs index 9f0fd2e..1dbf085 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_tuple_test.exs b/test/ash_typescript/rpc/requested_fields_processor_tuple_test.exs index 176156c..c72e663 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_tuple_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_tuple_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorTupleTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/requested_fields_processor_typed_structs_test.exs b/test/ash_typescript/rpc/requested_fields_processor_typed_structs_test.exs index 4f312eb..4f992ac 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_typed_structs_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_typed_structs_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorTypedStructsTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/requested_fields_processor_union_types_test.exs b/test/ash_typescript/rpc/requested_fields_processor_union_types_test.exs index 8b8e784..87d8fc4 100644 --- a/test/ash_typescript/rpc/requested_fields_processor_union_types_test.exs +++ b/test/ash_typescript/rpc/requested_fields_processor_union_types_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RequestedFieldsProcessorUnionTypesTest do use ExUnit.Case alias AshTypescript.Rpc.RequestedFieldsProcessor diff --git a/test/ash_typescript/rpc/result_processor_keyword_test.exs b/test/ash_typescript/rpc/result_processor_keyword_test.exs index 7a92faf..eefd849 100644 --- a/test/ash_typescript/rpc/result_processor_keyword_test.exs +++ b/test/ash_typescript/rpc/result_processor_keyword_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ResultProcessorKeywordTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/rpc_field_argument_mapping_test.exs b/test/ash_typescript/rpc/rpc_field_argument_mapping_test.exs index 37c91d1..ce6df4e 100644 --- a/test/ash_typescript/rpc/rpc_field_argument_mapping_test.exs +++ b/test/ash_typescript/rpc/rpc_field_argument_mapping_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.FieldArgumentMappingTest do @moduledoc """ Tests for field and argument name mapping in RPC actions. diff --git a/test/ash_typescript/rpc/rpc_function_generation_mapped_fields_test.exs b/test/ash_typescript/rpc/rpc_function_generation_mapped_fields_test.exs index c2b4856..c94bbfc 100644 --- a/test/ash_typescript/rpc/rpc_function_generation_mapped_fields_test.exs +++ b/test/ash_typescript/rpc/rpc_function_generation_mapped_fields_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.RpcFunctionGenerationMappedFieldsTest do @moduledoc """ Tests for RPC action function generation with field and argument name mapping. diff --git a/test/ash_typescript/rpc/rpc_integration_test.exs b/test/ash_typescript/rpc/rpc_integration_test.exs index 0c83bce..2a4c292 100644 --- a/test/ash_typescript/rpc/rpc_integration_test.exs +++ b/test/ash_typescript/rpc/rpc_integration_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.IntegrationTest do use ExUnit.Case diff --git a/test/ash_typescript/rpc/rpc_pipeline_test.exs b/test/ash_typescript/rpc/rpc_pipeline_test.exs index 5b38ab8..5b40473 100644 --- a/test/ash_typescript/rpc/rpc_pipeline_test.exs +++ b/test/ash_typescript/rpc/rpc_pipeline_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.PipelineTest do use ExUnit.Case diff --git a/test/ash_typescript/rpc/rpc_run_action_aggregates_test.exs b/test/ash_typescript/rpc/rpc_run_action_aggregates_test.exs index becc926..596ac23 100644 --- a/test/ash_typescript/rpc/rpc_run_action_aggregates_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_aggregates_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionAggregatesTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_calculations_test.exs b/test/ash_typescript/rpc/rpc_run_action_calculations_test.exs index 1f3a825..087ce8c 100644 --- a/test/ash_typescript/rpc/rpc_run_action_calculations_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_calculations_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionCalculationsTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_crud_test.exs b/test/ash_typescript/rpc/rpc_run_action_crud_test.exs index f86d0e2..689f724 100644 --- a/test/ash_typescript/rpc/rpc_run_action_crud_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_crud_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionCrudTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_embedded_test.exs b/test/ash_typescript/rpc/rpc_run_action_embedded_test.exs index 935de93..354a995 100644 --- a/test/ash_typescript/rpc/rpc_run_action_embedded_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_embedded_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionEmbeddedTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_field_mapping_test.exs b/test/ash_typescript/rpc/rpc_run_action_field_mapping_test.exs index 9adcb27..5c3e393 100644 --- a/test/ash_typescript/rpc/rpc_run_action_field_mapping_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_field_mapping_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionFieldMappingTest do @moduledoc """ Comprehensive tests for field and argument name mapping in the Task resource. diff --git a/test/ash_typescript/rpc/rpc_run_action_generic_actions_test.exs b/test/ash_typescript/rpc/rpc_run_action_generic_actions_test.exs index 0eb08d9..edc8daa 100644 --- a/test/ash_typescript/rpc/rpc_run_action_generic_actions_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_generic_actions_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionGenericActionsTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_keyword_test.exs b/test/ash_typescript/rpc/rpc_run_action_keyword_test.exs index 0fdb48d..02bb9ea 100644 --- a/test/ash_typescript/rpc/rpc_run_action_keyword_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_keyword_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionKeywordTest do use ExUnit.Case, async: false diff --git a/test/ash_typescript/rpc/rpc_run_action_ltree_test.exs b/test/ash_typescript/rpc/rpc_run_action_ltree_test.exs index 86677ca..e51ac44 100644 --- a/test/ash_typescript/rpc/rpc_run_action_ltree_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_ltree_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionLtreeTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_relationships_test.exs b/test/ash_typescript/rpc/rpc_run_action_relationships_test.exs index 9faec35..b7c9e29 100644 --- a/test/ash_typescript/rpc/rpc_run_action_relationships_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_relationships_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionRelationshipsTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_tuple_test.exs b/test/ash_typescript/rpc/rpc_run_action_tuple_test.exs index 108b355..d03d408 100644 --- a/test/ash_typescript/rpc/rpc_run_action_tuple_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_tuple_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionTupleTest do use ExUnit.Case, async: false diff --git a/test/ash_typescript/rpc/rpc_run_action_union_types_test.exs b/test/ash_typescript/rpc/rpc_run_action_union_types_test.exs index c09714b..9e81dc0 100644 --- a/test/ash_typescript/rpc/rpc_run_action_union_types_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_union_types_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionUnionTypesTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_untyped_maps_test.exs b/test/ash_typescript/rpc/rpc_run_action_untyped_maps_test.exs index 5a1f56a..13aff64 100644 --- a/test/ash_typescript/rpc/rpc_run_action_untyped_maps_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_untyped_maps_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionUntypedMapsTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_run_action_user_test.exs b/test/ash_typescript/rpc/rpc_run_action_user_test.exs index 054ed44..db54270 100644 --- a/test/ash_typescript/rpc/rpc_run_action_user_test.exs +++ b/test/ash_typescript/rpc/rpc_run_action_user_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcRunActionUserTest do use ExUnit.Case, async: false alias AshTypescript.Rpc diff --git a/test/ash_typescript/rpc/rpc_validate_action_test.exs b/test/ash_typescript/rpc/rpc_validate_action_test.exs index 2ce8294..26750ac 100644 --- a/test/ash_typescript/rpc/rpc_validate_action_test.exs +++ b/test/ash_typescript/rpc/rpc_validate_action_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RpcValidateActionTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/run_typed_query_test.exs b/test/ash_typescript/rpc/run_typed_query_test.exs index 4f5bdf8..e272d40 100644 --- a/test/ash_typescript/rpc/run_typed_query_test.exs +++ b/test/ash_typescript/rpc/run_typed_query_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.RunTypedQueryTest do use ExUnit.Case, async: false diff --git a/test/ash_typescript/rpc/verify_rpc_test.exs b/test/ash_typescript/rpc/verify_rpc_test.exs index 8e22f12..1dcf6c2 100644 --- a/test/ash_typescript/rpc/verify_rpc_test.exs +++ b/test/ash_typescript/rpc/verify_rpc_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.VerifyRpcTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/rpc/working_comprehensive_test.exs b/test/ash_typescript/rpc/working_comprehensive_test.exs index f560b38..6ed6df4 100644 --- a/test/ash_typescript/rpc/working_comprehensive_test.exs +++ b/test/ash_typescript/rpc/working_comprehensive_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.WorkingComprehensiveTest do @moduledoc """ Comprehensive integration tests for the refactored AshTypescript.Rpc module. diff --git a/test/ash_typescript/rpc/zod_mapped_fields_test.exs b/test/ash_typescript/rpc/zod_mapped_fields_test.exs index 20a2ce3..95514bb 100644 --- a/test/ash_typescript/rpc/zod_mapped_fields_test.exs +++ b/test/ash_typescript/rpc/zod_mapped_fields_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Rpc.ZodMappedFieldsTest do @moduledoc """ Tests for Zod schema generation with field and argument name mapping. diff --git a/test/ash_typescript/typescript_codegen_test.exs b/test/ash_typescript/typescript_codegen_test.exs index f107e17..10e5a3a 100644 --- a/test/ash_typescript/typescript_codegen_test.exs +++ b/test/ash_typescript/typescript_codegen_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.CodegenTest do use ExUnit.Case, async: false alias AshTypescript.Codegen diff --git a/test/ash_typescript/typescript_filter_test.exs b/test/ash_typescript/typescript_filter_test.exs index 7300859..2f3af27 100644 --- a/test/ash_typescript/typescript_filter_test.exs +++ b/test/ash_typescript/typescript_filter_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.FilterTest do use ExUnit.Case, async: true diff --git a/test/ash_typescript/union_field_formatting_test.exs b/test/ash_typescript/union_field_formatting_test.exs index 68d289a..66eff1a 100644 --- a/test/ash_typescript/union_field_formatting_test.exs +++ b/test/ash_typescript/union_field_formatting_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.UnionFieldFormattingTest do @moduledoc """ Regression tests to ensure union field formatting uses configured field formatters diff --git a/test/ash_typescript/union_types_test.exs b/test/ash_typescript/union_types_test.exs index 1d93cb7..92dce49 100644 --- a/test/ash_typescript/union_types_test.exs +++ b/test/ash_typescript/union_types_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.UnionTypesTest do use ExUnit.Case diff --git a/test/ash_typescript/verifier_checker_test.exs b/test/ash_typescript/verifier_checker_test.exs index d6ce1a9..1929186 100644 --- a/test/ash_typescript/verifier_checker_test.exs +++ b/test/ash_typescript/verifier_checker_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.VerifierCheckerTest do use ExUnit.Case, async: true diff --git a/test/support/domain.ex b/test/support/domain.ex index 9374534..3ca1022 100644 --- a/test/support/domain.ex +++ b/test/support/domain.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Domain do @moduledoc """ Test domain for AshTypescript integration testing. diff --git a/test/support/resources/calculations/self_calculation.ex b/test/support/resources/calculations/self_calculation.ex index 9880b6c..2b3b4fe 100644 --- a/test/support/resources/calculations/self_calculation.ex +++ b/test/support/resources/calculations/self_calculation.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.SelfCalculation do @moduledoc """ Self-reference calculation for testing. diff --git a/test/support/resources/calculations/summary_calculation.ex b/test/support/resources/calculations/summary_calculation.ex index 3ae6f62..cb3cee7 100644 --- a/test/support/resources/calculations/summary_calculation.ex +++ b/test/support/resources/calculations/summary_calculation.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.SummaryCalculation do @moduledoc """ Summary calculation for todos. diff --git a/test/support/resources/embedded/task_metadata.ex b/test/support/resources/embedded/task_metadata.ex index 34988f5..0d70f48 100644 --- a/test/support/resources/embedded/task_metadata.ex +++ b/test/support/resources/embedded/task_metadata.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TaskMetadata do @moduledoc """ Test embedded resource with field name mappings for Zod schema testing. diff --git a/test/support/resources/embedded/todo_content/checklist_content.ex b/test/support/resources/embedded/todo_content/checklist_content.ex index 75374e4..c9a67d3 100644 --- a/test/support/resources/embedded/todo_content/checklist_content.ex +++ b/test/support/resources/embedded/todo_content/checklist_content.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoContent.ChecklistContent do @moduledoc """ Test embedded resource for checklist content (union type member). diff --git a/test/support/resources/embedded/todo_content/link_content.ex b/test/support/resources/embedded/todo_content/link_content.ex index 46e35ac..dad9652 100644 --- a/test/support/resources/embedded/todo_content/link_content.ex +++ b/test/support/resources/embedded/todo_content/link_content.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoContent.LinkContent do @moduledoc """ Test embedded resource for link content (union type member). diff --git a/test/support/resources/embedded/todo_content/text_content.ex b/test/support/resources/embedded/todo_content/text_content.ex index 9f540cf..de4df42 100644 --- a/test/support/resources/embedded/todo_content/text_content.ex +++ b/test/support/resources/embedded/todo_content/text_content.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoContent.TextContent do @moduledoc """ Test embedded resource for text content (union type member). diff --git a/test/support/resources/embedded/todo_metadata.ex b/test/support/resources/embedded/todo_metadata.ex index 0653c90..915c2bd 100644 --- a/test/support/resources/embedded/todo_metadata.ex +++ b/test/support/resources/embedded/todo_metadata.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoMetadata do @moduledoc """ Test embedded resource for todo metadata with calculations and relationships. diff --git a/test/support/resources/embedded/todo_metadata/adjusted_priority_calculation.ex b/test/support/resources/embedded/todo_metadata/adjusted_priority_calculation.ex index 15d96dc..e5bbe3a 100644 --- a/test/support/resources/embedded/todo_metadata/adjusted_priority_calculation.ex +++ b/test/support/resources/embedded/todo_metadata/adjusted_priority_calculation.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoMetadata.AdjustedPriorityCalculation do @moduledoc """ Adjusted priority calculation for todo metadata. diff --git a/test/support/resources/embedded/todo_metadata/formatted_summary_calculation.ex b/test/support/resources/embedded/todo_metadata/formatted_summary_calculation.ex index 894822f..e071dd9 100644 --- a/test/support/resources/embedded/todo_metadata/formatted_summary_calculation.ex +++ b/test/support/resources/embedded/todo_metadata/formatted_summary_calculation.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoMetadata.FormattedSummaryCalculation do @moduledoc """ Formatted summary calculation for todo metadata. diff --git a/test/support/resources/empty_resource.ex b/test/support/resources/empty_resource.ex index 11cd568..2e1d9f8 100644 --- a/test/support/resources/empty_resource.ex +++ b/test/support/resources/empty_resource.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.EmptyResource do @moduledoc """ Test resource with minimal configuration. diff --git a/test/support/resources/map_field_resource.ex b/test/support/resources/map_field_resource.ex index 7e5aa7c..51e613b 100644 --- a/test/support/resources/map_field_resource.ex +++ b/test/support/resources/map_field_resource.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.MapFieldResource do @moduledoc false use Ash.Resource, diff --git a/test/support/resources/no_relationships_resource.ex b/test/support/resources/no_relationships_resource.ex index c549f2f..c7762a9 100644 --- a/test/support/resources/no_relationships_resource.ex +++ b/test/support/resources/no_relationships_resource.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.NoRelationshipsResource do @moduledoc """ Test resource without any relationships. diff --git a/test/support/resources/not_exposed.ex b/test/support/resources/not_exposed.ex index ef6127a..9085bc7 100644 --- a/test/support/resources/not_exposed.ex +++ b/test/support/resources/not_exposed.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.NotExposed do @moduledoc """ Test resource not exposed to TypeScript generation. diff --git a/test/support/resources/org_todo.ex b/test/support/resources/org_todo.ex index ca36c97..bbfe6f4 100644 --- a/test/support/resources/org_todo.ex +++ b/test/support/resources/org_todo.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.OrgTodo do @moduledoc """ Test resource for organization-level todos with multitenancy support. diff --git a/test/support/resources/post.ex b/test/support/resources/post.ex index 068c2d8..17abb44 100644 --- a/test/support/resources/post.ex +++ b/test/support/resources/post.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Post do @moduledoc """ Test resource representing blog posts with comments. diff --git a/test/support/resources/post_comment.ex b/test/support/resources/post_comment.ex index 7ea9c81..4152699 100644 --- a/test/support/resources/post_comment.ex +++ b/test/support/resources/post_comment.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.PostComment do @moduledoc """ Test resource for post comments. diff --git a/test/support/resources/task.ex b/test/support/resources/task.ex index 1488a5c..6a77883 100644 --- a/test/support/resources/task.ex +++ b/test/support/resources/task.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Task do @moduledoc """ Test resource for validating field and argument name mapping in RPC actions. diff --git a/test/support/resources/todo.ex b/test/support/resources/todo.ex index 366ffc8..b84720e 100644 --- a/test/support/resources/todo.ex +++ b/test/support/resources/todo.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo do @moduledoc """ Test resource representing a todo item with relationships and calculations. diff --git a/test/support/resources/todo/color_palette.ex b/test/support/resources/todo/color_palette.ex index cf39571..fe75d31 100644 --- a/test/support/resources/todo/color_palette.ex +++ b/test/support/resources/todo/color_palette.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo.ColorPalette do @moduledoc """ A custom type that represents a color palette stored as a map. diff --git a/test/support/resources/todo/date_calculations.ex b/test/support/resources/todo/date_calculations.ex index 166f9ec..e6fa1bf 100644 --- a/test/support/resources/todo/date_calculations.ex +++ b/test/support/resources/todo/date_calculations.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo.SimpleDateCalculation do @moduledoc """ Simple date difference calculation for todos. diff --git a/test/support/resources/todo/owner_calculation.ex b/test/support/resources/todo/owner_calculation.ex index 321b04d..85d0b41 100644 --- a/test/support/resources/todo/owner_calculation.ex +++ b/test/support/resources/todo/owner_calculation.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo.OwnerCalculation do @moduledoc """ Calculation for todo owner information. diff --git a/test/support/resources/todo/priority_score.ex b/test/support/resources/todo/priority_score.ex index e25d92c..97ef3af 100644 --- a/test/support/resources/todo/priority_score.ex +++ b/test/support/resources/todo/priority_score.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo.PriorityScore do @moduledoc """ A custom type that represents a priority score from 1-100. diff --git a/test/support/resources/todo/status.ex b/test/support/resources/todo/status.ex index 521c1e8..609fecd 100644 --- a/test/support/resources/todo/status.ex +++ b/test/support/resources/todo/status.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Todo.Status do @moduledoc """ Todo status enumeration. diff --git a/test/support/resources/todo_comment.ex b/test/support/resources/todo_comment.ex index fe003eb..64169f2 100644 --- a/test/support/resources/todo_comment.ex +++ b/test/support/resources/todo_comment.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoComment do @moduledoc """ Test resource representing comments on todo items. diff --git a/test/support/resources/typed_structs/task_stats.ex b/test/support/resources/typed_structs/task_stats.ex index 88d7ca5..f645a10 100644 --- a/test/support/resources/typed_structs/task_stats.ex +++ b/test/support/resources/typed_structs/task_stats.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TaskStats do @moduledoc """ Test TypedStruct for task statistics with field name mappings. diff --git a/test/support/resources/typed_structs/todo_statistics.ex b/test/support/resources/typed_structs/todo_statistics.ex index c618c5e..7deb78b 100644 --- a/test/support/resources/typed_structs/todo_statistics.ex +++ b/test/support/resources/typed_structs/todo_statistics.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoStatistics do @moduledoc """ Test TypedStruct for todo statistics and performance metrics. diff --git a/test/support/resources/typed_structs/todo_timestamp.ex b/test/support/resources/typed_structs/todo_timestamp.ex index 4e79a48..6b640dc 100644 --- a/test/support/resources/typed_structs/todo_timestamp.ex +++ b/test/support/resources/typed_structs/todo_timestamp.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TodoTimestamp do @moduledoc """ Test TypedStruct for todo timestamp data. diff --git a/test/support/resources/user.ex b/test/support/resources/user.ex index ac14830..5ee8aba 100644 --- a/test/support/resources/user.ex +++ b/test/support/resources/user.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.User do @moduledoc """ Test resource representing a user with relationships to todos and settings. diff --git a/test/support/resources/user_settings.ex b/test/support/resources/user_settings.ex index 285b701..153c5fc 100644 --- a/test/support/resources/user_settings.ex +++ b/test/support/resources/user_settings.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.UserSettings do @moduledoc """ Test resource for user settings with multitenancy support. diff --git a/test/support/test_app.ex b/test/support/test_app.ex index 152e9c9..38704a0 100644 --- a/test/support/test_app.ex +++ b/test/support/test_app.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.TestApp do @moduledoc false use Application diff --git a/test/support/test_endpoint.ex b/test/support/test_endpoint.ex index 6d92e1d..73110f6 100644 --- a/test/support/test_endpoint.ex +++ b/test/support/test_endpoint.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TestEndpoint do @moduledoc """ Minimal Phoenix endpoint for Tidewave MCP testing. diff --git a/test/support/test_formatters.ex b/test/support/test_formatters.ex index 583cb2c..5d816fa 100644 --- a/test/support/test_formatters.ex +++ b/test/support/test_formatters.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.Formatters do @moduledoc """ Test helper module containing custom formatter functions for testing. diff --git a/test/support/test_helpers.ex b/test/support/test_helpers.ex index 05298f5..83523d7 100644 --- a/test/support/test_helpers.ex +++ b/test/support/test_helpers.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.TestHelpers do @moduledoc """ Common test helpers and utilities for AshTypescript test suite. diff --git a/test/support/types/custom_metadata.ex b/test/support/types/custom_metadata.ex index 559b863..e1164a5 100644 --- a/test/support/types/custom_metadata.ex +++ b/test/support/types/custom_metadata.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + defmodule AshTypescript.Test.CustomMetadata do @moduledoc """ A custom map type with typescript_field_names callback for testing. diff --git a/test/test_helper.exs b/test/test_helper.exs index c2db696..7e28e31 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +# +# SPDX-License-Identifier: MIT + ExUnit.configure(exclude: [:generates_warnings]) ExUnit.start() diff --git a/test/ts/customTypes.ts b/test/ts/customTypes.ts index 15d46b1..8ab9c76 100644 --- a/test/ts/customTypes.ts +++ b/test/ts/customTypes.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + export type ColorPalette = { primary: string; secondary: string; diff --git a/test/ts/package-lock.json.license b/test/ts/package-lock.json.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/test/ts/package-lock.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/test/ts/package.json.license b/test/ts/package.json.license new file mode 100644 index 0000000..2004992 --- /dev/null +++ b/test/ts/package.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 Torkild G. Kjevik + +SPDX-License-Identifier: MIT diff --git a/test/ts/shouldFail.ts b/test/ts/shouldFail.ts index 8b1b0d3..c344864 100644 --- a/test/ts/shouldFail.ts +++ b/test/ts/shouldFail.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // TypeScript test file for validating INCORRECT usage patterns // This file should FAIL to compile and demonstrates invalid usage that should be caught by TypeScript // diff --git a/test/ts/shouldFail/customFetchErrors.ts b/test/ts/shouldFail/customFetchErrors.ts index 96870ad..7985b3c 100644 --- a/test/ts/shouldFail/customFetchErrors.ts +++ b/test/ts/shouldFail/customFetchErrors.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Custom Fetch Tests - shouldFail // Tests for invalid usage patterns of customFetch and fetchOptions diff --git a/test/ts/shouldFail/invalidCalcArgs.ts b/test/ts/shouldFail/invalidCalcArgs.ts index 3cc3223..638dd8e 100644 --- a/test/ts/shouldFail/invalidCalcArgs.ts +++ b/test/ts/shouldFail/invalidCalcArgs.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Invalid CalcArgs Tests - shouldFail // Tests for invalid args types, structure, and missing args diff --git a/test/ts/shouldFail/invalidChannelUsage.ts b/test/ts/shouldFail/invalidChannelUsage.ts index 15a964e..0fc8b02 100644 --- a/test/ts/shouldFail/invalidChannelUsage.ts +++ b/test/ts/shouldFail/invalidChannelUsage.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Invalid Channel Usage Tests - shouldFail // Tests for invalid channel function usage that should fail TypeScript compilation diff --git a/test/ts/shouldFail/invalidFields.ts b/test/ts/shouldFail/invalidFields.ts index 7065d73..64d08fc 100644 --- a/test/ts/shouldFail/invalidFields.ts +++ b/test/ts/shouldFail/invalidFields.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Invalid Fields Tests - shouldFail // Tests for invalid field names and relationship fields diff --git a/test/ts/shouldFail/invalidStructure.ts b/test/ts/shouldFail/invalidStructure.ts index ab02dff..9a6e082 100644 --- a/test/ts/shouldFail/invalidStructure.ts +++ b/test/ts/shouldFail/invalidStructure.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Invalid Structure Tests - shouldFail // Tests for invalid nesting, missing required properties, and wrong structures diff --git a/test/ts/shouldFail/operations.ts b/test/ts/shouldFail/operations.ts index 6340f0a..ae70509 100644 --- a/test/ts/shouldFail/operations.ts +++ b/test/ts/shouldFail/operations.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Operations Tests - shouldFail // Tests for invalid operation usage that should fail TypeScript compilation diff --git a/test/ts/shouldFail/typeMismatches.ts b/test/ts/shouldFail/typeMismatches.ts index 83505df..eb5c6ee 100644 --- a/test/ts/shouldFail/typeMismatches.ts +++ b/test/ts/shouldFail/typeMismatches.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Type Mismatches Tests - shouldFail // Tests for type assignment errors and invalid field access diff --git a/test/ts/shouldFail/unionValidation.ts b/test/ts/shouldFail/unionValidation.ts index 5ddf3f8..d2ee3cc 100644 --- a/test/ts/shouldFail/unionValidation.ts +++ b/test/ts/shouldFail/unionValidation.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Union Validation Tests - shouldFail // Tests for invalid union field syntax diff --git a/test/ts/shouldFail/wrongPaginationTypes.ts b/test/ts/shouldFail/wrongPaginationTypes.ts index c926fed..2a73c7a 100644 --- a/test/ts/shouldFail/wrongPaginationTypes.ts +++ b/test/ts/shouldFail/wrongPaginationTypes.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Wrong Pagination Types - shouldFail // Tests that using wrong pagination parameters produces type errors diff --git a/test/ts/shouldPass.ts b/test/ts/shouldPass.ts index 0fb65a4..b870f84 100644 --- a/test/ts/shouldPass.ts +++ b/test/ts/shouldPass.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // TypeScript test file for validating correct usage of generated types // This file should compile without errors and demonstrates valid usage patterns // diff --git a/test/ts/shouldPass/calculations.ts b/test/ts/shouldPass/calculations.ts index 455cb96..309dc5e 100644 --- a/test/ts/shouldPass/calculations.ts +++ b/test/ts/shouldPass/calculations.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Calculations Tests - shouldPass // Tests for self calculations, nested calculations, and args variations diff --git a/test/ts/shouldPass/channelOperations.ts b/test/ts/shouldPass/channelOperations.ts index 4f32392..832dc9e 100644 --- a/test/ts/shouldPass/channelOperations.ts +++ b/test/ts/shouldPass/channelOperations.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Channel Operations Tests - shouldPass // Tests for channel-based CRUD operations diff --git a/test/ts/shouldPass/channelTimeoutTest.ts b/test/ts/shouldPass/channelTimeoutTest.ts index 9ee5a80..2cc693d 100644 --- a/test/ts/shouldPass/channelTimeoutTest.ts +++ b/test/ts/shouldPass/channelTimeoutTest.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Channel Timeout Test - shouldPass // Tests that timeout parameter works correctly with channel functions diff --git a/test/ts/shouldPass/channelValidations.ts b/test/ts/shouldPass/channelValidations.ts index 24bbd46..2197b52 100644 --- a/test/ts/shouldPass/channelValidations.ts +++ b/test/ts/shouldPass/channelValidations.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Channel Validation Tests - shouldPass // Tests for channel validation functions diff --git a/test/ts/shouldPass/complexScenarios.ts b/test/ts/shouldPass/complexScenarios.ts index 4d16842..7db0c1c 100644 --- a/test/ts/shouldPass/complexScenarios.ts +++ b/test/ts/shouldPass/complexScenarios.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Complex Scenarios Tests - shouldPass // Tests that combine multiple features and complex usage patterns diff --git a/test/ts/shouldPass/conditionalPagination.ts b/test/ts/shouldPass/conditionalPagination.ts index 36b7002..0570132 100644 --- a/test/ts/shouldPass/conditionalPagination.ts +++ b/test/ts/shouldPass/conditionalPagination.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Conditional Pagination Tests - shouldPass // Tests for optional pagination behavior where types match runtime behavior diff --git a/test/ts/shouldPass/customFetch.ts b/test/ts/shouldPass/customFetch.ts index 5dff92b..e0183a9 100644 --- a/test/ts/shouldPass/customFetch.ts +++ b/test/ts/shouldPass/customFetch.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Custom Fetch Tests - shouldPass // Tests for customFetch and fetchOptions parameters diff --git a/test/ts/shouldPass/customTypes.ts b/test/ts/shouldPass/customTypes.ts index 5d12697..97ea857 100644 --- a/test/ts/shouldPass/customTypes.ts +++ b/test/ts/shouldPass/customTypes.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Custom Types Tests - shouldPass // Tests for custom type field selection and usage diff --git a/test/ts/shouldPass/embeddedResources.ts b/test/ts/shouldPass/embeddedResources.ts index 595a6b5..5d06473 100644 --- a/test/ts/shouldPass/embeddedResources.ts +++ b/test/ts/shouldPass/embeddedResources.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Embedded Resources Tests - shouldPass // Tests for embedded resource field selection and input types diff --git a/test/ts/shouldPass/fetchOptionsAdvanced.ts b/test/ts/shouldPass/fetchOptionsAdvanced.ts index 7bf4c51..754c380 100644 --- a/test/ts/shouldPass/fetchOptionsAdvanced.ts +++ b/test/ts/shouldPass/fetchOptionsAdvanced.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Advanced fetchOptions Tests - shouldPass // Real-world usage patterns for fetchOptions and customFetch diff --git a/test/ts/shouldPass/keywordTuple.ts b/test/ts/shouldPass/keywordTuple.ts index b9a8d01..84ae22f 100644 --- a/test/ts/shouldPass/keywordTuple.ts +++ b/test/ts/shouldPass/keywordTuple.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Test file for keyword and tuple type handling in generated TypeScript import { listTodos, getKeywordOptionsTodo, getCoordinatesInfoTodo } from "../generated"; diff --git a/test/ts/shouldPass/operations.ts b/test/ts/shouldPass/operations.ts index 3ab7350..fd06309 100644 --- a/test/ts/shouldPass/operations.ts +++ b/test/ts/shouldPass/operations.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Operations Tests - shouldPass // Tests for basic CRUD operations (create, list, get, update) diff --git a/test/ts/shouldPass/precisePaginationTypes.ts b/test/ts/shouldPass/precisePaginationTypes.ts index ae89427..1122810 100644 --- a/test/ts/shouldPass/precisePaginationTypes.ts +++ b/test/ts/shouldPass/precisePaginationTypes.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Precise Pagination Type Tests - shouldPass // Tests that pagination result types are inferred correctly based on what params are used diff --git a/test/ts/shouldPass/relationships.ts b/test/ts/shouldPass/relationships.ts index 4b77af1..80b171c 100644 --- a/test/ts/shouldPass/relationships.ts +++ b/test/ts/shouldPass/relationships.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Relationships Tests - shouldPass // Tests for relationship field selection in calculations diff --git a/test/ts/shouldPass/typedMaps.ts b/test/ts/shouldPass/typedMaps.ts index 73c1da1..f2dd8ff 100644 --- a/test/ts/shouldPass/typedMaps.ts +++ b/test/ts/shouldPass/typedMaps.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Typed Maps Tests - shouldPass // Tests for typed map field selection and validation using current field syntax diff --git a/test/ts/shouldPass/typedStructs.ts b/test/ts/shouldPass/typedStructs.ts index 4adce57..d91175a 100644 --- a/test/ts/shouldPass/typedStructs.ts +++ b/test/ts/shouldPass/typedStructs.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + import { getTodo } from "../generated"; export const todoWithStatistics = await getTodo({ diff --git a/test/ts/shouldPass/unionTypes.ts b/test/ts/shouldPass/unionTypes.ts index f4e70ab..d28602d 100644 --- a/test/ts/shouldPass/unionTypes.ts +++ b/test/ts/shouldPass/unionTypes.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Union Types Tests - shouldPass // Tests for union field selection and validation using current field syntax diff --git a/test/ts/shouldPass/untypedMaps.ts b/test/ts/shouldPass/untypedMaps.ts index ede143b..b7cd742 100644 --- a/test/ts/shouldPass/untypedMaps.ts +++ b/test/ts/shouldPass/untypedMaps.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Test TypeScript compilation and type safety for untyped map features import { updateTodoWithUntypedData, diff --git a/test/ts/shouldPass/validationErrors.ts b/test/ts/shouldPass/validationErrors.ts index f991711..b9f74b1 100644 --- a/test/ts/shouldPass/validationErrors.ts +++ b/test/ts/shouldPass/validationErrors.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Test file to verify explicit validation error types work with actual generated discriminated union types // This tests with the real CreateTodoInput structure from generated.ts diff --git a/test/ts/zod/shouldFail/complexInvalidSchemas.ts b/test/ts/zod/shouldFail/complexInvalidSchemas.ts index 5bd1297..79bd894 100644 --- a/test/ts/zod/shouldFail/complexInvalidSchemas.ts +++ b/test/ts/zod/shouldFail/complexInvalidSchemas.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Complex Invalid Schema Tests - shouldFail // Tests for complex invalid schema usage patterns that should fail TypeScript compilation diff --git a/test/ts/zod/shouldFail/invalidZodUsage.ts b/test/ts/zod/shouldFail/invalidZodUsage.ts index 35f36a4..e7c3727 100644 --- a/test/ts/zod/shouldFail/invalidZodUsage.ts +++ b/test/ts/zod/shouldFail/invalidZodUsage.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Invalid Zod Schema Usage Tests - shouldFail // Tests for invalid schema usage patterns that should fail TypeScript compilation diff --git a/test/ts/zod/shouldPass/basicZodUsage.ts b/test/ts/zod/shouldPass/basicZodUsage.ts index 366e467..c7ebaed 100644 --- a/test/ts/zod/shouldPass/basicZodUsage.ts +++ b/test/ts/zod/shouldPass/basicZodUsage.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Basic Zod Schema Usage Tests - shouldPass // Tests for valid schema validation patterns with generated schemas diff --git a/test/ts/zod/shouldPass/complexSchemaValidation.ts b/test/ts/zod/shouldPass/complexSchemaValidation.ts index ee0dc1b..925d663 100644 --- a/test/ts/zod/shouldPass/complexSchemaValidation.ts +++ b/test/ts/zod/shouldPass/complexSchemaValidation.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 Torkild G. Kjevik +// +// SPDX-License-Identifier: MIT + // Complex Schema Validation Tests - shouldPass // Tests for advanced schema features like embedded resources, unions, and calculations diff --git a/usage-rules.md b/usage-rules.md index 1df1764..815df2c 100644 --- a/usage-rules.md +++ b/usage-rules.md @@ -1,3 +1,9 @@ + + # AshTypescript Usage Rules ## Quick Reference