@stechquick/symphony-cli 0.2.271

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 (212) hide show
  1. package/README.md +378 -0
  2. package/bin/run +5 -0
  3. package/bin/run.cmd +3 -0
  4. package/lib/commands/mui-create.d.ts +14 -0
  5. package/lib/commands/mui-create.js +39 -0
  6. package/lib/commands/nc-addcomp.d.ts +11 -0
  7. package/lib/commands/nc-addcomp.js +22 -0
  8. package/lib/commands/nc-build.d.ts +9 -0
  9. package/lib/commands/nc-build.js +20 -0
  10. package/lib/commands/nc-create.d.ts +14 -0
  11. package/lib/commands/nc-create.js +38 -0
  12. package/lib/commands/qui-build.d.ts +6 -0
  13. package/lib/commands/qui-build.js +16 -0
  14. package/lib/commands/qui-create.d.ts +14 -0
  15. package/lib/commands/qui-create.js +39 -0
  16. package/lib/commands/qui-start.d.ts +9 -0
  17. package/lib/commands/qui-start.js +30 -0
  18. package/lib/commands/quick-serve.d.ts +17 -0
  19. package/lib/commands/quick-serve.js +73 -0
  20. package/lib/commands/sym-addfunc.d.ts +12 -0
  21. package/lib/commands/sym-addfunc.js +21 -0
  22. package/lib/commands/sym-build.d.ts +12 -0
  23. package/lib/commands/sym-build.js +56 -0
  24. package/lib/commands/sym-create-module.d.ts +14 -0
  25. package/lib/commands/sym-create-module.js +39 -0
  26. package/lib/commands/sym-create.d.ts +14 -0
  27. package/lib/commands/sym-create.js +39 -0
  28. package/lib/commands/sym-fn-deploy.d.ts +24 -0
  29. package/lib/commands/sym-fn-deploy.js +152 -0
  30. package/lib/commands/sym-nano-deploy.d.ts +11 -0
  31. package/lib/commands/sym-nano-deploy.js +50 -0
  32. package/lib/commands/sym-start.d.ts +14 -0
  33. package/lib/commands/sym-start.js +28 -0
  34. package/lib/commands/sym-test.d.ts +6 -0
  35. package/lib/commands/sym-test.js +12 -0
  36. package/lib/helpers/deploy/fnDeployHelper.d.ts +28 -0
  37. package/lib/helpers/deploy/fnDeployHelper.js +196 -0
  38. package/lib/helpers/deploy/nanoDeployHelper.d.ts +20 -0
  39. package/lib/helpers/deploy/nanoDeployHelper.js +83 -0
  40. package/lib/helpers/fnDownloadHelper.d.ts +11 -0
  41. package/lib/helpers/fnDownloadHelper.js +64 -0
  42. package/lib/helpers/initHelper.d.ts +22 -0
  43. package/lib/helpers/initHelper.js +78 -0
  44. package/lib/helpers/microUIHelper.d.ts +10 -0
  45. package/lib/helpers/microUIHelper.js +33 -0
  46. package/lib/helpers/namedComponent/ncHelper.d.ts +15 -0
  47. package/lib/helpers/namedComponent/ncHelper.js +60 -0
  48. package/lib/helpers/npmHelper.d.ts +23 -0
  49. package/lib/helpers/npmHelper.js +79 -0
  50. package/lib/helpers/packageHelper.d.ts +14 -0
  51. package/lib/helpers/packageHelper.js +32 -0
  52. package/lib/helpers/shellHelper.d.ts +25 -0
  53. package/lib/helpers/shellHelper.js +52 -0
  54. package/lib/helpers/socketServer/socketServerHelper.d.ts +14 -0
  55. package/lib/helpers/socketServer/socketServerHelper.js +106 -0
  56. package/lib/helpers/typeHelper.d.ts +3 -0
  57. package/lib/helpers/typeHelper.js +22 -0
  58. package/lib/helpers/ui/createuiHelper.d.ts +10 -0
  59. package/lib/helpers/ui/createuiHelper.js +33 -0
  60. package/lib/helpers/ui/quiBuilder.d.ts +13 -0
  61. package/lib/helpers/ui/quiBuilder.js +163 -0
  62. package/lib/helpers/utils.d.ts +8 -0
  63. package/lib/helpers/utils.js +20 -0
  64. package/lib/index.d.ts +1 -0
  65. package/lib/index.js +4 -0
  66. package/lib/pathFinder.d.ts +4 -0
  67. package/lib/pathFinder.js +13 -0
  68. package/lib/predeploy/src/fn/fnPostdeploy.d.ts +5 -0
  69. package/lib/predeploy/src/fn/fnPostdeploy.js +49 -0
  70. package/lib/predeploy/src/fn/fnPredeploy.d.ts +4 -0
  71. package/lib/predeploy/src/fn/fnPredeploy.js +30 -0
  72. package/lib/predeploy/src/nano/nanoPostdeploy.d.ts +5 -0
  73. package/lib/predeploy/src/nano/nanoPostdeploy.js +41 -0
  74. package/lib/predeploy/src/nano/nanoPredeploy.d.ts +4 -0
  75. package/lib/predeploy/src/nano/nanoPredeploy.js +25 -0
  76. package/lib/predeploy/src/paramReplacer.d.ts +7 -0
  77. package/lib/predeploy/src/paramReplacer.js +14 -0
  78. package/lib/predeploy/src/predeployCommon.d.ts +15 -0
  79. package/lib/predeploy/src/predeployCommon.js +83 -0
  80. package/oclif.manifest.json +1 -0
  81. package/package.json +76 -0
  82. package/templates/addModule/{{ModuleName}}/.jenkins/dev.yaml +43 -0
  83. package/templates/addModule/{{ModuleName}}/README.md +2 -0
  84. package/templates/addModule/{{ModuleName}}/index.ts +1 -0
  85. package/templates/addModule/{{ModuleName}}/src/implementation/object.ts +16 -0
  86. package/templates/addModule/{{ModuleName}}/src/module.ts +9 -0
  87. package/templates/addModule/{{ModuleName}}/tsconfig.json +66 -0
  88. package/templates/addModule/{{ModuleName}}/webpack.config.js +41 -0
  89. package/templates/addModule/{{ModuleName}}/{{remove}}.gitignore +6 -0
  90. package/templates/addModule/{{ModuleName}}/{{remove}}package.json +33 -0
  91. package/templates/addfunc/functions/{{FuncName}}/config.yaml +25 -0
  92. package/templates/addfunc/functions/{{FuncName}}/func.yaml +9 -0
  93. package/templates/addfunc/functions/{{FuncName}}/{{FuncName}}.ts +8 -0
  94. package/templates/addfunc/unitTest/{{FuncName}}.test.ts +18 -0
  95. package/templates/createmicroui/{{MicroUIName}}-ui/.babelrc +17 -0
  96. package/templates/createmicroui/{{MicroUIName}}-ui/.editorconfig +9 -0
  97. package/templates/createmicroui/{{MicroUIName}}-ui/.postcssrc.js +8 -0
  98. package/templates/createmicroui/{{MicroUIName}}-ui/README.md +45 -0
  99. package/templates/createmicroui/{{MicroUIName}}-ui/build/build.js +41 -0
  100. package/templates/createmicroui/{{MicroUIName}}-ui/build/check-versions.js +49 -0
  101. package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-client.js +10 -0
  102. package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-server.js +107 -0
  103. package/templates/createmicroui/{{MicroUIName}}-ui/build/utils.js +73 -0
  104. package/templates/createmicroui/{{MicroUIName}}-ui/build/vue-loader.conf.js +19 -0
  105. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.base.conf.js +76 -0
  106. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.dev.conf.js +39 -0
  107. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.prod.conf.js +128 -0
  108. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.test.conf.js +32 -0
  109. package/templates/createmicroui/{{MicroUIName}}-ui/build.gradle +251 -0
  110. package/templates/createmicroui/{{MicroUIName}}-ui/config/dev.env.js +7 -0
  111. package/templates/createmicroui/{{MicroUIName}}-ui/config/index.js +50 -0
  112. package/templates/createmicroui/{{MicroUIName}}-ui/config/prod.env.js +4 -0
  113. package/templates/createmicroui/{{MicroUIName}}-ui/config/test.env.js +7 -0
  114. package/templates/createmicroui/{{MicroUIName}}-ui/copyBundle.js +3 -0
  115. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/base/repos.gradle +48 -0
  116. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.jar +0 -0
  117. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.properties +6 -0
  118. package/templates/createmicroui/{{MicroUIName}}-ui/gradlew +172 -0
  119. package/templates/createmicroui/{{MicroUIName}}-ui/index.html +11 -0
  120. package/templates/createmicroui/{{MicroUIName}}-ui/index.js +18 -0
  121. package/templates/createmicroui/{{MicroUIName}}-ui/indexCompNames.js +14 -0
  122. package/templates/createmicroui/{{MicroUIName}}-ui/indexInitial.js +8 -0
  123. package/templates/createmicroui/{{MicroUIName}}-ui/indexModuleName.js +1 -0
  124. package/templates/createmicroui/{{MicroUIName}}-ui/indexVCompNames.json +50 -0
  125. package/templates/createmicroui/{{MicroUIName}}-ui/package.json +84 -0
  126. package/templates/createmicroui/{{MicroUIName}}-ui/removeDist.js +2 -0
  127. package/templates/createmicroui/{{MicroUIName}}-ui/src/App.vue +54 -0
  128. package/templates/createmicroui/{{MicroUIName}}-ui/src/api/index.js +5 -0
  129. package/templates/createmicroui/{{MicroUIName}}-ui/src/components/index.js +6 -0
  130. package/templates/createmicroui/{{MicroUIName}}-ui/src/docker/nginx.conf +39 -0
  131. package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/en/default.json +3 -0
  132. package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/tr/default.json +3 -0
  133. package/templates/createmicroui/{{MicroUIName}}-ui/src/main.js +15 -0
  134. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/handlers/health.js +8 -0
  135. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/index.js +8 -0
  136. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/server.js +45 -0
  137. package/templates/createmicroui/{{MicroUIName}}-ui/src/pages/index.js +6 -0
  138. package/templates/createmicroui/{{MicroUIName}}-ui/src/router/index.js +5 -0
  139. package/templates/createmicroui/{{MicroUIName}}-ui/src/service/serviceConstants.js +1 -0
  140. package/templates/createmicroui/{{MicroUIName}}-ui/src/store/index.js +14 -0
  141. package/templates/createmicroui/{{MicroUIName}}-ui/src/worker/a9e657cbf4abb977edda.worker.js +60638 -0
  142. package/templates/createmicroui/{{MicroUIName}}-ui/static/.gitkeep +0 -0
  143. package/templates/createmicroui/{{MicroUIName}}-ui/webpack.config.js +257 -0
  144. package/templates/createui/{{UIName}}/Jenkinsfile +20 -0
  145. package/templates/createui/{{UIName}}/build.gradle +266 -0
  146. package/templates/createui/{{UIName}}/gradle/base/repos.gradle +93 -0
  147. package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.jar +0 -0
  148. package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.properties +6 -0
  149. package/templates/createui/{{UIName}}/gradlew +172 -0
  150. package/templates/createui/{{UIName}}/gradlew.bat +90 -0
  151. package/templates/createui/{{UIName}}/settings/globalLocalization.qjson +29 -0
  152. package/templates/createui/{{UIName}}/settings/localProxy.yaml +25 -0
  153. package/templates/createui/{{UIName}}/settings/qjson/alert.qjson +920 -0
  154. package/templates/createui/{{UIName}}/settings/qjson/loading.qjson +1486 -0
  155. package/templates/createui/{{UIName}}/settings/qjson/logHandler.qjson +65 -0
  156. package/templates/createui/{{UIName}}/settings/qjson/pipeline.qjson +116 -0
  157. package/templates/createui/{{UIName}}/settings/settings-proxy.js +120 -0
  158. package/templates/createui/{{UIName}}/settings/settings.yaml +85 -0
  159. package/templates/createui/{{UIName}}/settings.gradle +1 -0
  160. package/templates/createui/{{UIName}}/static/components/yourNamedCompHere.js +0 -0
  161. package/templates/createui/{{UIName}}/static/css/main.css +36 -0
  162. package/templates/createui/{{UIName}}/static/css/myDarkTheme.css +143 -0
  163. package/templates/createui/{{UIName}}/static/css/myHappyTheme1.css +140 -0
  164. package/templates/createui/{{UIName}}/static/css/myHappyTheme2.css +140 -0
  165. package/templates/createui/{{UIName}}/static/images/ahelogo.png +0 -0
  166. package/templates/createui/{{UIName}}/static/images/avatar.png +0 -0
  167. package/templates/createui/{{UIName}}/static/images/profile.png +0 -0
  168. package/templates/createui/{{UIName}}/static/images/profile2.png +0 -0
  169. package/templates/createui/{{UIName}}/static/images/yourImagesHere.png +0 -0
  170. package/templates/createui/{{UIName}}/static/js/componentList.ts +4452 -0
  171. package/templates/createui/{{UIName}}/static/qjsons/VDatatableConditionalRowColoring.qjson +158 -0
  172. package/templates/createui/{{UIName}}/static/qjsons/alertSamplePage.qjson +772 -0
  173. package/templates/createui/{{UIName}}/static/qjsons/complicatedSamplePage.qjson +10448 -0
  174. package/templates/createui/{{UIName}}/static/qjsons/customComponentSample.qjson +803 -0
  175. package/templates/createui/{{UIName}}/static/qjsons/customerInfoCustomComp.qjson +1451 -0
  176. package/templates/createui/{{UIName}}/static/qjsons/first.qjson +2180 -0
  177. package/templates/createui/{{UIName}}/static/qjsons/formatterSample.qjson +877 -0
  178. package/templates/createui/{{UIName}}/static/qjsons/localizationSample.qjson +1845 -0
  179. package/templates/createui/{{UIName}}/static/qjsons/pipelineSample.qjson +913 -0
  180. package/templates/createui/{{UIName}}/static/qjsons/validationSample.qjson +2371 -0
  181. package/templates/createui/{{UIName}}/static/qjsons/webDashboardSample.qjson +2993 -0
  182. package/templates/createui/{{UIName}}/{{remove}}.gitignore +3 -0
  183. package/templates/createui/{{UIName}}/{{remove}}package.json +22 -0
  184. package/templates/fnPredeploy/Dockerfile +22 -0
  185. package/templates/init/{{AppName}}/.vscode/launch.json +24 -0
  186. package/templates/init/{{AppName}}/Jenkinsfile +36 -0
  187. package/templates/init/{{AppName}}/app.yaml +1 -0
  188. package/templates/init/{{AppName}}/functions/qjsonfunc/func.yaml +9 -0
  189. package/templates/init/{{AppName}}/functions/qjsonfunc/qjsonfunc.ts +3 -0
  190. package/templates/init/{{AppName}}/functions/qjsonfunc/qjsons/test.qjson +180 -0
  191. package/templates/init/{{AppName}}/functions/samplefunc/config.yaml +46 -0
  192. package/templates/init/{{AppName}}/functions/samplefunc/func.yaml +9 -0
  193. package/templates/init/{{AppName}}/functions/samplefunc/samplefunc.ts +27 -0
  194. package/templates/init/{{AppName}}/jest.config.js +8 -0
  195. package/templates/init/{{AppName}}/local.ts +6 -0
  196. package/templates/init/{{AppName}}/sym-engine/config.yaml +7 -0
  197. package/templates/init/{{AppName}}/sym-engine/localization.yaml +5 -0
  198. package/templates/init/{{AppName}}/sym-engine/pipeline.ts +64 -0
  199. package/templates/init/{{AppName}}/test/qjson.http +29 -0
  200. package/templates/init/{{AppName}}/test/sample.http +24 -0
  201. package/templates/init/{{AppName}}/tsconfig.json +66 -0
  202. package/templates/init/{{AppName}}/unitTest/samplefunc.test.ts +55 -0
  203. package/templates/init/{{AppName}}/{{remove}}.gitignore +6 -0
  204. package/templates/init/{{AppName}}/{{remove}}package.json +40 -0
  205. package/templates/nanoPredeploy/Dockerfile +27 -0
  206. package/templates/nc-addComp/{{ComponentName}}.vue +29 -0
  207. package/templates/nc-create/{{ProjectName}}/shims/shims-vue.d.ts +4 -0
  208. package/templates/nc-create/{{ProjectName}}/src/namedComps/{{ProjectName}}.vue +29 -0
  209. package/templates/nc-create/{{ProjectName}}/tsconfig.json +66 -0
  210. package/templates/nc-create/{{ProjectName}}/webpack.config.js +2 -0
  211. package/templates/nc-create/{{ProjectName}}/{{remove}}.gitignore +3 -0
  212. package/templates/nc-create/{{ProjectName}}/{{remove}}package.json +28 -0
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ package-lock.json
3
+ /dist
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "{{UIName}}",
3
+ "version": "1.0.0",
4
+ "description": "{{UIDesc}}",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "symphony-cli qui-build",
8
+ "link": "npm link quick_qui",
9
+ "start": "symphony-cli qui-start",
10
+ "quick:serve": "symphony-cli quick-serve",
11
+ "quick:qui:create": "symphony-cli qui-create ../new_qui"
12
+ },
13
+ "devDependencies": {
14
+ "quick_qui": "^1.0.253",
15
+ "symphony-cli": "^0.2.244"
16
+ },
17
+ "author": "",
18
+ "license": "ISC",
19
+ "files": [
20
+ "dist"
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ FROM fnproject/node:dev as build-stage
2
+ WORKDIR /function
3
+ COPY package.json /function/
4
+ # COPY .npmrc /function/
5
+ # COPY .npmrc /root/
6
+ COPY *.ts /function/
7
+ COPY tsconfig.json /function/
8
+ # RUN npm install
9
+ COPY node_modules/ /function/node_modules/
10
+ RUN npm run build -- --skipversion
11
+ RUN rm -rf node_modules/typescript
12
+
13
+ FROM fnproject/node
14
+ WORKDIR /function
15
+ COPY . /function/
16
+ COPY --from=build-stage /function/node_modules/ /function/node_modules/
17
+ COPY --from=build-stage /function/dist/ /function/dist/
18
+ RUN chmod -R o+r /function
19
+
20
+ # set node_env
21
+ {{environmentalVars}}
22
+ ENTRYPOINT ["node", "./dist/{{funcName}}.js"]
@@ -0,0 +1,24 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ // "env": {
11
+ // "NODE_ENV": "development"
12
+ // },
13
+ "name": "Debug ts (Raw)",
14
+ "program": "${workspaceFolder}/local.ts",
15
+ "args": ["{\"httpPort\":3003,\"httpsPort\":3030}"], //you can change httpPort and httpsPort values
16
+ "preLaunchTask": "npm: buildDebug",
17
+ "sourceMaps": true,
18
+ // "stopOnEntry": true,
19
+ "outFiles": [
20
+ "${workspaceFolder}/dist/**/*.js"
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,36 @@
1
+ @Library("tools@isleasing_dev_remote_fn_parameters")_
2
+
3
+ jenkinsfileSymphony{
4
+ notifyPushBuildStatus = true
5
+ stage('Environment Setup'){
6
+ ansiColor('xterm') {
7
+ sh '''rm -f package-lock.json
8
+ npm install node@13.7.0'''
9
+ }
10
+ }
11
+ stage('Resolve Dependencies'){
12
+ ansiColor('xterm') {
13
+ sh '''npm install'''
14
+ }
15
+ }
16
+ stage('Build {{AppName}} SYM-App'){
17
+ ansiColor('xterm') {
18
+ sh '''npm run build -- --skipversion'''
19
+ }
20
+ }
21
+ stage('Docker Login'){
22
+ ansiColor('xterm') {
23
+ withCredentials([string(credentialsId: 'SYMPHONYDEMO_DOCKER_PASSWORD', variable: 'DOCKER_PASSWORD')]) {
24
+ sh "docker login --username=symphonydemo --password=${DOCKER_PASSWORD}"
25
+ }
26
+ }
27
+ }
28
+ stage('Deploy {{AppName}} SYM-App'){
29
+ ansiColor('xterm') {
30
+ withCredentials([string(credentialsId: 'SYMPHONYDEMO_DOCKER_PASSWORD', variable: 'DOCKER_PASSWORD')]) {
31
+ sh "npm run deploy -- --d_url='https://registry.hub.docker.com' --d_user='symphonydemo' --d_pass=${DOCKER_PASSWORD} --f_url='http://serverless.fn-api.plateau.softtech' --node_env='default'"
32
+ }
33
+ archiveArtifacts allowEmptyArchive: true, artifacts: 'package-lock.json'
34
+ }
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ name: {{AppName}}
@@ -0,0 +1,9 @@
1
+ schema_version: 20180708
2
+ name: qjsonfunc
3
+ version: 0.0.0
4
+ runtime: docker
5
+ entrypoint: node ./dist/qjsonfunc.js
6
+ triggers:
7
+ - name: qjsonfunc
8
+ type: http
9
+ source: /qjsonfunc
@@ -0,0 +1,3 @@
1
+ import { symphony } from "plateau-symphony";
2
+
3
+ symphony.serveQJsons({ requireFunc: require });
@@ -0,0 +1,180 @@
1
+ let pjson = {
2
+ "pJson": [
3
+ {
4
+ "T": "VBtn",
5
+ "P": {
6
+ "ID": {
7
+ "H": "EdtrComp_1",
8
+ "T": "prop"
9
+ },
10
+ "color": {
11
+ "H": "'primary'",
12
+ "T": "prop"
13
+ },
14
+ "regular": {
15
+ "H": "true",
16
+ "T": "prop"
17
+ }
18
+ },
19
+ "E": {
20
+ "click": {
21
+ "H": "EdtrComp_3.text = 'vira viraaa'\r\nRequest.async({url='/moneytransfer/sampleFunc', data= {x=5,y=6}, http='get', onSuccess= 'onsuc', onFail= 'onfail'})\r\n"
22
+ },
23
+ "onsuc": {
24
+ "H": "EdtrComp_3.text = response.calculations.sum",
25
+ "C": true
26
+ },
27
+ "onfail": {
28
+ "H": "EdtrComp_3.text = 'hadiii'",
29
+ "C": true
30
+ }
31
+ },
32
+ "C": {
33
+ "default": {
34
+ "c": [
35
+ {
36
+ "T": "QLabel",
37
+ "C": {},
38
+ "E": {},
39
+ "P": {
40
+ "ID": {
41
+ "H": "EdtrComp_2",
42
+ "T": "prop"
43
+ },
44
+ "text": {
45
+ "H": "'tuş'",
46
+ "T": "prop"
47
+ }
48
+ },
49
+ "_Editor": {
50
+ "eID": "EdtrComp_2"
51
+ },
52
+ "O": {
53
+ "cType": "child"
54
+ }
55
+ }
56
+ ],
57
+ "cType": "slot"
58
+ }
59
+ },
60
+ "_Editor": {
61
+ "eID": "EdtrComp_1"
62
+ },
63
+ "O": {
64
+ "cType": "slot"
65
+ }
66
+ },
67
+ {
68
+ "T": "QLabel",
69
+ "P": {
70
+ "ID": {
71
+ "H": "EdtrComp_3",
72
+ "T": "prop"
73
+ },
74
+ "text": {
75
+ "H": "'metin'",
76
+ "T": "prop"
77
+ }
78
+ },
79
+ "E": {},
80
+ "C": {},
81
+ "_Editor": {
82
+ "eID": "EdtrComp_3"
83
+ },
84
+ "O": {
85
+ "cType": "child"
86
+ }
87
+ }
88
+ ],
89
+ "cJson": [
90
+ {
91
+ "T": "VBtn",
92
+ "P": {
93
+ "ID": {
94
+ "H": "EdtrComp_1",
95
+ "T": "prop"
96
+ },
97
+ "color": {
98
+ "H": "╬'primary'╩╩",
99
+ "T": "prop"
100
+ },
101
+ "regular": {
102
+ "H": "╬true╩╩",
103
+ "T": "prop"
104
+ }
105
+ },
106
+ "E": {
107
+ "click": {
108
+ "H": "╬=╣.╣EdtrComp_3╩╠text╩╩╠'vira viraaa'╩╩╬()╣.╣Request╩╠async╩╩╠{}╠=╣url╩╠'/moneytransfer/sampleFunc'╩╩╠=╣data╩╠{}╠=╣x╩╠5╩╩╠=╣y╩╠6╩╩╩╩╠=╣http╩╠'get'╩╩╠=╣onSuccess╩╠'onsuc'╩╩╠=╣onFail╩╠'onfail'╩╩╩╩╩"
109
+ },
110
+ "onsuc": {
111
+ "H": "╬=╣.╣EdtrComp_3╩╠text╩╩╠.╣.╣response╩╠calculations╩╩╠sum╩╩╩╩",
112
+ "C": true
113
+ },
114
+ "onfail": {
115
+ "H": "╬=╣.╣EdtrComp_3╩╠text╩╩╠'hadiii'╩╩╩",
116
+ "C": true
117
+ }
118
+ },
119
+ "C": {
120
+ "default": {
121
+ "c": [
122
+ {
123
+ "T": "QLabel",
124
+ "C": {},
125
+ "E": {},
126
+ "P": {
127
+ "ID": {
128
+ "H": "EdtrComp_2",
129
+ "T": "prop"
130
+ },
131
+ "text": {
132
+ "H": "╬'tuş'╩╩",
133
+ "T": "prop"
134
+ }
135
+ },
136
+ "_Editor": {
137
+ "eID": "EdtrComp_2"
138
+ },
139
+ "O": {
140
+ "cType": "child"
141
+ }
142
+ }
143
+ ],
144
+ "cType": "slot"
145
+ }
146
+ },
147
+ "_Editor": {
148
+ "eID": "EdtrComp_1"
149
+ },
150
+ "O": {
151
+ "cType": "slot"
152
+ }
153
+ },
154
+ {
155
+ "T": "QLabel",
156
+ "P": {
157
+ "ID": {
158
+ "H": "EdtrComp_3",
159
+ "T": "prop"
160
+ },
161
+ "text": {
162
+ "H": "╬'metin'╩╩",
163
+ "T": "prop"
164
+ }
165
+ },
166
+ "E": {},
167
+ "C": {},
168
+ "_Editor": {
169
+ "eID": "EdtrComp_3"
170
+ },
171
+ "O": {
172
+ "cType": "child"
173
+ }
174
+ }
175
+ ],
176
+ "lrids": {},
177
+ "clrids": {},
178
+ "description": {}
179
+ };
180
+ export default pjson
@@ -0,0 +1,46 @@
1
+ # this level is rezerved for environments
2
+ # uses default environment where none is supplied
3
+ default:
4
+ # PLEASE DELETE EVERTHING BELOW THIS LINE (THESE ARE JUST SAMPLES) AND WRITE YOUR OWN
5
+ # this level is for your config keys
6
+ log:
7
+ minlevel: "log" # none | error | warn | trace | log | info | debug
8
+ path: # "C:/Logs/Symphony"
9
+ disk: false
10
+ sampleKey:
11
+ url: "this is a sample value"
12
+ timeout: 2000
13
+ restGetExample:
14
+ url: "http://dummy.restapiexample.com/api/v1/employees"
15
+ timeout: 2000
16
+ log:
17
+ body: false # false | 100 |
18
+ header: false
19
+ request: false
20
+ response: false
21
+ restPostExample:
22
+ url: "http://dummy.restapiexample.com/api/v1/create"
23
+ timeout: 2000
24
+ log:
25
+ #body: true
26
+ header: true
27
+ request: true
28
+ response: true
29
+ soapExample:
30
+ url: "http://www.dneonline.com/calculator.asmx?wsdl"
31
+ timeout: 5000
32
+ sessionBag:
33
+ environment: none #none | memory | hazelcast
34
+ bag:
35
+ environment: memory #memory | hazelcast
36
+ groupConfig:
37
+ name: "dev"
38
+ password: "dev-pass"
39
+ # Network configuration for hazelcast
40
+ clientNetworkConfig:
41
+ # Client tries to connect the members at these addresses.
42
+ hazelcastClusterMembers: [
43
+ "127.0.0.1:5701",
44
+ "127.0.0.2:5701"
45
+ ]
46
+
@@ -0,0 +1,9 @@
1
+ schema_version: 20180708
2
+ name: samplefunc
3
+ version: 0.0.0
4
+ runtime: docker
5
+ entrypoint: node ./dist/samplefunc.js
6
+ triggers:
7
+ - name: samplefunc
8
+ type: http
9
+ source: /samplefunc
@@ -0,0 +1,27 @@
1
+ import { symphony } from "plateau-symphony";
2
+
3
+ symphony.registerFunc({
4
+ funcName: "samplefunc", keepBag: false, requireFunc: require, func: async (sym) => {
5
+ const x = sym.request.body.number1;
6
+ const y = sym.request.body.number2;
7
+ const sum: number = x + y;
8
+ const difference: number = y - x;
9
+ sym.response.body.calculations = { funcName: "samplefunc", sum: sum, difference: difference };
10
+
11
+ //#region rest example
12
+ const respGet = await sym.rest.get({ symConfigKey: "restGetExample" });
13
+ sym.response.body.restGetResponse = { listEmp: respGet.body };
14
+ //#endregion
15
+
16
+ //#region rest example
17
+ const respPost = await sym.rest.post({ symConfigKey: "restPostExample", body: { "name": "test", "salary": "123", "age": "23" } });
18
+ sym.response.body.restPostResponse = { listEmp: respPost.body };
19
+ //#endregion
20
+
21
+ //#region soap example
22
+ const soapBody = { "intA": "2", "intB": "3" };
23
+ const respSoap = await sym.soap.request({ request: { body: soapBody, methodName: "Add", symConfigKey: "soapExample" } });
24
+ sym.response.body.soapResponse = { total: respSoap.data };
25
+ //#endregion
26
+ }
27
+ });
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ roots: ['<rootDir>/unitTest'],
3
+ transform: {
4
+ '^.+\\.tsx?$': 'ts-jest',
5
+ },
6
+ testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
7
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
8
+ }
@@ -0,0 +1,6 @@
1
+ import { symphony } from "plateau-symphony";
2
+
3
+
4
+
5
+
6
+ symphony.discoverFunctions(require);
@@ -0,0 +1,7 @@
1
+ default:
2
+ readiness: readiness
3
+ liveness: liveness
4
+ test:
5
+ subtestitem1: "test1"
6
+ subtestitem2: "test2"
7
+
@@ -0,0 +1,5 @@
1
+ tr-TR:
2
+ example: "örnek"
3
+ en-US:
4
+ example: "example"
5
+
@@ -0,0 +1,64 @@
1
+ import { ISymPipeline, ISoapRequest } from "plateau-symphony";
2
+
3
+ export default <ISymPipeline>{
4
+ // preFunc: async sym => {
5
+ // //write code to execute before each function execution
6
+ // //to stop execution return {stopExecution: true}
7
+ // },
8
+ // appStart: () => {
9
+ // //write code to execute when starts application execution
10
+ // },
11
+ // postFunc: async sym => {
12
+ // //write code to execute after each function execution
13
+ // },
14
+ // onBeforeRest: async ({ url, body, header }: {
15
+ // url: string;
16
+ // body?: string | Record<string, any> | FormData | undefined;
17
+ // header: Record<string, string | string[] | undefined> | undefined;
18
+ // }): Promise<{
19
+ // url: string;
20
+ // body?: string | Record<string, any> | FormData | undefined;
21
+ // header: Record<string, string | string[] | undefined> | undefined;
22
+ // }> => {
23
+ // //write code to execute before each rest request execution
24
+ // return {
25
+ // url: url,
26
+ // body: body,
27
+ // header: header
28
+ // }
29
+ // },
30
+ // onAfterRest: async ({ body, status, statusText, headers }: {
31
+ // body: Record<string, any>;
32
+ // status: number;
33
+ // statusText: string;
34
+ // headers: Record<string, string | string[] | undefined> | undefined;
35
+ // }): Promise<void> => {
36
+ // //write code to execute after each rest response execution
37
+ // },
38
+ // onBeforeSoap: ({ url, request }: { url: string, request: ISoapRequest }): {
39
+ // url: string;
40
+ // request: ISoapRequest;
41
+ // } => {
42
+ // //write code to execute before each soap request execution
43
+ // return {
44
+ // url: url,
45
+ // request: request
46
+ // }
47
+ // },
48
+ // onAfterSoap: (response: any): void => {
49
+ // //write code to execute after each soap request execution
50
+ // },
51
+ // onBeforeSoapCb: ({ url, request }: { url: string, request: ISoapRequest }): {
52
+ // url: string;
53
+ // request: ISoapRequest;
54
+ // } => {
55
+ // //write code to execute before each soap callback request execution
56
+ // return {
57
+ // url: url,
58
+ // request: request
59
+ // }
60
+ // },
61
+ // onAfterSoapCb: (response: any): void => {
62
+ // //write code to execute after each soap callback response execution
63
+ // }
64
+ }
@@ -0,0 +1,29 @@
1
+ ### Sample GET request for QJson (ON LOCAL-DEV)
2
+ GET http://localhost:3002/{{AppName}}/qjsonfunc?qjsonpath=test.qjson HTTP/1.1
3
+
4
+ ### Sample POST request for QJson (ON LOCAL-DEV)
5
+ POST http://localhost:3002/{{AppName}}/qjsonfunc HTTP/1.1
6
+
7
+ {"qjsonpath":"test.qjson"}
8
+
9
+
10
+ ### Sample GET request for QJson (ON SERVERLESS)
11
+ GET http://localhost:8080/t/{{AppName}}/qjsonfunc?qjsonpath=test.qjson HTTP/1.1
12
+
13
+ ### Sample POST request for QJson (ON SERVERLESS)
14
+ POST http://localhost:8080/t/{{AppName}}/qjsonfunc HTTP/1.1
15
+
16
+ {"qjsonpath":"test.qjson"}
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+ # you can use your favourite rest test client
26
+ # (Easiest) VSCode ext: Rest Client -> https://marketplace.visualstudio.com/items?itemName=humao.rest-client
27
+ # fiddler -> https://www.telerik.com/fiddler
28
+ # postman -> https://www.postman.com/
29
+ # online -> https://www.webtools.services/online-rest-api-client (disable browser cors protection -> Win + R -> chrome.exe --disable-web-security --user-data-dir="alper")
@@ -0,0 +1,24 @@
1
+ ### Sample request for Sample Func (ON LOCAL-DEV)
2
+ POST http://localhost:3002/{{AppName}}/sampleFunc HTTP/1.1
3
+ Cookie: test=testcookieValue
4
+
5
+ { "x":5, "y": 6 }
6
+
7
+
8
+
9
+ ### Sample request for Sample Func (ON SERVERLESS)
10
+ POST http://localhost:8080/t/{{AppName}}/samplefunc HTTP/1.1
11
+ Cookie: test=testcookieValue
12
+
13
+ { "x":5, "y": 6 }
14
+
15
+
16
+
17
+
18
+
19
+
20
+ # you can use your favourite rest test client
21
+ # (Easiest) VSCode ext: Rest Client -> https://marketplace.visualstudio.com/items?itemName=humao.rest-client
22
+ # fiddler -> https://www.telerik.com/fiddler
23
+ # postman -> https://www.postman.com/
24
+ # online -> https://www.webtools.services/online-rest-api-client (disable browser cors protection -> Win + R -> chrome.exe --disable-web-security --user-data-dir="alper")
@@ -0,0 +1,66 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "*": ["types/*"]
6
+ },
7
+ /* Basic Options */
8
+ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
9
+ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
10
+ "lib": [
11
+ "es5",
12
+ "es6",
13
+ "dom"
14
+ ], /* Specify library files to be included in the compilation. */
15
+ "allowJs": true, /* Allow javascript files to be compiled. */
16
+ // "checkJs": true, /* Report errors in .js files. */
17
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
18
+ "declaration": false, /* Generates corresponding '.d.ts' file. */
19
+ "declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
20
+ "sourceMap": true, /* Generates corresponding '.map' file. */
21
+ // "outFile": "./", /* Concatenate and emit output to single file. */
22
+ "outDir": "./dist/", /* Redirect output structure to the directory. */
23
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
24
+ // "composite": true, /* Enable project compilation */
25
+ // "removeComments": true, /* Do not emit comments to output. */
26
+ // "noEmit": true, /* Do not emit outputs. */
27
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
28
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
29
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
30
+ /* Strict Type-Checking Options */
31
+ "strict": true, /* Enable all strict type-checking options. */
32
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
33
+ // "strictNullChecks": true, /* Enable strict null checks. */
34
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
35
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
36
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
37
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
38
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
39
+ /* Additional Checks */
40
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
41
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
42
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
43
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
44
+ /* Module Resolution Options */
45
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ /* Source Map Options */
55
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
56
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
57
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
58
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
59
+ /* Experimental Options */
60
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
61
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
62
+ },
63
+ "include": [
64
+ "./**/*"
65
+ ]
66
+ }