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
8 changes: 8 additions & 0 deletions .github/badges/abap2ui5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"schemaVersion": 1,
"label": "abap2UI5",
"message": "2 apps · 3 views · 45 controls",
"color": "007ec6",
"labelColor": "555",
"cacheSeconds": 3600
}
8 changes: 8 additions & 0 deletions .github/badges/check-abap2ui5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"schemaVersion": 1,
"label": "check-abap2UI5",
"message": "86 rules passed",
"color": "4c1",
"labelColor": "555",
"cacheSeconds": 3600
}
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2

updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
groups:
# one pull request for the toolchain rather than one per pin
toolchain:
patterns: ["*"]

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns: ["*"]
26 changes: 0 additions & 26 deletions .github/workflows/ABAP_CLOUD.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/ABAP_STANDARD.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/abap-cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: abap-cloud

on:
# the sibling repositories are resolved from their main branch with no
# version pin, so an upstream rename breaks this one silently. Nothing
# else notices while there is no pull request open.
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: abap-cloud-${{ github.ref }}
cancel-in-progress: true

jobs:
abap-cloud:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npx abaplint .github/abaplint/abap_cloud.jsonc
32 changes: 32 additions & 0 deletions .github/workflows/abap-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: abap-standard

on:
# the sibling repositories are resolved from their main branch with no
# version pin, so an upstream rename breaks this one silently. Nothing
# else notices while there is no pull request open.
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: abap-standard-${{ github.ref }}
cancel-in-progress: true

jobs:
abap-standard:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npx abaplint ./abaplint.jsonc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build_rename
name: build-rename

# Renames all artifacts to a chosen namespace and pushes the result to
# the branch rename_<name>, e.g. rename_zmyui5 - ready to pull with
Expand All @@ -24,11 +24,11 @@ permissions:
contents: write

concurrency:
group: build_rename-${{ inputs.namespace }}
group: build-rename-${{ inputs.namespace }}
cancel-in-progress: false

jobs:
build_rename:
build-rename:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand All @@ -50,8 +50,8 @@ jobs:
echo "BRANCH=rename_$ns" >> "$GITHUB_ENV"
echo "Building branch: rename_$ns"

- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: 'npm'
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/check-abap2ui5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: check-abap2ui5

# The abap2UI5-specific lint, as opposed to abap-standard/cloud/702, which lint
# ABAP itself. It reads a whole app class and the view it builds: the controls
# and members it writes, the structure of the document, the UI5 version floor,
# the data behind the bindings, and the abap2ui5 semantics no UI5 tooling sees.
# Settings live in abap2ui5lint.jsonc.
#
# @abap2ui5/render-runtime is a devDependency because the render gate is the
# only reason for it: it carries the OpenUI5 packages and the browser the gate
# serves. The linter names it an OPTIONAL PEER, the one dependency kind npm
# does not install by itself - without it the views stop being rendered and the
# run still passes.

on:
pull_request:
push:
branches: [main]
# nothing else notices when an upstream rename breaks the views here
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:

permissions:
contents: write

concurrency:
group: check-abap2ui5-${{ github.ref }}
cancel-in-progress: true

jobs:
check-abap2ui5:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# the branch, not the merge commit, so the badges can be pushed back
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: 'npm'
- run: npm ci
# the render gate drives a headless browser
- run: npx playwright install chromium --with-deps
- run: npx abap2ui5lint

# the same run once more as markdown, into the run's own page - findings
# and totals without expanding a log. --no-render because whether the views
# load was already decided above; --no-badge so a pass that skipped a gate
# cannot overwrite what the real run wrote.
- name: Job summary
if: always()
run: npx abap2ui5lint --no-render --advisory --no-progress --no-badge --format markdown >> "$GITHUB_STEP_SUMMARY"

# The badges are committed onto the PULL REQUEST branch: main is protected
# and github-actions[bot] cannot be given a bypass, so the pull request that
# changes the views is what changes the badges, and main picks them up when
# it merges. Only after a green gate - a red pull request cannot merge, so
# its badges would never reach main, and a badge commit on top of a failing
# run reads as if something had been fixed.
- name: Publish the badges
if: success()
env:
PUSHABLE: ${{ github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository }}
run: |
if git diff --quiet -- .github/badges; then
echo "The linter badges are up to date."
exit 0
fi
git diff -- .github/badges
if [ "$PUSHABLE" != "true" ]; then
echo "::warning::The linter badges are out of date and this ref cannot be pushed to. Run 'npm run check:abap2ui5' and commit .github/badges/."
exit 0
fi
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -qm 'Refresh the abap2UI5-linter badges' -- .github/badges
git push
echo "Badges refreshed and pushed onto the pull request branch."
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: renaming
name: check-rename

on:
push:
Expand All @@ -9,16 +9,16 @@ permissions:
contents: read

