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
10 changes: 0 additions & 10 deletions .changeset/warm-dodos-decide.md

This file was deleted.

86 changes: 49 additions & 37 deletions .github/workflows/add-docs-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,54 @@
name: Generate Docs

on:
pull_request:
types: [opened, synchronize]
branches:
- main
pull_request:
types: [opened, synchronize]
branches:
- main

jobs:
generate-docs:
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CHANGESETS_GH_TOKEN }}

- uses: pnpm/action-setup@v4
with:
version: 10
run_install: true

- uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install packages
run: pnpm install

- name: Build packages
run: pnpm build:packages

- name: Build Docs
run: pnpm build:docs

- name: Commit and push docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs
git commit -m "chore: update docs [skip ci]" || echo "No changes to commit"
git push origin HEAD:main --force-with-lease
generate-docs:
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CHANGESETS_GH_TOKEN }}

- uses: pnpm/action-setup@v4
with:
version: 10
run_install: true

- uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install packages
run: pnpm install

- name: Build packages
run: pnpm build:packages

- name: Build Docs
run: pnpm build:docs

- name: Commit docs
id: commit_docs
run: |
git add docs
if git diff --cached --quiet; then
echo "No changes to commit."
echo "commit=false" >> $GITHUB_OUTPUT
else
git commit -m "chore: update docs [skip ci]"
echo "commit=true" >> $GITHUB_OUTPUT
fi

- name: Push docs (only if commit was made)
if: steps.commit_docs.outputs.commit == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin HEAD:${GITHUB_HEAD_REF} --force-with-lease

3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
- [x] **Scaffolding a registry** of reusable Xano components
- [x] Exporting all available `xanoscript` from your instance via metadata API _*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
- [x] Adding components to Xano from a registry (only functions, tables, queries for now)
- [ ] Automated test runner with assertion configuration
- [ ] Linting with custom rulesets
- [x] Automated test runner with assertion configuration

---

