Skip to content

Commit 6d3c4e1

Browse files
authored
more scaffolding (#4)
1 parent cce9ec3 commit 6d3c4e1

15 files changed

+258
-5
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
jobs:
11+
unit:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
- run: npm install
18+
- run: npm test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
output

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-scripts=true

abap_transpile.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"input_folder": "src",
3+
"input_filter": [],
4+
"libs": [{
5+
"url": "https://github.com/open-abap/open-abap-core"
6+
}],
7+
"output_folder": "output",
8+
"write_unit_tests": true,
9+
"write_source_map": true,
10+
"options": {
11+
"ignoreSyntaxCheck": false,
12+
"addFilenames": true,
13+
"addCommonJS": true,
14+
"setup": {
15+
"filename": "../setup.mjs",
16+
"preFunction": "setup"
17+
}
18+
}
19+
}

abaplint.jsonc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,7 @@
546546
"skipNames": []
547547
},
548548
"unused_methods": true,
549-
"unused_types": {
550-
"exclude": [],
551-
"severity": "Error",
552-
"skipNames": []
553-
},
549+
"unused_types": false,
554550
"unused_variables": {
555551
"exclude": [],
556552
"severity": "Error",

package-lock.json

Lines changed: 88 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "open-abap-xco",
3+
"version": "1.0.0",
4+
"description": "XCO",
5+
"main": "index.js",
6+
"scripts": {
7+
"lint": "abaplint",
8+
"unit": "rm -rf output && abap_transpile && echo RUNNING && node --expose-gc output/index.mjs && echo OK",
9+
"flame": "0x -o -- node --expose-gc test/performance.mjs",
10+
"performance": "rm -rf output && abap_transpile ./abap_transpile_test.json && node --expose-gc test/performance.mjs",
11+
"integration": "rm -rf output && abap_transpile ./abap_transpile_test.json && node --expose-gc output/index.mjs",
12+
"postgres:init": "cat test/adbc/init.sql | docker exec -i postgresql psql -U postgres -d postgres",
13+
"docker:start": "docker compose -p open-abap -f test/stack.yml up -d --wait && npm run postgres:init",
14+
"test": "npm run lint && npm run unit"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/open-abap/open-abap-xco.git"
19+
},
20+
"author": "",
21+
"license": "ISC",
22+
"bugs": {
23+
"url": "https://github.com/open-abap/open-abap-xco/issues"
24+
},
25+
"homepage": "https://github.com/open-abap/open-abap-xco#readme",
26+
"dependencies": {
27+
"@abaplint/cli": "^2.113.222",
28+
"@abaplint/runtime": "^2.12.2",
29+
"@abaplint/database-sqlite": "^2.11.78",
30+
"@abaplint/transpiler-cli": "^2.12.2"
31+
}
32+
}

setup.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {SQLiteDatabaseClient} from "@abaplint/database-sqlite";
2+
3+
export async function setup(abap, schemas, insert) {
4+
abap.context.databaseConnections["DEFAULT"] = new SQLiteDatabaseClient();
5+
await abap.context.databaseConnections["DEFAULT"].connect();
6+
await abap.context.databaseConnections["DEFAULT"].execute(schemas.sqlite);
7+
await abap.context.databaseConnections["DEFAULT"].execute(insert);
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
INTERFACE if_xco_cp_software_component_f PUBLIC.
2+
3+
METHODS
4+
for_name
5+
IMPORTING
6+
iv_name TYPE if_xco_software_component=>tv_name
7+
RETURNING
8+
VALUE(ro_software_component) TYPE REF TO if_xco_software_component.
9+
10+
ENDINTERFACE.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
3+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4+
<asx:values>
5+
<VSEOINTERF>
6+
<CLSNAME>IF_XCO_CP_SOFTWARE_COMPONENT_F</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>IF_XCO_CP_SOFTWARE_COMPONENT_F</DESCRIPT>
9+
<EXPOSURE>2</EXPOSURE>
10+
<STATE>1</STATE>
11+
<UNICODE>X</UNICODE>
12+
</VSEOINTERF>
13+
</asx:values>
14+
</asx:abap>
15+
</abapGit>

0 commit comments

Comments
 (0)