zcatalyst-cli 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/docs/client-utils.toml +5 -0
  2. package/docs/command_needs/auth.toml +1 -1
  3. package/docs/plugin-loader.toml +4 -0
  4. package/docs/serve/server/index.toml +4 -0
  5. package/docs/serve/server/lib/web_client/server.toml +4 -0
  6. package/lib/apig-utils.js +2 -1
  7. package/lib/client-utils.js +35 -6
  8. package/lib/command_needs/auth.js +2 -2
  9. package/lib/commands/client/delete.js +1 -0
  10. package/lib/commands/event/generate/index.js +4 -13
  11. package/lib/commands/iac/import.js +3 -1
  12. package/lib/commands/init.js +1 -1
  13. package/lib/commands/pull.js +1 -1
  14. package/lib/commands/serve.js +2 -1
  15. package/lib/error.js +6 -5
  16. package/lib/errorOut.js +2 -2
  17. package/lib/fn-utils/lib/common.js +4 -4
  18. package/lib/fn-utils/lib/java.js +1 -1
  19. package/lib/init/dependencies/npm-install.js +2 -9
  20. package/lib/init/features/client/index.js +47 -0
  21. package/lib/init/features/client/initializers/angular.js +88 -0
  22. package/lib/init/features/client/initializers/basic.js +27 -0
  23. package/lib/init/features/client/initializers/lyte.js +44 -0
  24. package/lib/init/features/client/initializers/react.js +53 -0
  25. package/lib/init/features/functions/languages/node.js +3 -1
  26. package/lib/init/features/index.js +10 -3
  27. package/lib/init/features/project.js +1 -1
  28. package/lib/internal/command.js +4 -1
  29. package/lib/internal/config.js +2 -1
  30. package/lib/optional-import.js +11 -25
  31. package/lib/plugin-loader.js +8 -2
  32. package/lib/port-resolver.js +4 -2
  33. package/lib/serve/index.js +6 -1
  34. package/lib/serve/server/index.js +52 -8
  35. package/lib/serve/server/lib/master.js +28 -12
  36. package/lib/serve/server/lib/web_client/index.js +30 -0
  37. package/lib/serve/server/lib/web_client/server.js +171 -0
  38. package/lib/serve/server/lib/web_client/utils.js +10 -0
  39. package/lib/util_modules/char.js +1 -1
  40. package/lib/util_modules/config/lib/apig.js +2 -1
  41. package/lib/util_modules/constants/index.js +3 -1
  42. package/lib/util_modules/constants/lib/placeholders.js +3 -1
  43. package/lib/util_modules/constants/lib/plugin.js +28 -0
  44. package/lib/util_modules/constants/lib/template.js +11 -1
  45. package/lib/util_modules/constants/lib/urls.js +8 -0
  46. package/lib/util_modules/{contextHelp.js → context-help.js} +0 -0
  47. package/lib/util_modules/env.js +13 -12
  48. package/lib/util_modules/global-space.js +99 -0
  49. package/lib/util_modules/option.js +5 -1
  50. package/lib/util_modules/shell.js +10 -6
  51. package/lib/winston.js +1 -1
  52. package/package.json +6 -3
  53. package/templates/init/.DS_Store +0 -0
  54. package/templates/init/client/.DS_Store +0 -0
  55. package/templates/init/client/{client-package.json → basic/client-package.json} +0 -0
  56. package/templates/init/client/{index.html → basic/index.html} +0 -0
  57. package/templates/init/client/{main.css → basic/main.css} +0 -0
  58. package/templates/init/client/{main.js → basic/main.js} +0 -0
  59. package/templates/init/client/lyte/build/build.js +301 -0
  60. package/templates/init/client/lyte/build/scripts/cliDownloadScript.js +54 -0
  61. package/templates/init/client/lyte/client-package.json +5 -0
  62. package/templates/init/client/lyte/components/javascript/welcome-comp.js +13 -0
  63. package/templates/init/client/lyte/components/styles/welcome-comp.css +0 -0
  64. package/templates/init/client/lyte/components/templates/welcome-comp.html +8 -0
  65. package/templates/init/client/lyte/data-store/adapters/.gitkeep +0 -0
  66. package/templates/init/client/lyte/data-store/models/.gitkeep +0 -0
  67. package/templates/init/client/lyte/data-store/serializers/.gitkeep +0 -0
  68. package/templates/init/client/lyte/index.html +17 -0
  69. package/templates/init/client/lyte/package.json +12 -0
  70. package/templates/init/client/lyte/router.js +14 -0
  71. package/templates/init/client/lyte/routes/index.js +54 -0
  72. package/templates/init/client/react/.DS_Store +0 -0
  73. package/templates/init/client/react/react_js/package.json +11 -0
  74. package/templates/init/client/react/react_js/template/README.md +70 -0
  75. package/templates/init/client/react/react_js/template/client-package.json +5 -0
  76. package/templates/init/client/react/react_js/template/gitignore +23 -0
  77. package/templates/init/client/react/react_js/template/public/favicon.ico +0 -0
  78. package/templates/init/client/react/react_js/template/public/index.html +43 -0
  79. package/templates/init/client/react/react_js/template/public/logo192.png +0 -0
  80. package/templates/init/client/react/react_js/template/public/logo512.png +0 -0
  81. package/templates/init/client/react/react_js/template/public/manifest.json +25 -0
  82. package/templates/init/client/react/react_js/template/public/robots.txt +3 -0
  83. package/templates/init/client/react/react_js/template/src/App.css +38 -0
  84. package/templates/init/client/react/react_js/template/src/App.js +25 -0
  85. package/templates/init/client/react/react_js/template/src/App.test.js +8 -0
  86. package/templates/init/client/react/react_js/template/src/index.css +13 -0
  87. package/templates/init/client/react/react_js/template/src/index.js +17 -0
  88. package/templates/init/client/react/react_js/template/src/logo.svg +1 -0
  89. package/templates/init/client/react/react_js/template/src/reportWebVitals.js +13 -0
  90. package/templates/init/client/react/react_js/template/src/setupTests.js +5 -0
  91. package/templates/init/client/react/react_js/template.json +13 -0
  92. package/templates/init/client/react/react_ts/package.json +11 -0
  93. package/templates/init/client/react/react_ts/template/README.md +46 -0
  94. package/templates/init/client/react/react_ts/template/client-package.json +5 -0
  95. package/templates/init/client/react/react_ts/template/gitignore +23 -0
  96. package/templates/init/client/react/react_ts/template/public/favicon.ico +0 -0
  97. package/templates/init/client/react/react_ts/template/public/index.html +43 -0
  98. package/templates/init/client/react/react_ts/template/public/logo192.png +0 -0
  99. package/templates/init/client/react/react_ts/template/public/logo512.png +0 -0
  100. package/templates/init/client/react/react_ts/template/public/manifest.json +25 -0
  101. package/templates/init/client/react/react_ts/template/public/robots.txt +3 -0
  102. package/templates/init/client/react/react_ts/template/src/App.css +38 -0
  103. package/templates/init/client/react/react_ts/template/src/App.test.tsx +9 -0
  104. package/templates/init/client/react/react_ts/template/src/App.tsx +26 -0
  105. package/templates/init/client/react/react_ts/template/src/index.css +13 -0
  106. package/templates/init/client/react/react_ts/template/src/index.tsx +17 -0
  107. package/templates/init/client/react/react_ts/template/src/logo.svg +1 -0
  108. package/templates/init/client/react/react_ts/template/src/reportWebVitals.ts +15 -0
  109. package/templates/init/client/react/react_ts/template/src/setupTests.ts +5 -0
  110. package/templates/init/client/react/react_ts/template.json +18 -0
  111. package/templates/web-socket.txt +21 -0
  112. package/lib/init/features/client.js +0 -50
  113. package/lib/serve/server/lib/client.js +0 -30
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,38 @@
1
+ .App {
2
+ text-align: center;
3
+ }
4
+
5
+ .App-logo {
6
+ height: 40vmin;
7
+ pointer-events: none;
8
+ }
9
+
10
+ @media (prefers-reduced-motion: no-preference) {
11
+ .App-logo {
12
+ animation: App-logo-spin infinite 20s linear;
13
+ }
14
+ }
15
+
16
+ .App-header {
17
+ background-color: #282c34;
18
+ min-height: 100vh;
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: center;
22
+ justify-content: center;
23
+ font-size: calc(10px + 2vmin);
24
+ color: white;
25
+ }
26
+
27
+ .App-link {
28
+ color: #61dafb;
29
+ }
30
+
31
+ @keyframes App-logo-spin {
32
+ from {
33
+ transform: rotate(0deg);
34
+ }
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import App from './App';
4
+
5
+ test('renders learn react link', () => {
6
+ render(<App />);
7
+ const linkElement = screen.getByText(/learn react/i);
8
+ expect(linkElement).toBeInTheDocument();
9
+ });
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import logo from './logo.svg';
3
+ import './App.css';
4
+
5
+ function App() {
6
+ return (
7
+ <div className="App">
8
+ <header className="App-header">
9
+ <img src={logo} className="App-logo" alt="logo" />
10
+ <p>
11
+ Edit <code>src/App.tsx</code> and save to reload.
12
+ </p>
13
+ <a
14
+ className="App-link"
15
+ href="https://reactjs.org"
16
+ target="_blank"
17
+ rel="noopener noreferrer"
18
+ >
19
+ Learn React
20
+ </a>
21
+ </header>
22
+ </div>
23
+ );
24
+ }
25
+
26
+ export default App;
@@ -0,0 +1,13 @@
1
+ body {
2
+ margin: 0;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
+ sans-serif;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ }
9
+
10
+ code {
11
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
+ monospace;
13
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import './index.css';
4
+ import App from './App';
5
+ import reportWebVitals from './reportWebVitals';
6
+
7
+ ReactDOM.render(
8
+ <React.StrictMode>
9
+ <App />
10
+ </React.StrictMode>,
11
+ document.getElementById('root')
12
+ );
13
+
14
+ // If you want to start measuring performance in your app, pass a function
15
+ // to log results (for example: reportWebVitals(console.log))
16
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17
+ reportWebVitals();
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
@@ -0,0 +1,15 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+
3
+ const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
+ if (onPerfEntry && onPerfEntry instanceof Function) {
5
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
+ getCLS(onPerfEntry);
7
+ getFID(onPerfEntry);
8
+ getFCP(onPerfEntry);
9
+ getLCP(onPerfEntry);
10
+ getTTFB(onPerfEntry);
11
+ });
12
+ }
13
+ };
14
+
15
+ export default reportWebVitals;
@@ -0,0 +1,5 @@
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,18 @@
1
+ {
2
+ "package": {
3
+ "dependencies": {
4
+ "@testing-library/jest-dom": "^5.11.4",
5
+ "@testing-library/react": "^11.1.0",
6
+ "@testing-library/user-event": "^12.1.10",
7
+ "@types/node": "^12.0.0",
8
+ "@types/react": "^17.0.0",
9
+ "@types/react-dom": "^17.0.0",
10
+ "@types/jest": "^26.0.15",
11
+ "typescript": "^4.1.2",
12
+ "web-vitals": "^1.0.1"
13
+ },
14
+ "eslintConfig": {
15
+ "extends": ["react-app", "react-app/jest"]
16
+ }{{_DEV_DEPENDENCIES_}}
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ const reloadSocket = new WebSocket('ws://localhost:{{_PORT_}}/client-reload');
2
+
3
+ reloadSocket.onopen = () => {
4
+ console.log('Connection established with the server');
5
+ reloadSocket.send('connected');
6
+ };
7
+
8
+ reloadSocket.onmessage = (message) => {
9
+ if (message.data === 'reload') {
10
+ reloadSocket.close();
11
+ window.location.reload();
12
+ }
13
+ };
14
+
15
+ reloadSocket.onclose = () => {
16
+ console.log('connection closed');
17
+ };
18
+
19
+ reloadSocket.onerror = (err) => {
20
+ console.error('Reload error: ', err);
21
+ };
@@ -1,50 +0,0 @@
1
- 'use strict';
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const ansi_colors_1 = require("ansi-colors");
16
- const prompt_1 = __importDefault(require("../../prompt"));
17
- const constants_1 = require("../../util_modules/constants");
18
- const fs_1 = require("../../util_modules/fs");
19
- const logger_1 = require("../../util_modules/logger");
20
- const project_1 = require("../../util_modules/project");
21
- const client_1 = require("../util/client");
22
- exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
23
- logger_1.message('A directory ' + ansi_colors_1.cyan.bold('client') + ' will be created with a webapp pre-configured.');
24
- const clientDirPath = project_1.resolveProjectPath(constants_1.FOLDERNAME.client);
25
- const foldeExists = yield fs_1.ASYNC.dirExists(clientDirPath);
26
- const overwriteAns = foldeExists
27
- ? yield prompt_1.default.ask(prompt_1.default.question('overwrite', 'Directory ' + ansi_colors_1.underline(constants_1.FOLDERNAME.client) + ' already exists. Overwrite ?', {
28
- type: 'confirm',
29
- defaultAns: false
30
- }))
31
- : { overwrite: true };
32
- if (!overwriteAns.overwrite) {
33
- logger_1.message('Skipping client setup...');
34
- return;
35
- }
36
- yield fs_1.ASYNC.deleteDir(clientDirPath).catch();
37
- yield fs_1.ASYNC.ensureDir(clientDirPath);
38
- yield fs_1.ASYNC.copyDir(constants_1.TEMPLATE.client, clientDirPath);
39
- const clientNameAns = yield prompt_1.default.ask(prompt_1.default.question('clientName', 'How do you want to address the client ?', {
40
- defaultAns: 'sampleApp',
41
- validate: (ans) => {
42
- if (ans.match(constants_1.REGEX.client.package_name)) {
43
- return true;
44
- }
45
- return 'Invalid client name';
46
- }
47
- }));
48
- yield fs_1.ASYNC.findAndReplace(clientDirPath)(constants_1.PLACEHOLDER.client.package.name, clientNameAns.clientName);
49
- return client_1.fillClientInitPayload(project_1.resolveProjectPath(constants_1.FOLDERNAME.client), clientNameAns.clientName);
50
- });
@@ -1,30 +0,0 @@
1
- 'use strict';
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- const express_1 = __importStar(require("express"));
23
- const args = process.argv.slice(2);
24
- const listenPort = parseInt(args[0], 10);
25
- const clientDetails = JSON.parse(args[1]);
26
- const app = express_1.default();
27
- app.use('/app', express_1.static(clientDetails.source, { index: clientDetails.homepage }));
28
- app.listen(listenPort).on('error', (err) => {
29
- console.error(err);
30
- });