Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .check.exs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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"}},
Expand Down
4 changes: 4 additions & 0 deletions .credo.exs
Original file line number Diff line number Diff line change
@@ -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`.
#
Expand Down
4 changes: 4 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

---
updates:
- directory: /
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

name: CI
on:
push:
Expand All @@ -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 }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

# The directory Mix will write compiled artifacts to.
/_build/

Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
elixir 1.18.3-otp-27
erlang 27.3.3
nodejs 22.16.0
pipx 1.8.0
3 changes: 3 additions & 0 deletions .tool-versions.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# AshTypescript - AI Assistant Guide

## Project Overview
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Change Log

All notable changes to this project will be documented in this file.
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

18 changes: 18 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
MIT License

Copyright (c) <year> <copyright holders>

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.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

<img src="https://github.com/ash-project/ash_typescript/blob/main/logos/ash-typescript.png?raw=true" alt="Logo" width="300"/>

![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**
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/architecture-decisions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# AshTypescript Architecture Changelog

Key architectural decisions and their reasoning for AI assistant context.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/development-workflows.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Development Workflows

Essential development workflows and patterns for AshTypescript development.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/embedded-resources.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Embedded Resources Architecture

Implementation of embedded resources with relationship-like integration for AshTypescript development.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/field-argument-name-mapping.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# 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.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/rpc-pipeline.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# RPC Pipeline Architecture

## Overview
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/type-system.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Type System and Type Inference

Core type inference system architecture and schema-based classification for AshTypescript development.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/union-systems-core.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Union Systems - Core Implementation

Core union field selection and storage mode architecture for AshTypescript development.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/features/zod-schemas.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# Zod Schema Generation Implementation

Implementation of Zod validation schema generation for AshTypescript runtime validation.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/testing-and-validation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# TypeScript Testing and Validation

Comprehensive guide for testing organization and validation procedures for maintaining system stability.
Expand Down
6 changes: 6 additions & 0 deletions agent-docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
-->

# AshTypescript Troubleshooting

## Quick Diagnosis
Expand Down
4 changes: 4 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

import Config

# Default configuration for ash_typescript
Expand Down
4 changes: 4 additions & 0 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

import Config

config :git_ops,
Expand Down
3 changes: 3 additions & 0 deletions documentation/dsls/DSL-AshTypescript.Resource.md.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
3 changes: 3 additions & 0 deletions documentation/dsls/DSL-AshTypescript.Rpc.md.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Torkild G. Kjevik

SPDX-License-Identifier: MIT
4 changes: 4 additions & 0 deletions lib/ash_typescript.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

defmodule AshTypescript do
@moduledoc false
end
4 changes: 4 additions & 0 deletions lib/ash_typescript/codegen.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/field_formatter.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/filter.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/helpers.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource/info.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource/verify_field_names.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource/verify_map_field_names.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource/verify_mapped_field_names.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/resource/verify_unique_type_names.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/rpc.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2025 Torkild G. Kjevik
#
# SPDX-License-Identifier: MIT

defmodule AshTypescript.Rpc do
@moduledoc false

Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/rpc/codegen.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/rpc/error_builder.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/ash_typescript/rpc/info.ex
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading
Loading