@into-cps-association/libms 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.env +9 -0
  2. package/.eslintignore +6 -0
  3. package/.eslintrc +53 -0
  4. package/.madgerc +18 -0
  5. package/.prettierrc +4 -0
  6. package/API.md +211 -0
  7. package/DEVELOPER.md +60 -0
  8. package/LICENSE.md +301 -0
  9. package/README.md +119 -0
  10. package/dist/src/app.module.d.ts +2 -0
  11. package/dist/src/app.module.js +36 -0
  12. package/dist/src/app.module.js.map +1 -0
  13. package/dist/src/bootstrap.d.ts +6 -0
  14. package/dist/src/bootstrap.js +27 -0
  15. package/dist/src/bootstrap.js.map +1 -0
  16. package/dist/src/files/files.module.d.ts +2 -0
  17. package/dist/src/files/files.module.js +27 -0
  18. package/dist/src/files/files.module.js.map +1 -0
  19. package/dist/src/files/interfaces/files.service.interface.d.ts +5 -0
  20. package/dist/src/files/interfaces/files.service.interface.js +3 -0
  21. package/dist/src/files/interfaces/files.service.interface.js.map +1 -0
  22. package/dist/src/files/queries.d.ts +2 -0
  23. package/dist/src/files/queries.js +47 -0
  24. package/dist/src/files/queries.js.map +1 -0
  25. package/dist/src/files/resolvers/files.resolver.d.ts +8 -0
  26. package/dist/src/files/resolvers/files.resolver.js +49 -0
  27. package/dist/src/files/resolvers/files.resolver.js.map +1 -0
  28. package/dist/src/files/services/files-service.factory.d.ts +11 -0
  29. package/dist/src/files/services/files-service.factory.js +48 -0
  30. package/dist/src/files/services/files-service.factory.js.map +1 -0
  31. package/dist/src/files/services/gitlab-files.service.d.ts +12 -0
  32. package/dist/src/files/services/gitlab-files.service.js +65 -0
  33. package/dist/src/files/services/gitlab-files.service.js.map +1 -0
  34. package/dist/src/files/services/local-files.service.d.ts +11 -0
  35. package/dist/src/files/services/local-files.service.js +77 -0
  36. package/dist/src/files/services/local-files.service.js.map +1 -0
  37. package/dist/src/main.d.ts +2 -0
  38. package/dist/src/main.js +20 -0
  39. package/dist/src/main.js.map +1 -0
  40. package/dist/src/types.d.ts +43 -0
  41. package/dist/src/types.js +181 -0
  42. package/dist/src/types.js.map +1 -0
  43. package/dist/test/e2e/app.e2e.spec.d.ts +1 -0
  44. package/dist/test/e2e/app.e2e.spec.js +36 -0
  45. package/dist/test/e2e/app.e2e.spec.js.map +1 -0
  46. package/dist/test/integration/files.service.integration.spec.d.ts +1 -0
  47. package/dist/test/integration/files.service.integration.spec.js +53 -0
  48. package/dist/test/integration/files.service.integration.spec.js.map +1 -0
  49. package/dist/test/testUtil.d.ts +88 -0
  50. package/dist/test/testUtil.js +182 -0
  51. package/dist/test/testUtil.js.map +1 -0
  52. package/dist/test/unit/files-service.factory.unit.spec.d.ts +1 -0
  53. package/dist/test/unit/files-service.factory.unit.spec.js +40 -0
  54. package/dist/test/unit/files-service.factory.unit.spec.js.map +1 -0
  55. package/dist/test/unit/files.resolver.unit.spec.d.ts +1 -0
  56. package/dist/test/unit/files.resolver.unit.spec.js +56 -0
  57. package/dist/test/unit/files.resolver.unit.spec.js.map +1 -0
  58. package/dist/test/unit/gitlab-files.service.unit.spec.d.ts +1 -0
  59. package/dist/test/unit/gitlab-files.service.unit.spec.js +37 -0
  60. package/dist/test/unit/gitlab-files.service.unit.spec.js.map +1 -0
  61. package/dist/test/unit/local-files.service.unit.spec.d.ts +1 -0
  62. package/dist/test/unit/local-files.service.unit.spec.js +84 -0
  63. package/dist/test/unit/local-files.service.unit.spec.js.map +1 -0
  64. package/dist/tsconfig.tsbuildinfo +1 -0
  65. package/jest.config.json +30 -0
  66. package/nest-cli.json +8 -0
  67. package/package.json +71 -0
  68. package/src/app.module.ts +24 -0
  69. package/src/bootstrap.ts +29 -0
  70. package/src/files/files.module.ts +15 -0
  71. package/src/files/interfaces/files.service.interface.ts +7 -0
  72. package/src/files/queries.ts +42 -0
  73. package/src/files/resolvers/files.resolver.ts +23 -0
  74. package/src/files/services/files-service.factory.ts +27 -0
  75. package/src/files/services/gitlab-files.service.ts +65 -0
  76. package/src/files/services/local-files.service.ts +76 -0
  77. package/src/main.ts +27 -0
  78. package/src/schema.gql +58 -0
  79. package/src/types.ts +92 -0
  80. package/test/README.md +33 -0
  81. package/test/coverage/clover.xml +40 -0
  82. package/test/coverage/coverage-final.json +2 -0
  83. package/test/coverage/lcov-report/base.css +224 -0
  84. package/test/coverage/lcov-report/block-navigation.js +87 -0
  85. package/test/coverage/lcov-report/favicon.png +0 -0
  86. package/test/coverage/lcov-report/index.html +116 -0
  87. package/test/coverage/lcov-report/prettify.css +1 -0
  88. package/test/coverage/lcov-report/prettify.js +2 -0
  89. package/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  90. package/test/coverage/lcov-report/sorter.js +196 -0
  91. package/test/coverage/lcov-report/testUtil.ts.html +655 -0
  92. package/test/coverage/lcov.info +52 -0
  93. package/test/data/user2/data/.gitkeep +0 -0
  94. package/test/data/user2/digital_twins/.gitkeep +0 -0
  95. package/test/data/user2/functions/.gitkeep +0 -0
  96. package/test/data/user2/models/.gitkeep +0 -0
  97. package/test/data/user2/tools/.gitkeep +0 -0
  98. package/test/data/user2/tools/README.md +1 -0
  99. package/test/e2e/app.e2e.spec.ts +79 -0
  100. package/test/integration/files.service.integration.spec.ts +67 -0
  101. package/test/jest-e2e.json +9 -0
  102. package/test/starttraefik.bash +11 -0
  103. package/test/stoptraefik.bash +9 -0
  104. package/test/testUtil.ts +190 -0
  105. package/test/unit/files-service.factory.unit.spec.ts +46 -0
  106. package/test/unit/files.resolver.unit.spec.ts +70 -0
  107. package/test/unit/gitlab-files.service.unit.spec.ts +46 -0
  108. package/test/unit/local-files.service.unit.spec.ts +108 -0
  109. package/tsconfig.json +31 -0
