karavan-core 4.8.0 → 99.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of karavan-core might be problematic. Click here for more details.

Files changed (115) hide show
  1. package/index.js +3 -0
  2. package/package.json +8 -58
  3. package/.bebelrc +0 -3
  4. package/.mocharc.json +0 -11
  5. package/.prettierignore +0 -9
  6. package/.prettierrc +0 -14
  7. package/src/core/api/CamelDefinitionApi.ts +0 -3271
  8. package/src/core/api/CamelDefinitionApiExt.ts +0 -757
  9. package/src/core/api/CamelDefinitionYaml.ts +0 -412
  10. package/src/core/api/CamelDefinitionYamlStep.ts +0 -4733
  11. package/src/core/api/CamelDisplayUtil.ts +0 -143
  12. package/src/core/api/CamelUtil.ts +0 -360
  13. package/src/core/api/ComponentApi.ts +0 -368
  14. package/src/core/api/KameletApi.ts +0 -147
  15. package/src/core/api/MainConfigurationApi.ts +0 -47
  16. package/src/core/api/ProjectModelApi.ts +0 -75
  17. package/src/core/api/SpiBeanApi.ts +0 -104
  18. package/src/core/api/TemplateApi.ts +0 -58
  19. package/src/core/api/TopologyUtils.ts +0 -392
  20. package/src/core/api/VariableUtil.ts +0 -104
  21. package/src/core/model/CamelDefinition.ts +0 -3783
  22. package/src/core/model/CamelMetadata.ts +0 -2714
  23. package/src/core/model/ComponentModels.ts +0 -106
  24. package/src/core/model/IntegrationDefinition.ts +0 -188
  25. package/src/core/model/KameletModels.ts +0 -223
  26. package/src/core/model/MainConfigurationModel.ts +0 -37
  27. package/src/core/model/ProjectModel.ts +0 -43
  28. package/src/core/model/SpiBeanModels.ts +0 -53
  29. package/src/core/model/TopologyDefinition.ts +0 -117
  30. package/test/addStep.spec.ts +0 -124
  31. package/test/addStep1.yaml +0 -27
  32. package/test/allowableValues.camel.yaml +0 -19
  33. package/test/allowableValues.spec.ts +0 -30
  34. package/test/avro-serialize-action.kamelet.yaml +0 -70
  35. package/test/beans.spec.ts +0 -92
  36. package/test/beans1.yaml +0 -36
  37. package/test/beans2.yaml +0 -42
  38. package/test/beans3.yaml +0 -7
  39. package/test/checkRequired.spec.ts +0 -53
  40. package/test/circuitBreaker.spec.ts +0 -57
  41. package/test/circuitBreaker.yaml +0 -19
  42. package/test/cloneDefinition.spec.ts +0 -106
  43. package/test/createKamelet.spec.ts +0 -38
  44. package/test/cxf.json +0 -615
  45. package/test/cxf.spec.ts +0 -44
  46. package/test/cxf.yaml +0 -15
  47. package/test/deleteStep.spec.ts +0 -74
  48. package/test/demo.spec.ts +0 -49
  49. package/test/demo.yaml +0 -32
  50. package/test/doCatchOnWhen.camel.yaml +0 -20
  51. package/test/doCatchOnWhen.spec.ts +0 -36
  52. package/test/errorHandler.spec.ts +0 -38
  53. package/test/errorHandler1.yaml +0 -27
  54. package/test/expression.spec.ts +0 -55
  55. package/test/findStep.spec.ts +0 -112
  56. package/test/findStep.yaml +0 -65
  57. package/test/getElementProperties.spec.ts +0 -32
  58. package/test/getElementPropertiesByName.spec.ts +0 -31
  59. package/test/getExpressionLanguage.spec.ts +0 -40
  60. package/test/hasElementWithId.camel.yaml +0 -98
  61. package/test/hasElementWithId.spec.ts +0 -57
  62. package/test/hasElementWithId1.camel.yaml +0 -16
  63. package/test/hasElementWithIdError.camel.yaml +0 -98
  64. package/test/integration.spec.ts +0 -60
  65. package/test/integration1.yaml +0 -24
  66. package/test/integration2.yaml +0 -23
  67. package/test/integrationToYaml.spec.ts +0 -51
  68. package/test/intercept.spec.ts +0 -62
  69. package/test/intercept.yaml +0 -19
  70. package/test/is-not-integration.yaml +0 -5114
  71. package/test/isIntegration.spec.ts +0 -45
  72. package/test/kamelet.spec.ts +0 -61
  73. package/test/metadata/components.json +0 -697
  74. package/test/metadata/kamelets.yaml +0 -23414
  75. package/test/metadata/spiBeans.json +0 -3094
  76. package/test/multiObjectProperties.spec.ts +0 -46
  77. package/test/multiObjectProperties1.yaml +0 -19
  78. package/test/multiple.spec.ts +0 -38
  79. package/test/multiple.yaml +0 -29
  80. package/test/openapi.spec.ts +0 -48
  81. package/test/openapi.yaml +0 -7
  82. package/test/placeholder.spec.ts +0 -32
  83. package/test/placeholder.yaml +0 -133
  84. package/test/plain-try-catch.yaml +0 -31
  85. package/test/plain.spec.ts +0 -72
  86. package/test/plain1.yaml +0 -22
  87. package/test/plain2.yaml +0 -13
  88. package/test/plain3.yaml +0 -5
  89. package/test/plain4.yaml +0 -5
  90. package/test/postgresql-source.kamelet.yaml +0 -113
  91. package/test/restConfigDsl.yaml +0 -15
  92. package/test/restDsl.spec.ts +0 -83
  93. package/test/restDsl.yaml +0 -29
  94. package/test/routes.spec.ts +0 -37
  95. package/test/routes1.yaml +0 -31
  96. package/test/supported-components.json +0 -1221
  97. package/test/supportedComponents.spec.ts +0 -34
  98. package/test/template1.AggregationStrategy.java +0 -21
  99. package/test/template1.Processor.java +0 -13
  100. package/test/template2.AggregationStrategy.java +0 -21
  101. package/test/template2.Processor.java +0 -13
  102. package/test/templateApi.spec.ts +0 -45
  103. package/test/timer-source.kamelet.yaml +0 -75
  104. package/test/tod.spec.ts +0 -31
  105. package/test/tod.yaml +0 -9
  106. package/test/topology.spec.ts +0 -51
  107. package/test/topology1.camel.yaml +0 -56
  108. package/test/topology2.camel.yaml +0 -44
  109. package/test/topology3.camel.yaml +0 -27
  110. package/test/tsconfig.testing.json +0 -14
  111. package/test/updateStep.spec.ts +0 -72
  112. package/test/variable1.camel.yaml +0 -42
  113. package/test/variable2.camel.yaml +0 -42
  114. package/test/variables.spec.ts +0 -34
  115. package/tsconfig.json +0 -34
