@ankhorage/paradox 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/README.md +5 -0
- package/.changeset/config.json +11 -0
- package/.github/workflows/docs.yml +45 -0
- package/.prettierignore +1 -0
- package/.prettierrc.js +5 -0
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/bun.lock +663 -0
- package/eslint.config.mjs +12 -0
- package/package.json +36 -0
- package/paradox/components.md +1 -0
- package/paradox/exports.json +57 -0
- package/paradox/exports.md +67 -0
- package/paradox/paradox.json +62 -0
- package/paradox.config.ts +18 -0
- package/src/analyze/analyze.ts +46 -0
- package/src/analyze/components.ts +27 -0
- package/src/analyze/exports.ts +68 -0
- package/src/analyze/project.ts +11 -0
- package/src/analyze/types.ts +36 -0
- package/src/analyze/utils/getComponentPropsType.ts +26 -0
- package/src/analyze/utils/getParadoxComment.ts +24 -0
- package/src/analyze/utils/getPropsFromType.ts +24 -0
- package/src/analyze/utils/isReactComponent.ts +35 -0
- package/src/analyze/utils/parseParadoxComment.ts +23 -0
- package/src/analyze/utils/resolveExportSymbol.ts +8 -0
- package/src/cli.ts +30 -0
- package/src/config/defineParadoxConfig.ts +8 -0
- package/src/config/types.ts +20 -0
- package/src/index.ts +9 -0
- package/src/model/buildModel.ts +25 -0
- package/src/model/types.ts +19 -0
- package/src/render/render.ts +82 -0
- package/src/render/types.ts +10 -0
- package/src/write/write.ts +25 -0
- package/tests/__snapshots__/basic.components.md +10 -0
- package/tests/__snapshots__/basic.exports.md +13 -0
- package/tests/__snapshots__/basic.readme.md +13 -0
- package/tests/analyze.test.ts +60 -0
- package/tests/fixtures/basic/package.json +5 -0
- package/tests/fixtures/basic/src/index.ts +2 -0
- package/tests/fixtures/basic/src/internal.ts +6 -0
- package/tests/fixtures/basic/src/ui.ts +29 -0
- package/tests/fixtures/basic/tsconfig.json +11 -0
- package/tsconfig.eslint.json +16 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout repository
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup Bun
|
|
18
|
+
uses: oven-sh/setup-bun@v2
|
|
19
|
+
with:
|
|
20
|
+
bun-version: '1.3.11'
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: bun install --frozen-lockfile
|
|
24
|
+
|
|
25
|
+
- name: Run lint
|
|
26
|
+
run: bun run lint
|
|
27
|
+
|
|
28
|
+
- name: Check formatting
|
|
29
|
+
run: bun run format:check
|
|
30
|
+
|
|
31
|
+
- name: Run typecheck
|
|
32
|
+
run: bun run typecheck
|
|
33
|
+
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: bun run test
|
|
36
|
+
|
|
37
|
+
- name: Check changesets
|
|
38
|
+
if: github.event_name == 'pull_request'
|
|
39
|
+
run: bun run changeset:status
|
|
40
|
+
|
|
41
|
+
- name: Generate docs
|
|
42
|
+
run: bun run docs
|
|
43
|
+
|
|
44
|
+
- name: Check generated docs
|
|
45
|
+
run: git diff --exit-code
|
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tests/__snapshots__/*.md
|
package/.prettierrc.js
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.0.0
|
|
4
|
+
|
|
5
|
+
### Initial Changes
|
|
6
|
+
|
|
7
|
+
- Bootstrap Paradox with a TypeScript documentation pipeline: analyze, model, render, and write.
|
|
8
|
+
- Add generated README and package export artifacts under `paradox/`.
|
|
9
|
+
- Add repository config, CI validation, linting, formatting, typechecking, and bun tests.
|
|
10
|
+
|
|
11
|
+
All notable changes to this project will be documented in this file.
|
|
12
|
+
|
|
13
|
+
The format is based on Changesets and the package changelog generated during release.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ankhorage
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @ankhorage/paradox
|
|
2
|
+
|
|
3
|
+
Deterministic documentation generator for TypeScript packages.
|
|
4
|
+
|
|
5
|
+
## Package Exports
|
|
6
|
+
|
|
7
|
+
### analyze
|
|
8
|
+
|
|
9
|
+
Runs the source analysis pipeline for a configured package.
|
|
10
|
+
|
|
11
|
+
### AnalysisComponent
|
|
12
|
+
|
|
13
|
+
Describes one React component and its extracted props.
|
|
14
|
+
|
|
15
|
+
### AnalysisExport
|
|
16
|
+
|
|
17
|
+
Describes one exported declaration discovered in a package.
|
|
18
|
+
|
|
19
|
+
### AnalysisResult
|
|
20
|
+
|
|
21
|
+
Complete analysis output used to build the documentation model.
|
|
22
|
+
|
|
23
|
+
### defineParadoxConfig
|
|
24
|
+
|
|
25
|
+
Defines a Paradox configuration object without changing its shape.
|
|
26
|
+
|
|
27
|
+
### ParadoxConfig
|
|
28
|
+
|
|
29
|
+
Configuration for running Paradox against a TypeScript package.
|
|
30
|
+
|
|
31
|
+
### buildModel
|
|
32
|
+
|
|
33
|
+
Converts analysis output into a serializable documentation model.
|
|
34
|
+
|
|
35
|
+
### DocumentationModel
|
|
36
|
+
|
|
37
|
+
Serializable model consumed by renderers and writers.
|
|
38
|
+
|
|
39
|
+
### render
|
|
40
|
+
|
|
41
|
+
Renders the documentation model into README and artifact files.
|
|
42
|
+
|
|
43
|
+
### RenderResult
|
|
44
|
+
|
|
45
|
+
Rendered documentation files ready to be written to disk.
|
|
46
|
+
|
|
47
|
+
### write
|
|
48
|
+
|
|
49
|
+
Writes generated documentation artifacts to the configured output paths.
|