@stechquick/symphony-cli 0.5.32 → 0.5.34

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.5.32 linux-x64 node-v16.20.2
22
+ @stechquick/symphony-cli/0.5.34 linux-x64 node-v16.20.2
23
23
  $ symphony-cli --help [COMMAND]
24
24
  USAGE
25
25
  $ symphony-cli COMMAND
@@ -82,7 +82,7 @@ EXAMPLE
82
82
  symphony-cli mui-create myUI -d="My Micro UI project"
83
83
  ```
84
84
 
85
- _See code: [src/commands/mui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/mui-create.ts)_
85
+ _See code: [src/commands/mui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/mui-create.ts)_
86
86
 
87
87
  ## `symphony-cli nc-addcomp NAME`
88
88
 
@@ -99,7 +99,7 @@ EXAMPLE
99
99
  symphony-cli nc-addcomp my_comp_name
100
100
  ```
101
101
 
102
- _See code: [src/commands/nc-addcomp.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/nc-addcomp.ts)_
102
+ _See code: [src/commands/nc-addcomp.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/nc-addcomp.ts)_
103
103
 
104
104
  ## `symphony-cli nc-build`
105
105
 
@@ -117,7 +117,7 @@ EXAMPLES
117
117
  $ symphony-cli nc-build -w
118
118
  ```
119
119
 
120
- _See code: [src/commands/nc-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/nc-build.ts)_
120
+ _See code: [src/commands/nc-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/nc-build.ts)_
121
121
 
122
122
  ## `symphony-cli nc-create NAME`
123
123
 
@@ -137,7 +137,7 @@ EXAMPLE
137
137
  symphony-cli nc-create nc_example -d="my named component example"
138
138
  ```
139
139
 
140
- _See code: [src/commands/nc-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/nc-create.ts)_
140
+ _See code: [src/commands/nc-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/nc-create.ts)_
141
141
 
142
142
  ## `symphony-cli qui-build`
143
143
 
@@ -151,29 +151,32 @@ EXAMPLE
151
151
  $ symphony-cli qui-build -w
152
152
  ```
153
153
 
154
- _See code: [src/commands/qui-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/qui-build.ts)_
154
+ _See code: [src/commands/qui-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/qui-build.ts)_
155
155
 
156
156
  ## `symphony-cli qui-create NAME`
157
157
 
158
- Plateau-QUI command to create a new Quick ui project
158
+ Plateau-UI command to create a new Plateau UI project
159
159
 
160
160
  ```
161
161
  USAGE
162
162
  $ symphony-cli qui-create NAME
163
163
 
164
164
  ARGUMENTS
165
- NAME input quick ui name
165
+ NAME input Plateau UI name
166
166
 
167
167
  OPTIONS
168
- -d, --desc=desc description to project
169
- -t, --token=token (required) npm token for @stechquick
168
+ -d, --desc=desc description to project
169
+ -r, --registry=registry your registery address (example: nexus address)
170
+ -t, --token=token npm token for @stechquick
170
171
 
171
172
  EXAMPLES
172
173
  symphony-cli qui-create myUI -t=TOKEN
173
- symphony-cli qui-create myUI -t=TOKEN -d="My Quick UI project"
174
+ symphony-cli qui-create myUI -t=TOKEN -d="My Plateau UI project"
175
+ symphony-cli qui-create myUI -r=REGISTERY
176
+ symphony-cli qui-create myUI -r=REGISTERY -d="My Plateau UI project"
174
177
  ```
175
178
 
176
- _See code: [src/commands/qui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/qui-create.ts)_
179
+ _See code: [src/commands/qui-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/qui-create.ts)_
177
180
 
178
181
  ## `symphony-cli qui-start`
179
182
 
@@ -190,7 +193,7 @@ EXAMPLE
190
193
  $ symphony-cli qui-start -b
191
194
  ```
192
195
 
193
- _See code: [src/commands/qui-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/qui-start.ts)_
196
+ _See code: [src/commands/qui-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/qui-start.ts)_
194
197
 
195
198
  ## `symphony-cli quick-serve`