@@ -1,45 +0,0 @@
1
- /*
2
- * Licensed to the Apache Software Foundation (ASF) under one or more
3
- * contributor license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright ownership.
5
- * The ASF licenses this file to You under the Apache License, Version 2.0
6
- * (the "License"); you may not use this file except in compliance with
7
- * the License. You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import {expect} from 'chai';
18
- import * as fs from 'fs';
19
- import 'mocha';
20
- import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml";
21
- import {FilterDefinition, ToDefinition} from "../src/core/model/CamelDefinition";
22
- import { RouteDefinition} from "../src/core/model/CamelDefinition";
23
- import {Integration} from "../src/core/model/IntegrationDefinition";
24
-
25
- describe('Is Integration', () => {
26
-
27
- it('Is not integration', () => {
28
- const yaml = fs.readFileSync('test/is-not-integration.yaml',{encoding:'utf8', flag:'r'});
29
- const i = CamelDefinitionYaml.yamlIsIntegration(yaml);
30
- expect(i).to.equal('none');
31
- });
32
-
33
- it('Is integration CRD', () => {
34
- const yaml = fs.readFileSync('test/integration1.yaml',{encoding:'utf8', flag:'r'});
35
- const i = CamelDefinitionYaml.yamlIsIntegration(yaml);
36
- expect(i).to.equal('crd');
37
- });
38
-
39
- it('Is integration plain', () => {
40
- const yaml = fs.readFileSync('test/plain1.yaml',{encoding:'utf8', flag:'r'});
41
- const i = CamelDefinitionYaml.yamlIsIntegration(yaml);
42
- expect(i).to.equal('plain');
43
- });
44
-
45
- });
@@ -1,61 +0,0 @@
1
- /*
2
- * Licensed to the Apache Software Foundation (ASF) under one or more
3
- * contributor license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright ownership.
5
- * The ASF licenses this file to You under the Apache License, Version 2.0
6
- * (the "License"); you may not use this file except in compliance with
7
- * the License. You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import * as fs from 'fs';
18
- import 'mocha';
19
- import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml";
20
- import { FromDefinition, LogDefinition, } from '../src/core/model/CamelDefinition';
21
- import { RouteDefinition} from "../src/core/model/CamelDefinition";
22
- import { Beans, Integration } from '../src/core/model/IntegrationDefinition';
23
- import { BeanFactoryDefinition } from '../src/core/model/CamelDefinition';
24
- import { MetadataAnnotations } from '../src/core/model/IntegrationDefinition';
25
-
26
- describe('Kamelet <=> YAML', () => {
27
-
28
- it('Yaml to Kamelet', () => {
29
- const yaml = fs.readFileSync('test/postgresql-source.kamelet.yaml',{encoding:'utf8', flag:'r'});
30
- const i = CamelDefinitionYaml.yamlToIntegration("postgresql-source.kamelet.yaml", yaml);
31
- });
32
-
33
- it('Kamelet to YAML with beans', () => {
34
- const i = Integration.createNew("test", 'kamelet');
35
-
36
- const flow1 = new FromDefinition({uri: "direct1"});
37
- flow1.steps?.push(new LogDefinition({logName: 'log11', message: "hello11"}));
38
- i.spec.flows?.push(new RouteDefinition({from:flow1}));
39
-
40
- const b = new Beans();
41
- b.beans.push(new BeanFactoryDefinition({name: "beanDS1", type: "String.class"}));
42
- b.beans.push(new BeanFactoryDefinition({name: "beanDS2", type: "String.class"}));
43
- i.spec.flows?.push(b);
44
- const a = new MetadataAnnotations({"camel.apache.org/kamelet.group" : "hello world"})
45
- i.metadata.annotations = a
46
-
47
- // console.log(CamelDefinitionYaml.integrationToYaml(i))
48
- });
49
-
50
- it('Kamelet to YAML without beans', () => {
51
- const i = Integration.createNew("test", 'kamelet');
52
-
53
- const flow1 = new FromDefinition({uri: "direct1"});
54
- flow1.steps?.push(new LogDefinition({logName: 'log11', message: "hello11"}));
55
- i.spec.flows?.push(new RouteDefinition({from:flow1}));
56
-
57
- console.log(CamelDefinitionYaml.integrationToYaml(i))
58
- });
59
-
60
-
61
- });