package/.env ADDED
@@ -0,0 +1,9 @@
1
+ PORT='4001'
2
+ MODE='local'
3
+ LOCAL_PATH ='/home/prasad/git/prasadtalasila/DTaaS/files'
4
+ GITLAB_GROUP ='dtaas'
5
+ GITLAB_URL='https://gitlab.foo.com/api/graphql'
6
+ TOKEN='glpat-xFagGa33EW7bWpsM5q-Z'
7
+ LOG_LEVEL='debug'
8
+ APOLLO_PATH='/lib'
9
+ GRAPHQL_PLAYGROUND='true'
package/.eslintignore ADDED
@@ -0,0 +1,6 @@
1
+ api/
2
+ build/
3
+ dist/
4
+ node_modules/
5
+ script/
6
+ src/types.ts
package/.eslintrc ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "env": {
3
+ "jest": true,
4
+ "jest/globals": true,
5
+ "node": true
6
+ },
7
+ "extends": [
8
+ "eslint:recommended",
9
+ "airbnb-base",
10
+ "plugin:@typescript-eslint/recommended",
11
+ "prettier"
12
+ ],
13
+ "globals": {
14
+ "Atomics": "readonly",
15
+ "SharedArrayBuffer": "readonly"
16
+ },
17
+ "settings": {
18
+ "import/resolver": {
19
+ "node": {
20
+ "extensions": [".js"]
21
+ }
22
+ }
23
+ },
24
+ "parser": "@typescript-eslint/parser",
25
+ "parserOptions": {
26
+ "requireConfigFile": false,
27
+ "ecmaVersion": 2022,
28
+ "sourceType": "module" // Allows for the use of imports
29
+ },
30
+ "plugins": ["jest", "@typescript-eslint", "import"],
31
+ "rules": {
32
+ "import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
33
+ "no-console": "error",
34
+ "import/first": "error",
35
+ "linebreak-style": 0, // disable linter linebreak rule, to allow for both unix and windows developement
36
+ "import/no-unresolved": "off", // Whatever IDE will pass an error if if the module is not found, so no reason for this..
37
+ "import/extensions": "off", // That includes the production build.. We use linter for code checking / clean code optimization..
38
+ "no-use-before-define": "off"
39
+ },
40
+ "root": true,
41
+
42
+ "overrides": [
43
+ {
44
+ "files": ["*.ts"],
45
+ "parser": "@typescript-eslint/parser",
46
+ "parserOptions": {
47
+ "requireConfigFile": false,
48
+ "project": ["./tsconfig.json"]
49
+ },
50
+ "plugins": ["@typescript-eslint"]
51
+ }
52
+ ]
53
+ }
package/.madgerc ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "fontSize": "10px",
3
+ "tsconfig": "tsconfig.json",
4
+ "fileExtensions": ["ts", "tsx", "js", "jsx"],
5
+ "backgroundColor": "#FFFFFF",
6
+ "textColor": "#FFFFFF",
7
+ "nodeColor": "black",
8
+ "noDependencyColor": "green",
9
+ "cyclicNodeColor": "red",
10
+ "edgeColor": "green",
11
+ "graphVizOptions": {
12
+ "G": {
13
+ "rankdir": "TB",
14
+ "layout": "neato",
15
+ "splines": "curved"
16
+ }
17
+ }
18
+ }
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all"
4
+ }
package/API.md ADDED
@@ -0,0 +1,211 @@
1
+ # Overview
2
+
3
+ ## GraphQL API Calls
4
+
5
+ The lib microservice takes two distinct GraphQL queries.
6
+
7
+ ### Directory Listing
8
+
9
+ This query receives directory path and provides list of files
10
+ in that directory. A sample query and response are given here.
11
+
12
+ ``` graphql
13
+ query {
14
+ listDirectory(path: "user1") {
15
+ repository {
16
+ tree {
17
+ blobs {
18
+ edges {
19
+ node {
20
+ name
21
+ type
22
+ }
23
+ }
24
+ }
25
+ trees {
26
+ edges {
27
+ node {
28
+ name
29
+ type
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ ```
38
+
39
+ ``` graphql
40
+ {
41
+ "data": {
42
+ "listDirectory": {
43
+ "repository": {
44
+ "tree": {
45
+ "blobs": {
46
+ "edges": []
47
+ },
48
+ "trees": {
49
+ "edges": [
50
+ {
51
+ "node": {
52
+ "name": "common",
53
+ "type": "tree"
54
+ }
55
+ },
56
+ {
57
+ "node": {
58
+ "name": "data",
59
+ "type": "tree"
60
+ }
61
+ },
62
+ {
63
+ "node": {
64
+ "name": "digital twins",
65
+ "type": "tree"
66
+ }
67
+ },
68
+ {
69
+ "node": {
70
+ "name": "functions",
71
+ "type": "tree"
72
+ }
73
+ },
74
+ {
75
+ "node": {
76
+ "name": "models",
77
+ "type": "tree"
78
+ }
79
+ },
80
+ {
81
+ "node": {
82
+ "name": "tools",
83
+ "type": "tree"
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ### Fetch a File
96
+
97
+ This query receives directory path and send the file contents to user in response.
98
+
99
+ To check this query, create a file `files/user2/data/welcome.txt`
100
+ with content of `hello world`.
101
+
102
+ A sample query and response are given here.
103
+
104
+ ```graphql
105
+ query {
106
+ readFile(path: "user2/data/sample.txt") {
107
+ repository {
108
+ blobs {
109
+ nodes {
110
+ name
111
+ rawBlob
112
+ rawTextBlob
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ ```graphql
121
+ {
122
+ "data": {
123
+ "readFile": {
124
+ "repository": {
125
+ "blobs": {
126
+ "nodes": [
127
+ {
128
+ "name": "sample.txt",
129
+ "rawBlob": "hello world",
130
+ "rawTextBlob": "hello world"
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ ## HTTP API Calls
141
+
142
+ The lib microservice also supports making API calls using HTTP POST requests.
143
+ Simply send a POST request to the URL endpoint with the GraphQL query in
144
+ the request body. Make sure to set the Content-Type header to
145
+ "application/json".
146
+
147
+ The easiest way to perform HTTP requests is to use
148
+ [HTTPie](https://github.com/httpie/desktop/releases) desktop application.
149
+ You can download the Ubuntu AppImage and run it. Select the following options:
150
+
151
+ ```txt
152
+ Method: POST
153
+ URL: localhost:4001
154
+ Body: <<copy the json code from examples below>>
155
+ Content Type: text/json
156
+ ```
157
+
158
+ Here are examples of the HTTP requests and responses for the HTTP API calls.
159
+
160
+ ### Directory listing
161
+
162
+ ```http
163
+ POST /lib HTTP/1.1
164
+ Host: localhost:4001
165
+ Content-Type: application/json
166
+ Content-Length: 388
167
+ {
168
+ "query":"query {\n listDirectory(path: \"user1\") {\n repository {\n tree {\n blobs {\n edges {\n node {\n name\n type\n }\n }\n }\n trees {\n edges {\n node {\n name\n type\n }\n }\n }\n }\n }\n }\n}"
169
+ }
170
+ ```
171
+
172
+ This HTTP POST request will generate the following HTTP response message.
173
+
174
+ ```http
175
+ HTTP/1.1 200 OK
176
+ Access-Control-Allow-Origin: *
177
+ Connection: close
178
+ Content-Length: 306
179
+ Content-Type: application/json; charset=utf-8
180
+ Date: Tue, 26 Sep 2023 20:26:49 GMT
181
+ X-Powered-By: Express
182
+ {"data":{"listDirectory":{"repository":{"tree":{"blobs":{"edges":[]},"trees":{"edges":[{"node":{"name":"data","type":"tree"}},{"node":{"name":"digital twins","type":"tree"}},{"node":{"name":"functions","type":"tree"}},{"node":{"name":"models","type":"tree"}},{"node":{"name":"tools","type":"tree"}}]}}}}}}
183
+ ```
184
+
185
+ ### Fetch a file
186
+
187
+ This query receives directory path and send the file contents to user in response.
188
+
189
+ To check this query, create a file `files/user2/data/welcome.txt`
190
+ with content of `hello world`.
191
+
192
+ ```http
193
+ POST /lib HTTP/1.1
194
+ Host: localhost:4001
195
+ Content-Type: application/json
196
+ Content-Length: 217
197
+ {
198
+ "query":"query {\n readFile(path: \"user2/data/welcome.txt\") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}"
199
+ }
200
+ ```
201
+
202
+ ```http
203
+ HTTP/1.1 200 OK
204
+ Access-Control-Allow-Origin: *
205
+ Connection: close
206
+ Content-Length: 134
207
+ Content-Type: application/json; charset=utf-8
208
+ Date: Wed, 27 Sep 2023 09:17:18 GMT
209
+ X-Powered-By: Express
210
+ {"data":{"readFile":{"repository":{"blobs":{"nodes":[{"name":"welcome.txt","rawBlob":"hello world","rawTextBlob":"hello world"}]}}}}}
211
+ ```
package/DEVELOPER.md ADDED
@@ -0,0 +1,60 @@
1
+ # Developer Instructions
2
+
3
+ ## :gear: Configure
4
+
5
+ This microservice needs library assets and configuration
6
+ file. Please see [README](./README.md) for this information.
7
+
8
+ ## :hammer_and_wrench: Developer Commands
9
+
10
+ ```bash
11
+ yarn install # Install dependencies for the microservice
12
+ yarn syntax # Analyze code for errors and style issues
13
+ yarn graph # Generate dependency graphs in the code
14
+ yarn build # Compile ES6 to ES5 and copy JS files to build/ directory
15
+ yarn test:unit # Run all tests
16
+ yarn test:e2e # Run end-to-end tests
17
+ yarn test:int # Run integration tests
18
+ yarn test:all # Run unit tests
19
+ yarn start -h # List of all the CLI commands
20
+ yarn start # Start the application
21
+ yarn clean # Deletes "build", "coverage", "dist" and other temp files
22
+ ```
23
+
24
+ ## :package: :ship: NPM package
25
+
26
+ ### Github Package Registry
27
+
28
+ The Github actions workflow of
29
+ [lib microservice](../../.github/workflows/lib-ms.yml) publishes the __libms__
30
+ into [public packages](https://github.com/orgs/INTO-CPS-Association/packages).
31
+
32
+ ### Verdaccio - Local Package Registry
33
+
34
+ Use the instructions in
35
+ [publish npm package](../../docs/developer/npm-packages.md) for help
36
+ with publishing __libms npm package__ in local computer.
37
+
38
+ Application of the advice given on that page for __libms__ will require
39
+ running the following commands.
40
+
41
+ ### Publish
42
+
43
+ ```bash
44
+ yarn install
45
+ yarn build #the dist/ directory is needed for publishing step
46
+ yarn publish --no-git-tag-version #increments version and publishes to registry
47
+ yarn publish #increments version, publishes to registry and adds a git tag
48
+ ```
49
+
50
+ ### Unpublish
51
+
52
+ ```bash
53
+ npm unpublish --registry http://localhost:4873/ @into-cps-association/libms@0.2.0
54
+ ```
55
+
56
+ ## Service Endpoint
57
+
58
+ The URL endpoint for this microservice is located at: `localhost:PORT/lib`
59
+
60
+ The [API](./API.md) page shows sample queries and responses.
package/LICENSE.md ADDED
@@ -0,0 +1,301 @@
1
+ # License
2
+
3
+ --- Start of Definition of INTO-CPS Association Public License ---
4
+
5
+ /*
6
+
7
+ * This file is part of the INTO-CPS Association.
8
+
9
+ * Copyright (c) 2017-CurrentYear, INTO-CPS Association (ICA),
10
+ * c/o Peter Gorm Larsen, Aarhus University, Department of Engineering,
11
+ * Finlandsgade 22, 8200 Aarhus N, Denmark.
12
+
13
+ * All rights reserved.
14
+
15
+ * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
16
+ * THIS INTO-CPS ASSOCIATION PUBLIC LICENSE (ICAPL) VERSION 1.0.
17
+ * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
18
+ * RECIPIENT'S ACCEPTANCE OF THE INTO-CPS ASSOCIATION PUBLIC LICENSE OR
19
+ * THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
20
+
21
+ * The INTO-CPS tool suite software and the INTO-CPS Association
22
+ * Public License (ICAPL) are obtained from the INTO-CPS Association, either
23
+ * from the above address, from the URLs: <http://www.into-cps.org> or
24
+ * in the INTO-CPS tool suite distribution.
25
+ * GNU version 3 is obtained from:
26
+ * <http://www.gnu.org/copyleft/gpl.html>.
27
+
28
+ * This program is distributed WITHOUT ANY WARRANTY; without
29
+ * even the implied warranty of MERCHANTABILITY or FITNESS
30
+ * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
31
+ * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
32
+ * THE INTO-CPS ASSOCIATION PUBLIC LICENSE.
33
+
34
+ * See the full ICAPL conditions for more details.
35
+
36
+ */
37
+
38
+ --- End of INTO-CPS Association Public License Header ---
39
+
40
+ The ICAPL is a public license for the INTO-CPS tool
41
+ suite with three modes/alternatives
42
+ (GPL, ICA-Internal-EPL, ICA-External-EPL) for use and redistribution,
43
+ in source and/or binary/object-code form:
44
+
45
+ * GPL. Any party (member or non-member of the INTO-CPS Association) may use and
46
+ redistribute INTO-CPS tool suite under GPL version 3.
47
+
48
+ * Silver Level members of the INTO-CPS Association may also use and redistribute
49
+ the INTO-CPS tool suite under ICA-Internal-EPL conditions.
50
+
51
+ * Gold Level members of the INTO-CPS Association may also use and redistribute
52
+ The INTO-CPS tool suite under ICA-Internal-EPL or ICA-External-EPL conditions.
53
+
54
+ Definitions of the INTO-CPS Association Public license modes:
55
+
56
+ * GPL = GPL version 3.
57
+
58
+ * ICA-Internal-EPL = These INTO-CPA Association Public
59
+ license conditions together with
60
+ Internally restricted EPL, i.e., EPL version 1.0 with the Additional Condition
61
+ that use and redistribution by a member of the INTO-CPS Association is only allowed
62
+ within the INTO-CPS Association member's own
63
+ organization (i.e., its own legal entity),
64
+ or for a member of the INTO-CPS Association
65
+ paying a membership fee corresponding to
66
+ the size of the organization including all its affiliates, use and redistribution
67
+ is allowed within/between its affiliates.
68
+
69
+ * ICA-External-EPL = These INTO-CPA Association Public
70
+ license conditions together with
71
+ Externally restricted EPL, i.e., EPL version 1.0 with the Additional Condition
72
+ that use and redistribution by a member of the INTO-CPS Association, or by a Licensed
73
+ Third Party Distributor having a redistribution agreement with that member,
74
+ to parties external to the INTO-CPS Association
75
+ member’s own organization (i.e., its own
76
+ legal entity) is only allowed in binary/object-code form, except the case of
77
+ redistribution to other members the INTO-CPS Association to which source is also
78
+ allowed to be distributed.
79
+
80
+ [This has the consequence that an external party who wishes to use
81
+ the INTO-CPS Association in source form together with
82
+ its own proprietary software in all
83
+ cases must be a member of the INTO-CPS Association].
84
+
85
+ In all cases of usage and redistribution by recipients, the following
86
+ conditions also apply:
87
+
88
+ a) Redistributions of source code must retain the above copyright notice,
89
+ all definitions, and conditions. It is sufficient if the ICAPL Header is
90
+ present in each source file, if the full ICAPL is available in a prominent
91
+ and easily located place in the redistribution.
92
+
93
+ b) Redistributions in binary/object-code form must reproduce the above
94
+ copyright notice, all definitions, and conditions. It is sufficient if the
95
+ ICAPL Header and the location in the redistribution of the full ICAPL
96
+ are present in the documentation and/or other materials provided with the
97
+ redistribution, if the full ICAPL is available in a prominent and easily
98
+ located place in the redistribution.
99
+
100
+ c) A recipient must clearly indicate its chosen usage mode of ICAPL,
101
+ in accompanying documentation and in a text file ICA-USAGE-MODE.txt,
102
+ provided with the distribution.
103
+
104
+ d) Contributor(s) making a Contribution to the
105
+ INTO-CPS Association thereby also makes a
106
+ Transfer of Contribution Copyright. In return, upon the effective date of
107
+ the transfer, ICA grants the Contributor(s) a Contribution License of the
108
+ Contribution. ICA has the right to accept or refuse Contributions.
109
+
110
+ Definitions:
111
+
112
+ "Subsidiary license conditions" means:
113
+
114
+ The additional license conditions depending on the by the recipient chosen
115
+ mode of ICAPL, defined by GPL version 3.0 for GPL, and by EPL for
116
+ ICA-Internal-EPL and ICA-External-EPL.
117
+
118
+ "ICAPL" means:
119
+
120
+ INTO-CPS Association Public License version 1.0, i.e., the license
121
+ defined here (the text between
122
+ "--- Start of Definition of INTO-CPS Association Public License ---" and
123
+ "--- End of Definition of INTO-CPS Association
124
+ Public License ---", or later versions thereof.
125
+
126
+ "ICAPL Header" means:
127
+
128
+ INTO-CPS Association Public License Header version 1.2, i.e., the
129
+ text between "--- Start of Definition
130
+ of INTO-CPS Association Public License ---" and
131
+ "--- End of INTO-CPS Association Public License Header ---, or later versions thereof.
132
+
133
+ "Contribution" means:
134
+
135
+ a) in the case of the initial Contributor,
136
+ the initial code and documentation
137
+ distributed under ICAPL, and
138
+
139
+ b) in the case of each subsequent Contributor:
140
+ i) changes to the INTO-CPS tool suite, and
141
+ ii) additions to the INTO-CPS tool suite;
142
+
143
+ where such changes and/or additions
144
+ to the INTO-CPS tool suite originate from and are
145
+ distributed by that particular Contributor.
146
+ A Contribution 'originates' from
147
+ a Contributor if it was added to the INTO-CPS
148
+ tool suite by such Contributor itself or
149
+ anyone acting on such Contributor's behalf.
150
+
151
+ For Contributors licensing the INTO-CPS tool suite under ICA-Internal-EPL or
152
+ ICA-External-EPL conditions, the following conditions also hold:
153
+
154
+ Contributions do not include additions to the distributed Program which: (i)
155
+ are separate modules of software distributed
156
+ in conjunction with the INTO-CPS tool suite
157
+ under their own license agreement, (ii) are separate modules which are not
158
+ derivative works of the INTO-CPS tool suite, and (iii) are separate modules of software
159
+ distributed in conjunction with the INTO-CPS tool suite under their own license agreement
160
+ where these separate modules are merged with (weaved together with) modules of
161
+ The INTO-CPS tool suite to form new modules
162
+ that are distributed as object code or source
163
+ code under their own license agreement, as allowed under the Additional
164
+ Condition of internal distribution according to ICA-Internal-EPL and/or
165
+ Additional Condition for external distribution according to ICA-External-EPL.
166
+
167
+ "Transfer of Contribution Copyright" means that the Contributors of a
168
+ Contribution transfer the ownership and the copyright of the Contribution to
169
+ the INTO-CPS Association, the INTO-CPS Association Copyright owner, for
170
+ inclusion in the INTO-CPS tool suite.
171
+ The transfer takes place upon the effective date
172
+ when the Contribution is made available on the
173
+ INTO-CPS Association web site under ICAPL, by
174
+ such Contributors themselves or anyone acting on such Contributors' behalf.
175
+ The transfer is free of charge. If the
176
+ Contributors or the INTO-CPS Association so wish,
177
+ an optional Copyright transfer agreement can be signed
178
+ between the INTO-CPS Association and the Contributors.
179
+
180
+ "Contribution License" means a license from the INTO-CPS
181
+ Association to the Contributors of the Contribution, effective
182
+ on the date of the Transfer of Contribution Copyright,
183
+ where the INTO-CPS Association grants the Contributors a
184
+ non-exclusive, world-wide, transferable, free of charge,
185
+ perpetual license, including sublicensing rights, to use,
186
+ have used, modify, have modified, reproduce and or have reproduced the
187
+ contributed material, for business and other purposes, including but not
188
+ limited to evaluation, development, testing, integration and merging with
189
+ other software and distribution. The warranty and liability disclaimers of
190
+ ICAPL apply to this license.
191
+
192
+ "Contributor" means any person or entity that distributes (part of)
193
+ the INTO-CPS tool chain.
194
+
195
+ "The Program" means the Contributions distributed in accordance with ICAPL.
196
+
197
+ "The INTO-CPS tool chain" means the Contributions
198
+ distributed in accordance with ICAPL.
199
+
200
+ "Recipient" means anyone who receives the INTO-CPS tool chain under ICAPL,
201
+ including all Contributors.
202
+
203
+ "Licensed Third Party Distributor" means a reseller/distributor having signed
204
+ a redistribution/resale agreement in accordance with ICAPL and the INTO-CPS
205
+ Association Bylaws, with a Gold Level organizational member which is not an
206
+ Affiliate of the reseller/distributor, for distributing a product containing
207
+ part(s) of the INTO-CPS tool suite. The Licensed Third Party Distributor shall
208
+ only be allowed further redistribution to other resellers if the Gold Level
209
+ member is granting such a right to it in the redistribution/resale agreement
210
+ between the Gold Level member and the Licensed Third Party Distributor.
211
+
212
+ "Affiliate" shall mean any legal entity, directly or indirectly, through one
213
+ or more intermediaries, controlling or controlled by or under common control
214
+ with any other legal entity, as the case may be. For purposes of this
215
+ definition, the term "control" (including the terms "controlling,"
216
+ "controlled by" and "under common control with") means the possession,
217
+ direct or indirect, of the power to direct or cause the direction of the
218
+ management and policies of a legal entity, whether through the ownership of
219
+ voting securities, by contract or otherwise.
220
+
221
+ NO WARRANTY
222
+
223
+ EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY
224
+ LICENSE CONDITIONS OF ICAPL, THE INTO-CPS ASSOCIATION IS PROVIDED ON AN "AS IS"
225
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
226
+ IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
227
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
228
+ PURPOSE. Each Recipient is solely responsible for determining the
229
+ appropriateness of using and distributing the
230
+ INTO-CPS tool suite and assumes all risks
231
+ associated with its exercise of rights under ICAPL , including but not
232
+ limited to the risks and costs of program errors, compliance with applicable
233
+ laws, damage to or loss of data, programs or equipment, and unavailability
234
+ or interruption of operations.
235
+
236
+ DISCLAIMER OF LIABILITY
237
+
238
+ EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY
239
+ LICENSE CONDITIONS OF ICAPL, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
240
+ SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
241
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
242
+ LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
243
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
244
+ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE INTO-CPS TOOL
245
+ SUITE OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED
246
+ OF THE POSSIBILITY OF SUCH DAMAGES.
247
+
248
+ A Contributor licensing the INTO-CPS tool suite under ICA-Internal-EPL or
249
+ ICA-External-EPL may choose to distribute (parts of) the INTO-CPS tool suite
250
+ in object code form under its own license agreement, provided that:
251
+
252
+ a) it complies with the terms and conditions of ICAPL; or for the case of
253
+ redistribution of the INTO-CPS tool suite
254
+ together with proprietary code it is a dual
255
+ license where the INTO-CPS tool suite parts are distributed under ICAPL compatible
256
+ conditions and the proprietary code is distributed under proprietary license
257
+ conditions; and
258
+
259
+ b) its license agreement:
260
+ i) effectively disclaims on behalf of all Contributors all warranties and
261
+ conditions, express and implied, including warranties or conditions of title
262
+ and non-infringement, and implied warranties or conditions of merchantability
263
+ and fitness for a particular purpose;
264
+ ii) effectively excludes on behalf of all Contributors all liability for
265
+ damages, including direct, indirect, special, incidental and consequential
266
+ damages, such as lost profits;
267
+ iii) states that any provisions which differ
268
+ from ICAPL are offered by that
269
+ Contributor alone and not by any other party; and
270
+ iv) states from where the source code
271
+ for the INTO-CPS tool suite is available, and
272
+ informs licensees how to obtain it in a reasonable manner on or through a
273
+ medium customarily used for software exchange.
274
+
275
+ When the INTO-CPS tool suite is made available in source code form:
276
+
277
+ a) it must be made available under ICAPL; and
278
+
279
+ b) a copy of ICAPL must be included with each copy of the INTO-CPS tool suite.
280
+
281
+ c) a copy of the subsidiary license associated with the selected mode of
282
+ ICAPL must be included with each copy of the INTO-CPS tool suite.
283
+
284
+ Contributors may not remove or alter any copyright notices contained within
285
+ The INTO-CPS tool suite.
286
+
287
+ If there is a conflict between ICAPL and the subsidiary license conditions,
288
+ ICAPL has priority.
289
+
290
+ This Agreement is governed by the laws of Denmark. The place of jurisdiction
291
+ for all disagreements related to this Agreement, is Aarhus, Denmark.
292
+
293
+ The EPL 1.0 license definition has been obtained from:
294
+ <http://www.eclipse.org/legal/epl-v10.html>.
295
+ It is also reproduced in the INTO-CPS distribution.
296
+
297
+ The GPL Version 3 license definition has been obtained from
298
+ <http://www.gnu.org/copyleft/gpl.html>.
299
+ It is also reproduced in the INTO-CPS distribution.
300
+
301
+ --- End of Definition of INTO-CPS Association Public License ---