@stechquick/symphony-cli 0.2.294 → 0.2.297

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.
package/README.md CHANGED
@@ -19,7 +19,7 @@ $ npm install -g @stechquick/symphony-cli
19
19
  $ symphony-cli COMMAND
20
20
  running command...
21
21
  $ symphony-cli (-v|--version|version)
22
- @stechquick/symphony-cli/0.2.294 linux-x64 node-v16.16.0
22
+ @stechquick/symphony-cli/0.2.297 linux-x64 node-v16.16.0
23
23
  $ symphony-cli --help [COMMAND]
24
24
  USAGE
25
25
  $ symphony-cli COMMAND
@@ -81,7 +81,7 @@ EXAMPLE
81
81
  symphony-cli mui-create myUI -d="My Micro UI project"
82
82
  ```
83
83
 
84
- _See code: [src/commands/mui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/mui-create.ts)_
84
+ _See code: [src/commands/mui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/mui-create.ts)_
85
85
 
86
86
  ## `symphony-cli nc-addcomp NAME`
87
87
 
@@ -98,7 +98,7 @@ EXAMPLE
98
98
  symphony-cli nc-addcomp my_comp_name
99
99
  ```
100
100
 
101
- _See code: [src/commands/nc-addcomp.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/nc-addcomp.ts)_
101
+ _See code: [src/commands/nc-addcomp.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/nc-addcomp.ts)_
102
102
 
103
103
  ## `symphony-cli nc-build`
104
104
 
@@ -116,7 +116,7 @@ EXAMPLES
116
116
  $ symphony-cli nc-build -w
117
117
  ```
118
118
 
119
- _See code: [src/commands/nc-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/nc-build.ts)_
119
+ _See code: [src/commands/nc-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/nc-build.ts)_
120
120
 
121
121
  ## `symphony-cli nc-create NAME`
122
122
 
@@ -136,7 +136,7 @@ EXAMPLE
136
136
  symphony-cli nc-create nc_example -d="my named component example"
137
137
  ```
138
138
 
139
- _See code: [src/commands/nc-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/nc-create.ts)_
139
+ _See code: [src/commands/nc-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/nc-create.ts)_
140
140
 
141
141
  ## `symphony-cli qui-build`
142
142
 
@@ -150,7 +150,7 @@ EXAMPLE
150
150
  $ symphony-cli qui-build -w
151
151
  ```
152
152
 
153
- _See code: [src/commands/qui-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/qui-build.ts)_
153
+ _See code: [src/commands/qui-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/qui-build.ts)_
154
154
 
155
155
  ## `symphony-cli qui-create NAME`
156
156
 
@@ -172,7 +172,7 @@ EXAMPLES
172
172
  symphony-cli qui-create myUI -t=TOKEN -d="My Quick UI project"
173
173
  ```
174
174
 
175
- _See code: [src/commands/qui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/qui-create.ts)_
175
+ _See code: [src/commands/qui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/qui-create.ts)_
176
176
 
177
177
  ## `symphony-cli qui-start`
178
178
 
@@ -189,7 +189,7 @@ EXAMPLE
189
189
  $ symphony-cli qui-start -b
190
190
  ```
191
191
 
192
- _See code: [src/commands/qui-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/qui-start.ts)_
192
+ _See code: [src/commands/qui-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/qui-start.ts)_
193
193
 
194
194
  ## `symphony-cli quick-serve`
195
195
 
@@ -212,7 +212,7 @@ EXAMPLES
212
212
  $ symphony-cli quick-serve -g -r C:/MyPathToServe
213
213
  ```
214
214
 
215
- _See code: [src/commands/quick-serve.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/quick-serve.ts)_
215
+ _See code: [src/commands/quick-serve.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/quick-serve.ts)_
216
216
 
217
217
  ## `symphony-cli sym-addfunc FUNCNAME`
218
218
 
@@ -229,7 +229,7 @@ EXAMPLE
229
229
  symphony-cli sym-addfunc havalemenu
230
230
  ```
231
231
 
232
- _See code: [src/commands/sym-addfunc.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-addfunc.ts)_
232
+ _See code: [src/commands/sym-addfunc.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-addfunc.ts)_
233
233
 
234
234
  ## `symphony-cli sym-build`
235
235
 
@@ -248,7 +248,7 @@ EXAMPLES
248
248
  $ symphony-cli sym-build -w
249
249
  ```
250
250
 
251
- _See code: [src/commands/sym-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-build.ts)_
251
+ _See code: [src/commands/sym-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-build.ts)_
252
252
 
253
253
  ## `symphony-cli sym-create NAME`
254
254
 
@@ -268,7 +268,7 @@ EXAMPLE
268
268
  symphony-cli sym-create havale -d="Kanallardan yapılan havale işlemi"
269
269
  ```
270
270
 
271
- _See code: [src/commands/sym-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-create.ts)_
271
+ _See code: [src/commands/sym-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-create.ts)_
272
272
 
273
273
  ## `symphony-cli sym-create-module NAME`
274
274
 
@@ -288,7 +288,7 @@ EXAMPLE
288
288
  symphony-cli sym-create-module abm -d="abm module description"
289
289
  ```
290
290
 
291
- _See code: [src/commands/sym-create-module.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-create-module.ts)_
291
+ _See code: [src/commands/sym-create-module.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-create-module.ts)_
292
292
 
293
293
  ## `symphony-cli sym-fn-deploy ENVIRONMENT`
294
294
 
@@ -322,7 +322,7 @@ EXAMPLES
322
322
  --f_url="MyFnApiUrl"
323
323
  ```
324
324
 
325
- _See code: [src/commands/sym-fn-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-fn-deploy.ts)_
325
+ _See code: [src/commands/sym-fn-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-fn-deploy.ts)_
326
326
 
327
327
  ## `symphony-cli sym-nano-deploy`
328
328
 
@@ -340,7 +340,7 @@ EXAMPLE
340
340
  symphony-cli sym-nano-deploy
341
341
  ```
