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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class KronosAPIResolver implements ExternalModuleResolver {

private static final Logger LOGGER = LoggerFactory.getLogger(KronosAPIResolver.class);

private static final String API_MODULE_PREFIX = "sdk/";
private static final String API_MODULE_PREFIX = "@aerokit/sdk/";

private static final String ABAP_API_MODULE_PREFIX = API_MODULE_PREFIX + "abap";
private static final Pattern API_MODULE_PATTERN = Pattern.compile(API_MODULE_PREFIX + "(\\w+)(?:/(.+))?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"lint": "abaplint --config abaplint.json"
},
"dependencies": {
"buffer": "^6.0.3",
"@abaplint/runtime": "^2.10.9",
"@abaplint/cli": "^2.112.17",
"@abaplint/transpiler-cli": "^2.10.9"
"@abaplint/runtime": "^2.10.9",
"@abaplint/transpiler-cli": "^2.10.9",
"@aerokit/sdk": "^12.56.0",
"buffer": "^6.0.3"
},
"author": "codbex",
"license": "EPL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENDCLASS.

CLASS zcl_codbex_http_response IMPLEMENTATION.
METHOD println.
WRITE '@KERNEL const http = await import("sdk/http");'.
WRITE '@KERNEL const http = await import("@aerokit/sdk/http");'.
WRITE '@KERNEL const valueString = typeof message_in.value === "string" ? message_in.value : JSON.stringify(message_in.value, null, 2);'.
WRITE '@KERNEL http.response.println(valueString);'.
ENDMETHOD.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { DB } from "@abaplint/runtime";
import { database, sql, update, query } from "sdk/db";
import { database, sql, update, query } from "@aerokit/sdk/db";

import { logging } from "sdk/log";
import { logging } from "@aerokit/sdk/log";

const DatabaseResultSetHelper = Java.type("org.eclipse.dirigible.components.data.management.helpers.DatabaseResultSetHelper");
const DatabaseResultSetHelper = Java.type("org.eclipse.dirigible.components.database.helpers.DatabaseResultSetHelper");

export class DatabaseInitializer {
private static readonly DEFAULT_DATA_SOURCE_NAME = "DefaultDB";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"sdk/*" : [
"../../../../../../target/unpacked-dependencies/META-INF/dirigible/modules/src/*"
],
"@aerokit/sdk/*" : [
"../../../../../../target/unpacked-dependencies/META-INF/dirigible/modules/src/*"
],
"@abaplint/runtime" : [
"./node_modules/@abaplint/runtime/build/src/*"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ log "Packaging the code..."
esbuild src/run.mjs --tsconfig=./tsconfig.json --bundle --outdir=dist --format=esm --target=es2022 \
--external:tls --external:net --external:util --external:crypto --external:zlib \
--external:http --external:https --external:fs --external:path --external:url \
--external:sdk \
--external:sdk --external:@aerokit \
--inject:./src/lib/polyfills/buffer.js --inject:./src/lib/polyfills/process.js \
--out-extension:.js=.mjs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ log "Packaging the code..."
esbuild src/run.mjs --tsconfig=./tsconfig.json --bundle --outdir=dist --format=esm --target=es2022 \
--external:tls --external:net --external:util --external:crypto --external:zlib \
--external:http --external:https --external:fs --external:path --external:url \
--external:sdk \
--external:sdk --external:@aerokit \
--inject:./src/lib/polyfills/buffer.js --inject:./src/lib/polyfills/process.js \
--out-extension:.js=.mjs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"run": "node dist/run.mjs"
},
"dependencies": {
"@aerokit/sdk": "^12.56.0",
"buffer": "^6.0.3",
"@abaplint/runtime": "^2.10.9",
"@abaplint/cli": "^2.112.17",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DatabaseInitializer } from "sdk/abap/database";
import { DatabaseInitializer } from "./database.mjs";
import { initializeABAP } from '../dist/abap/init.mjs';

import { zcl_abap_app } from '../dist/abap/zcl_abap_app.clas.mjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export function getTemplate() {
location: "/template-abap/src/lib/polyfills/process.js",
action: "generate",
rename: "src/lib/polyfills/process.js"
},{
} ,{
location: "/template-abap/src/database.mjs",
action: "generate",
rename: "src/database.mjs"
},{
location: "/template-abap/src/run.mjs",
action: "generate",
rename: "src/run.mjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
"ESNext",
"DOM"
],
"paths": {
"@aerokit/sdk/*": [
"./node_modules/@aerokit/sdk/dist/esm/*"
],
"/*": [
"./*"
]
},
"types" : [
"../modules/types"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller, Post } from "sdk/http"
import { Controller, Post } from "@aerokit/sdk/http"
import { FunctionParamsDTO, FunctionResultDTO } from "./function-data-dto"

@Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"sdk/*": [
"./modules/src/*"
],
"@aerokit/sdk/*": [
"./modules/src/*"
],
"/*": [
"./*"
]
Expand Down
16 changes: 16 additions & 0 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@
<artifactId>dirigible-components-group-database</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-engine-cms</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-engine-cms-internal</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-engine-cms-s3</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-api-cms</artifactId>
</dependency>

<!-- Engine -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ void testCreateProjectFromTemplate() {
}

private void assertGeneratedJSWorks() {
await().atMost(30, TimeUnit.SECONDS) // Wait at most 10 seconds
.pollInterval(1, TimeUnit.SECONDS) // Check every second
await().atMost(120, TimeUnit.SECONDS) // Wait at most 10 seconds
.pollInterval(10, TimeUnit.SECONDS) // Check every second
.until(() -> {
try {
ide.assertJSHttpResponse(TEST_PROJECT, "dist/run.mjs", 200, "Hello world!");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.codbex.platform</groupId>
<artifactId>codbex-platform-parent</artifactId>
<version>12.31.0</version>
<version>12.58.0</version>
</parent>

<name>codbex - kronos - parent</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/*
* HANA XS Classic Bridge for DB API
*/
import { database } from 'sdk/db';
import { database } from '@aerokit/sdk/db';
import * as TYPE_CONVERTER from 'kronos/db/sqlToXSCColumnTypeConverter';

export function getConnection() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/*
* HANA XS Classic Bridge for HDB API
*/
import { database } from 'sdk/db';
import { database } from '@aerokit/sdk/db';
import * as PROCEDURE_UTILS from 'kronos/hdb/procedureUtils';
import * as HDB_UTILS from 'kronos/hdb/hdbUtils';
import * as TYPE_CONVERTER from 'kronos/db/sqlToXSCColumnTypeConverter';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { client as dClient } from "sdk/http";
import { client as dClient } from "@aerokit/sdk/http";
import * as web from "kronos/web/web";
import { Configurations as config } from "sdk/core";
import { Configurations as config } from "@aerokit/sdk/core";

export const OPTIONS = 0;
export const GET = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { registry } from "sdk/platform";
import { registry } from "@aerokit/sdk/platform";

export function Job(constructJob) {
if (!constructJob.uri) throw "URI not specified";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* SPDX-License-Identifier: EPL-2.0
*/
import * as httpUtils from "kronos/http/http";
import { MailClient as mail } from "sdk/mail";
import { MailClient as mail } from "@aerokit/sdk/mail";

export const http = httpUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { repository as repositoryManager } from "sdk/platform";
import { repository as repositoryManager } from "@aerokit/sdk/platform";

export function Store(filePath) {
var REGISTRY_DIR_PREFIX = "/registry/public/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { user as securityUser } from 'sdk/security';
import { user as securityUser } from '@aerokit/sdk/security';

export const authType = securityUser.getAuthType();
export const language = securityUser.getLanguage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { base64 } from 'sdk/utils';
import { hex } from 'sdk/utils';
import { base64 } from '@aerokit/sdk/utils';
import { hex } from '@aerokit/sdk/utils';

export function encodeHex(data) {
if (typeof data === 'string') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
import { uuid } from "sdk/utils";
import { bytes } from "sdk/io";
import { uuid } from "@aerokit/sdk/utils";
import { bytes } from "@aerokit/sdk/io";
import * as codecUtils from "kronos/util/codec/codec";

export const codec = codecUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* HANA XS Classic Bridge for Web API
*/

import { request as dRequest, response as dResponse, upload as dUpload} from 'sdk/http';
import { request as dRequest, response as dResponse, upload as dUpload} from '@aerokit/sdk/http';
import * as session from 'kronos/session/session';
import { zip, bytes } from 'sdk/io';
import { zip, bytes } from '@aerokit/sdk/io';

import * as WEB_UTILS from 'kronos/web/webUtils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,17 +319,16 @@ public void generateOData(XSOData model) throws SQLException {
String[] odataxc = odata2ODataXTransformer.transform(oDataDefinition);
String odatax = odataxc[0];
String odatac = odataxc[1];
ODataSchema odataSchema = new ODataSchema(oDataDefinition.getLocation(), oDataDefinition.getName(), null, null, odatax.getBytes());
ODataSchema odataSchema = new ODataSchema(oDataDefinition.getLocation(), oDataDefinition.getName(), null, null, odatax);
odataSchemaService.save(odataSchema);
ODataContainer odataContainer =
new ODataContainer(oDataDefinition.getLocation(), oDataDefinition.getName(), null, null, odatac.getBytes());
ODataContainer odataContainer = new ODataContainer(oDataDefinition.getLocation(), oDataDefinition.getName(), null, null, odatac);
odataContainerService.save(odataContainer);

String[] odataMappings = odata2ODataMTransformer.transform(oDataDefinition);
int i = 1;
for (String mapping : odataMappings) {
ODataMapping odataMapping =
new ODataMapping(oDataDefinition.getLocation(), oDataDefinition.getName() + "#" + i++, null, null, mapping.getBytes());
new ODataMapping(oDataDefinition.getLocation(), oDataDefinition.getName() + "#" + i++, null, null, mapping);
odataMappingService.save(odataMapping);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hana/core/Hana.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hana.core;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Copyright (c) 2022 codbex or an codbex affiliate company and contributors
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2022 codbex or an codbex affiliate company and contributors
* SPDX-License-Identifier: EPL-2.0
*/
// Generated from com/codbex/kronos/parser/hdbdd/core/Cds.g4 by ANTLR 4.13.2
package com.codbex.kronos.parser.hdbdd.core;

Expand Down
Loading
Loading