authup 0.0.0 → 0.1.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 (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -4
  3. package/dist/commands/index.d.ts +5 -0
  4. package/dist/commands/index.d.ts.map +1 -0
  5. package/dist/commands/index.js +27 -0
  6. package/dist/commands/index.js.map +1 -0
  7. package/dist/commands/info.d.ts +3 -0
  8. package/dist/commands/info.d.ts.map +1 -0
  9. package/dist/commands/info.js +41 -0
  10. package/dist/commands/info.js.map +1 -0
  11. package/dist/commands/server.d.ts +3 -0
  12. package/dist/commands/server.d.ts.map +1 -0
  13. package/dist/commands/server.js +55 -0
  14. package/dist/commands/server.js.map +1 -0
  15. package/dist/commands/start.d.ts +3 -0
  16. package/dist/commands/start.d.ts.map +1 -0
  17. package/dist/commands/start.js +53 -0
  18. package/dist/commands/start.js.map +1 -0
  19. package/dist/commands/ui.d.ts +3 -0
  20. package/dist/commands/ui.d.ts.map +1 -0
  21. package/dist/commands/ui.js +51 -0
  22. package/dist/commands/ui.js.map +1 -0
  23. package/dist/config/index.d.ts +3 -0
  24. package/dist/config/index.d.ts.map +1 -0
  25. package/dist/config/index.js +25 -0
  26. package/dist/config/index.js.map +1 -0
  27. package/dist/config/module.d.ts +3 -0
  28. package/dist/config/module.d.ts.map +1 -0
  29. package/dist/config/module.js +39 -0
  30. package/dist/config/module.js.map +1 -0
  31. package/dist/config/read.d.ts +3 -0
  32. package/dist/config/read.d.ts.map +1 -0
  33. package/dist/config/read.js +40 -0
  34. package/dist/config/read.js.map +1 -0
  35. package/dist/config/type.d.ts +11 -0
  36. package/dist/config/type.d.ts.map +1 -0
  37. package/dist/config/type.js +9 -0
  38. package/dist/config/type.js.map +1 -0
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +21 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/packages/index.d.ts +4 -0
  44. package/dist/packages/index.d.ts.map +1 -0
  45. package/dist/packages/index.js +26 -0
  46. package/dist/packages/index.js.map +1 -0
  47. package/dist/packages/server/commands/index.d.ts +5 -0
  48. package/dist/packages/server/commands/index.d.ts.map +1 -0
  49. package/dist/packages/server/commands/index.js +27 -0
  50. package/dist/packages/server/commands/index.js.map +1 -0
  51. package/dist/packages/server/commands/module.d.ts +6 -0
  52. package/dist/packages/server/commands/module.d.ts.map +1 -0
  53. package/dist/packages/server/commands/module.js +52 -0
  54. package/dist/packages/server/commands/module.js.map +1 -0
  55. package/dist/packages/server/commands/reset.d.ts +5 -0
  56. package/dist/packages/server/commands/reset.d.ts.map +1 -0
  57. package/dist/packages/server/commands/reset.js +36 -0
  58. package/dist/packages/server/commands/reset.js.map +1 -0
  59. package/dist/packages/server/commands/start.d.ts +3 -0
  60. package/dist/packages/server/commands/start.d.ts.map +1 -0
  61. package/dist/packages/server/commands/start.js +35 -0
  62. package/dist/packages/server/commands/start.js.map +1 -0
  63. package/dist/packages/server/commands/utils.d.ts +4 -0
  64. package/dist/packages/server/commands/utils.d.ts.map +1 -0
  65. package/dist/packages/server/commands/utils.js +27 -0
  66. package/dist/packages/server/commands/utils.js.map +1 -0
  67. package/dist/packages/server/constants.d.ts +5 -0
  68. package/dist/packages/server/constants.d.ts.map +1 -0
  69. package/dist/packages/server/constants.js +15 -0
  70. package/dist/packages/server/constants.js.map +1 -0
  71. package/dist/packages/server/index.d.ts +3 -0
  72. package/dist/packages/server/index.d.ts.map +1 -0
  73. package/dist/packages/server/index.js +25 -0
  74. package/dist/packages/server/index.js.map +1 -0
  75. package/dist/packages/type.d.ts +5 -0
  76. package/dist/packages/type.d.ts.map +1 -0
  77. package/dist/packages/type.js +9 -0
  78. package/dist/packages/type.js.map +1 -0
  79. package/dist/packages/ui/commands/index.d.ts +3 -0
  80. package/dist/packages/ui/commands/index.d.ts.map +1 -0
  81. package/dist/packages/ui/commands/index.js +25 -0
  82. package/dist/packages/ui/commands/index.js.map +1 -0
  83. package/dist/packages/ui/commands/module.d.ts +6 -0
  84. package/dist/packages/ui/commands/module.d.ts.map +1 -0
  85. package/dist/packages/ui/commands/module.js +41 -0
  86. package/dist/packages/ui/commands/module.js.map +1 -0
  87. package/dist/packages/ui/commands/start.d.ts +11 -0
  88. package/dist/packages/ui/commands/start.d.ts.map +1 -0
  89. package/dist/packages/ui/commands/start.js +58 -0
  90. package/dist/packages/ui/commands/start.js.map +1 -0
  91. package/dist/packages/ui/config/index.d.ts +3 -0
  92. package/dist/packages/ui/config/index.d.ts.map +1 -0
  93. package/dist/packages/ui/config/index.js +25 -0
  94. package/dist/packages/ui/config/index.js.map +1 -0
  95. package/dist/packages/ui/config/module.d.ts +4 -0
  96. package/dist/packages/ui/config/module.d.ts.map +1 -0
  97. package/dist/packages/ui/config/module.js +22 -0
  98. package/dist/packages/ui/config/module.js.map +1 -0
  99. package/dist/packages/ui/config/validate.d.ts +3 -0
  100. package/dist/packages/ui/config/validate.d.ts.map +1 -0
  101. package/dist/packages/ui/config/validate.js +23 -0
  102. package/dist/packages/ui/config/validate.js.map +1 -0
  103. package/dist/packages/ui/constants.d.ts +4 -0
  104. package/dist/packages/ui/constants.d.ts.map +1 -0
  105. package/dist/packages/ui/constants.js +14 -0
  106. package/dist/packages/ui/constants.js.map +1 -0
  107. package/dist/packages/ui/index.d.ts +5 -0
  108. package/dist/packages/ui/index.d.ts.map +1 -0
  109. package/dist/packages/ui/index.js +27 -0
  110. package/dist/packages/ui/index.js.map +1 -0
  111. package/dist/packages/ui/type.d.ts +7 -0
  112. package/dist/packages/ui/type.d.ts.map +1 -0
  113. package/dist/packages/ui/type.js +9 -0
  114. package/dist/packages/ui/type.js.map +1 -0
  115. package/dist/utils/index.d.ts +4 -0
  116. package/dist/utils/index.d.ts.map +1 -0
  117. package/dist/utils/index.js +26 -0
  118. package/dist/utils/index.js.map +1 -0
  119. package/dist/utils/line-breaks.d.ts +2 -0
  120. package/dist/utils/line-breaks.d.ts.map +1 -0
  121. package/dist/utils/line-breaks.js +14 -0
  122. package/dist/utils/line-breaks.js.map +1 -0
  123. package/dist/utils/process-output.d.ts +2 -0
  124. package/dist/utils/process-output.d.ts.map +1 -0
  125. package/dist/utils/process-output.js +37 -0
  126. package/dist/utils/process-output.js.map +1 -0
  127. package/dist/utils/stringify-object-args.d.ts +2 -0
  128. package/dist/utils/stringify-object-args.d.ts.map +1 -0
  129. package/dist/utils/stringify-object-args.js +19 -0
  130. package/dist/utils/stringify-object-args.js.map +1 -0
  131. package/package.json +47 -9
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./module"), exports);
24
+ __exportStar(require("./reset"), exports);
25
+ __exportStar(require("./start"), exports);
26
+ __exportStar(require("./utils"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packages/server/commands/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ import { ChildProcess } from 'child_process';
3
+ import { CommandExecutionContext } from '../../type';
4
+ import { ServerCommand } from '../constants';
5
+ export declare function executeServerCommand(command: `${ServerCommand}`, ctx?: CommandExecutionContext): Promise<ChildProcess>;
6
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/packages/server/commands/module.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAQ,MAAM,eAAe,CAAC;AAMnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,GAAG,aAAa,EAAE,EAC3B,GAAG,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC,YAAY,CAAC,CAuBxB"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022-2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
+ return new (P || (P = Promise))(function (resolve, reject) {
11
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
15
+ });
16
+ };
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.executeServerCommand = void 0;
22
+ const child_process_1 = require("child_process");
23
+ const consola_1 = __importDefault(require("consola"));
24
+ const path_1 = __importDefault(require("path"));
25
+ const process_1 = __importDefault(require("process"));
26
+ const resolve_package_path_1 = __importDefault(require("resolve-package-path"));
27
+ const utils_1 = require("../../../utils");
28
+ function executeServerCommand(command, ctx) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ ctx = ctx || {};
31
+ ctx.env = ctx.env || {};
32
+ ctx.args = ctx.args || {};
33
+ return new Promise((resolve, reject) => {
34
+ const modulePath = (0, resolve_package_path_1.default)('@authup/server', process_1.default.cwd());
35
+ const directory = path_1.default.dirname(modulePath);
36
+ const outputPath = path_1.default.join(directory, 'dist', 'cli', 'index.js');
37
+ const childProcess = (0, child_process_1.exec)(`node ${outputPath} ${command} ${(0, utils_1.stringifyObjectArgs)(ctx.args)}`, {
38
+ env: ctx.env,
39
+ });
40
+ childProcess.on('spawn', () => {
41
+ resolve(childProcess);
42
+ });
43
+ childProcess.stderr.setEncoding('utf-8');
44
+ childProcess.stderr.on('data', (data) => {
45
+ consola_1.default.warn(data);
46
+ reject(data);
47
+ });
48
+ });
49
+ });
50
+ }
51
+ exports.executeServerCommand = executeServerCommand;
52
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/packages/server/commands/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;AAEH,iDAAmD;AACnD,sDAA8B;AAC9B,gDAAwB;AACxB,sDAA8B;AAC9B,gFAAsD;AACtD,0CAAqD;AAIrD,SAAsB,oBAAoB,CACtC,OAA2B,EAC3B,GAA6B;;QAE7B,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;QAChB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACjD,MAAM,UAAU,GAAG,IAAA,8BAAkB,EAAC,gBAAgB,EAAE,iBAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YACvE,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAE3C,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;YACnE,MAAM,YAAY,GAAG,IAAA,oBAAI,EAAC,QAAQ,UAAU,IAAI,OAAO,IAAI,IAAA,2BAAmB,EAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE;gBACxF,GAAG,EAAE,GAAG,CAAC,GAAG;aACf,CAAC,CAAC;YACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;YAEH,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACzC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACpC,iBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AA1BD,oDA0BC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import { ChildProcess } from 'child_process';
3
+ import { CommandExecutionContext } from '../../type';
4
+ export declare function resetServer(ctx?: CommandExecutionContext): Promise<ChildProcess>;
5
+ //# sourceMappingURL=reset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../src/packages/server/commands/reset.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAKrD,wBAAsB,WAAW,CAAC,GAAG,CAAC,EAAE,uBAAuB,GAAI,OAAO,CAAC,YAAY,CAAC,CAQvF"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
+ return new (P || (P = Promise))(function (resolve, reject) {
11
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
15
+ });
16
+ };
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.resetServer = void 0;
22
+ const consola_1 = __importDefault(require("consola"));
23
+ const constants_1 = require("../constants");
24
+ const module_1 = require("./module");
25
+ const utils_1 = require("./utils");
26
+ function resetServer(ctx) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ consola_1.default.info('Server: Cleanup configuration, database, ...');
29
+ const childProcess = yield (0, module_1.executeServerCommand)(constants_1.ServerCommand.RESET, ctx);
30
+ consola_1.default.success('Server: Cleaned up');
31
+ (0, utils_1.handleServerCommandOutput)(childProcess);
32
+ return childProcess;
33
+ });
34
+ }
35
+ exports.resetServer = resetServer;
36
+ //# sourceMappingURL=reset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../../src/packages/server/commands/reset.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;AAEH,sDAA8B;AAG9B,4CAA6C;AAC7C,qCAAgD;AAChD,mCAAoD;AAEpD,SAAsB,WAAW,CAAC,GAA6B;;QAC3D,iBAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;QAC7D,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAoB,EAAC,yBAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1E,iBAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAEtC,IAAA,iCAAyB,EAAC,YAAY,CAAC,CAAC;QAExC,OAAO,YAAY,CAAC;IACxB,CAAC;CAAA;AARD,kCAQC"}
@@ -0,0 +1,3 @@
1
+ import { CommandExecutionContext } from '../../type';
2
+ export declare function startServer(ctx?: CommandExecutionContext): Promise<void>;
3
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../../src/packages/server/commands/start.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAKrD,wBAAsB,WAAW,CAAC,GAAG,CAAC,EAAE,uBAAuB,iBAM9D"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
+ return new (P || (P = Promise))(function (resolve, reject) {
11
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
15
+ });
16
+ };
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.startServer = void 0;
22
+ const consola_1 = __importDefault(require("consola"));
23
+ const constants_1 = require("../constants");
24
+ const module_1 = require("./module");
25
+ const utils_1 = require("./utils");
26
+ function startServer(ctx) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ consola_1.default.info('Server: Starting...');
29
+ const childProcess = yield (0, module_1.executeServerCommand)(constants_1.ServerCommand.START, ctx);
30
+ consola_1.default.success('Server: Started');
31
+ (0, utils_1.handleServerCommandOutput)(childProcess);
32
+ });
33
+ }
34
+ exports.startServer = startServer;
35
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../src/packages/server/commands/start.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;AAEH,sDAA8B;AAE9B,4CAA6C;AAC7C,qCAAgD;AAChD,mCAAoD;AAEpD,SAAsB,WAAW,CAAC,GAA6B;;QAC3D,iBAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACpC,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAoB,EAAC,yBAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1E,iBAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAEnC,IAAA,iCAAyB,EAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;CAAA;AAND,kCAMC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ import { ChildProcess } from 'child_process';
3
+ export declare function handleServerCommandOutput(childProcess: ChildProcess): void;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/packages/server/commands/utils.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,QAWnE"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.handleServerCommandOutput = void 0;
13
+ const consola_1 = __importDefault(require("consola"));
14
+ const utils_1 = require("../../../utils");
15
+ function handleServerCommandOutput(childProcess) {
16
+ childProcess.stdout.on('data', (data) => {
17
+ if (typeof data !== 'string' || data.length === 0) {
18
+ return;
19
+ }
20
+ const lines = (0, utils_1.parseProcessOutputData)(data);
21
+ for (let i = 0; i < lines.length; i++) {
22
+ consola_1.default.info(`Server: ${lines[i]}`);
23
+ }
24
+ });
25
+ }
26
+ exports.handleServerCommandOutput = handleServerCommandOutput;
27
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/packages/server/commands/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,sDAA8B;AAC9B,0CAAwD;AAExD,SAAgB,yBAAyB,CAAC,YAA0B;IAChE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACpC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC/C,OAAO;SACV;QAED,MAAM,KAAK,GAAG,IAAA,8BAAsB,EAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,iBAAO,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACvC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAXD,8DAWC"}
@@ -0,0 +1,5 @@
1
+ export declare enum ServerCommand {
2
+ START = "start",
3
+ RESET = "reset"
4
+ }
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/packages/server/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;CAClB"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ServerCommand = void 0;
10
+ var ServerCommand;
11
+ (function (ServerCommand) {
12
+ ServerCommand["START"] = "start";
13
+ ServerCommand["RESET"] = "reset";
14
+ })(ServerCommand = exports.ServerCommand || (exports.ServerCommand = {}));
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/packages/server/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,gCAAe,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
@@ -0,0 +1,3 @@
1
+ export * from './commands';
2
+ export * from './constants';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/server/index.ts"],"names":[],"mappings":"AAOA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./commands"), exports);
24
+ __exportStar(require("./constants"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packages/server/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,8CAA4B"}
@@ -0,0 +1,5 @@
1
+ export type CommandExecutionContext<ENV extends Record<string, any> = Record<string, any>, ARGS extends Record<string, any> = Record<string, any>> = {
2
+ env?: ENV;
3
+ args?: ARGS;
4
+ };
5
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/packages/type.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,uBAAuB,CAC/B,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACtD;IACA,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE,IAAI,CAAA;CACd,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/packages/type.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,3 @@
1
+ export * from './module';
2
+ export * from './start';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/commands/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./module"), exports);
24
+ __exportStar(require("./start"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packages/ui/commands/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ import { ChildProcess } from 'child_process';
3
+ import { CommandExecutionContext } from '../../type';
4
+ import { UICommand } from '../constants';
5
+ export declare function executeUICommand(command: `${UICommand}`, ctx?: CommandExecutionContext): Promise<ChildProcess>;
6
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/commands/module.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAQ,MAAM,eAAe,CAAC;AAMnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,GAAG,SAAS,EAAE,EACvB,GAAG,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC,YAAY,CAAC,CA0BxB"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022-2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.executeUICommand = void 0;
13
+ const child_process_1 = require("child_process");
14
+ const consola_1 = __importDefault(require("consola"));
15
+ const path_1 = __importDefault(require("path"));
16
+ const process_1 = __importDefault(require("process"));
17
+ const resolve_package_path_1 = __importDefault(require("resolve-package-path"));
18
+ const utils_1 = require("../../../utils");
19
+ function executeUICommand(command, ctx) {
20
+ ctx = ctx || {};
21
+ ctx.env = ctx.env || {};
22
+ ctx.args = ctx.args || {};
23
+ return new Promise((resolve, reject) => {
24
+ const modulePath = (0, resolve_package_path_1.default)('@authup/ui', process_1.default.cwd());
25
+ const directory = path_1.default.dirname(modulePath);
26
+ const outputPath = path_1.default.join(directory, '.output', 'server', 'index.mjs');
27
+ const childProcess = (0, child_process_1.exec)(`node ${outputPath} ${(0, utils_1.stringifyObjectArgs)(ctx.args)}`, {
28
+ env: Object.assign(Object.assign({}, process_1.default.env), ctx.env),
29
+ });
30
+ childProcess.on('spawn', () => {
31
+ resolve(childProcess);
32
+ });
33
+ childProcess.stderr.setEncoding('utf-8');
34
+ childProcess.stderr.on('data', (data) => {
35
+ consola_1.default.warn(data);
36
+ reject(data);
37
+ });
38
+ });
39
+ }
40
+ exports.executeUICommand = executeUICommand;
41
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/packages/ui/commands/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,iDAAmD;AACnD,sDAA8B;AAC9B,gDAAwB;AACxB,sDAA8B;AAC9B,gFAAsD;AACtD,0CAAqD;AAIrD,SAAgB,gBAAgB,CAC5B,OAAuB,EACvB,GAA6B;IAE7B,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;IAChB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;IACxB,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;IAE1B,OAAO,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjD,MAAM,UAAU,GAAG,IAAA,8BAAkB,EAAC,YAAY,EAAE,iBAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnE,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;QAC1E,MAAM,YAAY,GAAG,IAAA,oBAAI,EAAC,QAAQ,UAAU,IAAI,IAAA,2BAAmB,EAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE;YAC7E,GAAG,EAAE,gCACE,iBAAO,CAAC,GAAG,GACX,GAAG,CAAC,GAAG,CACU;SAC3B,CAAC,CAAC;QACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACpC,iBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AA7BD,4CA6BC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="node" />
2
+ import { ChildProcess } from 'child_process';
3
+ import { CommandExecutionContext } from '../../type';
4
+ type Env = {
5
+ port?: number;
6
+ host?: string;
7
+ apiUrl?: string;
8
+ };
9
+ export declare function startUI(ctx?: CommandExecutionContext<Env>): Promise<ChildProcess>;
10
+ export {};
11
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/commands/start.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAIrD,KAAK,GAAG,GAAG;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AACF,wBAAsB,OAAO,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC,GAAG,CAAC,GAAI,OAAO,CAAC,YAAY,CAAC,CAgCxF"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
+ return new (P || (P = Promise))(function (resolve, reject) {
11
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
15
+ });
16
+ };
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.startUI = void 0;
22
+ const consola_1 = __importDefault(require("consola"));
23
+ const utils_1 = require("../../../utils");
24
+ const constants_1 = require("../constants");
25
+ const module_1 = require("./module");
26
+ function startUI(ctx) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ ctx = ctx || {};
29
+ ctx.env = ctx.env || {};
30
+ const env = {};
31
+ if (ctx.env.port) {
32
+ env.PORT = ctx.env.port;
33
+ }
34
+ if (ctx.env.host) {
35
+ env.HOST = ctx.env.host;
36
+ }
37
+ if (ctx.env.apiUrl) {
38
+ env.NUXT_PUBLIC_API_URL = ctx.env.apiUrl;
39
+ }
40
+ consola_1.default.info('UI: Starting...');
41
+ const childProcess = yield (0, module_1.executeUICommand)(constants_1.UICommand.START, {
42
+ env,
43
+ });
44
+ consola_1.default.success('UI: Started');
45
+ childProcess.stdout.on('data', (data) => {
46
+ if (typeof data !== 'string' || data.length === 0) {
47
+ return;
48
+ }
49
+ const lines = (0, utils_1.parseProcessOutputData)(data);
50
+ for (let i = 0; i < lines.length; i++) {
51
+ consola_1.default.info(`UI: ${lines[i]}`);
52
+ }
53
+ });
54
+ return childProcess;
55
+ });
56
+ }
57
+ exports.startUI = startUI;
58
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../src/packages/ui/commands/start.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;AAEH,sDAA8B;AAE9B,0CAAwD;AAExD,4CAAyC;AACzC,qCAA4C;AAS5C,SAAsB,OAAO,CAAC,GAAkC;;QAC5D,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;QAChB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;QAExB,MAAM,GAAG,GAAyB,EAAE,CAAC;QACrC,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;YACd,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;SAC3B;QACD,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;YACd,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;SAC3B;QACD,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE;YAChB,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;SAC5C;QAED,iBAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAChC,MAAM,YAAY,GAAG,MAAM,IAAA,yBAAgB,EAAC,qBAAS,CAAC,KAAK,EAAE;YACzD,GAAG;SACN,CAAC,CAAC;QACH,iBAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC/B,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACpC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC/C,OAAO;aACV;YAED,MAAM,KAAK,GAAG,IAAA,8BAAsB,EAAC,IAAI,CAAC,CAAC;YAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACnC,iBAAO,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aACnC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;IACxB,CAAC;CAAA;AAhCD,0BAgCC"}
@@ -0,0 +1,3 @@
1
+ export * from './module';
2
+ export * from './validate';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/config/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./module"), exports);
24
+ __exportStar(require("./validate"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packages/ui/config/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,6CAA2B"}
@@ -0,0 +1,4 @@
1
+ import { UIOptions, UIOptionsInput } from '../type';
2
+ export declare function applyUiConfig(input: UIOptionsInput): UIOptions;
3
+ export declare function extendUiConfig(input: UIOptionsInput): UIOptions;
4
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/config/module.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGpD,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAI,SAAS,CAE/D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAI,SAAS,CAKhE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022-2022.
4
+ * Author Peter Placzek (tada5hi)
5
+ * For the full copyright and license information,
6
+ * view the LICENSE file that was distributed with this source code.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.extendUiConfig = exports.applyUiConfig = void 0;
10
+ const validate_1 = require("./validate");
11
+ function applyUiConfig(input) {
12
+ return extendUiConfig((0, validate_1.validateUiConfig)(input));
13
+ }
14
+ exports.applyUiConfig = applyUiConfig;
15
+ function extendUiConfig(input) {
16
+ return {
17
+ port: input.port || 3000,
18
+ host: input.host || '0.0.0.0',
19
+ };
20
+ }
21
+ exports.extendUiConfig = extendUiConfig;
22
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/packages/ui/config/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,yCAA8C;AAE9C,SAAgB,aAAa,CAAC,KAAqB;IAC/C,OAAO,cAAc,CAAC,IAAA,2BAAgB,EAAC,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;AAFD,sCAEC;AAED,SAAgB,cAAc,CAAC,KAAqB;IAChD,OAAO;QACH,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS;KAChC,CAAC;AACN,CAAC;AALD,wCAKC"}
@@ -0,0 +1,3 @@
1
+ import { UIOptionsInput } from '../type';
2
+ export declare function validateUiConfig(input: UIOptionsInput): UIOptionsInput;
3
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/packages/ui/config/validate.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQzC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAI,cAAc,CAEvE"}