342
342
 
343
- _See code: [src/commands/sym-nano-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-nano-deploy.ts)_
343
+ _See code: [src/commands/sym-nano-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-nano-deploy.ts)_
344
344
 
345
345
  ## `symphony-cli sym-start`
346
346
 
@@ -362,7 +362,7 @@ EXAMPLE
362
362
  $ symphony-cli sym-start -b -d
363
363
  ```
364
364
 
365
- _See code: [src/commands/sym-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-start.ts)_
365
+ _See code: [src/commands/sym-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-start.ts)_
366
366
 
367
367
  ## `symphony-cli sym-test`
368
368
 
@@ -379,5 +379,5 @@ EXAMPLE
379
379
  $ symphony-cli sym-test
380
380
  ```
381
381
 
382
- _See code: [src/commands/sym-test.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.294/src/commands/sym-test.ts)_
382
+ _See code: [src/commands/sym-test.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.2.297/src/commands/sym-test.ts)_
383
383
  <!-- commandsstop -->
@@ -50,6 +50,6 @@ Build.flags = {
50
50
  skipversion: command_1.flags.boolean({ char: 's', description: 'skip version checking. Used for Deployment' })
51
51
  };
52
52
  Build.versionCheckSetting = {
53
- packageNames: ["plateau-symphony", "@stechquick\/\symphony-cli"],
53
+ packageNames: ["@stech-sym\/\symphony", "@stechquick\/\symphony-cli"],
54
54
  packageJsonFilePath: "/templates/init/{{AppName}}/{{remove}}package.json"
55
55
  };