196
199
 
@@ -213,7 +216,7 @@ EXAMPLES
213
216
  $ symphony-cli quick-serve -g -r C:/MyPathToServe
214
217
  ```
215
218
 
216
- _See code: [src/commands/quick-serve.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/quick-serve.ts)_
219
+ _See code: [src/commands/quick-serve.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/quick-serve.ts)_
217
220
 
218
221
  ## `symphony-cli studio-sync`
219
222
 
@@ -232,7 +235,7 @@ EXAMPLE
232
235
  $ symphony-cli studio-sync
233
236
  ```
234
237
 
235
- _See code: [src/commands/studio-sync.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/studio-sync.ts)_
238
+ _See code: [src/commands/studio-sync.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/studio-sync.ts)_
236
239
 
237
240
  ## `symphony-cli sym-addfunc FUNCNAME`
238
241
 
@@ -249,7 +252,7 @@ EXAMPLE
249
252
  symphony-cli sym-addfunc havalemenu
250
253
  ```
251
254
 
252
- _See code: [src/commands/sym-addfunc.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-addfunc.ts)_
255
+ _See code: [src/commands/sym-addfunc.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-addfunc.ts)_
253
256
 
254
257
  ## `symphony-cli sym-build`
255
258
 
@@ -279,7 +282,7 @@ EXAMPLES
279
282
  $ symphony-cli sym-build --swagger -l ./dist/api/local.js
280
283
  ```
281
284
 
282
- _See code: [src/commands/sym-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-build.ts)_
285
+ _See code: [src/commands/sym-build.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-build.ts)_
283
286
 
284
287
  ## `symphony-cli sym-create NAME`
285
288
 
@@ -293,14 +296,18 @@ ARGUMENTS
293
296
  NAME input application name
294
297
 
295
298
  OPTIONS
296
- -d, --desc=desc description to application
297
- -t, --token=token (required) npm token for @stechquick
299
+ -d, --desc=desc description to application
300
+ -r, --registry=registry your registery address (example: nexus address)
301
+ -t, --token=token npm token for @stechquick
298
302
 
299
- EXAMPLE
300
- symphony-cli sym-create havale -d="Kanallardan yapılan havale işlemi"
303
+ EXAMPLES
304
+ symphony-cli sym-create havale -t=TOKEN
305
+ symphony-cli sym-create havale -t=TOKEN -d="Havale işlemi"
306
+ symphony-cli sym-create havale -r=REGISTERY
307
+ symphony-cli sym-create havale -r=REGISTERY -d="Havale işlemi"
301
308
  ```
302
309
 
303
- _See code: [src/commands/sym-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-create.ts)_
310
+ _See code: [src/commands/sym-create.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-create.ts)_
304
311
 
305
312
  ## `symphony-cli sym-create-module NAME`
306
313
 
@@ -320,7 +327,7 @@ EXAMPLE
320
327
  symphony-cli sym-create-module abm -d="abm module description"
321
328
  ```
322
329
 
323
- _See code: [src/commands/sym-create-module.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-create-module.ts)_
330
+ _See code: [src/commands/sym-create-module.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-create-module.ts)_
324
331
 
325
332
  ## `symphony-cli sym-fn-deploy ENVIRONMENT`
326
333
 
@@ -354,7 +361,7 @@ EXAMPLES
354
361
  --f_url="MyFnApiUrl"
355
362
  ```
356
363
 
357
- _See code: [src/commands/sym-fn-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-fn-deploy.ts)_
364
+ _See code: [src/commands/sym-fn-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-fn-deploy.ts)_
358
365
 
359
366
  ## `symphony-cli sym-nano-deploy`
360
367
 
@@ -372,7 +379,7 @@ EXAMPLE
372
379
  symphony-cli sym-nano-deploy
373
380
  ```
374
381
 
375
- _See code: [src/commands/sym-nano-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-nano-deploy.ts)_
382
+ _See code: [src/commands/sym-nano-deploy.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-nano-deploy.ts)_
376
383
 
377
384
  ## `symphony-cli sym-start`
