You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2023/03/10 11:57:52 UTC
[camel-karavan] branch main updated (e94b9804 -> 152a8942)
This is an automated email from the ASF dual-hosted git repository.
marat pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
from e94b9804 Backend for #662
new 3f558f34 Start without custom components
new 152a8942 Fix issue with empty repository #677
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/camel/karavan/service/GitService.java | 6 ++-
karavan-app/src/main/webui/package-lock.json | 43 +++++++++++++++++-----
karavan-designer/src/App.tsx | 14 ++++---
3 files changed, 45 insertions(+), 18 deletions(-)
[camel-karavan] 02/02: Fix issue with empty repository #677
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
commit 152a89423c0747f81a32c2a4af346fd7d2b145e3
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Mon Mar 6 17:42:45 2023 -0500
Fix issue with empty repository #677
---
.../apache/camel/karavan/service/GitService.java | 6 ++-
karavan-app/src/main/webui/package-lock.json | 43 +++++++++++++++++-----
2 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java b/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
index f04dd9fa..650a5622 100644
--- a/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
@@ -34,6 +34,7 @@ import org.eclipse.jgit.api.PullResult;
import org.eclipse.jgit.api.RemoteAddCommand;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.RefNotFoundException;
+import org.eclipse.jgit.api.errors.TransportException;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.revwalk.RevCommit;
@@ -164,7 +165,7 @@ public class GitService {
try {
git = clone(folder, gitConfig.getUri(), gitConfig.getBranch(), cred);
checkout(git, false, null, null, gitConfig.getBranch());
- } catch (RefNotFoundException e) {
+ } catch (RefNotFoundException | TransportException e) {
LOGGER.error("New repository");
git = init(folder, gitConfig.getUri(), gitConfig.getBranch());
} catch (Exception e) {
@@ -233,7 +234,7 @@ public class GitService {
if (checkout) {
checkout(git, false, null, null, gitConfig.getBranch());
}
- } catch (RefNotFoundException e) {
+ } catch (RefNotFoundException | TransportException e) {
LOGGER.error("New repository");
git = init(folder, gitConfig.getUri(), gitConfig.getBranch());
} catch (Exception e) {
@@ -337,6 +338,7 @@ public class GitService {
public Git init(String dir, String uri, String branch) throws GitAPIException, IOException, URISyntaxException {
Git git = Git.init().setInitialBranch(branch).setDirectory(Path.of(dir).toFile()).call();
+// git.branchCreate().setName(branch).call();
addRemote(git, uri);
return git;
}
diff --git a/karavan-app/src/main/webui/package-lock.json b/karavan-app/src/main/webui/package-lock.json
index 30e72c8e..11fb3657 100644
--- a/karavan-app/src/main/webui/package-lock.json
+++ b/karavan-app/src/main/webui/package-lock.json
@@ -42,6 +42,27 @@
"typescript": "^4.9.5"
}
},
+ "../../../../karavan-core": {
+ "version": "3.20.1-SNAPSHOT",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/js-yaml": "^4.0.5",
+ "@types/uuid": "^8.3.4",
+ "typescript": "^4.9.4",
+ "uuid": "8.3.2"
+ },
+ "devDependencies": {
+ "@types/chai": "^4.3.0",
+ "@types/dagre": "^0.7.47",
+ "@types/mocha": "^9.1.0",
+ "@types/node": "^18.11.18",
+ "chai": "^4.3.4",
+ "cross-env": "^7.0.3",
+ "fs": "^0.0.1-security",
+ "mocha": "^9.2.0",
+ "ts-node": "^10.4.0"
+ }
+ },
"../karavan-core": {
"extraneous": true
},
@@ -11178,15 +11199,8 @@
}
},
"node_modules/karavan-core": {
- "version": "3.20.1-SNAPSHOT",
- "resolved": "file:../../../../karavan-core",
- "license": "Apache-2.0",
- "dependencies": {
- "@types/js-yaml": "^4.0.5",
- "@types/uuid": "^8.3.4",
- "typescript": "^4.9.4",
- "uuid": "8.3.2"
- }
+ "resolved": "../../../../karavan-core",
+ "link": true
},
"node_modules/keycloak-js": {
"version": "19.0.1",
@@ -24845,10 +24859,19 @@
}
},
"karavan-core": {
- "version": "3.20.1-SNAPSHOT",
+ "version": "file:../../../../karavan-core",
"requires": {
+ "@types/chai": "^4.3.0",
+ "@types/dagre": "^0.7.47",
"@types/js-yaml": "^4.0.5",
+ "@types/mocha": "^9.1.0",
+ "@types/node": "^18.11.18",
"@types/uuid": "^8.3.4",
+ "chai": "^4.3.4",
+ "cross-env": "^7.0.3",
+ "fs": "^0.0.1-security",
+ "mocha": "^9.2.0",
+ "ts-node": "^10.4.0",
"typescript": "^4.9.4",
"uuid": "8.3.2"
}
[camel-karavan] 01/02: Start without custom components
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
commit 3f558f34d175bf588ef38a21fd3acb73681acfe0
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Mon Mar 6 16:27:24 2023 -0500
Start without custom components
---
karavan-designer/src/App.tsx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/karavan-designer/src/App.tsx b/karavan-designer/src/App.tsx
index bc75043c..e536a093 100644
--- a/karavan-designer/src/App.tsx
+++ b/karavan-designer/src/App.tsx
@@ -97,9 +97,9 @@ class App extends React.Component<Props, State> {
Promise.all([
fetch("kamelets/kamelets.yaml"),
fetch("components/components.json"),
- fetch("components/supported-components.json"),
fetch("snippets/org.apache.camel.AggregationStrategy"),
fetch("snippets/org.apache.camel.Processor")
+ // fetch("components/supported-components.json"),
]).then(responses =>
Promise.all(responses.map(response => response.text()))
).then(data => {
@@ -112,14 +112,16 @@ class App extends React.Component<Props, State> {
JSON.parse(data[1]).forEach((c: any) => jsons.push(JSON.stringify(c)));
ComponentApi.saveComponents(jsons, true);
- ComponentApi.saveSupportedComponents(data[2]);
- ComponentApi.setSupportedOnly(true);
-
this.toast("Success", "Loaded " + jsons.length + " components", 'success');
this.setState({loaded: true});
- TemplateApi.saveTemplate("org.apache.camel.AggregationStrategy", data[3]);
- TemplateApi.saveTemplate("org.apache.camel.Processor", data[4]);
+ TemplateApi.saveTemplate("org.apache.camel.AggregationStrategy", data[2]);
+ TemplateApi.saveTemplate("org.apache.camel.Processor", data[3]);
+
+ if (data[4]) {
+ ComponentApi.saveSupportedComponents(data[4]);
+ ComponentApi.setSupportedOnly(true);
+ }
}).catch(err =>
this.toast("Error", err.text, 'danger')
);