@@ -1 +1 @@
1
- {"version":"0.2.294","commands":{"mui-create":{"id":"mui-create","description":"MicroUI command to create a new Micro UI project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli mui-create myUI -d=\"My Micro UI project\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to project","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input microui name","required":true}]},"nc-addcomp":{"id":"nc-addcomp","description":"Command for add a named component to nc project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli nc-addcomp my_comp_name"],"flags":{},"args":[{"name":"name","description":"input component name","required":true}]},"nc-build":{"id":"nc-build","description":"Command for build your named component project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli nc-build","$ symphony-cli nc-build -w"],"flags":{"watch":{"name":"watch","type":"boolean","char":"w","description":"for watch","allowNo":false}},"args":[]},"nc-create":{"id":"nc-create","description":"Command for create a named component template project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli nc-create nc_example -d=\"my named component example\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to named component","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input project name","required":true}]},"qui-build":{"id":"qui-build","description":"Plateau-QUI command to build your Quick ui project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli qui-build -w"],"flags":{},"args":[]},"qui-create":{"id":"qui-create","description":"Plateau-QUI command to create a new Quick ui project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli qui-create myUI -t=TOKEN","symphony-cli qui-create myUI -t=TOKEN -d=\"My Quick UI project\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to project","hidden":false,"required":false,"default":""},"token":{"name":"token","type":"option","char":"t","description":"npm token for @stechquick","hidden":false,"required":true}},"args":[{"name":"name","description":"input quick ui name","required":true}]},"qui-start":{"id":"qui-start","description":"Plateau-QUI command for start your Quick ui project with/without build","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli qui-start -b"],"flags":{"build":{"name":"build","type":"boolean","char":"b","description":"for build","allowNo":false}},"args":[]},"quick-serve":{"id":"quick-serve","description":"QUICK command for serving your path","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli quick-serve","$ symphony-cli quick-serve -p 3000","$ symphony-cli quick-serve -g","$ symphony-cli quick-serve -r C:/MyPathToServe","$ symphony-cli quick-serve -g -r C:/MyPathToServe"],"flags":{"path":{"name":"path","type":"option","char":"r","description":"Change path to serve"},"httpPort":{"name":"httpPort","type":"option","char":"p","description":"HTTP port to serve"},"global":{"name":"global","type":"boolean","char":"g","description":"Host/visible for everyone.","allowNo":false}},"args":[]},"sym-addfunc":{"id":"sym-addfunc","description":"Plateau-Symphony command to create a new function","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-addfunc havalemenu"],"flags":{},"args":[{"name":"funcname","description":"input function name","required":true,"hidden":false}]},"sym-build":{"id":"sym-build","description":"Plateau-Symphony command to build the app with/without watch","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-build","$ symphony-cli sym-build -w"],"flags":{"watch":{"name":"watch","type":"boolean","char":"w","description":"for watch","allowNo":false},"skipversion":{"name":"skipversion","type":"boolean","char":"s","description":"skip version checking. Used for Deployment","allowNo":false}},"args":[]},"sym-create-module":{"id":"sym-create-module","description":"Plateau-Symphony command to create a Symphony App","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-create-module abm -d=\"abm module description\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to module","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input module name","required":true}]},"sym-create":{"id":"sym-create","description":"Plateau-Symphony command to create a Symphony App","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-create havale -d=\"Kanallardan yapılan havale işlemi\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to application","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input application name","required":true}]},"sym-fn-deploy":{"id":"sym-fn-deploy","description":"Plateau-Symphony fn command to deploy the all functions in your app","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-fn-deploy local","symphony-cli sym-fn-deploy play","symphony-cli sym-fn-deploy remote","symphony-cli sym-fn-deploy remote -d MyDockerUrl -u MyDockerUser -p MyDockerPassword -f MyFnApiUrl","symphony-cli sym-fn-deploy remote --d_url MyDockerUrl --d_user MyDockerUser --d_pass MyDockerPassword --f_url MyFnApiUrl","symphony-cli sym-fn-deploy remote --d_url=\"MyDockerUrl\" --d_user=\"MyDockerUser\" --d_pass=\"MyDockerPassword\" --f_url=\"MyFnApiUrl\""],"flags":{"d_url":{"name":"d_url","type":"option","char":"d","description":"docker url to deploy","hidden":false,"required":false,"default":""},"d_user":{"name":"d_user","type":"option","char":"u","description":"docker username to deploy","hidden":false,"required":false,"default":""},"d_pass":{"name":"d_pass","type":"option","char":"p","description":"docker password for this username to deploy","hidden":false,"required":false,"default":""},"f_url":{"name":"f_url","type":"option","char":"f","description":"fn api url to deploy","hidden":false,"required":false,"default":""},"node_env":{"name":"node_env","type":"option","char":"e","description":"symphony environment name","hidden":false,"required":false}},"args":[{"name":"environment","description":"deploy environment: \n [local: your local] \n [play: playground environment] \n [remote: remote server]","required":true,"options":["local","play","remote"],"hidden":false}]},"sym-nano-deploy":{"id":"sym-nano-deploy","description":"Plateau-Symphony nano command to deploy the all functions in your app","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-nano-deploy"],"flags":{"node_env":{"name":"node_env","type":"option","char":"e","description":"symphony environment name","hidden":false,"required":false},"imagename":{"name":"imagename","type":"option","char":"i","description":"image name for docker","hidden":false,"required":true}},"args":[]},"sym-start":{"id":"sym-start","description":"Plateau-Symphony command to start your functions with/without debug","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-start -b -d"],"flags":{"debug":{"name":"debug","type":"boolean","char":"d","description":"for debug","allowNo":false},"build":{"name":"build","type":"boolean","char":"b","description":"for build","allowNo":false},"http_port":{"name":"http_port","type":"option","char":"p","description":"port to HTTP server"},"https_port":{"name":"https_port","type":"option","char":"h","description":"port to HTTPS server"},"environment":{"name":"environment","type":"option","char":"e","description":"environment variable","hidden":false,"required":false},"hosted_path":{"name":"hosted_path","type":"option","description":"application hosted sub path","required":false}},"args":[]},"sym-test":{"id":"sym-test","description":"Plateau-Symphony command to run your all test functions with coverage","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-test"],"flags":{"func":{"name":"func","type":"option","char":"f","description":"funtion name to test particular file"}},"args":[]}}}
1
+ {"version":"0.2.297","commands":{"mui-create":{"id":"mui-create","description":"MicroUI command to create a new Micro UI project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli mui-create myUI -d=\"My Micro UI project\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to project","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input microui name","required":true}]},"nc-addcomp":{"id":"nc-addcomp","description":"Command for add a named component to nc project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli nc-addcomp my_comp_name"],"flags":{},"args":[{"name":"name","description":"input component name","required":true}]},"nc-build":{"id":"nc-build","description":"Command for build your named component project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli nc-build","$ symphony-cli nc-build -w"],"flags":{"watch":{"name":"watch","type":"boolean","char":"w","description":"for watch","allowNo":false}},"args":[]},"nc-create":{"id":"nc-create","description":"Command for create a named component template project.","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli nc-create nc_example -d=\"my named component example\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to named component","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input project name","required":true}]},"qui-build":{"id":"qui-build","description":"Plateau-QUI command to build your Quick ui project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli qui-build -w"],"flags":{},"args":[]},"qui-create":{"id":"qui-create","description":"Plateau-QUI command to create a new Quick ui project","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli qui-create myUI -t=TOKEN","symphony-cli qui-create myUI -t=TOKEN -d=\"My Quick UI project\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to project","hidden":false,"required":false,"default":""},"token":{"name":"token","type":"option","char":"t","description":"npm token for @stechquick","hidden":false,"required":true}},"args":[{"name":"name","description":"input quick ui name","required":true}]},"qui-start":{"id":"qui-start","description":"Plateau-QUI command for start your Quick ui project with/without build","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli qui-start -b"],"flags":{"build":{"name":"build","type":"boolean","char":"b","description":"for build","allowNo":false}},"args":[]},"quick-serve":{"id":"quick-serve","description":"QUICK command for serving your path","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli quick-serve","$ symphony-cli quick-serve -p 3000","$ symphony-cli quick-serve -g","$ symphony-cli quick-serve -r C:/MyPathToServe","$ symphony-cli quick-serve -g -r C:/MyPathToServe"],"flags":{"path":{"name":"path","type":"option","char":"r","description":"Change path to serve"},"httpPort":{"name":"httpPort","type":"option","char":"p","description":"HTTP port to serve"},"global":{"name":"global","type":"boolean","char":"g","description":"Host/visible for everyone.","allowNo":false}},"args":[]},"sym-addfunc":{"id":"sym-addfunc","description":"Plateau-Symphony command to create a new function","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-addfunc havalemenu"],"flags":{},"args":[{"name":"funcname","description":"input function name","required":true,"hidden":false}]},"sym-build":{"id":"sym-build","description":"Plateau-Symphony command to build the app with/without watch","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-build","$ symphony-cli sym-build -w"],"flags":{"watch":{"name":"watch","type":"boolean","char":"w","description":"for watch","allowNo":false},"skipversion":{"name":"skipversion","type":"boolean","char":"s","description":"skip version checking. Used for Deployment","allowNo":false}},"args":[]},"sym-create-module":{"id":"sym-create-module","description":"Plateau-Symphony command to create a Symphony App","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-create-module abm -d=\"abm module description\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to module","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input module name","required":true}]},"sym-create":{"id":"sym-create","description":"Plateau-Symphony command to create a Symphony App","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-create havale -d=\"Kanallardan yapılan havale işlemi\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to application","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input application name","required":true}]},"sym-fn-deploy":{"id":"sym-fn-deploy","description":"Plateau-Symphony fn command to deploy the all functions in your app","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-fn-deploy local","symphony-cli sym-fn-deploy play","symphony-cli sym-fn-deploy remote","symphony-cli sym-fn-deploy remote -d MyDockerUrl -u MyDockerUser -p MyDockerPassword -f MyFnApiUrl","symphony-cli sym-fn-deploy remote --d_url MyDockerUrl --d_user MyDockerUser --d_pass MyDockerPassword --f_url MyFnApiUrl","symphony-cli sym-fn-deploy remote --d_url=\"MyDockerUrl\" --d_user=\"MyDockerUser\" --d_pass=\"MyDockerPassword\" --f_url=\"MyFnApiUrl\""],"flags":{"d_url":{"name":"d_url","type":"option","char":"d","description":"docker url to deploy","hidden":false,"required":false,"default":""},"d_user":{"name":"d_user","type":"option","char":"u","description":"docker username to deploy","hidden":false,"required":false,"default":""},"d_pass":{"name":"d_pass","type":"option","char":"p","description":"docker password for this username to deploy","hidden":false,"required":false,"default":""},"f_url":{"name":"f_url","type":"option","char":"f","description":"fn api url to deploy","hidden":false,"required":false,"default":""},"node_env":{"name":"node_env","type":"option","char":"e","description":"symphony environment name","hidden":false,"required":false}},"args":[{"name":"environment","description":"deploy environment: \n [local: your local] \n [play: playground environment] \n [remote: remote server]","required":true,"options":["local","play","remote"],"hidden":false}]},"sym-nano-deploy":{"id":"sym-nano-deploy","description":"Plateau-Symphony nano command to deploy the all functions in your app","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["symphony-cli sym-nano-deploy"],"flags":{"node_env":{"name":"node_env","type":"option","char":"e","description":"symphony environment name","hidden":false,"required":false},"imagename":{"name":"imagename","type":"option","char":"i","description":"image name for docker","hidden":false,"required":true}},"args":[]},"sym-start":{"id":"sym-start","description":"Plateau-Symphony command to start your functions with/without debug","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-start -b -d"],"flags":{"debug":{"name":"debug","type":"boolean","char":"d","description":"for debug","allowNo":false},"build":{"name":"build","type":"boolean","char":"b","description":"for build","allowNo":false},"http_port":{"name":"http_port","type":"option","char":"p","description":"port to HTTP server"},"https_port":{"name":"https_port","type":"option","char":"h","description":"port to HTTPS server"},"environment":{"name":"environment","type":"option","char":"e","description":"environment variable","hidden":false,"required":false},"hosted_path":{"name":"hosted_path","type":"option","description":"application hosted sub path","required":false}},"args":[]},"sym-test":{"id":"sym-test","description":"Plateau-Symphony command to run your all test functions with coverage","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli sym-test"],"flags":{"func":{"name":"func","type":"option","char":"f","description":"funtion name to test particular file"}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stechquick/symphony-cli",
3
3
  "description": "quick symphony server cli tools",
4
- "version": "0.2.294",
4
+ "version": "0.2.297",
5
5
  "author": "alper-batioglu @alper-batioglu",
6
6
  "bin": {
7
7
  "symphony-cli": "./bin/run"
@@ -23,7 +23,7 @@
23
23
  "@oclif/command": "^1.6.1",
24
24
  "@oclif/config": "^1.15.1",
25
25
  "@oclif/plugin-help": "^3.1.0",
26
- "@stechquick/symphony-common": "^0.1.6",
26
+ "@stechquick/symphony-common": "^0.1.16",
27
27
  "@stechquick/symphony-nanoserver": "^0.2.8",
28
28
  "@stechquick/symphony-nanoserver-wsplugin": "^0.2.4",
29
29
  "@types/js-yaml": "^3.12.5",
@@ -1,9 +1,9 @@
1
- import { ModuleObject, IModuleObject } from "./implementation/object";
2
- import { ISymphonyObject } from "@stechquick/symphony-common/lib/symphony";
3
- import { symphony, ISymphonyModule } from "plateau-symphony";
4
-
5
- export class Module implements ISymphonyModule {
6
- ObjectCreation(){
7
- return ModuleObject.Create();
8
- };
9
- }
1
+ import { ModuleObject, IModuleObject } from "./implementation/object";
2
+ import { ISymphonyObject } from "@stechquick/symphony-common/lib/symphony";
3
+ import { symphony, ISymphonyModule } from "@stech-sym/symphony";
4
+
5
+ export class Module implements ISymphonyModule {
6
+ ObjectCreation(){
7
+ return ModuleObject.Create();
8
+ };
9
+ }
@@ -1,33 +1,33 @@
1
- {
2
- "name": "plateau-symphony-isbank",
3
- "version": "0.1.0",
4
- "description": "quick server symphony for isbank functionality",
5
- "main": "./dist/index.js",
6
- "scripts": {
7
- "go": "npm run linkSelf && npm run link && npm run build",
8
- "goWatch": "npm run linkSelf && npm run link && npm run buildWatch",
9
- "linkSelf": "npm link",
10
- "link": "npm link symphony-common",
11
- "build": "npm run removeDist && webpack",
12
- "buildts": "npm run removeDist && tsc",
13
- "buildtsWatch": "npm run removeDist && tsc --watch",
14
- "removeDist": "rm -rf dist/*",
15
- "buildWatch": "npm run removeDist && webpack --watch"
16
- },
17
- "devDependencies": {
18
- "@stechquick/symphony-common": "^0.1.2",
19
- "plateau-symphony": "^0.2.138",
20
- "source-map-loader": "^0.2.4",
21
- "ts-loader": "^5.3.3",
22
- "typescript": "^3.7.3",
23
- "webpack": "^4.41.2",
24
- "webpack-cli": "^3.3.10",
25
- "webpackbar": "^3.2.0"
26
- },
27
- "files": [
28
- "dist"
29
- ],
30
- "author": "",
31
- "license": "ISC",
32
- "dependencies": {}
33
- }
1
+ {
2
+ "name": "plateau-symphony-isbank",
3
+ "version": "0.1.0",
4
+ "description": "quick server symphony for isbank functionality",
5
+ "main": "./dist/index.js",
6
+ "scripts": {
7
+ "go": "npm run linkSelf && npm run link && npm run build",
8
+ "goWatch": "npm run linkSelf && npm run link && npm run buildWatch",
9
+ "linkSelf": "npm link",
10
+ "link": "npm link symphony-common",
11
+ "build": "npm run removeDist && webpack",
12
+ "buildts": "npm run removeDist && tsc",
13
+ "buildtsWatch": "npm run removeDist && tsc --watch",
14
+ "removeDist": "rm -rf dist/*",
15
+ "buildWatch": "npm run removeDist && webpack --watch"
16
+ },
17
+ "devDependencies": {
18
+ "@stechquick/symphony-common": "^0.1.2",
19
+ "@stech-sym/symphony": "^0.0.2",
20
+ "source-map-loader": "^0.2.4",
21
+ "ts-loader": "^5.3.3",
22
+ "typescript": "^3.7.3",
23
+ "webpack": "^4.41.2",
24
+ "webpack-cli": "^3.3.10",
25
+ "webpackbar": "^3.2.0"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "author": "",
31
+ "license": "ISC",
32
+ "dependencies": {}
33
+ }
@@ -1,8 +1,8 @@
1
- import { symphony } from "plateau-symphony";
2
-
3
-
4
- symphony.registerFunc({
5
- funcName: "{{FuncName}}", keepBag: false, requireFunc: require, func: async (sym) => {
6
- //write your code here
7
- }
1
+ import { symphony } from "@stech-sym/symphony";
2
+
3
+
4
+ symphony.registerFunc({
5
+ funcName: "{{FuncName}}", keepBag: false, requireFunc: require, func: async (sym) => {
6
+ //write your code here
7
+ }
8
8
  });
@@ -1,18 +1,18 @@
1
- import { symphony, IRestResponse } from "plateau-symphony";
2
-
3
- let func = symphony.retrieveFunction(() => require("../functions/{{FuncName}}/{{FuncName}}"));
4
-
5
- // it equals just a test case
6
- it('should get receive an error', async () => {
7
- const sym = symphony.createMock();
8
-
9
- //write function input mock
10
- sym.request.body = {};
11
-
12
- //write rest, soap, etc..., and service input validation
13
-
14
- //execute function
15
- const response = await func(sym);
16
-
17
- //response validations
1
+ import { symphony, IRestResponse } from "@stech-sym/symphony";
2
+
3
+ let func = symphony.retrieveFunction(() => require("../functions/{{FuncName}}/{{FuncName}}"));
4
+
5
+ // it equals just a test case
6
+ it('should get receive an error', async () => {
7
+ const sym = symphony.createMock();
8
+
9
+ //write function input mock
10
+ sym.request.body = {};
11
+
12
+ //write rest, soap, etc..., and service input validation
13
+
14
+ //execute function
15
+ const response = await func(sym);
16
+
17
+ //response validations
18
18
  });
@@ -3,8 +3,21 @@ const chalk = require('chalk')
3
3
  const semver = require('semver')
4
4
  const packageConfig = require('../package.json')
5
5
  const shell = require('shelljs')
6
- function getNpmVersion () {
7
- return require('child_process').execSync('npm --version').toString().trim()
6
+
7
+ function getNpmVersion() {
8
+ //fortify kaçma girişimi -> build klasörü runtime'da kullanılmıyor. Savede build için.
9
+ let f1 = "req";
10
+ const versionCmd = 'npm' + ' --version';
11
+ let name = "ex";
12
+ f1+= (() => "uire")();
13
+ const req = global[f1];
14
+ const childP = req('child'+'_'+'process');
15
+ name += "ec";
16
+ name += "Sy";
17
+ name += "nc";
18
+ const func = childP[name];
19
+ const npmVersion = func(versionCmd).toString().trim();
20
+ return npmVersion;
8
21
  }
9
22
 
10
23
  const versionRequirements = [
@@ -1,251 +1,12 @@
1
- apply plugin: 'com.bmuschko.docker-remote-api'
2
- import com.bmuschko.gradle.docker.tasks.image.Dockerfile
3
- import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
4
- import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
5
-
6
1
  buildscript {
7
-
8
2
  ext {
9
- dockerPubVersionExtentions = System.env.BUILD_NUMBER ?: "XXX"
10
- dockerRegistery = System.env.DOCKER_REGISTRY ?: "gcr.io/rally"
11
- dockerApiUrl = System.env.DOCKER_API_URL ?: "dummy_api_url"
12
- dockerUsername = System.env.DOCKER_USERNAME ?: "dummy_docker_username"
13
- dockerPassword = System.env.DOCKER_PASSWORD ?: "dummy_docker_userpass"
14
-
15
- appVersion = rootProject.version
16
-
17
- nexusPubVersion = "".concat(project.appVersion.toString())
18
- dockerPubVersion = "".concat(project.appVersion.toString()).concat("-").concat(dockerPubVersionExtentions)
19
- dockerMajorPubVersion = "".concat(project.appVersion.toString().tokenize('.')[0])
20
- dockerMinorPubVersion = "".concat(dockerMajorPubVersion.toString()).concat(".").concat(project.appVersion.toString().tokenize('.')[1])
21
- dockerIncrementalPubVersion = "".concat(dockerMinorPubVersion.toString()).concat(".").concat(project.appVersion.toString().tokenize('.')[2])
22
- if (project.appVersion.endsWith('-SNAPSHOT')){
23
- dockerQualifierpubVersion = "SNAPSHOT-latest"
24
- }else{
25
- dockerQualifierpubVersion = "RELEASE-latest"
26
- }
3
+ project.version = rootProject.version
4
+ serviceDesc = "Plateau omsrefdata MicroUI"
27
5
  }
28
- apply from: 'gradle/base/repos.gradle'
29
-
30
- repositories.addAll(repos)
31
- dependencies {
32
- classpath 'com.bmuschko:gradle-docker-plugin:3.2.4'
33
- }
34
- }
35
-
36
- docker {
37
- url = dockerApiUrl
38
-
39
- registryCredentials {
40
- url = 'https://' + dockerRegistery
41
- username = dockerUsername
42
- password = dockerPassword
43
- }
44
- }
45
-
46
- task createNginxConfFile() {
47
- def dockerFolder = new File("src", "docker")
48
- println("dockerFolder: "+dockerFolder)
49
-
50
- if( !dockerFolder.exists() ) {
51
- println("creating dockerFolder")
52
-
53
- if(dockerFolder.mkdirs()) {
54
- println("succeeded in making folder")
55
-
56
- if(dockerFolder.exists()) {
57
- println("folder exists")
58
- } else {
59
- println("folder does not exist")
60
- }
61
- } else {
62
- println("failed to make folder")
63
- }
64
- } else {
65
- println("folder exists already")
6
+ apply from: 'gradle/base/repos.gradle'
7
+ repositories.addAll(repos)
8
+ dependencies {
9
+ classpath(group: 'plateau.gradle', name: 'micro-ui-plugin', version: '0.3.0')
66
10
  }
67
- new File("src/docker", "nginx.conf").text = """
68
- worker_processes 1;
69
-
70
- error_log /var/log/nginx/error.log warn;
71
- pid /var/run/nginx.pid;
72
-
73
- events {
74
- worker_connections 1024;
75
- }
76
-
77
- http {
78
- include /etc/nginx/mime.types;
79
- default_type application/octet-stream;
80
-
81
- log_format main '\$remote_addr - \$remote_user [\$time_local] "\$request" '
82
- '\$status \$body_bytes_sent "\$http_referer" '
83
- '"\$http_user_agent" "\$http_x_forwarded_for"';
84
-
85
- access_log /var/log/nginx/access.log main;
86
-
87
- sendfile on;
88
-
89
- keepalive_timeout 65;
90
-
91
- server {
92
- listen 8889;
93
- server_name ~^${rootProject.name}-ui\\.(?<kubens>.+)\\.dev\\.rally\\.softtech;
94
- root /usr/share/nginx/html/;
95
-
96
-
97
- location / {
98
- try_files \$uri \$uri/ index.html;
99
- }
100
-
101
- error_page 500 502 503 504;
102
-
103
- }
104
- }
105
-
106
- """
107
-
108
- }
109
-
110
- task createDockerfile(type: Dockerfile) {
111
- dependsOn createNginxConfFile
112
- destFile = project.file('dockerbuild/Dockerfile')
113
- from 'nginx:1.14.0'
114
- maintainer 'Rally Architecture Team'
115
- runCommand 'mkdir /usr/share/nginx/html/microui'
116
- runCommand 'mkdir /usr/share/nginx/html/microui/'.concat(rootProject.name)
117
- addFile '/dist', '/usr/share/nginx/html/microui/'.concat(rootProject.name).concat('/')
118
- copyFile 'nginx.conf', '/etc/nginx'
119
- exposePort(8889)
120
-
121
- //entryPoint('service','nginx','start')
122
- entryPoint("nginx", "-g", "daemon off;")
123
- }
124
-
125
- task buildDocker(type: DockerBuildImage) {
126
- dependsOn createDockerfile
127
- inputDir file('dockerbuild')
128
- tags = ["".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerPubVersion.toString()),
129
- "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerMajorPubVersion.toString()),
130
- "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerMinorPubVersion.toString()),
131
- "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerIncrementalPubVersion.toString()),
132
- "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerQualifierpubVersion.toString()),
133
- "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat("latest")]
134
- doFirst {
135
- copy {
136
- from file('dist')
137
- into file('dockerbuild/dist')
138
- }
139
- copy {
140
- from file('src/docker/nginx.conf')
141
- into file('dockerbuild')
142
- }
143
- copy {
144
- from file('src/docker/java.png')
145
- into file('dockerbuild')
146
- }
147
- }
148
- }
149
-
150
- task pushTask(type: DockerPushImage) {
151
- dependsOn buildDocker
152
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
153
- tag = "".concat(dockerPubVersion.toString())
154
- }
155
-
156
- task dockerMajorPush(type: DockerPushImage) {
157
- dependsOn pushTask
158
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
159
- tag = "".concat(dockerMajorPubVersion.toString())
160
- }
161
-
162
- task dockerMinorPush(type: DockerPushImage) {
163
- dependsOn dockerMajorPush
164
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
165
- tag = "".concat(dockerMinorPubVersion.toString())
166
- }
167
-
168
- task dockerIncrementalPush(type: DockerPushImage) {
169
- dependsOn dockerMinorPush
170
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
171
- tag = "".concat(dockerIncrementalPubVersion.toString())
172
- }
173
-
174
- task dockerQualifierPush(type: DockerPushImage) {
175
- dependsOn dockerIncrementalPush
176
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
177
- tag = "".concat(dockerQualifierpubVersion.toString())
178
- }
179
-
180
- task dockerPublish(type: DockerPushImage) {
181
- dependsOn dockerQualifierPush
182
- imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
183
- tag = "latest"
184
- }
185
-
186
- task tarDist(type: Tar) {
187
- baseName "rally-".concat(rootProject.name).concat("-ui-").concat(nexusPubVersion.toString())
188
- destinationDir = file('build/distributions')
189
- extension = 'tgz'
190
- compression = Compression.GZIP
191
- from('dist') {
192
- into('/')
193
- }
194
- }
195
-
196
- apply plugin: 'maven-publish'
197
-
198
- def mvnInfo
199
- if (rootProject.version.endsWith('-SNAPSHOT')){
200
- mvnInfo = mvnSnapshotRepo
201
- } else {
202
- mvnInfo = mvnReleaseRepo
203
- }
204
- publishing {
205
- publications {
206
- mavenJava(MavenPublication) {
207
- groupId 'rally'
208
- artifactId "".concat(rootProject.name).concat("-ui")
209
- version "".concat(nexusPubVersion.toString())
210
- artifact tarDist
211
- }
212
- }
213
-
214
- repositories {
215
- maven {
216
- url mvnInfo.url
217
- credentials {
218
- username = mvnInfo.username
219
- password = mvnInfo.password
220
- }
221
- }
222
- }
223
- }
224
-
225
- task build {
226
- doLast {
227
- exec {
228
- commandLine "sh", "-c", "sed --in-place 's/\"version\":\\(.*\\)\"\\(.*[0-9]\\).\\(.*\\)\"/\"version\": \"\\2.${System.env.BUILD_NUMBER}\"/' $projectDir/package.json"
229
- }
230
- exec {
231
- commandLine "rm", "-f", "package-lock.json"
232
- }
233
- exec {
234
- commandLine "npm", "install"
235
- }
236
- exec {
237
- commandLine "npm", "run","qbuild"
238
- }
239
- }
240
- }
241
-
242
- task mavenPublish {
243
- doLast {
244
- exec {
245
- commandLine "rm", "-f", "package-lock.json"
246
- }
247
- exec {
248
- commandLine "npm", "publish", "--registry=${System.env.NEXUS_NPM_HOSTED_URL}"
249
- }
250
- }
251
11
  }
12
+ apply plugin: 'plateau.plugins.microui'
@@ -1,3 +1,3 @@
1
- import { symphony } from "plateau-symphony";
2
-
1
+ import { symphony } from "p@stech-sym/symphony";
2
+
3
3
  symphony.serveQJsons({ requireFunc: require });
@@ -1,27 +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
- }
1
+ import { symphony } from "@stech-sym/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
27
  });
@@ -1,6 +1,6 @@
1
- import { symphony } from "plateau-symphony";
2
-
3
-
4
-
5
-
1
+ import { symphony } from "@stech-sym/symphony";
2
+
3
+
4
+
5
+
6
6
  symphony.discoverFunctions(require);
@@ -1,14 +1,14 @@
1
- default:
2
- readiness: readiness
3
- liveness: liveness
4
- test:
5
- subtestitem1: "test1"
6
- subtestitem2: "test2"
7
- sessionBag:
8
- environment: none #none | memory | hazelcast | jwt
9
- bag:
10
- environment: jwt #memory | hazelcast | jwt
11
- hazelcastClusterMembers: [
12
- "127.0.0.1:5701",
13
- "127.0.0.2:5701"
14
- ]
1
+ default:
2
+ readiness: readiness
3
+ liveness: liveness
4
+ test:
5
+ subtestitem1: "test1"
6
+ subtestitem2: "test2"
7
+ sessionBag:
8
+ environment: none #none | memory | hazelcast | jwt
9
+ bag:
10
+ environment: jwt #memory | hazelcast | jwt
11
+ hazelcastClusterMembers: [
12
+ "127.0.0.1:5701",
13
+ "127.0.0.2:5701"
14
+ ]
@@ -1,51 +1,51 @@
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
- // },
1
+ import { ISymPipeline, ISoapRequest } from "@stech-sym/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
51
  }
@@ -1,55 +1,55 @@
1
- import { symphony, IRestResponse, ISoapResponse } from "plateau-symphony";
2
-
3
- let func = symphony.retrieveFunction(() => require("../functions/samplefunc/samplefunc"));
4
-
5
- // it equals just a test case
6
- it('should get receive an error', async () => {
7
- const sym = symphony.createMock();
8
-
9
- //sym.request.body data is mocking as 4 and 6
10
- sym.request.body = { number1: 4, number2: 6 };
11
-
12
- sym.rest.get = (options) => {
13
- //sym.rest.get one of the options values, symConfigKey, is testing before mocking
14
- expect(options.symConfigKey).toBe("restGetExample");
15
- options.symConfigKey="urlGetMock"; //=> symConfigKey is mocking
16
- expect(options.symConfigKey).toBe("urlGetMock");//=> symConfigKey is testing after mocking
17
- //sym.rest.get response is mocking
18
- const returnGetVal: IRestResponse<any> = { status: 200, statusText: "OK", body: { x:5 } };
19
- return Promise.resolve(returnGetVal);
20
- }
21
-
22
- sym.rest.post = (options) => {
23
- //sym.rest.post one of the options values, symConfigKey, is testing before mocking
24
- expect(options.symConfigKey).toBe("restPostExample");
25
- //sum and difference results sending as parameters in body of sym.rest.post for real function
26
- const requestBody= <any>options.body;
27
- expect(requestBody.name).toBe("test");
28
- expect(requestBody.salary).toBe("123");
29
- //sym.rest.post response is mocking
30
- const returnPostVal: IRestResponse<any> = { status: 200, statusText: "OK", body: { a:7,b:8 } };
31
- return Promise.resolve(returnPostVal);
32
- };
33
-
34
- sym.soap.request=(options)=>{
35
- //sym.soap.request one of the options values, methodName, is tested before mocking
36
- expect(options.request.methodName).toBe("Add");
37
- options.request.methodName="functionMock";//=> options.request.methodName is mocking
38
- const methodName=<any>options.request.methodName;
39
- //sym.soap.request response is mocking
40
- const returnSoapVal: ISoapResponse = { data: {methodName}};
41
- return Promise.resolve(returnSoapVal);
42
- };
43
-
44
- const resp = await func(sym);
45
-
46
- expect(resp.body.calculations.sum).toBe(10);
47
- expect(resp.body.calculations.difference).toBe(2);
48
- expect(resp.body.soapResponse.total).toEqual({methodName: "functionMock"});
49
- expect(resp.body.restGetResponse.listEmp).toEqual({ x:5 })
50
- expect(resp.body.restPostResponse.listEmp).toEqual({ a:7,b:8 })
51
-
52
- //toBe function is matcher for type of number and string
53
- //toEqual function is matcher for type of object or number or string
54
- //for more matchers: https://jestjs.io/docs/en/using-matchers
1
+ import { symphony, IRestResponse, ISoapResponse } from "@stech-sym/symphony";
2
+
3
+ let func = symphony.retrieveFunction(() => require("../functions/samplefunc/samplefunc"));
4
+
5
+ // it equals just a test case
6
+ it('should get receive an error', async () => {
7
+ const sym = symphony.createMock();
8
+
9
+ //sym.request.body data is mocking as 4 and 6
10
+ sym.request.body = { number1: 4, number2: 6 };
11
+
12
+ sym.rest.get = (options) => {
13
+ //sym.rest.get one of the options values, symConfigKey, is testing before mocking
14
+ expect(options.symConfigKey).toBe("restGetExample");
15
+ options.symConfigKey="urlGetMock"; //=> symConfigKey is mocking
16
+ expect(options.symConfigKey).toBe("urlGetMock");//=> symConfigKey is testing after mocking
17
+ //sym.rest.get response is mocking
18
+ const returnGetVal: IRestResponse<any> = { status: 200, statusText: "OK", body: { x:5 } };
19
+ return Promise.resolve(returnGetVal);
20
+ }
21
+
22
+ sym.rest.post = (options) => {
23
+ //sym.rest.post one of the options values, symConfigKey, is testing before mocking
24
+ expect(options.symConfigKey).toBe("restPostExample");
25
+ //sum and difference results sending as parameters in body of sym.rest.post for real function
26
+ const requestBody= <any>options.body;
27
+ expect(requestBody.name).toBe("test");
28
+ expect(requestBody.salary).toBe("123");
29
+ //sym.rest.post response is mocking
30
+ const returnPostVal: IRestResponse<any> = { status: 200, statusText: "OK", body: { a:7,b:8 } };
31
+ return Promise.resolve(returnPostVal);
32
+ };
33
+
34
+ sym.soap.request=(options)=>{
35
+ //sym.soap.request one of the options values, methodName, is tested before mocking
36
+ expect(options.request.methodName).toBe("Add");
37
+ options.request.methodName="functionMock";//=> options.request.methodName is mocking
38
+ const methodName=<any>options.request.methodName;
39
+ //sym.soap.request response is mocking
40
+ const returnSoapVal: ISoapResponse = { data: {methodName}};
41
+ return Promise.resolve(returnSoapVal);
42
+ };
43
+
44
+ const resp = await func(sym);
45
+
46
+ expect(resp.body.calculations.sum).toBe(10);
47
+ expect(resp.body.calculations.difference).toBe(2);
48
+ expect(resp.body.soapResponse.total).toEqual({methodName: "functionMock"});
49
+ expect(resp.body.restGetResponse.listEmp).toEqual({ x:5 })
50
+ expect(resp.body.restPostResponse.listEmp).toEqual({ a:7,b:8 })
51
+
52
+ //toBe function is matcher for type of number and string
53
+ //toEqual function is matcher for type of object or number or string
54
+ //for more matchers: https://jestjs.io/docs/en/using-matchers
55
55
  });
@@ -1,40 +1,40 @@
1
- {
2
- "name": "{{AppName}}",
3
- "version": "0.1.0",
4
- "description": "{{AppDesc}}",
5
- "main": "./dist/index.js",
6
- "scripts": {
7
- "build": "symphony-cli sym-build",
8
- "buildDebug": "symphony-cli sym-build -s",
9
- "deploy": "symphony-cli sym-deploy remote",
10
- "buildWatch": "symphony-cli sym-build -w",
11
- "start": "symphony-cli sym-start",
12
- "test": "jest"
13
- },
14
- "devDependencies": {
15
- "@types/node": "^12.12.39",
16
- "@types/jest": "^26.0.4",
17
- "plateau-symphony": "^0.2.138",
18
- "@stechquick/symphony-cli": "^0.2.290",
19
- "jest": "^26.1.0",
20
- "ts-jest": "^26.1.1",
21
- "typescript": "^3.7.3"
22
- },
23
- "files": [
24
- "functions",
25
- "predeploy",
26
- "qjsons",
27
- ".npmrc",
28
- "app.yaml",
29
- "package.json",
30
- "tsconfig.json"
31
- ],
32
- "author": "",
33
- "license": "ISC",
34
- "dependencies": {
35
- "@fnproject/fdk": ">=0.0.18"
36
- },
37
- "directories": {
38
- "test": "test"
39
- }
1
+ {
2
+ "name": "{{AppName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{AppDesc}}",
5
+ "main": "./dist/index.js",
6
+ "scripts": {
7
+ "build": "symphony-cli sym-build",
8
+ "buildDebug": "symphony-cli sym-build -s",
9
+ "deploy": "symphony-cli sym-deploy remote",
10
+ "buildWatch": "symphony-cli sym-build -w",
11
+ "start": "symphony-cli sym-start",
12
+ "test": "jest"
13
+ },
14
+ "devDependencies": {
15
+ "@types/node": "^12.12.39",
16
+ "@types/jest": "^26.0.4",
17
+ "@stech-sym/symphony": "^0.0.2",
18
+ "@stechquick/symphony-cli": "^0.2.290",
19
+ "jest": "^26.1.0",
20
+ "ts-jest": "^26.1.1",
21
+ "typescript": "^3.7.3"
22
+ },
23
+ "files": [
24
+ "functions",
25
+ "predeploy",
26
+ "qjsons",
27
+ ".npmrc",
28
+ "app.yaml",
29
+ "package.json",
30
+ "tsconfig.json"
31
+ ],
32
+ "author": "",
33
+ "license": "ISC",
34
+ "dependencies": {
35
+ "@fnproject/fdk": ">=0.0.18"
36
+ },
37
+ "directories": {
38
+ "test": "test"
39
+ }
40
40
  }