378
385
 
@@ -400,7 +407,7 @@ EXAMPLES
400
407
  $ symphony-cli sym-start -l ./dist/api/local.js
401
408
  ```
402
409
 
403
- _See code: [src/commands/sym-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-start.ts)_
410
+ _See code: [src/commands/sym-start.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-start.ts)_
404
411
 
405
412
  ## `symphony-cli sym-test`
406
413
 
@@ -417,5 +424,5 @@ EXAMPLE
417
424
  $ symphony-cli sym-test
418
425
  ```
419
426
 
420
- _See code: [src/commands/sym-test.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.32/src/commands/sym-test.ts)_
427
+ _See code: [src/commands/sym-test.ts](https://github.com/alper-batioglu/symphony-cli/blob/v0.5.34/src/commands/sym-test.ts)_
421
428
  <!-- commandsstop -->
@@ -10,6 +10,7 @@ export default class CreateUI extends Command {
10
10
  static flags: {
11
11
  desc: flags.IOptionFlag<string>;
12
12
  token: flags.IOptionFlag<string>;
13
+ registry: flags.IOptionFlag<string>;
13
14
  };
14
15
  run(): Promise<void>;
15
16
  }
@@ -2,29 +2,37 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const createuiHelper_1 = require("../helpers/ui/createuiHelper");
5
+ const npmHelper_1 = require("../helpers/npmHelper");
5
6
  const log_1 = require("@stechquick/symphony-common/lib/log");
6
7
  const chalk_1 = require("../helpers/chalk");
7
8
  class CreateUI extends command_1.Command {
8
9
  async run() {
9
10
  const { flags } = this.parse(CreateUI);
10
11
  const { args } = this.parse(CreateUI);
11
- log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Creating ui. Please wait..."), timeFormat: "datetime" });
12
- await new createuiHelper_1.CreateUIHelper().CreateUI(args["name"], `${flags.desc}`, `${flags.token}`);
13
- //NpmHelper.install({ folderName: args["name"] }); // Banka networkünden dolayı banka nexus olmayınca install yapılamıyor.
14
- log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Ui created successfully."), timeFormat: "datetime" });
12
+ log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Creating UI. Please wait..."), timeFormat: "datetime" });
13
+ let createResponse = await new createuiHelper_1.CreateUIHelper().CreateUI(args["name"], `${flags.desc}`, `${flags.token}`, `${flags.registry}`);
14
+ if (createResponse == false) {
15
+ log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "UI creation failed due to an error. Please review the error message for more details."), timeFormat: "datetime" });
16
+ }
17
+ else {
18
+ npmHelper_1.NpmHelper.install({ folderName: args["name"] });
19
+ log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "UI created successfully."), timeFormat: "datetime" });
20
+ }
15
21
  }
16
22
  }
17
23
  exports.default = CreateUI;
18
- CreateUI.description = 'Plateau-QUI command to create a new Quick ui project';
24
+ CreateUI.description = 'Plateau-UI command to create a new Plateau UI project';
19
25
  CreateUI.examples = [
20
26
  `symphony-cli qui-create myUI -t=TOKEN`,
21
- `symphony-cli qui-create myUI -t=TOKEN -d="My Quick UI project"`
27
+ `symphony-cli qui-create myUI -t=TOKEN -d="My Plateau UI project"`,
28
+ `symphony-cli qui-create myUI -r=REGISTERY`,
29
+ `symphony-cli qui-create myUI -r=REGISTERY -d="My Plateau UI project"`
22
30
  ];
23
31
  CreateUI.args = [
24
32
  {
25
33
  name: 'name',
26
34
  required: true,
27
- description: 'input quick ui name',
35
+ description: 'input Plateau UI name',
28
36
  }
29
37
  ];
30
38
  CreateUI.flags = {
@@ -41,6 +49,15 @@ CreateUI.flags = {
41
49
  description: "npm token for @stechquick",
42
50
  hidden: false,
43
51
  multiple: false,
44
- required: true,
52
+ default: '',
53
+ required: false,
54
+ }),
55
+ registry: command_1.flags.string({
56
+ char: "r",
57
+ description: "your registery address (example: nexus address)",
58
+ hidden: false,
59
+ multiple: false,
60
+ default: '',
61
+ required: false,
45
62
  })
