Skip to content

Commit 60d5d14

Browse files
committed
Initial public release
0 parents  commit 60d5d14

58 files changed

Lines changed: 11529 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.fs]
2+
max_line_length = 110
3+
indent_style = space
4+
indent_size = 2

.gitattributes

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Auto detect text files
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp text=auto eol=lf
6+
*.fs diff=csharp text=auto eol=lf
7+
*.fsi diff=csharp text=auto eol=lf
8+
*.fsx diff=csharp text=auto eol=lf
9+
*.sln text eol=crlf merge=union
10+
*.csproj merge=union
11+
*.vbproj merge=union
12+
*.fsproj merge=union
13+
*.dbproj merge=union
14+
15+
# Standard to msysgit
16+
*.doc diff=astextplain
17+
*.DOC diff=astextplain
18+
*.docx diff=astextplain
19+
*.DOCX diff=astextplain
20+
*.dot diff=astextplain
21+
*.DOT diff=astextplain
22+
*.pdf diff=astextplain
23+
*.PDF diff=astextplain
24+
*.rtf diff=astextplain
25+
*.RTF diff=astextplain
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Bug Report
2+
description: Something isn't working as expected
3+
labels: [bug]
4+
5+
body:
6+
- type: input
7+
id: version
8+
attributes:
9+
label: XrmTypeScript version
10+
placeholder: e.g. v1.0.0
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: description
16+
attributes:
17+
label: What happened?
18+
description: Include any error messages or unexpected output.
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: What did you expect?
26+
validations:
27+
required: true
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Request
2+
description: Suggest an idea or improvement
3+
labels: [enhancement]
4+
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: What problem does this solve?
10+
description: Describe the scenario where this would help.
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposed solution
18+
description: What would you like to see added or changed?
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: alternatives
24+
attributes:
25+
label: Alternatives considered
26+
description: Any workarounds you've tried or other approaches you considered.
27+
validations:
28+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## What does this PR do?
2+
3+
<!-- Briefly describe the change and why it's needed. -->
4+
5+
## Checklist
6+
7+
- [ ] Builds and runs without errors (`dotnet fsi build.fsx RunXTS`)
8+
- [ ] Tested against a real Dynamics 365 / Power Apps environment, or explain why not
9+
- [ ] No breaking changes to generated output, or breaking changes are documented

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: '8.x'
21+
22+
- run: dotnet fsi build.fsx RunXTS

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: windows-latest # net462 exe requires Windows
11+
permissions:
12+
contents: write
13+
id-token: write
14+
attestations: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # required for 'git describe --tags' in build.fsx
20+
21+
- uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: '8.x'
24+
25+
- run: dotnet fsi build.fsx Zip
26+
27+
- name: Attest build provenance
28+
uses: actions/attest-build-provenance@v2
29+
with:
30+
subject-path: bin/*.zip
31+
32+
- name: Upload to GitHub Release
33+
uses: softprops/action-gh-release@v2
34+
with:
35+
files: bin/*.zip

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Build output
2+
[Bb]in/
3+
[Oo]bj/
4+
temp/
5+
6+
# Visual Studio
7+
.vs/
8+
*.user
9+
*.suo
10+
*.sln.docstates
11+
12+
# NuGet
13+
packages/
14+
*.nupkg
15+
16+
# Windows
17+
Thumbs.db
18+
Desktop.ini
19+
$RECYCLE.BIN/
20+
21+
# Mac
22+
.DS_Store

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
## [1.0.0] - 2026-04-09
4+
### Added
5+
- Initial public release
6+
7+
[1.0.0]: https://github.com/Mosh-K/XrmTypeScript/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
## Reporting a Bug
4+
5+
Be sure to reproduce the issue on the latest master branch before filing a report.
6+
If you can still reproduce it, open a detailed issue with the steps needed to reproduce the bug.
7+
The goal of your description is to make it easy to fix the bug, not just find it.
8+
9+
## Feature Requests
10+
11+
We love new ideas. Open an issue explaining the feature in detail so we can understand exactly what you need.
12+
13+
## Building the Project
14+
15+
The build script is `build.fsx`, run with `dotnet fsi`.
16+
17+
```
18+
dotnet fsi build.fsx
19+
```
20+
21+
22+
## Code Structure
23+
24+
XrmTypeScript works by querying CRM for metadata and generating TypeScript declaration files from it.
25+
The entry point is `XrmTypeScript.fs`, which calls two functions: `retrieveRawState`, which fetches
26+
metadata from CRM, and `generateFromRaw`, which generates the declaration files from that metadata.
27+
28+
The following describes the contents of each folder in the project.
29+
30+
### Types
31+
Contains the static TypeScript declaration files that are copied directly to the output.
32+
The main file is `xrm.d.ts`, which provides the base `Xrm` namespace declarations based on `@types/xrm`.
33+
34+
### TypeScript
35+
Contains helper methods and declarations used during the generation of TypeScript files.
36+
37+
### Crm
38+
Contains helper methods for connecting to and querying CRM.
39+
`CrmAuth` handles authentication, `CrmBaseHelper` handles querying, and `CrmDataHelper` extends `CrmBaseHelper`.
40+
41+
### Interpretation
42+
Contains interpreters that translate raw CRM metadata into an intermediate representation used by the rest of the program.
43+
44+
### CreateTypeScript
45+
Contains functions that translate the intermediate representation into TypeScript declaration file content.
46+
47+
### Generation
48+
Orchestrates the overall generation process — retrieving metadata, interpreting it, and writing the output files.
49+
50+
### CommandLine
51+
Contains the functions necessary to handle command-line arguments.

0 commit comments

Comments
 (0)