concurrency:
group: rename_test-${{ github.ref }}
group: check-rename-${{ github.ref }}
cancel-in-progress: true

jobs:
rename_test:
check-rename:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
cache: 'npm'
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CLAUDE.md

All project guidance lives in **[AGENTS.md](AGENTS.md)** — the single source of
truth for this repository.

Read `AGENTS.md` before making any change.
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing

An SQL console in the browser, without Eclipse or SAP GUI.

## Before you open a pull request

Run what CI runs:

```sh
npm ci
npm run check
```

`npm run check` is the same set of steps the workflows run on a pull request,
so a green run locally is a green run there. `npm test` is an alias for it —
this repository has no separate unit-test suite; its ABAP is checked, not
executed.

## What the gates are

| Gate | What it proves |
| --- | --- |
| `npm run lint` | abaplint: syntax and style, resolved against the abap2UI5 core and the sibling addons |
| `npm run check:cloud` | the same source compiles under ABAP Cloud restrictions |
| `npm run check:abap2ui5` | [abap2UI5-linter](https://github.com/abap2UI5/linter): the app class and the view it builds, judged together — controls, members, bindings, the UI5 version floor, and a headless render of every view |
| `npm run rename` | the namespace rename still applies cleanly |

The abap2UI5-linter keeps a baseline in `abap2ui5lint-baseline.json`. Findings
recorded there are counted and never listed; a **new** finding fails the gate,
and an entry whose finding is gone is stale and fails too. So the file only ever
shrinks — fix something, then refresh it with:

```sh
npx abap2ui5lint --update-baseline
```

## Conventions

English for code, comments, commit messages and pull requests. Commit subjects
are written in the imperative and describe the outcome, not the mechanics. One
topic per pull request. The wider rules the whole ecosystem follows live in
[abap2UI5's CONVENTIONS.md](https://github.com/abap2UI5/abap2UI5/blob/main/.github/shared/CONVENTIONS.md).

## Views

Views are built with `z2ui5_cl_ui5_view_builder`, the generic builder in the
core's `src/02` — five verbs (`ele`, `tag`, `a`, `end`, `stringify`) that
translate a UI5 XML view one to one. Two things to know before editing a chain:

- `a( )` applies to the element the chain is pointing at, so give a control its
attributes immediately after the `ele( )` or `tag( )` that opened it;
- an ABAP boolean goes into `b =`, never `v =`. Through `v =` an `abap_false`
renders as an empty string, which UI5 reads as true.

The frozen `z2ui5_cl_xml_view` is gone from this repository. Do not reintroduce
it: it lives in the core's `src/99`, outside the released API, and the view gate
can read nothing that is built with it.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[![ABAP_STANDARD](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_STANDARD.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_STANDARD.yaml)
[![ABAP_CLOUD](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_CLOUD.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_CLOUD.yaml)
[![ABAP_702](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_702.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/ABAP_702.yaml)
![ABAP](https://img.shields.io/badge/ABAP-Standard%20%E2%86%92%20Cloud-blue)
[![namespace](https://img.shields.io/badge/namespace-z2ui5__sql__cl-blue)](abaplint.jsonc)
[![dependency](https://img.shields.io/badge/dependency-abap2UI5-blue)](https://github.com/abap2UI5/abap2UI5)
[![abap2UI5](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fabap2UI5-addons%2Fsql-console%2Fmain%2F.github%2Fbadges%2Fabap2ui5.json)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/check-abap2ui5.yaml)
<br><br>
[![abap-standard](https://github.com/abap2UI5-addons/sql-console/actions/workflows/abap-standard.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/abap-standard.yaml)
[![abap-cloud](https://github.com/abap2UI5-addons/sql-console/actions/workflows/abap-cloud.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/abap-cloud.yaml)
<br>
[![auto_cloud](https://github.com/abap2UI5-addons/sql-console/actions/workflows/auto_cloud.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/auto_cloud.yaml)
[![auto_downport](https://github.com/abap2UI5-addons/sql-console/actions/workflows/auto_downport.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/auto_downport.yaml)
[![check-abap2UI5](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fabap2UI5-addons%2Fsql-console%2Fmain%2F.github%2Fbadges%2Fcheck-abap2ui5.json)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/check-abap2ui5.yaml)
[![check-rename](https://github.com/abap2UI5-addons/sql-console/actions/workflows/check-rename.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/check-rename.yaml)
<br>
[![renaming](https://github.com/abap2UI5-addons/sql-console/actions/workflows/rename_test.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/rename_test.yaml)
[![build-rename](https://github.com/abap2UI5-addons/sql-console/actions/workflows/build-rename.yaml/badge.svg)](https://github.com/abap2UI5-addons/sql-console/actions/workflows/build-rename.yaml)

# sql-console
SQL Console in Your Browser – No Need for Eclipse or SAP GUI Installation
Expand Down
Loading
Loading