@stechquick/symphony-cli 0.2.271
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +378 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/lib/commands/mui-create.d.ts +14 -0
- package/lib/commands/mui-create.js +39 -0
- package/lib/commands/nc-addcomp.d.ts +11 -0
- package/lib/commands/nc-addcomp.js +22 -0
- package/lib/commands/nc-build.d.ts +9 -0
- package/lib/commands/nc-build.js +20 -0
- package/lib/commands/nc-create.d.ts +14 -0
- package/lib/commands/nc-create.js +38 -0
- package/lib/commands/qui-build.d.ts +6 -0
- package/lib/commands/qui-build.js +16 -0
- package/lib/commands/qui-create.d.ts +14 -0
- package/lib/commands/qui-create.js +39 -0
- package/lib/commands/qui-start.d.ts +9 -0
- package/lib/commands/qui-start.js +30 -0
- package/lib/commands/quick-serve.d.ts +17 -0
- package/lib/commands/quick-serve.js +73 -0
- package/lib/commands/sym-addfunc.d.ts +12 -0
- package/lib/commands/sym-addfunc.js +21 -0
- package/lib/commands/sym-build.d.ts +12 -0
- package/lib/commands/sym-build.js +56 -0
- package/lib/commands/sym-create-module.d.ts +14 -0
- package/lib/commands/sym-create-module.js +39 -0
- package/lib/commands/sym-create.d.ts +14 -0
- package/lib/commands/sym-create.js +39 -0
- package/lib/commands/sym-fn-deploy.d.ts +24 -0
- package/lib/commands/sym-fn-deploy.js +152 -0
- package/lib/commands/sym-nano-deploy.d.ts +11 -0
- package/lib/commands/sym-nano-deploy.js +50 -0
- package/lib/commands/sym-start.d.ts +14 -0
- package/lib/commands/sym-start.js +28 -0
- package/lib/commands/sym-test.d.ts +6 -0
- package/lib/commands/sym-test.js +12 -0
- package/lib/helpers/deploy/fnDeployHelper.d.ts +28 -0
- package/lib/helpers/deploy/fnDeployHelper.js +196 -0
- package/lib/helpers/deploy/nanoDeployHelper.d.ts +20 -0
- package/lib/helpers/deploy/nanoDeployHelper.js +83 -0
- package/lib/helpers/fnDownloadHelper.d.ts +11 -0
- package/lib/helpers/fnDownloadHelper.js +64 -0
- package/lib/helpers/initHelper.d.ts +22 -0
- package/lib/helpers/initHelper.js +78 -0
- package/lib/helpers/microUIHelper.d.ts +10 -0
- package/lib/helpers/microUIHelper.js +33 -0
- package/lib/helpers/namedComponent/ncHelper.d.ts +15 -0
- package/lib/helpers/namedComponent/ncHelper.js +60 -0
- package/lib/helpers/npmHelper.d.ts +23 -0
- package/lib/helpers/npmHelper.js +79 -0
- package/lib/helpers/packageHelper.d.ts +14 -0
- package/lib/helpers/packageHelper.js +32 -0
- package/lib/helpers/shellHelper.d.ts +25 -0
- package/lib/helpers/shellHelper.js +52 -0
- package/lib/helpers/socketServer/socketServerHelper.d.ts +14 -0
- package/lib/helpers/socketServer/socketServerHelper.js +106 -0
- package/lib/helpers/typeHelper.d.ts +3 -0
- package/lib/helpers/typeHelper.js +22 -0
- package/lib/helpers/ui/createuiHelper.d.ts +10 -0
- package/lib/helpers/ui/createuiHelper.js +33 -0
- package/lib/helpers/ui/quiBuilder.d.ts +13 -0
- package/lib/helpers/ui/quiBuilder.js +163 -0
- package/lib/helpers/utils.d.ts +8 -0
- package/lib/helpers/utils.js +20 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -0
- package/lib/pathFinder.d.ts +4 -0
- package/lib/pathFinder.js +13 -0
- package/lib/predeploy/src/fn/fnPostdeploy.d.ts +5 -0
- package/lib/predeploy/src/fn/fnPostdeploy.js +49 -0
- package/lib/predeploy/src/fn/fnPredeploy.d.ts +4 -0
- package/lib/predeploy/src/fn/fnPredeploy.js +30 -0
- package/lib/predeploy/src/nano/nanoPostdeploy.d.ts +5 -0
- package/lib/predeploy/src/nano/nanoPostdeploy.js +41 -0
- package/lib/predeploy/src/nano/nanoPredeploy.d.ts +4 -0
- package/lib/predeploy/src/nano/nanoPredeploy.js +25 -0
- package/lib/predeploy/src/paramReplacer.d.ts +7 -0
- package/lib/predeploy/src/paramReplacer.js +14 -0
- package/lib/predeploy/src/predeployCommon.d.ts +15 -0
- package/lib/predeploy/src/predeployCommon.js +83 -0
- package/oclif.manifest.json +1 -0
- package/package.json +76 -0
- package/templates/addModule/{{ModuleName}}/.jenkins/dev.yaml +43 -0
- package/templates/addModule/{{ModuleName}}/README.md +2 -0
- package/templates/addModule/{{ModuleName}}/index.ts +1 -0
- package/templates/addModule/{{ModuleName}}/src/implementation/object.ts +16 -0
- package/templates/addModule/{{ModuleName}}/src/module.ts +9 -0
- package/templates/addModule/{{ModuleName}}/tsconfig.json +66 -0
- package/templates/addModule/{{ModuleName}}/webpack.config.js +41 -0
- package/templates/addModule/{{ModuleName}}/{{remove}}.gitignore +6 -0
- package/templates/addModule/{{ModuleName}}/{{remove}}package.json +33 -0
- package/templates/addfunc/functions/{{FuncName}}/config.yaml +25 -0
- package/templates/addfunc/functions/{{FuncName}}/func.yaml +9 -0
- package/templates/addfunc/functions/{{FuncName}}/{{FuncName}}.ts +8 -0
- package/templates/addfunc/unitTest/{{FuncName}}.test.ts +18 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/.babelrc +17 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/.editorconfig +9 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/.postcssrc.js +8 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/README.md +45 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/build.js +41 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/check-versions.js +49 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-client.js +10 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-server.js +107 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/utils.js +73 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/vue-loader.conf.js +19 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.base.conf.js +76 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.dev.conf.js +39 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.prod.conf.js +128 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.test.conf.js +32 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/build.gradle +251 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/config/dev.env.js +7 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/config/index.js +50 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/config/prod.env.js +4 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/config/test.env.js +7 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/copyBundle.js +3 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/gradle/base/repos.gradle +48 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/gradlew +172 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/index.html +11 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/index.js +18 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/indexCompNames.js +14 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/indexInitial.js +8 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/indexModuleName.js +1 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/indexVCompNames.json +50 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/package.json +84 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/removeDist.js +2 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/App.vue +54 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/api/index.js +5 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/components/index.js +6 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/docker/nginx.conf +39 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/en/default.json +3 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/tr/default.json +3 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/main.js +15 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/handlers/health.js +8 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/index.js +8 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/server.js +45 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/pages/index.js +6 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/router/index.js +5 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/service/serviceConstants.js +1 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/store/index.js +14 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/src/worker/a9e657cbf4abb977edda.worker.js +60638 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/static/.gitkeep +0 -0
- package/templates/createmicroui/{{MicroUIName}}-ui/webpack.config.js +257 -0
- package/templates/createui/{{UIName}}/Jenkinsfile +20 -0
- package/templates/createui/{{UIName}}/build.gradle +266 -0
- package/templates/createui/{{UIName}}/gradle/base/repos.gradle +93 -0
- package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/templates/createui/{{UIName}}/gradlew +172 -0
- package/templates/createui/{{UIName}}/gradlew.bat +90 -0
- package/templates/createui/{{UIName}}/settings/globalLocalization.qjson +29 -0
- package/templates/createui/{{UIName}}/settings/localProxy.yaml +25 -0
- package/templates/createui/{{UIName}}/settings/qjson/alert.qjson +920 -0
- package/templates/createui/{{UIName}}/settings/qjson/loading.qjson +1486 -0
- package/templates/createui/{{UIName}}/settings/qjson/logHandler.qjson +65 -0
- package/templates/createui/{{UIName}}/settings/qjson/pipeline.qjson +116 -0
- package/templates/createui/{{UIName}}/settings/settings-proxy.js +120 -0
- package/templates/createui/{{UIName}}/settings/settings.yaml +85 -0
- package/templates/createui/{{UIName}}/settings.gradle +1 -0
- package/templates/createui/{{UIName}}/static/components/yourNamedCompHere.js +0 -0
- package/templates/createui/{{UIName}}/static/css/main.css +36 -0
- package/templates/createui/{{UIName}}/static/css/myDarkTheme.css +143 -0
- package/templates/createui/{{UIName}}/static/css/myHappyTheme1.css +140 -0
- package/templates/createui/{{UIName}}/static/css/myHappyTheme2.css +140 -0
- package/templates/createui/{{UIName}}/static/images/ahelogo.png +0 -0
- package/templates/createui/{{UIName}}/static/images/avatar.png +0 -0
- package/templates/createui/{{UIName}}/static/images/profile.png +0 -0
- package/templates/createui/{{UIName}}/static/images/profile2.png +0 -0
- package/templates/createui/{{UIName}}/static/images/yourImagesHere.png +0 -0
- package/templates/createui/{{UIName}}/static/js/componentList.ts +4452 -0
- package/templates/createui/{{UIName}}/static/qjsons/VDatatableConditionalRowColoring.qjson +158 -0
- package/templates/createui/{{UIName}}/static/qjsons/alertSamplePage.qjson +772 -0
- package/templates/createui/{{UIName}}/static/qjsons/complicatedSamplePage.qjson +10448 -0
- package/templates/createui/{{UIName}}/static/qjsons/customComponentSample.qjson +803 -0
- package/templates/createui/{{UIName}}/static/qjsons/customerInfoCustomComp.qjson +1451 -0
- package/templates/createui/{{UIName}}/static/qjsons/first.qjson +2180 -0
- package/templates/createui/{{UIName}}/static/qjsons/formatterSample.qjson +877 -0
- package/templates/createui/{{UIName}}/static/qjsons/localizationSample.qjson +1845 -0
- package/templates/createui/{{UIName}}/static/qjsons/pipelineSample.qjson +913 -0
- package/templates/createui/{{UIName}}/static/qjsons/validationSample.qjson +2371 -0
- package/templates/createui/{{UIName}}/static/qjsons/webDashboardSample.qjson +2993 -0
- package/templates/createui/{{UIName}}/{{remove}}.gitignore +3 -0
- package/templates/createui/{{UIName}}/{{remove}}package.json +22 -0
- package/templates/fnPredeploy/Dockerfile +22 -0
- package/templates/init/{{AppName}}/.vscode/launch.json +24 -0
- package/templates/init/{{AppName}}/Jenkinsfile +36 -0
- package/templates/init/{{AppName}}/app.yaml +1 -0
- package/templates/init/{{AppName}}/functions/qjsonfunc/func.yaml +9 -0
- package/templates/init/{{AppName}}/functions/qjsonfunc/qjsonfunc.ts +3 -0
- package/templates/init/{{AppName}}/functions/qjsonfunc/qjsons/test.qjson +180 -0
- package/templates/init/{{AppName}}/functions/samplefunc/config.yaml +46 -0
- package/templates/init/{{AppName}}/functions/samplefunc/func.yaml +9 -0
- package/templates/init/{{AppName}}/functions/samplefunc/samplefunc.ts +27 -0
- package/templates/init/{{AppName}}/jest.config.js +8 -0
- package/templates/init/{{AppName}}/local.ts +6 -0
- package/templates/init/{{AppName}}/sym-engine/config.yaml +7 -0
- package/templates/init/{{AppName}}/sym-engine/localization.yaml +5 -0
- package/templates/init/{{AppName}}/sym-engine/pipeline.ts +64 -0
- package/templates/init/{{AppName}}/test/qjson.http +29 -0
- package/templates/init/{{AppName}}/test/sample.http +24 -0
- package/templates/init/{{AppName}}/tsconfig.json +66 -0
- package/templates/init/{{AppName}}/unitTest/samplefunc.test.ts +55 -0
- package/templates/init/{{AppName}}/{{remove}}.gitignore +6 -0
- package/templates/init/{{AppName}}/{{remove}}package.json +40 -0
- package/templates/nanoPredeploy/Dockerfile +27 -0
- package/templates/nc-addComp/{{ComponentName}}.vue +29 -0
- package/templates/nc-create/{{ProjectName}}/shims/shims-vue.d.ts +4 -0
- package/templates/nc-create/{{ProjectName}}/src/namedComps/{{ProjectName}}.vue +29 -0
- package/templates/nc-create/{{ProjectName}}/tsconfig.json +66 -0
- package/templates/nc-create/{{ProjectName}}/webpack.config.js +2 -0
- package/templates/nc-create/{{ProjectName}}/{{remove}}.gitignore +3 -0
- package/templates/nc-create/{{ProjectName}}/{{remove}}package.json +28 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class Serve extends Command {
|
|
3
|
+
private static server;
|
|
4
|
+
private rootPath;
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
path: flags.IOptionFlag<string | undefined>;
|
|
9
|
+
httpPort: import("@oclif/parser/lib/flags").IOptionFlag<number | undefined>;
|
|
10
|
+
global: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
private createServer;
|
|
14
|
+
private addServicesToServer;
|
|
15
|
+
private attachPlugins;
|
|
16
|
+
private startServer;
|
|
17
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const command_1 = require("@oclif/command");
|
|
5
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
|
+
const symphony_nanoserver_1 = require("@stechquick/symphony-nanoserver");
|
|
7
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
8
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
9
|
+
const socketServerHelper_1 = require("../helpers/socketServer/socketServerHelper");
|
|
10
|
+
class Serve extends command_1.Command {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.rootPath = "";
|
|
14
|
+
}
|
|
15
|
+
async run() {
|
|
16
|
+
var _a;
|
|
17
|
+
const { flags } = this.parse(Serve);
|
|
18
|
+
this.rootPath = (_a = flags.path) !== null && _a !== void 0 ? _a : path.resolve(".");
|
|
19
|
+
this.createServer();
|
|
20
|
+
this.addServicesToServer();
|
|
21
|
+
await this.startServer(flags.httpPort);
|
|
22
|
+
this.attachPlugins(); // attach plugin waits for server start
|
|
23
|
+
}
|
|
24
|
+
createServer() {
|
|
25
|
+
Serve.server = new symphony_nanoserver_1.NanoServer({
|
|
26
|
+
rootDiskPath: this.rootPath,
|
|
27
|
+
bindHost: global ? "0.0.0.0" : "127.0.0.1",
|
|
28
|
+
portSeekOffset: 1000,
|
|
29
|
+
manageCors: {}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
addServicesToServer() {
|
|
33
|
+
Serve.server.AddService({
|
|
34
|
+
PathStart: "/ping",
|
|
35
|
+
Methods: new Set(["GET"]),
|
|
36
|
+
Execute: async (options) => options.response.writeResponse(`Hi from symphony-cli quick server.<br> Root path: ${this.rootPath}`)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
attachPlugins() {
|
|
40
|
+
new socketServerHelper_1.SocketServerHelper(Serve.server).Start();
|
|
41
|
+
}
|
|
42
|
+
async startServer(httpPort) {
|
|
43
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Server starting..."), timeFormat: "datetime" });
|
|
44
|
+
Serve.server.Start({
|
|
45
|
+
port: httpPort || 3000,
|
|
46
|
+
successCb: () => {
|
|
47
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", `Http listening on: ${Serve.server.GetServerUrl()}`) });
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// Serve.server.StartHttps({
|
|
51
|
+
// port: 3030,
|
|
52
|
+
// privateKey: fs.readFileSync('key.pem', 'utf8'),
|
|
53
|
+
// certificate: fs.readFileSync('cert.pem', 'utf8'),
|
|
54
|
+
// successCb: () => {
|
|
55
|
+
// //Logger.log({ message: Chalk.create("green.bold", `Https listening on: ${Serve.server.GetServerUrl()}`) });
|
|
56
|
+
// }
|
|
57
|
+
// });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.default = Serve;
|
|
61
|
+
Serve.description = 'QUICK command for serving your path';
|
|
62
|
+
Serve.examples = [
|
|
63
|
+
"$ symphony-cli quick-serve",
|
|
64
|
+
"$ symphony-cli quick-serve -p 3000",
|
|
65
|
+
"$ symphony-cli quick-serve -g",
|
|
66
|
+
"$ symphony-cli quick-serve -r C:/MyPathToServe",
|
|
67
|
+
"$ symphony-cli quick-serve -g -r C:/MyPathToServe"
|
|
68
|
+
];
|
|
69
|
+
Serve.flags = {
|
|
70
|
+
path: command_1.flags.string({ char: 'r', description: 'Change path to serve' }),
|
|
71
|
+
httpPort: command_1.flags.integer({ char: 'p', description: 'HTTP port to serve' }),
|
|
72
|
+
global: command_1.flags.boolean({ char: 'g', description: 'Host/visible for everyone.' })
|
|
73
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/command';
|
|
2
|
+
export default class AddFunc extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
name: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
hidden: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const initHelper_1 = require("../helpers/initHelper");
|
|
5
|
+
class AddFunc extends command_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args } = this.parse(AddFunc);
|
|
8
|
+
new initHelper_1.InitHelper().AddFunc(args["funcname"]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = AddFunc;
|
|
12
|
+
AddFunc.description = 'Plateau-Symphony command to create a new function';
|
|
13
|
+
AddFunc.examples = [`symphony-cli sym-addfunc havalemenu`];
|
|
14
|
+
AddFunc.args = [
|
|
15
|
+
{
|
|
16
|
+
name: 'funcname',
|
|
17
|
+
required: true,
|
|
18
|
+
description: 'input function name',
|
|
19
|
+
hidden: false
|
|
20
|
+
}
|
|
21
|
+
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/command';
|
|
2
|
+
export default class Build extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
watch: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
7
|
+
skipversion: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
+
};
|
|
9
|
+
private static versionCheckSetting;
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
private continueToBuild;
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const npmHelper_1 = require("../helpers/npmHelper");
|
|
5
|
+
const initHelper_1 = require("../helpers/initHelper");
|
|
6
|
+
const packageHelper_1 = require("../helpers/packageHelper");
|
|
7
|
+
const cli_ux_1 = require("cli-ux");
|
|
8
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
9
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
10
|
+
class Build extends command_1.Command {
|
|
11
|
+
async run() {
|
|
12
|
+
const { flags } = this.parse(Build);
|
|
13
|
+
//assert in folder control
|
|
14
|
+
if (!initHelper_1.InitHelper.AssertInFolder()) {
|
|
15
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("red.bold", "Command must be executed in app root!"), timeFormat: "datetime" });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
//version control
|
|
19
|
+
let bwPackages = [];
|
|
20
|
+
if (!flags.skipversion) {
|
|
21
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Version checking, please wait...") });
|
|
22
|
+
bwPackages = packageHelper_1.PackageHelper.getBackwardPackages(Build.versionCheckSetting);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Skipping version checking...") });
|
|
26
|
+
}
|
|
27
|
+
if (bwPackages.length == 0) {
|
|
28
|
+
this.continueToBuild(flags.watch);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow.bold", "There are backward packages!\n"), additional: bwPackages });
|
|
32
|
+
cli_ux_1.cli.confirm(styling_1.Chalk.create("yellow.bold", "Do you want to continue? [Y/N]")).then(res => {
|
|
33
|
+
if (!res) {
|
|
34
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("red.bold", "Build stopped...") });
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Continue to build. (I hope you are aware of what you are doing...)") });
|
|
38
|
+
this.continueToBuild(flags.watch);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
continueToBuild(watch) {
|
|
42
|
+
npmHelper_1.NpmHelper.build({ watch });
|
|
43
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Build finished successfully."), timeFormat: "datetime" });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.default = Build;
|
|
47
|
+
Build.description = 'Plateau-Symphony command to build the app with/without watch';
|
|
48
|
+
Build.examples = ["$ symphony-cli sym-build", "$ symphony-cli sym-build -w"];
|
|
49
|
+
Build.flags = {
|
|
50
|
+
watch: command_1.flags.boolean({ char: 'w', description: 'for watch' }),
|
|
51
|
+
skipversion: command_1.flags.boolean({ char: 's', description: 'skip version checking. Used for Deployment' })
|
|
52
|
+
};
|
|
53
|
+
Build.versionCheckSetting = {
|
|
54
|
+
packageNames: ["plateau-symphony", "symphony-cli"],
|
|
55
|
+
packageJsonFilePath: "/templates/init/{{AppName}}/{{remove}}package.json"
|
|
56
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class CreateModule extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
name: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
static flags: {
|
|
11
|
+
desc: flags.IOptionFlag<string>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const initHelper_1 = require("../helpers/initHelper");
|
|
5
|
+
const npmHelper_1 = require("../helpers/npmHelper");
|
|
6
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
7
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
8
|
+
class CreateModule extends command_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = this.parse(CreateModule);
|
|
11
|
+
const { args } = this.parse(CreateModule);
|
|
12
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Module " + args["name"] + " creating. Please wait...") });
|
|
13
|
+
await new initHelper_1.InitHelper().AddModule(args["name"], `${flags.desc}`);
|
|
14
|
+
npmHelper_1.NpmHelper.install({ folderName: args["name"] });
|
|
15
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Module " + args["name"] + " created successfully.") });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = CreateModule;
|
|
19
|
+
CreateModule.description = 'Plateau-Symphony command to create a Symphony App';
|
|
20
|
+
CreateModule.examples = [
|
|
21
|
+
`symphony-cli sym-create-module abm -d="abm module description"`
|
|
22
|
+
];
|
|
23
|
+
CreateModule.args = [
|
|
24
|
+
{
|
|
25
|
+
name: 'name',
|
|
26
|
+
required: true,
|
|
27
|
+
description: 'input module name',
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
CreateModule.flags = {
|
|
31
|
+
desc: command_1.flags.string({
|
|
32
|
+
char: 'd',
|
|
33
|
+
description: 'description to module',
|
|
34
|
+
hidden: false,
|
|
35
|
+
multiple: false,
|
|
36
|
+
default: '',
|
|
37
|
+
required: false,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class CreateApp extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
name: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
static flags: {
|
|
11
|
+
desc: flags.IOptionFlag<string>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const initHelper_1 = require("../helpers/initHelper");
|
|
5
|
+
const npmHelper_1 = require("../helpers/npmHelper");
|
|
6
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
7
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
8
|
+
class CreateApp extends command_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = this.parse(CreateApp);
|
|
11
|
+
const { args } = this.parse(CreateApp);
|
|
12
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Application " + args["name"] + " creating. Please wait...") });
|
|
13
|
+
await new initHelper_1.InitHelper().AddApp(args["name"], `${flags.desc}`);
|
|
14
|
+
npmHelper_1.NpmHelper.install({ folderName: args["name"] });
|
|
15
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Application " + args["name"] + " created successfully.") });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = CreateApp;
|
|
19
|
+
CreateApp.description = 'Plateau-Symphony command to create a Symphony App';
|
|
20
|
+
CreateApp.examples = [
|
|
21
|
+
`symphony-cli sym-create havale -d="Kanallardan yapılan havale işlemi"`
|
|
22
|
+
];
|
|
23
|
+
CreateApp.args = [
|
|
24
|
+
{
|
|
25
|
+
name: 'name',
|
|
26
|
+
required: true,
|
|
27
|
+
description: 'input application name',
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
CreateApp.flags = {
|
|
31
|
+
desc: command_1.flags.string({
|
|
32
|
+
char: 'd',
|
|
33
|
+
description: 'description to application',
|
|
34
|
+
hidden: false,
|
|
35
|
+
multiple: false,
|
|
36
|
+
default: '',
|
|
37
|
+
required: false,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class FnDeploy extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
name: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
hidden: boolean;
|
|
10
|
+
options: string[];
|
|
11
|
+
}[];
|
|
12
|
+
static flags: {
|
|
13
|
+
d_url: flags.IOptionFlag<string>;
|
|
14
|
+
d_user: flags.IOptionFlag<string>;
|
|
15
|
+
d_pass: flags.IOptionFlag<string>;
|
|
16
|
+
f_url: flags.IOptionFlag<string>;
|
|
17
|
+
node_env: flags.IOptionFlag<string | undefined>;
|
|
18
|
+
};
|
|
19
|
+
private static defaultSettings;
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
private getSettings;
|
|
22
|
+
private appendEnvIndependentSettings;
|
|
23
|
+
private getRemoteSettings;
|
|
24
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const fnDeployHelper_1 = require("../helpers/deploy/fnDeployHelper");
|
|
5
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
6
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
7
|
+
class FnDeploy extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Checking deployment parameters, please wait...") });
|
|
10
|
+
const deploySettings = this.getSettings();
|
|
11
|
+
if (!deploySettings) {
|
|
12
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("red.bold", "Deploy stopped.") });
|
|
13
|
+
process.exit(12);
|
|
14
|
+
}
|
|
15
|
+
this.appendEnvIndependentSettings(deploySettings);
|
|
16
|
+
await new fnDeployHelper_1.FnDeployHelper(deploySettings).deploy();
|
|
17
|
+
}
|
|
18
|
+
getSettings() {
|
|
19
|
+
const { args } = this.parse(FnDeploy);
|
|
20
|
+
switch (args.environment) {
|
|
21
|
+
case "remote":
|
|
22
|
+
return this.getRemoteSettings();
|
|
23
|
+
case "play":
|
|
24
|
+
return FnDeploy.defaultSettings;
|
|
25
|
+
case "local":
|
|
26
|
+
return { environment: "local" };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
appendEnvIndependentSettings(deploySettings) {
|
|
30
|
+
const { flags } = this.parse(FnDeploy);
|
|
31
|
+
const nodeEnv = flags.node_env || process.env["NODE_ENV"] || process.env["node_env"];
|
|
32
|
+
if (!nodeEnv) {
|
|
33
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'environment name'. Defaulting to: default.") });
|
|
34
|
+
}
|
|
35
|
+
deploySettings.nodeEnv = nodeEnv;
|
|
36
|
+
}
|
|
37
|
+
getRemoteSettings() {
|
|
38
|
+
const { flags } = this.parse(FnDeploy);
|
|
39
|
+
const dockerUrl = flags.d_url || process.env["d_url"];
|
|
40
|
+
if (!dockerUrl) {
|
|
41
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'docker url' definition!") });
|
|
42
|
+
}
|
|
43
|
+
const dockerUser = flags.d_user || process.env["d_user"];
|
|
44
|
+
if (!dockerUser) {
|
|
45
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'docker username' definition!") });
|
|
46
|
+
}
|
|
47
|
+
const dockerPass = flags.d_pass || process.env["d_pass"];
|
|
48
|
+
if (!dockerPass) {
|
|
49
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'docker pasword' definition!") });
|
|
50
|
+
}
|
|
51
|
+
const fnUrl = flags.f_url || process.env["f_url"];
|
|
52
|
+
if (!fnUrl) {
|
|
53
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'fn api url' definition!") });
|
|
54
|
+
}
|
|
55
|
+
if (!(dockerUrl && dockerUser && dockerPass && fnUrl)) {
|
|
56
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Plase check your deployment parameters!") });
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
environment: "remote",
|
|
61
|
+
dockerSettings: {
|
|
62
|
+
url: dockerUrl,
|
|
63
|
+
username: dockerUser,
|
|
64
|
+
password: dockerPass
|
|
65
|
+
},
|
|
66
|
+
fnSettings: {
|
|
67
|
+
apiUrl: fnUrl
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.default = FnDeploy;
|
|
73
|
+
FnDeploy.description = 'Plateau-Symphony fn command to deploy the all functions in your app';
|
|
74
|
+
FnDeploy.examples = [
|
|
75
|
+
'symphony-cli sym-fn-deploy local',
|
|
76
|
+
'symphony-cli sym-fn-deploy play',
|
|
77
|
+
'symphony-cli sym-fn-deploy remote',
|
|
78
|
+
'symphony-cli sym-fn-deploy remote -d MyDockerUrl -u MyDockerUser -p MyDockerPassword -f MyFnApiUrl',
|
|
79
|
+
'symphony-cli sym-fn-deploy remote --d_url MyDockerUrl --d_user MyDockerUser --d_pass MyDockerPassword --f_url MyFnApiUrl',
|
|
80
|
+
'symphony-cli sym-fn-deploy remote --d_url="MyDockerUrl" --d_user="MyDockerUser" --d_pass="MyDockerPassword" --f_url="MyFnApiUrl"'
|
|
81
|
+
// Chalk.create("green", 'symphony-cli sym-deploy local'),
|
|
82
|
+
// Chalk.create("red", 'symphony-cli sym-deploy play'),
|
|
83
|
+
// Chalk.create("yellow", 'symphony-cli sym-deploy remote'),
|
|
84
|
+
// Chalk.create("yellow", 'symphony-cli sym-deploy remote -d MyDockerUrl -u MyDockerUser -p MyDockerPassword -f MyFnApiUrl'),
|
|
85
|
+
// Chalk.create("yellow", 'symphony-cli sym-deploy remote --d_url MyDockerUrl --d_user MyDockerUser --d_pass MyDockerPassword --f_url MyFnApiUrl'),
|
|
86
|
+
// Chalk.create("yellow", 'symphony-cli sym-deploy remote --d_url="MyDockerUrl" --d_user="MyDockerUser" --d_pass="MyDockerPassword" --f_url="MyFnApiUrl"')
|
|
87
|
+
];
|
|
88
|
+
FnDeploy.args = [
|
|
89
|
+
{
|
|
90
|
+
name: 'environment',
|
|
91
|
+
required: true,
|
|
92
|
+
description: `${styling_1.Chalk.create("bold", 'deploy environment: ')}
|
|
93
|
+
${styling_1.Chalk.create("green.bold", '[local: your local]')}
|
|
94
|
+
${styling_1.Chalk.create("red.bold", '[play: playground environment]')}
|
|
95
|
+
${styling_1.Chalk.create("yellow.bold", '[remote: remote server]')}`,
|
|
96
|
+
hidden: false,
|
|
97
|
+
options: ["local", "play", "remote"]
|
|
98
|
+
}
|
|
99
|
+
];
|
|
100
|
+
FnDeploy.flags = {
|
|
101
|
+
d_url: command_1.flags.string({
|
|
102
|
+
description: 'docker url to deploy',
|
|
103
|
+
hidden: false,
|
|
104
|
+
multiple: false,
|
|
105
|
+
default: '',
|
|
106
|
+
required: false,
|
|
107
|
+
char: 'd',
|
|
108
|
+
}),
|
|
109
|
+
d_user: command_1.flags.string({
|
|
110
|
+
description: 'docker username to deploy',
|
|
111
|
+
hidden: false,
|
|
112
|
+
multiple: false,
|
|
113
|
+
default: '',
|
|
114
|
+
required: false,
|
|
115
|
+
char: 'u',
|
|
116
|
+
}),
|
|
117
|
+
d_pass: command_1.flags.string({
|
|
118
|
+
description: 'docker password for this username to deploy',
|
|
119
|
+
hidden: false,
|
|
120
|
+
multiple: false,
|
|
121
|
+
default: '',
|
|
122
|
+
required: false,
|
|
123
|
+
char: 'p',
|
|
124
|
+
}),
|
|
125
|
+
f_url: command_1.flags.string({
|
|
126
|
+
description: 'fn api url to deploy',
|
|
127
|
+
hidden: false,
|
|
128
|
+
multiple: false,
|
|
129
|
+
default: '',
|
|
130
|
+
required: false,
|
|
131
|
+
char: 'f',
|
|
132
|
+
}),
|
|
133
|
+
node_env: command_1.flags.string({
|
|
134
|
+
description: 'symphony environment name',
|
|
135
|
+
hidden: false,
|
|
136
|
+
multiple: false,
|
|
137
|
+
default: undefined,
|
|
138
|
+
required: false,
|
|
139
|
+
char: 'e',
|
|
140
|
+
}),
|
|
141
|
+
};
|
|
142
|
+
FnDeploy.defaultSettings = {
|
|
143
|
+
environment: "play",
|
|
144
|
+
dockerSettings: {
|
|
145
|
+
url: "",
|
|
146
|
+
username: "symphonydemo",
|
|
147
|
+
password: "f40ddfd4-aad6-4a6a-b3a9-fb54847fb60a"
|
|
148
|
+
},
|
|
149
|
+
fnSettings: {
|
|
150
|
+
apiUrl: "http://10.223.2.98:80"
|
|
151
|
+
}
|
|
152
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class NanoDeploy extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
node_env: flags.IOptionFlag<string | undefined>;
|
|
7
|
+
imagename: flags.IOptionFlag<string>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
private appendEnvIndependentSettings;
|
|
11
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const nanoDeployHelper_1 = require("../helpers/deploy/nanoDeployHelper");
|
|
5
|
+
const log_1 = require("@stechquick/symphony-common/lib/log");
|
|
6
|
+
const styling_1 = require("@stechquick/symphony-common/lib/styling");
|
|
7
|
+
class NanoDeploy extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("green.bold", "Checking deployment parameters, please wait...") });
|
|
10
|
+
const { flags } = this.parse(NanoDeploy);
|
|
11
|
+
const deploySettings = { imageName: flags.imagename };
|
|
12
|
+
if (!deploySettings) {
|
|
13
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("red.bold", "Deploy stopped.") });
|
|
14
|
+
process.exit(12);
|
|
15
|
+
}
|
|
16
|
+
this.appendEnvIndependentSettings(deploySettings);
|
|
17
|
+
await new nanoDeployHelper_1.NanoDeployHelper(deploySettings).deploy();
|
|
18
|
+
}
|
|
19
|
+
appendEnvIndependentSettings(deploySettings) {
|
|
20
|
+
const { flags } = this.parse(NanoDeploy);
|
|
21
|
+
const nodeEnv = flags.node_env || process.env["NODE_ENV"] || process.env["node_env"];
|
|
22
|
+
if (!nodeEnv) {
|
|
23
|
+
log_1.Logger.log({ message: styling_1.Chalk.create("yellow", "Warning: There is no 'environment name'. Defaulting to: default.") });
|
|
24
|
+
}
|
|
25
|
+
deploySettings.nodeEnv = nodeEnv;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = NanoDeploy;
|
|
29
|
+
NanoDeploy.description = 'Plateau-Symphony nano command to deploy the all functions in your app';
|
|
30
|
+
NanoDeploy.examples = [
|
|
31
|
+
'symphony-cli sym-nano-deploy',
|
|
32
|
+
];
|
|
33
|
+
NanoDeploy.flags = {
|
|
34
|
+
node_env: command_1.flags.string({
|
|
35
|
+
description: 'symphony environment name',
|
|
36
|
+
hidden: false,
|
|
37
|
+
multiple: false,
|
|
38
|
+
default: undefined,
|
|
39
|
+
required: false,
|
|
40
|
+
char: 'e',
|
|
41
|
+
}),
|
|
42
|
+
imagename: command_1.flags.string({
|
|
43
|
+
description: 'image name for docker',
|
|
44
|
+
hidden: false,
|
|
45
|
+
multiple: false,
|
|
46
|
+
default: undefined,
|
|
47
|
+
required: true,
|
|
48
|
+
char: 'i',
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class Run extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
debug: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
7
|
+
build: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
+
http_port: import("@oclif/parser/lib/flags").IOptionFlag<number | undefined>;
|
|
9
|
+
https_port: import("@oclif/parser/lib/flags").IOptionFlag<number | undefined>;
|
|
10
|
+
environment: flags.IOptionFlag<string>;
|
|
11
|
+
hosted_path: flags.IOptionFlag<string | undefined>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const npmHelper_1 = require("../helpers/npmHelper");
|
|
5
|
+
class Run extends command_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { flags } = this.parse(Run);
|
|
8
|
+
const runSetting = {
|
|
9
|
+
debug: flags.debug,
|
|
10
|
+
build: flags.build,
|
|
11
|
+
httpPort: flags.http_port,
|
|
12
|
+
httpsPort: flags.https_port,
|
|
13
|
+
hostedPath: flags.hosted_path,
|
|
14
|
+
};
|
|
15
|
+
npmHelper_1.NpmHelper.run(flags.environment, runSetting);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = Run;
|
|
19
|
+
Run.description = 'Plateau-Symphony command to start your functions with/without debug';
|
|
20
|
+
Run.examples = [`$ symphony-cli sym-start -b -d`];
|
|
21
|
+
Run.flags = {
|
|
22
|
+
debug: command_1.flags.boolean({ char: 'd', description: 'for debug' }),
|
|
23
|
+
build: command_1.flags.boolean({ char: 'b', description: 'for build' }),
|
|
24
|
+
http_port: command_1.flags.integer({ char: 'p', description: 'port to HTTP server' }),
|
|
25
|
+
https_port: command_1.flags.integer({ char: 'h', description: 'port to HTTPS server' }),
|
|
26
|
+
environment: command_1.flags.string({ char: 'e', description: 'environment variable', hidden: false, default: 'default', required: false, }),
|
|
27
|
+
hosted_path: command_1.flags.string({ description: 'application hosted sub path', required: false }),
|
|
28
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
class UnitTest extends command_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
child_process_1.execSync("npm test -- --coverage", { stdio: 'inherit' });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.default = UnitTest;
|
|
11
|
+
UnitTest.description = 'Plateau-Symphony command to run your all test functions with coverage';
|
|
12
|
+
UnitTest.examples = [`$ symphony-cli sym-test`];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare type DeployEnvironment = "local" | "remote" | "play";
|
|
2
|
+
export interface IDockerSettings {
|
|
3
|
+
url: string;
|
|
4
|
+
username: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IFnSettings {
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IDeploySettings {
|
|
11
|
+
environment: DeployEnvironment;
|
|
12
|
+
nodeEnv?: string;
|
|
13
|
+
dockerSettings?: IDockerSettings;
|
|
14
|
+
fnSettings?: IFnSettings;
|
|
15
|
+
}
|
|
16
|
+
export declare class FnDeployHelper {
|
|
17
|
+
private settings;
|
|
18
|
+
constructor(settings: IDeploySettings);
|
|
19
|
+
deploy(): Promise<void>;
|
|
20
|
+
private getReplaceWords;
|
|
21
|
+
private getDockerCommandArgs;
|
|
22
|
+
private getFnCommandArgs;
|
|
23
|
+
private fnPreRemote;
|
|
24
|
+
private fnContextDelete;
|
|
25
|
+
private fnContext;
|
|
26
|
+
private fnDeploy;
|
|
27
|
+
}
|
|
28
|
+
export {};
|