authup 0.17.1 → 0.18.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.
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +26 -26
- package/dist/commands/info.d.ts +2 -2
- package/dist/commands/info.js +31 -31
- package/dist/commands/server.d.ts +2 -2
- package/dist/commands/server.js +45 -45
- package/dist/commands/start.d.ts +2 -2
- package/dist/commands/start.js +43 -43
- package/dist/commands/ui.d.ts +2 -2
- package/dist/commands/ui.js +41 -41
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +24 -24
- package/dist/config/module.d.ts +2 -2
- package/dist/config/module.js +27 -27
- package/dist/config/read.d.ts +2 -2
- package/dist/config/read.js +28 -28
- package/dist/config/type.d.ts +10 -10
- package/dist/config/type.js +8 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -21
- package/dist/packages/index.d.ts +3 -3
- package/dist/packages/index.js +25 -25
- package/dist/packages/server/commands/index.d.ts +4 -4
- package/dist/packages/server/commands/index.js +26 -26
- package/dist/packages/server/commands/module.d.ts +5 -5
- package/dist/packages/server/commands/module.js +45 -45
- package/dist/packages/server/commands/reset.d.ts +4 -4
- package/dist/packages/server/commands/reset.js +24 -24
- package/dist/packages/server/commands/start.d.ts +2 -2
- package/dist/packages/server/commands/start.js +23 -23
- package/dist/packages/server/commands/utils.d.ts +3 -3
- package/dist/packages/server/commands/utils.js +26 -26
- package/dist/packages/server/constants.d.ts +4 -4
- package/dist/packages/server/constants.js +14 -14
- package/dist/packages/server/index.d.ts +2 -2
- package/dist/packages/server/index.js +24 -24
- package/dist/packages/type.d.ts +4 -4
- package/dist/packages/type.js +8 -8
- package/dist/packages/ui/commands/index.d.ts +2 -2
- package/dist/packages/ui/commands/index.js +24 -24
- package/dist/packages/ui/commands/module.d.ts +5 -5
- package/dist/packages/ui/commands/module.js +48 -48
- package/dist/packages/ui/commands/start.d.ts +10 -10
- package/dist/packages/ui/commands/start.js +46 -46
- package/dist/packages/ui/config/index.d.ts +2 -2
- package/dist/packages/ui/config/index.js +24 -24
- package/dist/packages/ui/config/module.d.ts +3 -3
- package/dist/packages/ui/config/module.js +21 -21
- package/dist/packages/ui/config/validate.d.ts +2 -2
- package/dist/packages/ui/config/validate.js +22 -22
- package/dist/packages/ui/constants.d.ts +3 -3
- package/dist/packages/ui/constants.js +13 -13
- package/dist/packages/ui/index.d.ts +4 -4
- package/dist/packages/ui/index.js +26 -26
- package/dist/packages/ui/type.d.ts +6 -6
- package/dist/packages/ui/type.js +8 -8
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.js +26 -26
- package/dist/utils/line-breaks.d.ts +1 -1
- package/dist/utils/line-breaks.js +13 -13
- package/dist/utils/path.d.ts +1 -1
- package/dist/utils/path.js +17 -17
- package/dist/utils/process-output.d.ts +1 -1
- package/dist/utils/process-output.js +41 -41
- package/dist/utils/stringify-object-args.d.ts +1 -1
- package/dist/utils/stringify-object-args.js +18 -18
- package/package.json +6 -6
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './info';
|
|
2
|
-
export * from './server';
|
|
3
|
-
export * from './start';
|
|
4
|
-
export * from './ui';
|
|
1
|
+
export * from './info';
|
|
2
|
+
export * from './server';
|
|
3
|
+
export * from './start';
|
|
4
|
+
export * from './ui';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/commands/index.js
CHANGED
|
@@ -1,27 +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("./info"), exports);
|
|
24
|
-
__exportStar(require("./server"), exports);
|
|
25
|
-
__exportStar(require("./start"), exports);
|
|
26
|
-
__exportStar(require("./ui"), exports);
|
|
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("./info"), exports);
|
|
24
|
+
__exportStar(require("./server"), exports);
|
|
25
|
+
__exportStar(require("./start"), exports);
|
|
26
|
+
__exportStar(require("./ui"), exports);
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/dist/commands/info.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CAC } from 'cac';
|
|
2
|
-
export declare function buildInfoCommand(cac: CAC): void;
|
|
1
|
+
import type { CAC } from 'cac';
|
|
2
|
+
export declare function buildInfoCommand(cac: CAC): void;
|
|
3
3
|
//# sourceMappingURL=info.d.ts.map
|
package/dist/commands/info.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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.buildInfoCommand = void 0;
|
|
13
|
-
const consola_1 = __importDefault(require("consola"));
|
|
14
|
-
const config_1 = require("../config");
|
|
15
|
-
function buildInfoCommand(cac) {
|
|
16
|
-
cac.command('info', 'Get information about the configuration.')
|
|
17
|
-
.action(async () => {
|
|
18
|
-
const config = await (0, config_1.createConfig)();
|
|
19
|
-
consola_1.default.info(`Environment: ${config.server.base.env}`);
|
|
20
|
-
consola_1.default.info(`RootPath: ${config.server.base.rootPath}`);
|
|
21
|
-
consola_1.default.info(`WritableDirectoryPath: ${config.server.base.writableDirectoryPath}`);
|
|
22
|
-
consola_1.default.info(`UI Host: ${config.ui.host}`);
|
|
23
|
-
consola_1.default.info(`UI Port: ${config.ui.port}`);
|
|
24
|
-
consola_1.default.info(`Server Host: ${config.server.http.host}`);
|
|
25
|
-
consola_1.default.info(`Server Port: ${config.server.http.port}`);
|
|
26
|
-
consola_1.default.info('Report an issue: https://github.com/tada5hi/authup/issues/new');
|
|
27
|
-
consola_1.default.info('Suggest an improvement: https://github.com/tada5hi/authup/discussions/new');
|
|
28
|
-
consola_1.default.info('Read documentation: https://authup.org');
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
exports.buildInfoCommand = buildInfoCommand;
|
|
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.buildInfoCommand = void 0;
|
|
13
|
+
const consola_1 = __importDefault(require("consola"));
|
|
14
|
+
const config_1 = require("../config");
|
|
15
|
+
function buildInfoCommand(cac) {
|
|
16
|
+
cac.command('info', 'Get information about the configuration.')
|
|
17
|
+
.action(async () => {
|
|
18
|
+
const config = await (0, config_1.createConfig)();
|
|
19
|
+
consola_1.default.info(`Environment: ${config.server.base.env}`);
|
|
20
|
+
consola_1.default.info(`RootPath: ${config.server.base.rootPath}`);
|
|
21
|
+
consola_1.default.info(`WritableDirectoryPath: ${config.server.base.writableDirectoryPath}`);
|
|
22
|
+
consola_1.default.info(`UI Host: ${config.ui.host}`);
|
|
23
|
+
consola_1.default.info(`UI Port: ${config.ui.port}`);
|
|
24
|
+
consola_1.default.info(`Server Host: ${config.server.http.host}`);
|
|
25
|
+
consola_1.default.info(`Server Port: ${config.server.http.port}`);
|
|
26
|
+
consola_1.default.info('Report an issue: https://github.com/tada5hi/authup/issues/new');
|
|
27
|
+
consola_1.default.info('Suggest an improvement: https://github.com/tada5hi/authup/discussions/new');
|
|
28
|
+
consola_1.default.info('Read documentation: https://authup.org');
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.buildInfoCommand = buildInfoCommand;
|
|
32
32
|
//# sourceMappingURL=info.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CAC } from 'cac';
|
|
2
|
-
export declare function buildServerCommand(cac: CAC): void;
|
|
1
|
+
import type { CAC } from 'cac';
|
|
2
|
+
export declare function buildServerCommand(cac: CAC): void;
|
|
3
3
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/commands/server.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
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.buildServerCommand = void 0;
|
|
13
|
-
const consola_1 = __importDefault(require("consola"));
|
|
14
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
15
|
-
const process_1 = __importDefault(require("process"));
|
|
16
|
-
const packages_1 = require("../packages");
|
|
17
|
-
function buildServerCommand(cac) {
|
|
18
|
-
cac.command('server <cmd>', 'Run a specific command.')
|
|
19
|
-
.action(async (command) => {
|
|
20
|
-
const root = process_1.default.cwd();
|
|
21
|
-
switch (command) {
|
|
22
|
-
case packages_1.ServerCommand.START: {
|
|
23
|
-
await (0, packages_1.startServer)({
|
|
24
|
-
args: {
|
|
25
|
-
root,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
case packages_1.ServerCommand.RESET: {
|
|
31
|
-
await (0, packages_1.resetServer)({
|
|
32
|
-
args: {
|
|
33
|
-
root,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
default: {
|
|
39
|
-
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
exports.buildServerCommand = buildServerCommand;
|
|
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.buildServerCommand = void 0;
|
|
13
|
+
const consola_1 = __importDefault(require("consola"));
|
|
14
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
15
|
+
const process_1 = __importDefault(require("process"));
|
|
16
|
+
const packages_1 = require("../packages");
|
|
17
|
+
function buildServerCommand(cac) {
|
|
18
|
+
cac.command('server <cmd>', 'Run a specific command.')
|
|
19
|
+
.action(async (command) => {
|
|
20
|
+
const root = process_1.default.cwd();
|
|
21
|
+
switch (command) {
|
|
22
|
+
case packages_1.ServerCommand.START: {
|
|
23
|
+
await (0, packages_1.startServer)({
|
|
24
|
+
args: {
|
|
25
|
+
root,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
case packages_1.ServerCommand.RESET: {
|
|
31
|
+
await (0, packages_1.resetServer)({
|
|
32
|
+
args: {
|
|
33
|
+
root,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
default: {
|
|
39
|
+
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
exports.buildServerCommand = buildServerCommand;
|
|
46
46
|
//# sourceMappingURL=server.js.map
|
package/dist/commands/start.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CAC } from 'cac';
|
|
2
|
-
export declare function buildStartCommand(cac: CAC): void;
|
|
1
|
+
import type { CAC } from 'cac';
|
|
2
|
+
export declare function buildStartCommand(cac: CAC): void;
|
|
3
3
|
//# sourceMappingURL=start.d.ts.map
|
package/dist/commands/start.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
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.buildStartCommand = void 0;
|
|
13
|
-
const process_1 = __importDefault(require("process"));
|
|
14
|
-
const config_1 = require("../config");
|
|
15
|
-
const packages_1 = require("../packages");
|
|
16
|
-
function buildStartCommand(cac) {
|
|
17
|
-
cac
|
|
18
|
-
.command('start [...services]', 'Start one or many services.')
|
|
19
|
-
.action(async (services) => {
|
|
20
|
-
if (services.length === 0) {
|
|
21
|
-
services = ['server', 'ui'];
|
|
22
|
-
}
|
|
23
|
-
const config = await (0, config_1.createConfig)();
|
|
24
|
-
const root = process_1.default.cwd();
|
|
25
|
-
if (services.indexOf('server') !== -1) {
|
|
26
|
-
await (0, packages_1.startServer)({
|
|
27
|
-
env: {
|
|
28
|
-
root,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
if (services.indexOf('ui') !== -1) {
|
|
33
|
-
await (0, packages_1.startUI)({
|
|
34
|
-
env: {
|
|
35
|
-
port: config.ui.port,
|
|
36
|
-
host: config.ui.host,
|
|
37
|
-
apiUrl: config.server.http.publicUrl,
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
exports.buildStartCommand = buildStartCommand;
|
|
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.buildStartCommand = void 0;
|
|
13
|
+
const process_1 = __importDefault(require("process"));
|
|
14
|
+
const config_1 = require("../config");
|
|
15
|
+
const packages_1 = require("../packages");
|
|
16
|
+
function buildStartCommand(cac) {
|
|
17
|
+
cac
|
|
18
|
+
.command('start [...services]', 'Start one or many services.')
|
|
19
|
+
.action(async (services) => {
|
|
20
|
+
if (services.length === 0) {
|
|
21
|
+
services = ['server', 'ui'];
|
|
22
|
+
}
|
|
23
|
+
const config = await (0, config_1.createConfig)();
|
|
24
|
+
const root = process_1.default.cwd();
|
|
25
|
+
if (services.indexOf('server') !== -1) {
|
|
26
|
+
await (0, packages_1.startServer)({
|
|
27
|
+
env: {
|
|
28
|
+
root,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (services.indexOf('ui') !== -1) {
|
|
33
|
+
await (0, packages_1.startUI)({
|
|
34
|
+
env: {
|
|
35
|
+
port: config.ui.port,
|
|
36
|
+
host: config.ui.host,
|
|
37
|
+
apiUrl: config.server.http.publicUrl,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.buildStartCommand = buildStartCommand;
|
|
44
44
|
//# sourceMappingURL=start.js.map
|
package/dist/commands/ui.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CAC } from 'cac';
|
|
2
|
-
export declare function buildUiCommand(cac: CAC): void;
|
|
1
|
+
import type { CAC } from 'cac';
|
|
2
|
+
export declare function buildUiCommand(cac: CAC): void;
|
|
3
3
|
//# sourceMappingURL=ui.d.ts.map
|
package/dist/commands/ui.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
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.buildUiCommand = void 0;
|
|
13
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
-
const consola_1 = __importDefault(require("consola"));
|
|
15
|
-
const config_1 = require("../config");
|
|
16
|
-
const packages_1 = require("../packages");
|
|
17
|
-
function buildUiCommand(cac) {
|
|
18
|
-
cac
|
|
19
|
-
.command('ui <cmd>', 'Run a specific command')
|
|
20
|
-
.option('-p, --port [port]', 'Specify the port for starting the application')
|
|
21
|
-
.option('-h, --host [host]', 'Specify the host for starting a specific application')
|
|
22
|
-
.action(async (command, ctx) => {
|
|
23
|
-
const config = await (0, config_1.createConfig)();
|
|
24
|
-
switch (command) {
|
|
25
|
-
case packages_1.UICommand.START: {
|
|
26
|
-
await (0, packages_1.startUI)({
|
|
27
|
-
env: {
|
|
28
|
-
port: ctx.port || config.ui.port,
|
|
29
|
-
host: ctx.host || config.ui.host,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
default: {
|
|
35
|
-
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
exports.buildUiCommand = buildUiCommand;
|
|
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.buildUiCommand = void 0;
|
|
13
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
+
const consola_1 = __importDefault(require("consola"));
|
|
15
|
+
const config_1 = require("../config");
|
|
16
|
+
const packages_1 = require("../packages");
|
|
17
|
+
function buildUiCommand(cac) {
|
|
18
|
+
cac
|
|
19
|
+
.command('ui <cmd>', 'Run a specific command')
|
|
20
|
+
.option('-p, --port [port]', 'Specify the port for starting the application')
|
|
21
|
+
.option('-h, --host [host]', 'Specify the host for starting a specific application')
|
|
22
|
+
.action(async (command, ctx) => {
|
|
23
|
+
const config = await (0, config_1.createConfig)();
|
|
24
|
+
switch (command) {
|
|
25
|
+
case packages_1.UICommand.START: {
|
|
26
|
+
await (0, packages_1.startUI)({
|
|
27
|
+
env: {
|
|
28
|
+
port: ctx.port || config.ui.port,
|
|
29
|
+
host: ctx.host || config.ui.host,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
default: {
|
|
35
|
+
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
exports.buildUiCommand = buildUiCommand;
|
|
42
42
|
//# sourceMappingURL=ui.js.map
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './module';
|
|
2
|
-
export * from './type';
|
|
1
|
+
export * from './module';
|
|
2
|
+
export * from './type';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/config/index.js
CHANGED
|
@@ -1,25 +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("./type"), exports);
|
|
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("./type"), exports);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/dist/config/module.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Options } from './type';
|
|
2
|
-
export declare function createConfig(): Promise<Options>;
|
|
1
|
+
import type { Options } from './type';
|
|
2
|
+
export declare function createConfig(): Promise<Options>;
|
|
3
3
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/config/module.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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.createConfig = void 0;
|
|
10
|
-
const common_1 = require("@authup/common");
|
|
11
|
-
const server_1 = require("@authup/server");
|
|
12
|
-
const packages_1 = require("../packages");
|
|
13
|
-
const read_1 = require("./read");
|
|
14
|
-
async function createConfig() {
|
|
15
|
-
const global = await (0, read_1.readConfig)();
|
|
16
|
-
const server = (0, server_1.setOptions)(global.server || {});
|
|
17
|
-
const ui = (0, packages_1.validateUiConfig)(global.ui || {});
|
|
18
|
-
if (typeof ui.apiUrl === 'undefined' &&
|
|
19
|
-
server.http.publicUrl) {
|
|
20
|
-
ui.apiUrl = (0, common_1.makeURLPublicAccessible)(server.http.publicUrl);
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
server,
|
|
24
|
-
ui: (0, packages_1.extendUiConfig)(ui),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
exports.createConfig = createConfig;
|
|
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.createConfig = void 0;
|
|
10
|
+
const common_1 = require("@authup/common");
|
|
11
|
+
const server_1 = require("@authup/server");
|
|
12
|
+
const packages_1 = require("../packages");
|
|
13
|
+
const read_1 = require("./read");
|
|
14
|
+
async function createConfig() {
|
|
15
|
+
const global = await (0, read_1.readConfig)();
|
|
16
|
+
const server = (0, server_1.setOptions)(global.server || {});
|
|
17
|
+
const ui = (0, packages_1.validateUiConfig)(global.ui || {});
|
|
18
|
+
if (typeof ui.apiUrl === 'undefined' &&
|
|
19
|
+
server.http.publicUrl) {
|
|
20
|
+
ui.apiUrl = (0, common_1.makeURLPublicAccessible)(server.http.publicUrl);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
server,
|
|
24
|
+
ui: (0, packages_1.extendUiConfig)(ui),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.createConfig = createConfig;
|
|
28
28
|
//# sourceMappingURL=module.js.map
|
package/dist/config/read.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OptionsInput } from './type';
|
|
2
|
-
export declare function readConfig(directoryPath?: string): Promise<OptionsInput>;
|
|
1
|
+
import type { OptionsInput } from './type';
|
|
2
|
+
export declare function readConfig(directoryPath?: string): Promise<OptionsInput>;
|
|
3
3
|
//# sourceMappingURL=read.d.ts.map
|
package/dist/config/read.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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.readConfig = void 0;
|
|
13
|
-
const fs_1 = __importDefault(require("fs"));
|
|
14
|
-
const path_1 = __importDefault(require("path"));
|
|
15
|
-
const rc9_1 = require("rc9");
|
|
16
|
-
async function readConfig(directoryPath) {
|
|
17
|
-
directoryPath ?? (directoryPath = process.cwd());
|
|
18
|
-
const filePath = path_1.default.resolve(directoryPath, 'authup.conf');
|
|
19
|
-
try {
|
|
20
|
-
await fs_1.default.promises.access(filePath);
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
const file = await fs_1.default.promises.readFile(filePath, { encoding: 'utf-8' });
|
|
26
|
-
return (0, rc9_1.parse)(file);
|
|
27
|
-
}
|
|
28
|
-
exports.readConfig = readConfig;
|
|
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.readConfig = void 0;
|
|
13
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
|
+
const path_1 = __importDefault(require("path"));
|
|
15
|
+
const rc9_1 = require("rc9");
|
|
16
|
+
async function readConfig(directoryPath) {
|
|
17
|
+
directoryPath ?? (directoryPath = process.cwd());
|
|
18
|
+
const filePath = path_1.default.resolve(directoryPath, 'authup.conf');
|
|
19
|
+
try {
|
|
20
|
+
await fs_1.default.promises.access(filePath);
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
const file = await fs_1.default.promises.readFile(filePath, { encoding: 'utf-8' });
|
|
26
|
+
return (0, rc9_1.parse)(file);
|
|
27
|
+
}
|
|
28
|
+
exports.readConfig = readConfig;
|
|
29
29
|
//# sourceMappingURL=read.js.map
|
package/dist/config/type.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Options as ServerOptions, OptionsInput as ServerOptionsInput } from '@authup/server';
|
|
2
|
-
import type { UIOptions, UIOptionsInput } from '../packages';
|
|
3
|
-
export type Options = {
|
|
4
|
-
server: ServerOptions;
|
|
5
|
-
ui: UIOptions;
|
|
6
|
-
};
|
|
7
|
-
export type OptionsInput = {
|
|
8
|
-
server?: ServerOptionsInput;
|
|
9
|
-
ui?: UIOptionsInput;
|
|
10
|
-
};
|
|
1
|
+
import type { Options as ServerOptions, OptionsInput as ServerOptionsInput } from '@authup/server';
|
|
2
|
+
import type { UIOptions, UIOptionsInput } from '../packages';
|
|
3
|
+
export type Options = {
|
|
4
|
+
server: ServerOptions;
|
|
5
|
+
ui: UIOptions;
|
|
6
|
+
};
|
|
7
|
+
export type OptionsInput = {
|
|
8
|
+
server?: ServerOptionsInput;
|
|
9
|
+
ui?: UIOptionsInput;
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=type.d.ts.map
|