46
63
  };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const initHelper_1 = require("../helpers/initHelper");
5
+ const npmHelper_1 = require("../helpers/npmHelper");
5
6
  const chalk_1 = require("../helpers/chalk");
6
7
  const log_1 = require("@stechquick/symphony-common/lib/log");
7
8
  class CreateModule extends command_1.Command {
@@ -10,7 +11,7 @@ class CreateModule extends command_1.Command {
10
11
  const { args } = this.parse(CreateModule);
11
12
  log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Module " + args["name"] + " creating. Please wait...") });
12
13
  await new initHelper_1.InitHelper().AddModule(args["name"], `${flags.desc}`);
13
- //NpmHelper.install({ folderName: args["name"] }); // Banka networkünden dolayı banka nexus olmayınca install yapılamıyor.
14
+ npmHelper_1.NpmHelper.install({ folderName: args["name"] });
14
15
  log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Module " + args["name"] + " created successfully.") });
15
16
  }
16
17
  }
@@ -10,6 +10,7 @@ export default class CreateApp extends Command {
10
10
  static flags: {
11
11
  desc: flags.IOptionFlag<string>;
12
12
  token: flags.IOptionFlag<string>;
13
+ registry: flags.IOptionFlag<string>;
13
14
  };
14
15
  run(): Promise<void>;
15
16
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const initHelper_1 = require("../helpers/initHelper");
5
+ const npmHelper_1 = require("../helpers/npmHelper");
5
6
  const chalk_1 = require("../helpers/chalk");
6
7
  const log_1 = require("@stechquick/symphony-common/lib/log");
7
8
  class CreateApp extends command_1.Command {
@@ -9,15 +10,23 @@ class CreateApp extends command_1.Command {
9
10
  const { flags } = this.parse(CreateApp);
10
11
  const { args } = this.parse(CreateApp);
11
12
  log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Application " + args["name"] + " creating. Please wait...") });
12
- await new initHelper_1.InitHelper().AddApp(args["name"], `${flags.desc}`, flags.token);
13
- //NpmHelper.install({ folderName: args["name"] }); // Banka networkünden dolayı banka nexus olmayınca install yapılamıyor.
14
- log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Application " + args["name"] + " created successfully.") });
13
+ let createResponse = await new initHelper_1.InitHelper().AddApp(args["name"], `${flags.desc}`, `${flags.token}`, `${flags.registry}`);
14
+ if (createResponse == false) {
15
+ log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Application " + args["name"] + " creation failed due to an error. Please review the error message for more details."), timeFormat: "datetime" });
16
+ }
17
+ else {
18
+ npmHelper_1.NpmHelper.install({ folderName: args["name"] });
19
+ log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Application " + args["name"] + " created successfully."), timeFormat: "datetime" });
20
+ }
15
21
  }
16
22
  }
17
23
  exports.default = CreateApp;
18
24
  CreateApp.description = 'Plateau-Symphony command to create a Symphony App';
19
25
  CreateApp.examples = [
20
- `symphony-cli sym-create havale -d="Kanallardan yapılan havale işlemi"`
26
+ `symphony-cli sym-create havale -t=TOKEN`,
27
+ `symphony-cli sym-create havale -t=TOKEN -d="Havale işlemi"`,
28
+ `symphony-cli sym-create havale -r=REGISTERY`,
29
+ `symphony-cli sym-create havale -r=REGISTERY -d="Havale işlemi"`
21
30
  ];
22
31
  CreateApp.args = [
23
32
  {
@@ -40,6 +49,15 @@ CreateApp.flags = {
40
49
  description: "npm token for @stechquick",
41
50
  hidden: false,
42
51
  multiple: false,
43
- required: true,
52
+ default: '',
53
+ required: false,
44
54
  }),
55
+ registry: command_1.flags.string({
56
+ char: "r",
57
+ description: "your registery address (example: nexus address)",
58
+ hidden: false,
59
+ multiple: false,
60
+ default: '',
61
+ required: false,
62
+ })
45
63
  };
@@ -1,19 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
- const fnDeployHelper_1 = require("../helpers/deploy/fnDeployHelper");
5
4
  const log_1 = require("@stechquick/symphony-common/lib/log");
6
5
  const chalk_1 = require("../helpers/chalk");
7
6
  class FnDeploy extends command_1.Command {
8
7
  async run() {
9
- log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Checking deployment parameters, please wait...") });
10
- const deploySettings = this.getSettings();
11
- if (!deploySettings) {
12
- log_1.Logger.log({ message: chalk_1.Chalk.create("red.bold", "Deploy stopped.") });
13
- process.exit(12);
14
- }
15
- this.appendEnvIndependentSettings(deploySettings);
16
- await new fnDeployHelper_1.FnDeployHelper(deploySettings).deploy();
8
+ //Logger.log({ message: Chalk.create("green.bold", "Checking deployment parameters, please wait...")});
9
+ log_1.Logger.log({ message: chalk_1.Chalk.create("red.bold", "FN Serverless deployment is deprecated. Please contact with DevOps team or/and Symphony team...") });
10
+ // TO-DO: remove fn-deploy command @01.06.2025
11
+ /*
12
+ const deploySettings = this.getSettings();
13
+
14
+ if (!deploySettings) {
15
+ Logger.log({ message: Chalk.create("red.bold", "Deploy stopped.") });
16
+ process.exit(12);
17
+ }
18
+
19
+ this.appendEnvIndependentSettings(deploySettings);
20
+ await new FnDeployHelper(deploySettings).deploy();
21
+ */
17
22
  }
18
23
  getSettings() {
19
24
  const { args } = this.parse(FnDeploy);
@@ -6,6 +6,7 @@ const log_1 = require("@stechquick/symphony-common/lib/log");
6
6
  const chalk_1 = require("../helpers/chalk");
7
7
  class NanoDeploy extends command_1.Command {
8
8
  async run() {
9
+ log_1.Logger.log({ message: chalk_1.Chalk.create("yellow.bold", "Automated deployment will be deprecated. Please contact with DevOps team or/and Symphony team...") });
9
10
  log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Checking deployment parameters, please wait...") });
10
11
  const { flags } = this.parse(NanoDeploy);
11
12
  const deploySettings = { imageName: flags.imagename };
@@ -18,6 +18,6 @@ export declare class InitHelper {
18
18
  constructor();
19
19
  static AssertInFolder(): boolean;
20
20
  AddFunc(funcName: string): Promise<void>;
21
- AddApp(appName: string, appDesc: string, npmToken: string): Promise<void>;
21
+ AddApp(appName: string, appDesc: string, npmToken?: string, registry?: string): Promise<false | undefined>;
22
22
  AddModule(moduleName: string, moduleDesc: string): Promise<void>;
23
23
  }
@@ -52,15 +52,27 @@ class InitHelper {
52
52
  fileHelper_1.FileHelper.exportFiles({ sourcePath: addFuncTemplatePath, targetPath: "./", replaceMap: this.replaceMap });
53
53
  log_1.Logger.log({ message: chalk_1.Chalk.create("green.bold", "Function " + funcName + " added successfully."), timeFormat: "datetime" });
54
54
  }
55
- async AddApp(appName, appDesc, npmToken) {
55
+ async AddApp(appName, appDesc, npmToken, registry) {
56
+ if (npmToken == "" && registry == "") {
57
+ log_1.Logger.log({ message: chalk_1.Chalk.create("yellow.bold", "ERR! token or registry required. Let's follow the documentation step by step: https://docs.onplateau.com/Symphony/create-symphony"), timeFormat: "datetime" });
58
+ return false;
59
+ }
56
60
  this.replaceMap.set(this.appNameRegExp, appName);
57
61
  this.replaceMap.set(this.appDescRegExp, appDesc);
58
- this.replaceMap.set(this.npmrcTokenRegExp, npmToken);
62
+ let tokenInfo = "";
63
+ if (npmToken) {
64
+ tokenInfo = "@stechquick:registry=https://registry.npmjs.org/" + "\r\n" + "//registry.npmjs.org/:_authToken=" + npmToken;
65
+ }
66
+ else if (registry) {
67
+ //https://scorenexus.isbank/repository/npm-stechquick-registry-proxy-repo/
68
+ tokenInfo = "registry=" + registry + "\r\n" + "strict-ssl=false";
69
+ }
70
+ this.replaceMap.set(this.npmrcTokenRegExp, tokenInfo);
59
71
  const existsSubPath = fs.existsSync(this.subPath + appName);
60
72
  if (existsSubPath) {
61
73
  const answer = await cli_ux_1.default.confirm("App: " + appName + " already exists. If you have any, you will lose your pending changes. Would you like to overwrite it?");
62
74
  if (!answer) {
63
- return;
75
+ return false;
64
76
  }
65
77
  }
66
78
  const templatePath = path.join(path.resolve(__dirname), "../.." + this.initSearchPath);
@@ -7,5 +7,5 @@ export declare class CreateUIHelper {
7
7
  private npmrcTokenRegExp;
8
8
  private createuiSearchPath;
9
9
  constructor();
10
- CreateUI(uiName: string, uiDesc: string, npmToken: string): Promise<void>;
10
+ CreateUI(uiName: string, uiDesc: string, npmToken?: string, registry?: string): Promise<false | void>;
11
11
  }
@@ -6,6 +6,8 @@ const fs = tslib_1.__importStar(require("fs"));
6
6
  const path = tslib_1.__importStar(require("path"));
7
7
  const cli_ux_1 = tslib_1.__importDefault(require("cli-ux"));
8
8
  const fileHelper_1 = require("@stechquick/symphony-common/lib/helpers/fileHelper");
9
+ const log_1 = require("@stechquick/symphony-common/lib/log");
10
+ const chalk_1 = require("../../helpers/chalk");
9
11
  class CreateUIHelper {
10
12
  constructor() {
11
13
  this.subPath = "./";
@@ -17,15 +19,27 @@ class CreateUIHelper {
17
19
  this.createuiSearchPath = "../../../../templates/createui";
18
20
  this.replaceMap.set(this.removeRegExp, "");
19
21
  }
20
- async CreateUI(uiName, uiDesc, npmToken) {
22
+ async CreateUI(uiName, uiDesc, npmToken, registry) {
23
+ if (npmToken == "" && registry == "") {
24
+ log_1.Logger.log({ message: chalk_1.Chalk.create("yellow.bold", "ERR! token or registry required. Let's follow the documentation step by step: https://docs.onplateau.com/Export/Uncompiled-Export/create-ui"), timeFormat: "datetime" });
25
+ return false;
26
+ }
21
27
  this.replaceMap.set(this.uiNameRegExp, uiName);
22
28
  this.replaceMap.set(this.uiDescRegExp, uiDesc);
23
- this.replaceMap.set(this.npmrcTokenRegExp, npmToken);
29
+ let tokenInfo = "";
30
+ if (npmToken) {
31
+ tokenInfo = "@stechquick:registry=https://registry.npmjs.org/" + "\r\n" + "//registry.npmjs.org/:_authToken=" + npmToken;
32
+ }
33
+ else if (registry) {
34
+ //https://scorenexus.isbank/repository/npm-stechquick-registry-proxy-repo/
35
+ tokenInfo = "registry=" + registry + "\r\n" + "strict-ssl=false";
36
+ }
37
+ this.replaceMap.set(this.npmrcTokenRegExp, tokenInfo);
24
38
  const existsSubPath = fs.existsSync(this.subPath + uiName);
25
39
  if (existsSubPath) {
26
40
  const answer = await cli_ux_1.default.confirm("App: " + uiName + " already exists. If you have any, you will lose your pending changes. Would you like to overwrite it?");
27
41
  if (!answer) {
28
- return;
42
+ return false;
29
43
  }
30
44
  }
31
45
  const templatePath = path.join(path.resolve(__dirname), "../.." + this.createuiSearchPath);
@@ -1 +1 @@
1
- {"version":"0.5.32","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":[]},"studio-sync":{"id":"studio-sync","description":"Studio command for serving your path","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli studio-sync"],"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","$ symphony-cli sym-build --swagger","$ symphony-cli sym-build --swagger -i","$ symphony-cli sym-build --swagger -l ./dist/api/local.js"],"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},"swagger":{"name":"swagger","type":"boolean","description":"for swagger generation, this parameter must be given","allowNo":false},"swaggerInclusive":{"name":"swaggerInclusive","type":"boolean","char":"i","description":"to make swagger schema inclusive","allowNo":false},"local_js_dist_path":{"name":"local_js_dist_path","type":"option","char":"l","description":"for monorepos, if local.js is not directly under dist. like: ./dist/api/local.js"}},"args":[]},"sym-create-module":{"id":"sym-create-module","description":"Plateau-Symphony command to create a Symphony Library (Module)","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":""},"token":{"name":"token","type":"option","char":"t","description":"npm token for @stechquick","hidden":false,"required":true}},"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","$ symphony-cli sym-start -l ./dist/api/local.js"],"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},"local_js_dist_path":{"name":"local_js_dist_path","type":"option","char":"l","description":"for monorepos, if local.js is not directly under dist. like: ./dist/api/local.js"}},"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.5.34","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-UI command to create a new Plateau 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 Plateau UI project\"","symphony-cli qui-create myUI -r=REGISTERY","symphony-cli qui-create myUI -r=REGISTERY -d=\"My Plateau 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":false,"default":""},"registry":{"name":"registry","type":"option","char":"r","description":"your registery address (example: nexus address)","hidden":false,"required":false,"default":""}},"args":[{"name":"name","description":"input Plateau 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":[]},"studio-sync":{"id":"studio-sync","description":"Studio command for serving your path","pluginName":"@stechquick/symphony-cli","pluginType":"core","aliases":[],"examples":["$ symphony-cli studio-sync"],"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","$ symphony-cli sym-build --swagger","$ symphony-cli sym-build --swagger -i","$ symphony-cli sym-build --swagger -l ./dist/api/local.js"],"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},"swagger":{"name":"swagger","type":"boolean","description":"for swagger generation, this parameter must be given","allowNo":false},"swaggerInclusive":{"name":"swaggerInclusive","type":"boolean","char":"i","description":"to make swagger schema inclusive","allowNo":false},"local_js_dist_path":{"name":"local_js_dist_path","type":"option","char":"l","description":"for monorepos, if local.js is not directly under dist. like: ./dist/api/local.js"}},"args":[]},"sym-create-module":{"id":"sym-create-module","description":"Plateau-Symphony command to create a Symphony Library (Module)","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 -t=TOKEN","symphony-cli sym-create havale -t=TOKEN -d=\"Havale işlemi\"","symphony-cli sym-create havale -r=REGISTERY","symphony-cli sym-create havale -r=REGISTERY -d=\"Havale işlemi\""],"flags":{"desc":{"name":"desc","type":"option","char":"d","description":"description to application","hidden":false,"required":false,"default":""},"token":{"name":"token","type":"option","char":"t","description":"npm token for @stechquick","hidden":false,"required":false,"default":""},"registry":{"name":"registry","type":"option","char":"r","description":"your registery address (example: nexus address)","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","$ symphony-cli sym-start -l ./dist/api/local.js"],"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},"local_js_dist_path":{"name":"local_js_dist_path","type":"option","char":"l","description":"for monorepos, if local.js is not directly under dist. like: ./dist/api/local.js"}},"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.5.32",
4
+ "version": "0.5.34",
5
5
  "bin": {
6
6
  "symphony-cli": "./bin/run"
7
7
  },
@@ -1,9 +1 @@
1
- # When Pulse Secure is open on your computer:
2
- # If you have access to https://registry.npmjs.org/ from your local environment use Global Npm
3
- @stechquick:registry=https://registry.npmjs.org/
4
- //registry.npmjs.org/:_authToken={{NpmrcStechQuickToken}}
5
-
6
- # When Pulse Secure is open on your computer:
7
- # If you cannot access https://registry.npmjs.org/ from your local environment use Bank scorenexus
8
- # registry=https://scorenexus.isbank/repository/npm-stechquick-registry-proxy-repo/
9
- # strict-ssl=false
1
+ {{NpmrcStechQuickToken}}
@@ -10,8 +10,8 @@
10
10
  "quick:serve": "symphony-cli quick-serve"
11
11
  },
12
12
  "devDependencies": {
13
- "@stechquick/qui": "~1.2.513",
14
- "@stechquick/symphony-cli": "~0.5.29"
13
+ "@stechquick/qui": "~3.0.25-0",
14
+ "@stechquick/symphony-cli": "~0.5.32"
15
15
  },
16
16
  "author": "",
17
17
  "license": "ISC",
@@ -1,36 +1,11 @@
1
- @Library("tools@isleasing_dev_remote_fn_parameters")_
1
+ @Library("tools@V2.7.0")_
2
+ k8sBuildNodeGeneric(buildImageBy: 'containerd') {
2
3
 
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
- }
4
+ genericPipelineSettings()
5
+ genericPipelineBuildAndPushImage(
6
+ imageName: 'bff',
7
+ version: '1.0.6',
8
+ dockerFile: 'docker/Dockerfile',
9
+ logLevel: 'DEBUG'
10
+ )
36
11
  }
@@ -0,0 +1,24 @@
1
+ FROM node:20-alpine as build-stage
2
+ WORKDIR /app
3
+ COPY package.json /app/
4
+ COPY tsconfig.json /app/
5
+ COPY .npmrc /app/
6
+ RUN npm install
7
+ COPY functions/ /app/functions
8
+ COPY sym-functions-common/ /app/sym-functions-common
9
+ COPY sym-engine/ /app/sym-engine
10
+ COPY ./local.ts /app/
11
+ RUN npm run build -- --skipversion
12
+ RUN rm -rf /app/node_modules/typescript
13
+
14
+ FROM node:20-alpine
15
+ WORKDIR /app
16
+ COPY --from=build-stage /app/functions /app/functions
17
+ COPY --from=build-stage /app/sym-functions-common /app/sym-functions-common
18
+ COPY --from=build-stage /app/sym-engine /app/sym-engine
19
+ COPY --from=build-stage /app/package.json /app/
20
+ COPY --from=build-stage /app/node_modules/ /app/node_modules/
21
+ COPY --from=build-stage /app/dist/ /app/dist/
22
+ RUN chmod -R o+r /app
23
+
24
+ ENTRYPOINT ["node", "./dist/local.js", "{\"httpPort\":3003}"]
@@ -1,9 +1 @@
1
- # When Pulse Secure is open on your computer:
2
- # If you have access to https://registry.npmjs.org/ from your local environment use Global Npm
3
- @stechquick:registry=https://registry.npmjs.org/
4
- //registry.npmjs.org/:_authToken={{NpmrcStechQuickToken}}
5
-
6
- # When Pulse Secure is open on your computer:
7
- # If you cannot access https://registry.npmjs.org/ from your local environment use Bank scorenexus
8
- # registry=https://scorenexus.isbank/repository/npm-stechquick-registry-proxy-repo/
9
- # strict-ssl=false
1
+ {{NpmrcStechQuickToken}}
@@ -14,8 +14,8 @@
14
14
  "devDependencies": {
15
15
  "@types/node": "^12.12.39",
16
16
  "@types/jest": "^26.0.4",
17
- "@stechquick/symphony": "~0.1.17",
18
- "@stechquick/symphony-cli": "~0.5.26",
17
+ "@stechquick/symphony": "~1.0.1",
18
+ "@stechquick/symphony-cli": "~0.5.32",
19
19
  "jest": "^26.1.0",
20
20
  "ts-jest": "^26.1.1",
21
21
  "typescript": "^4.9.4"