Expand Down
7 changes: 4 additions & 3 deletions docs/commands/export-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Backup Xano Workspace via Metadata API

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--print-output-dir Expose usable output path for further reuse.
Expand Down
20 changes: 11 additions & 9 deletions docs/commands/generate-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,27 @@ xano generate-code [options]
```sh
Usage: xano generate-code [options]

Create a library based on the OpenAPI specification. If the openapi specification has not
yet been generated, this will generate that as well as the first step.
Create a library based on the OpenAPI specification. If the openapi
specification has not yet been generated, this will generate that as well as the
first step.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--group <name> API group name. Same as on Xano Interface.
--all Regenerate for all API groups in the workspace / branch of the
current context.
--all Regenerate for all API groups in the workspace /
branch of the current context.
--print-output-dir Expose usable output path for further reuse.
--generator <generator> Generator to use, see all options at:
https://openapi-generator.tech/docs/generators
--args <args> Additional arguments to pass to the generator. See
https://openapi-generator.tech/docs/usage#generate
--debug Specify this flag in order to allow logging. Logs will appear in
output/_logs. Default: false
--debug Specify this flag in order to allow logging. Logs
will appear in output/_logs. Default: false
-h, --help display help for command
```
11 changes: 6 additions & 5 deletions docs/commands/generate-oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ Update and generate OpenAPI spec(s) for the current context.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--group <name> API group name. Same as on Xano Interface.
--all Regenerate for all API groups in the workspace / branch of the
current context.
--all Regenerate for all API groups in the workspace /
branch of the current context.
--print-output-dir Expose usable output path for further reuse.
-h, --help display help for command
```
10 changes: 6 additions & 4 deletions docs/commands/generate-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ Options:
--input <file> workspace yaml file
--output <dir> output directory (overrides config)
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--print-output-dir Expose usable output path for further reuse.
--fetch Specify this if you want to fetch the workspace schema from Xano
--fetch Specify this if you want to fetch the workspace
schema from Xano
-h, --help display help for command
```
7 changes: 4 additions & 3 deletions docs/commands/generate-xs-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Process Xano workspace into repo structure

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--print-output-dir Expose usable output path for further reuse.
Expand Down
7 changes: 4 additions & 3 deletions docs/commands/registry-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Add a prebuilt component to the current Xano context.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--components Comma-separated list of components to add
Expand Down
9 changes: 5 additions & 4 deletions docs/commands/registry-scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ xano registry-scaffold [options]
```sh
Usage: xano registry-scaffold [options]

Scaffold a Xano registry folder with a sample component. Xano registry can be used to share
and reuse prebuilt components. In the registry you have to follow the
[registry](https://nextcurve.hu/schemas/registry/registry.json) and [registry
item](https://nextcurve.hu/schemas/registry/registry-item.json) schemas.
Scaffold a Xano registry folder with a sample component. Xano registry can be
used to share and reuse prebuilt components. In the registry you have to follow
the [registry](https://nextcurve.hu/schemas/registry/registry.json) and
[registry item](https://nextcurve.hu/schemas/registry/registry-item.json)
schemas.

Options:
--output <path> Output path for the registry
Expand Down
7 changes: 4 additions & 3 deletions docs/commands/restore-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Restore a backup to a Xano Workspace via Metadata API

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--source-backup <file> Path to the backup file to restore
--force Force restoration without confirmation
-h, --help display help for command
Expand Down
13 changes: 7 additions & 6 deletions docs/commands/run-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ Usage: xano run-test [options]
Run an API test suite via the OpenAPI spec. WIP...

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--group <name> API group name. Same as on Xano Interface.
--all Regenerate for all API groups in the workspace / branch of the
current context.
--all Regenerate for all API groups in the workspace /
branch of the current context.
--print-output-dir Expose usable output path for further reuse.
--test-config-path <path> Path to a test configuration file.
-h, --help display help for command
Expand Down
15 changes: 8 additions & 7 deletions docs/commands/serve-oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ Serve the Open API specification locally for quick visual check.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
--group <name> API group name. Same as on Xano Interface.
--all Regenerate for all API groups in the workspace / branch of the
current context.
--listen <port> The port where you want your registry to be served locally. By
default it is 5000.
--all Regenerate for all API groups in the workspace /
branch of the current context.
--listen <port> The port where you want your registry to be served
locally. By default it is 5000.
--cors Do you want to enable CORS? By default false.
-h, --help display help for command
```
8 changes: 4 additions & 4 deletions docs/commands/serve-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ xano serve-registry [options]
```sh
Usage: xano serve-registry [options]

Serve the registry locally. This allows you to actually use your registry without deploying
it.
Serve the registry locally. This allows you to actually use your registry
without deploying it.

Options:
--root <path> Where did you put your registry?
--listen <port> The port where you want your registry to be served locally. By default
it is 5000.
--listen <port> The port where you want your registry to be served locally.
By default it is 5000.
--cors Do you want to enable CORS? By default false.
-h, --help display help for command
```
7 changes: 4 additions & 3 deletions docs/commands/switch-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ Switch instance/workspace context

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
--workspace <workspace> The workspace name. This is used to fetch the workspace
configuration. Same as on Xano interface.
configuration. The value provided at the setup
command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
-h, --help display help for command
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @calycode/xano-cli

## 0.4.4

### Patch Changes

- 1fec1a5: refactor: minor cleanup, removal of the linting command..
fix: make backup to be stream, to allow bigger workspaces
refactor: cleanup of fs / path imports in the cli
- Updated dependencies [1fec1a5]
- @calycode/[email protected]
- @calycode/[email protected]
- @calycode/[email protected]

## 0.4.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calycode/cli",
"version": "0.4.3",
"version": "0.4.4",
"description": "Command-line interface for Xano providing terminal access to Xano workflows",
"publishConfig": {
"access": "restricted",
Expand Down
11 changes: 11 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @calycode/caly-core

## 0.4.4

### Patch Changes

- 1fec1a5: refactor: minor cleanup, removal of the linting command..
fix: make backup to be stream, to allow bigger workspaces
refactor: cleanup of fs / path imports in the cli
- Updated dependencies [1fec1a5]
- @calycode/[email protected]
- @calycode/[email protected]

## 0.4.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calycode/core",
"version": "0.4.3",
"version": "0.4.4",
"description": "Core functionality for the Caly Xano tooling providing programmatic access to Xano workflows",
"publishConfig": {
"access": "restricted"
Expand Down
Loading