From 960a206f5da37cd77a8c61f92fbe6b469b78940a Mon Sep 17 00:00:00 2001 From: epacheco Date: Tue, 12 Dec 2023 10:51:53 +0100 Subject: [PATCH] Renamed files http consumer, provider and http file consumer --- .../services/technicalComponentDirectory.js | 9 +++++--- .../{postConsumer.js => httpConsumer.js} | 4 ++-- .../{restGetFile.js => httpFileConsumer.js} | 4 ++-- .../{restApiPost.js => httpProvider.js} | 6 ++--- main/client/static/application.html | 2 +- ...er-editor.tag => http-consumer-editor.tag} | 4 ++-- ...st-editor.tag => http-provider-editor.tag} | 4 ++-- ...itor.tag => http-file-consumer-editor.tag} | 2 +- .../services/technicalComponentDirectory.js | 23 +++++++++++-------- .../{postConsumer.js => httpConsumer.js} | 6 ++--- .../{restGetFile.js => httpFileConsumer.js} | 8 +++---- .../{restApiPost.js => httpProvider.js} | 10 ++++---- 12 files changed, 44 insertions(+), 38 deletions(-) rename engine/workspaceComponentExecutor/{postConsumer.js => httpConsumer.js} (99%) rename engine/workspaceComponentExecutor/{restGetFile.js => httpFileConsumer.js} (97%) rename engine/workspaceComponentExecutor/{restApiPost.js => httpProvider.js} (88%) rename main/client/static/tag/editorComponents/dataFlow/{post-consumer-editor.tag => http-consumer-editor.tag} (99%) rename main/client/static/tag/editorComponents/dataFlow/{rest-api-post-editor.tag => http-provider-editor.tag} (99%) rename main/client/static/tag/editorComponents/files/{rest-get-editor.tag => http-file-consumer-editor.tag} (98%) rename main/server/workspaceComponentInitialize/{postConsumer.js => httpConsumer.js} (79%) rename main/server/workspaceComponentInitialize/{restGetFile.js => httpFileConsumer.js} (68%) rename main/server/workspaceComponentInitialize/{restApiPost.js => httpProvider.js} (98%) diff --git a/engine/services/technicalComponentDirectory.js b/engine/services/technicalComponentDirectory.js index 2fe9f6f31..9c710d597 100644 --- a/engine/services/technicalComponentDirectory.js +++ b/engine/services/technicalComponentDirectory.js @@ -12,7 +12,8 @@ module.exports = { cacheNosql: require('../workspaceComponentExecutor/cacheNosql.js'), gouvFrInverseGeo: require('../workspaceComponentExecutor/gouvFrInverseGeo.js'), restApiGet: require('../workspaceComponentExecutor/restApiGet.js'), - restApiPost: require('../workspaceComponentExecutor/restApiPost.js'), + restApiPost: require('../workspaceComponentExecutor/httpProvider.js'), + httpProvider: require('../workspaceComponentExecutor/httpProvider.js'), // xmlToObject: require('./workspaceComponentExecutor/xmlToObject.js'), framcalcGetCsv: require('../workspaceComponentExecutor/framcalcGetCsv.js'), gouvFrGeoLocaliser: require('../workspaceComponentExecutor/gouvFrGeoLocaliser.js'), @@ -22,7 +23,8 @@ module.exports = { filter: require('../workspaceComponentExecutor/filter.js'), upload: require('../workspaceComponentExecutor/upload.js'), scrapper: require('../workspaceComponentExecutor/scrapper/scrapper.js'), - httpGet: require('../workspaceComponentExecutor/restGetFile.js'), + httpGet: require('../workspaceComponentExecutor/httpFileConsumer.js'), + httpFileConsumer: require('../workspaceComponentExecutor/httpFileConsumer.js'), sqlConnector: require('../workspaceComponentExecutor/sqlConnecteur.js'), mongoConnector: require('../workspaceComponentExecutor/MongoDB.js'), influxdbConnector: require('../workspaceComponentExecutor/influxdb.js'), @@ -33,7 +35,8 @@ module.exports = { valueFromPath: require('../workspaceComponentExecutor/valueFromPath.js'), unicity: require('../workspaceComponentExecutor/unicity.js'), propertiesMatrix: require('../workspaceComponentExecutor/propertiesMatrix.js'), - postConsumer: require('../workspaceComponentExecutor/postConsumer.js'), + postConsumer: require('../workspaceComponentExecutor/httpConsumer.js'), + httpConsumer: require('../workspaceComponentExecutor/httpConsumer.js'), keyToArray: require('../workspaceComponentExecutor/keyToArray.js'), sftpConsumer: require('../workspaceComponentExecutor/sftpConsumer.js'), flat: require('../workspaceComponentExecutor/flat.js'), diff --git a/engine/workspaceComponentExecutor/postConsumer.js b/engine/workspaceComponentExecutor/httpConsumer.js similarity index 99% rename from engine/workspaceComponentExecutor/postConsumer.js rename to engine/workspaceComponentExecutor/httpConsumer.js index 7510241d0..a4f27a4d6 100644 --- a/engine/workspaceComponentExecutor/postConsumer.js +++ b/engine/workspaceComponentExecutor/httpConsumer.js @@ -4,7 +4,7 @@ const fs = require('fs'); const https = require('https'); const fileLib = require('../../core/lib/file_lib.js') -class PostConsumer { +class HttpConsumer { constructor () { this.fetch = require('node-fetch'); this.stringReplacer = require('../utils/stringReplacer.js'); @@ -298,4 +298,4 @@ class PostConsumer { } } -module.exports = new PostConsumer() +module.exports = new HttpConsumer() diff --git a/engine/workspaceComponentExecutor/restGetFile.js b/engine/workspaceComponentExecutor/httpFileConsumer.js similarity index 97% rename from engine/workspaceComponentExecutor/restGetFile.js rename to engine/workspaceComponentExecutor/httpFileConsumer.js index 3e61b7678..643d5b639 100644 --- a/engine/workspaceComponentExecutor/restGetFile.js +++ b/engine/workspaceComponentExecutor/httpFileConsumer.js @@ -1,5 +1,5 @@ 'use strict'; -class HttpGet { +class HttpFileConsumer { constructor () { this.url = require('url') this.http = require('http') @@ -68,4 +68,4 @@ class HttpGet { return this.makeRequest('GET', data.specificData.url, data.specificData.contentType,flowdata, pullParams) } } -module.exports = new HttpGet() +module.exports = new HttpFileConsumer() diff --git a/engine/workspaceComponentExecutor/restApiPost.js b/engine/workspaceComponentExecutor/httpProvider.js similarity index 88% rename from engine/workspaceComponentExecutor/restApiPost.js rename to engine/workspaceComponentExecutor/httpProvider.js index 59c1c4012..599e60a8b 100644 --- a/engine/workspaceComponentExecutor/restApiPost.js +++ b/engine/workspaceComponentExecutor/httpProvider.js @@ -1,8 +1,8 @@ 'use strict' -class RestApiPost { +class HttpProvider { constructor () { this.stepNode = false - this.workspace_component_lib = require('../../core/lib/workspace_component_lib') + this.workspace_component_lib = require('../../core/lib/workspace_component_lib.js') this.data2xml = require('data2xml') this.dataTraitment = require('../../core/dataTraitmentLibrary/index.js') this.json2yaml = require('json2yaml') @@ -22,4 +22,4 @@ class RestApiPost { } } -module.exports = new RestApiPost() +module.exports = new HttpProvider() diff --git a/main/client/static/application.html b/main/client/static/application.html index 909d5f601..9193bbc64 100644 --- a/main/client/static/application.html +++ b/main/client/static/application.html @@ -111,7 +111,7 @@ - + diff --git a/main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag b/main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag similarity index 99% rename from main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag rename to main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag index b1a26f70d..cc51e31c0 100644 --- a/main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag +++ b/main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag @@ -1,4 +1,4 @@ - +
Aide @@ -165,4 +165,4 @@ display: none; } - + diff --git a/main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag b/main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag similarity index 99% rename from main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag rename to main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag index 75c4383a3..e4bed51c1 100644 --- a/main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag +++ b/main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag @@ -1,4 +1,4 @@ - +
Aide @@ -131,4 +131,4 @@ color:rgb(180,180,180); } - + diff --git a/main/client/static/tag/editorComponents/files/rest-get-editor.tag b/main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag similarity index 98% rename from main/client/static/tag/editorComponents/files/rest-get-editor.tag rename to main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag index daf09e3a0..04a152af5 100644 --- a/main/client/static/tag/editorComponents/files/rest-get-editor.tag +++ b/main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag @@ -1,4 +1,4 @@ - +
Aide diff --git a/main/server/services/technicalComponentDirectory.js b/main/server/services/technicalComponentDirectory.js index 79c381417..66228b79b 100644 --- a/main/server/services/technicalComponentDirectory.js +++ b/main/server/services/technicalComponentDirectory.js @@ -12,7 +12,8 @@ module.exports = { cacheNosql: require('../workspaceComponentInitialize/cacheNosql.js'), gouvFrInverseGeo: require('../workspaceComponentInitialize/gouvFrInverseGeo.js'), restApiGet: require('../workspaceComponentInitialize/restApiGet.js'), - restApiPost: require('../workspaceComponentInitialize/restApiPost.js'), + restApiPost: require('../workspaceComponentInitialize/httpProvider.js'), + httpProvider: require('../workspaceComponentInitialize/httpProvider.js'), // xmlToObject: require('./workspaceComponentInitialize/xmlToObject.js'), framcalcGetCsv: require('../workspaceComponentInitialize/framcalcGetCsv.js'), gouvFrGeoLocaliser: require('../workspaceComponentInitialize/gouvFrGeoLocaliser.js'), @@ -22,7 +23,8 @@ module.exports = { filter: require('../workspaceComponentInitialize/filter.js'), upload: require('../workspaceComponentInitialize/upload.js'), scrapper: require('../workspaceComponentInitialize/scrapper.js'), - httpGet: require('../workspaceComponentInitialize/restGetFile.js'), + httpGet: require('../workspaceComponentInitialize/httpFileConsumer.js'), + httpFileConsumer: require('../workspaceComponentInitialize/httpFileConsumer.js'), sqlConnector: require('../workspaceComponentInitialize/sqlConnecteur.js'), mongoConnector: require('../workspaceComponentInitialize/MongoDB.js'), influxdbConnector: require('../workspaceComponentInitialize/influxdb.js'), @@ -33,7 +35,8 @@ module.exports = { valueFromPath: require('../workspaceComponentInitialize/valueFromPath.js'), unicity: require('../workspaceComponentInitialize/unicity.js'), propertiesMatrix: require('../workspaceComponentInitialize/propertiesMatrix.js'), - postConsumer: require('../workspaceComponentInitialize/postConsumer.js'), + postConsumer: require('../workspaceComponentInitialize/httpConsumer.js'), + httpConsumer: require('../workspaceComponentInitialize/httpConsumer.js'), keyToArray: require('../workspaceComponentInitialize/keyToArray.js'), sftpConsumer: require('../workspaceComponentInitialize/sftpConsumer.js'), flat: require('../workspaceComponentInitialize/flat.js'), @@ -64,17 +67,17 @@ module.exports = { return directory }, - initialise: function (router, unSafeRouteur,engineTracer) { + initialise: function (router, unSafeRouteur, engineTracer) { // console.log('initialise') - this.restApiPost.initialise(unSafeRouteur,engineTracer) // NO SECURE CHANGE ROUTER - this.restApiGet.initialise(unSafeRouteur,engineTracer) // NO SECURE CHANGE ROUTER - this.upload.initialise(router,engineTracer) - this.cacheNosql.initialise(router,engineTracer) // NO SECURE CHANGE ROUTER + this.httpProvider.initialise(unSafeRouteur, engineTracer) // NO SECURE CHANGE ROUTER + this.restApiGet.initialise(unSafeRouteur, engineTracer) // NO SECURE CHANGE ROUTER + this.upload.initialise(router, engineTracer) + this.cacheNosql.initialise(router, engineTracer) // NO SECURE CHANGE ROUTER }, - setAmqp : function (channel){ + setAmqp: function (channel) { // console.log('setAmqp') - this.restApiPost.setAmqp(channel); + this.httpProvider.setAmqp(channel) this.upload.setAmqp(channel) } } diff --git a/main/server/workspaceComponentInitialize/postConsumer.js b/main/server/workspaceComponentInitialize/httpConsumer.js similarity index 79% rename from main/server/workspaceComponentInitialize/postConsumer.js rename to main/server/workspaceComponentInitialize/httpConsumer.js index 3f12bbe93..a2595a142 100644 --- a/main/server/workspaceComponentInitialize/postConsumer.js +++ b/main/server/workspaceComponentInitialize/httpConsumer.js @@ -1,9 +1,9 @@ 'use strict'; -class PostConsumer { +class HttpConsumer { constructor () { this.type = 'HTTP consumer' this.description = 'Appeler une API HTTP; Executer une requête HTTP.' - this.editor = 'post-consumer-editor' + this.editor = 'http-consumer-editor' this.graphIcon = 'Post_consumer.svg' this.tags = [ 'http://semantic-bus.org/data/tags/outComponents', @@ -13,4 +13,4 @@ class PostConsumer { } } -module.exports = new PostConsumer() +module.exports = new HttpConsumer() diff --git a/main/server/workspaceComponentInitialize/restGetFile.js b/main/server/workspaceComponentInitialize/httpFileConsumer.js similarity index 68% rename from main/server/workspaceComponentInitialize/restGetFile.js rename to main/server/workspaceComponentInitialize/httpFileConsumer.js index 24a286253..2bd03f3cf 100644 --- a/main/server/workspaceComponentInitialize/restGetFile.js +++ b/main/server/workspaceComponentInitialize/httpFileConsumer.js @@ -1,9 +1,9 @@ 'use strict'; -class HttpGet { +class HttpFileConsumer { constructor () { - this.type = 'File consumer' + this.type = 'HTTP File Consumer' this.description = 'Interroger un fichier mis à disposition sur une API REST avec une requete GET.' - this.editor = 'rest-get-editor' + this.editor = 'http-file-consumer-editor' this.graphIcon = 'File_consumer.svg' this.tags = [ 'http://semantic-bus.org/data/tags/inComponents', @@ -11,4 +11,4 @@ class HttpGet { ] } } -module.exports = new HttpGet() +module.exports = new HttpFileConsumer() diff --git a/main/server/workspaceComponentInitialize/restApiPost.js b/main/server/workspaceComponentInitialize/httpProvider.js similarity index 98% rename from main/server/workspaceComponentInitialize/restApiPost.js rename to main/server/workspaceComponentInitialize/httpProvider.js index c3cc754d9..134f26df8 100644 --- a/main/server/workspaceComponentInitialize/restApiPost.js +++ b/main/server/workspaceComponentInitialize/httpProvider.js @@ -2,7 +2,7 @@ const { v4: uuidv4 } = require('uuid'); const MODE = 'AMQP' // MODE could be AMQP when all workflow will migrate over V1 -class RestApiPost { +class HttpProvider { constructor() { this.type = 'HTTP provider' this.description = `Mettre à disposition une API HTTP; Permettre à votre workflow d'être appelé par une requete HTTP.` @@ -14,9 +14,9 @@ class RestApiPost { 'http://semantic-bus.org/data/tags/APIComponents' ], this.stepNode = false - this.workspace_component_lib = require('../../../core/lib/workspace_component_lib') - this.workspace_lib = require('../../../core/lib/workspace_lib') - this.fragment_lib = require('../../../core/lib/fragment_lib') + this.workspace_component_lib = require('../../../core/lib/workspace_component_lib.js') + this.workspace_lib = require('../../../core/lib/workspace_lib.js') + this.fragment_lib = require('../../../core/lib/fragment_lib.js') this.data2xml = require('data2xml'); this.xmlJS = require('xml-js'); this.dataTraitment = require('../../../core/dataTraitmentLibrary/index.js') @@ -294,4 +294,4 @@ class RestApiPost { } } -module.exports = new RestApiPost() +module.exports = new HttpProvider()