authup 0.45.9 → 1.0.0-beta.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/cleanup.d.ts +3 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/index.d.ts +1 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.cjs +412 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +410 -0
- package/dist/index.mjs.map +1 -0
- package/dist/services/check.d.ts +3 -0
- package/dist/services/check.d.ts.map +1 -0
- package/dist/services/client-web/config.d.ts +4 -0
- package/dist/services/client-web/config.d.ts.map +1 -0
- package/dist/services/client-web/execute.d.ts +8 -0
- package/dist/services/client-web/execute.d.ts.map +1 -0
- package/dist/services/client-web/index.d.ts +3 -0
- package/dist/services/client-web/index.d.ts.map +1 -0
- package/dist/services/constants.d.ts +9 -0
- package/dist/services/constants.d.ts.map +1 -0
- package/dist/services/execute.d.ts +9 -0
- package/dist/services/execute.d.ts.map +1 -0
- package/dist/services/index.d.ts +5 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/server-core/config.d.ts +4 -0
- package/dist/services/server-core/config.d.ts.map +1 -0
- package/dist/services/server-core/execute.d.ts +3 -0
- package/dist/services/server-core/execute.d.ts.map +1 -0
- package/dist/services/server-core/index.d.ts +3 -0
- package/dist/services/server-core/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/modules-path.d.ts +1 -1
- package/dist/utils/modules-path.d.ts.map +1 -1
- package/dist/utils/shell.d.ts +12 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/package.json +27 -14
- package/dist/commands/api.d.ts +0 -3
- package/dist/commands/api.d.ts.map +0 -1
- package/dist/commands/api.js +0 -54
- package/dist/commands/api.js.map +0 -1
- package/dist/commands/index.js +0 -27
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/info.js +0 -32
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/start.js +0 -56
- package/dist/commands/start.js.map +0 -1
- package/dist/commands/ui.d.ts +0 -3
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/ui.js +0 -53
- package/dist/commands/ui.js.map +0 -1
- package/dist/config/index.d.ts +0 -3
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -25
- package/dist/config/index.js.map +0 -1
- package/dist/config/module.d.ts +0 -3
- package/dist/config/module.d.ts.map +0 -1
- package/dist/config/module.js +0 -34
- package/dist/config/module.js.map +0 -1
- package/dist/config/type.d.ts +0 -7
- package/dist/config/type.d.ts.map +0 -1
- package/dist/config/type.js +0 -9
- package/dist/config/type.js.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/packages/api/commands/index.d.ts +0 -6
- package/dist/packages/api/commands/index.d.ts.map +0 -1
- package/dist/packages/api/commands/index.js +0 -28
- package/dist/packages/api/commands/index.js.map +0 -1
- package/dist/packages/api/commands/module.d.ts +0 -6
- package/dist/packages/api/commands/module.d.ts.map +0 -1
- package/dist/packages/api/commands/module.js +0 -50
- package/dist/packages/api/commands/module.js.map +0 -1
- package/dist/packages/api/commands/reset.d.ts +0 -5
- package/dist/packages/api/commands/reset.d.ts.map +0 -1
- package/dist/packages/api/commands/reset.js +0 -25
- package/dist/packages/api/commands/reset.js.map +0 -1
- package/dist/packages/api/commands/start.d.ts +0 -3
- package/dist/packages/api/commands/start.d.ts.map +0 -1
- package/dist/packages/api/commands/start.js +0 -25
- package/dist/packages/api/commands/start.js.map +0 -1
- package/dist/packages/api/commands/type.d.ts +0 -6
- package/dist/packages/api/commands/type.d.ts.map +0 -1
- package/dist/packages/api/commands/type.js +0 -9
- package/dist/packages/api/commands/type.js.map +0 -1
- package/dist/packages/api/commands/utils.d.ts +0 -4
- package/dist/packages/api/commands/utils.d.ts.map +0 -1
- package/dist/packages/api/commands/utils.js +0 -27
- package/dist/packages/api/commands/utils.js.map +0 -1
- package/dist/packages/api/constants.d.ts +0 -5
- package/dist/packages/api/constants.d.ts.map +0 -1
- package/dist/packages/api/constants.js +0 -15
- package/dist/packages/api/constants.js.map +0 -1
- package/dist/packages/api/env.d.ts +0 -3
- package/dist/packages/api/env.d.ts.map +0 -1
- package/dist/packages/api/env.js +0 -23
- package/dist/packages/api/env.js.map +0 -1
- package/dist/packages/api/index.d.ts +0 -4
- package/dist/packages/api/index.d.ts.map +0 -1
- package/dist/packages/api/index.js +0 -26
- package/dist/packages/api/index.js.map +0 -1
- package/dist/packages/constants.d.ts +0 -5
- package/dist/packages/constants.d.ts.map +0 -1
- package/dist/packages/constants.js +0 -15
- package/dist/packages/constants.js.map +0 -1
- package/dist/packages/index.d.ts +0 -5
- package/dist/packages/index.d.ts.map +0 -1
- package/dist/packages/index.js +0 -27
- package/dist/packages/index.js.map +0 -1
- package/dist/packages/type.d.ts +0 -6
- package/dist/packages/type.d.ts.map +0 -1
- package/dist/packages/type.js +0 -9
- package/dist/packages/type.js.map +0 -1
- package/dist/packages/ui/commands/index.d.ts +0 -4
- package/dist/packages/ui/commands/index.d.ts.map +0 -1
- package/dist/packages/ui/commands/index.js +0 -26
- package/dist/packages/ui/commands/index.js.map +0 -1
- package/dist/packages/ui/commands/module.d.ts +0 -6
- package/dist/packages/ui/commands/module.d.ts.map +0 -1
- package/dist/packages/ui/commands/module.js +0 -56
- package/dist/packages/ui/commands/module.js.map +0 -1
- package/dist/packages/ui/commands/start.d.ts +0 -5
- package/dist/packages/ui/commands/start.d.ts.map +0 -1
- package/dist/packages/ui/commands/start.js +0 -34
- package/dist/packages/ui/commands/start.js.map +0 -1
- package/dist/packages/ui/commands/type.d.ts +0 -8
- package/dist/packages/ui/commands/type.d.ts.map +0 -1
- package/dist/packages/ui/commands/type.js +0 -9
- package/dist/packages/ui/commands/type.js.map +0 -1
- package/dist/packages/ui/config/env.d.ts +0 -3
- package/dist/packages/ui/config/env.d.ts.map +0 -1
- package/dist/packages/ui/config/env.js +0 -51
- package/dist/packages/ui/config/env.js.map +0 -1
- package/dist/packages/ui/config/index.d.ts +0 -4
- package/dist/packages/ui/config/index.d.ts.map +0 -1
- package/dist/packages/ui/config/index.js +0 -26
- package/dist/packages/ui/config/index.js.map +0 -1
- package/dist/packages/ui/config/module.d.ts +0 -3
- package/dist/packages/ui/config/module.d.ts.map +0 -1
- package/dist/packages/ui/config/module.js +0 -35
- package/dist/packages/ui/config/module.js.map +0 -1
- package/dist/packages/ui/config/type.d.ts +0 -10
- package/dist/packages/ui/config/type.d.ts.map +0 -1
- package/dist/packages/ui/config/type.js +0 -9
- package/dist/packages/ui/config/type.js.map +0 -1
- package/dist/packages/ui/constants.d.ts +0 -4
- package/dist/packages/ui/constants.d.ts.map +0 -1
- package/dist/packages/ui/constants.js +0 -14
- package/dist/packages/ui/constants.js.map +0 -1
- package/dist/packages/ui/index.d.ts +0 -4
- package/dist/packages/ui/index.d.ts.map +0 -1
- package/dist/packages/ui/index.js +0 -26
- package/dist/packages/ui/index.js.map +0 -1
- package/dist/utils/index.js +0 -27
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/line-breaks.js +0 -14
- package/dist/utils/line-breaks.js.map +0 -1
- package/dist/utils/modules-path.js +0 -18
- package/dist/utils/modules-path.js.map +0 -1
- package/dist/utils/process-output.js +0 -42
- package/dist/utils/process-output.js.map +0 -1
- package/dist/utils/stringify-object-args.js +0 -19
- package/dist/utils/stringify-object-args.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"description": "This is the CLI for the authup framework.",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"exports": {
|
|
6
|
+
"./package.json": "./package.json",
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.mjs",
|
|
10
|
+
"require": "./dist/index.cjs"
|
|
11
|
+
}
|
|
10
12
|
},
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"module": "./dist/index.mjs",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
11
16
|
"files": [
|
|
12
|
-
"dist
|
|
17
|
+
"dist"
|
|
13
18
|
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"cli": "node dist/index.cjs",
|
|
21
|
+
"cli-dev": "npm run build && npm run cli",
|
|
22
|
+
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
23
|
+
"build:js": "rollup -c",
|
|
24
|
+
"build": "rimraf ./dist && cross-env NODE_ENV=production npm run build:js && npm run build:types"
|
|
25
|
+
},
|
|
14
26
|
"bin": {
|
|
15
|
-
"authup": "dist/index.
|
|
27
|
+
"authup": "dist/index.cjs"
|
|
16
28
|
},
|
|
17
29
|
"keywords": [],
|
|
18
30
|
"author": {
|
|
@@ -24,21 +36,22 @@
|
|
|
24
36
|
"repository": {
|
|
25
37
|
"type": "git",
|
|
26
38
|
"url": "git+https://github.com/authup/authup.git",
|
|
27
|
-
"directory": "
|
|
39
|
+
"directory": "global/apps/authup"
|
|
28
40
|
},
|
|
29
41
|
"bugs": {
|
|
30
42
|
"url": "https://github.com/authup/authup/issues"
|
|
31
43
|
},
|
|
32
44
|
"homepage": "https://github.com/authup/authup#readme",
|
|
33
45
|
"dependencies": {
|
|
34
|
-
"@authup/client-
|
|
35
|
-
"@authup/
|
|
36
|
-
"@authup/
|
|
37
|
-
"@authup/
|
|
46
|
+
"@authup/client-web": "^1.0.0-beta.0",
|
|
47
|
+
"@authup/client-web-config": "^1.0.0-beta.0",
|
|
48
|
+
"@authup/config": "^1.0.0-beta.0",
|
|
49
|
+
"@authup/core": "^1.0.0-beta.0",
|
|
50
|
+
"@authup/server-core": "^1.0.0-beta.0",
|
|
38
51
|
"cac": "^6.7.14",
|
|
39
52
|
"chalk": "^4.1.2",
|
|
40
53
|
"consola": "^3.2.3",
|
|
41
|
-
"
|
|
54
|
+
"dycraft": "^1.1.0",
|
|
42
55
|
"resolve-package-path": "^4.0.3",
|
|
43
56
|
"smob": "^1.4.0",
|
|
44
57
|
"zod": "^3.22.4"
|
package/dist/commands/api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAQ/B,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,QAmC1C"}
|
package/dist/commands/api.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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 node_process_1 = __importDefault(require("node:process"));
|
|
14
|
-
const consola_1 = __importDefault(require("consola"));
|
|
15
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
16
|
-
const config_1 = require("../config");
|
|
17
|
-
const packages_1 = require("../packages");
|
|
18
|
-
function buildServerCommand(cac) {
|
|
19
|
-
cac.command('api <cmd>', 'Run a specific command.')
|
|
20
|
-
.action(async (command) => {
|
|
21
|
-
const root = node_process_1.default.cwd();
|
|
22
|
-
const config = await (0, config_1.createConfig)();
|
|
23
|
-
switch (command) {
|
|
24
|
-
case packages_1.ServerCommand.START: {
|
|
25
|
-
await (0, packages_1.startServer)({
|
|
26
|
-
args: {
|
|
27
|
-
root,
|
|
28
|
-
},
|
|
29
|
-
env: {
|
|
30
|
-
PORT: config.api.get('port'),
|
|
31
|
-
WRITABLE_DIRECTORY_PATH: config.api.get('writableDirectoryPath'),
|
|
32
|
-
},
|
|
33
|
-
envFromProcess: true,
|
|
34
|
-
});
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
case packages_1.ServerCommand.RESET: {
|
|
38
|
-
await (0, packages_1.resetServer)({
|
|
39
|
-
args: {
|
|
40
|
-
root,
|
|
41
|
-
},
|
|
42
|
-
envFromProcess: true,
|
|
43
|
-
});
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
default: {
|
|
47
|
-
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
exports.buildServerCommand = buildServerCommand;
|
|
54
|
-
//# sourceMappingURL=api.js.map
|
package/dist/commands/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,gEAAmC;AAEnC,sDAA8B;AAC9B,kDAA0B;AAC1B,sCAAyC;AACzC,0CAEqB;AAErB,SAAgB,kBAAkB,CAAC,GAAQ;IACvC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,yBAAyB,CAAC;SAC9C,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAC9B,MAAM,IAAI,GAAG,sBAAO,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,GAAE,CAAC;QAEpC,QAAQ,OAAO,EAAE,CAAC;YACd,KAAK,wBAAa,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvB,MAAM,IAAA,sBAAW,EAAC;oBACd,IAAI,EAAE;wBACF,IAAI;qBACP;oBACD,GAAG,EAAE;wBACD,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;wBAC5B,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,uBAAuB,CAAC;qBACnE;oBACD,cAAc,EAAE,IAAI;iBACvB,CAAC,CAAC;gBACH,MAAM;YACV,CAAC;YACD,KAAK,wBAAa,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvB,MAAM,IAAA,sBAAW,EAAC;oBACd,IAAI,EAAE;wBACF,IAAI;qBACP;oBACD,cAAc,EAAE,IAAI;iBACvB,CAAC,CAAC;gBACH,MAAM;YACV,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACN,iBAAO,CAAC,IAAI,CAAC,eAAe,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;gBACtE,MAAM;YACV,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAnCD,gDAmCC"}
|
package/dist/commands/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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("./api"), exports);
|
|
25
|
-
__exportStar(require("./start"), exports);
|
|
26
|
-
__exportStar(require("./ui"), exports);
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,yCAAuB;AACvB,wCAAsB;AACtB,0CAAwB;AACxB,uCAAqB"}
|
package/dist/commands/info.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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.api.get('env')}`);
|
|
20
|
-
consola_1.default.info(`RootPath: ${config.api.get('rootPath')}`);
|
|
21
|
-
consola_1.default.info(`WritableDirectoryPath: ${config.api.get('writableDirectoryPath')}`);
|
|
22
|
-
consola_1.default.info(`UI Host: ${config.ui.get('host')}`);
|
|
23
|
-
consola_1.default.info(`UI Port: ${config.ui.get('port')}`);
|
|
24
|
-
consola_1.default.info(`Server Host: ${config.api.get('host')}`);
|
|
25
|
-
consola_1.default.info(`Server Port: ${config.api.get('port')}`);
|
|
26
|
-
consola_1.default.info('Report an issue: https://github.com/authup/authup/issues/new');
|
|
27
|
-
consola_1.default.info('Suggest an improvement: https://github.com/authup/authup/discussions/new');
|
|
28
|
-
consola_1.default.info('Read documentation: https://authup.org');
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
exports.buildInfoCommand = buildInfoCommand;
|
|
32
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/commands/info.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,sDAA8B;AAC9B,sCAAyC;AAEzC,SAAgB,gBAAgB,CAAC,GAAQ;IACrC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,0CAA0C,CAAC;SAC1D,MAAM,CAAC,KAAK,IAAI,EAAE;QACf,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,GAAE,CAAC;QAEpC,iBAAO,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACtD,iBAAO,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACxD,iBAAO,CAAC,IAAI,CAAC,0BAA0B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;QAClF,iBAAO,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClD,iBAAO,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClD,iBAAO,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACvD,iBAAO,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACvD,iBAAO,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;QAC7E,iBAAO,CAAC,IAAI,CAAC,0EAA0E,CAAC,CAAC;QACzF,iBAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACX,CAAC;AAhBD,4CAgBC"}
|
package/dist/commands/start.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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 node_process_1 = __importDefault(require("node: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 = Object.values(packages_1.ServiceName);
|
|
22
|
-
}
|
|
23
|
-
const root = node_process_1.default.cwd();
|
|
24
|
-
const config = await (0, config_1.createConfig)();
|
|
25
|
-
if (services.indexOf(packages_1.ServiceName.API) !== -1) {
|
|
26
|
-
const ctx = {
|
|
27
|
-
args: {
|
|
28
|
-
root,
|
|
29
|
-
},
|
|
30
|
-
env: {
|
|
31
|
-
PORT: config.api.get('port'),
|
|
32
|
-
WRITABLE_DIRECTORY_PATH: config.api.get('writableDirectoryPath'),
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
await (0, packages_1.startServer)(ctx);
|
|
36
|
-
}
|
|
37
|
-
if (services.indexOf(packages_1.ServiceName.UI) !== -1) {
|
|
38
|
-
const ctx = {
|
|
39
|
-
args: {
|
|
40
|
-
root,
|
|
41
|
-
},
|
|
42
|
-
env: {
|
|
43
|
-
PORT: config.ui.get('port'),
|
|
44
|
-
HOST: config.ui.get('host'),
|
|
45
|
-
PUBLIC_URL: config.ui.get('publicUrl'),
|
|
46
|
-
API_URL: config.ui.has('apiUrl') ?
|
|
47
|
-
config.ui.get('apiUrl') :
|
|
48
|
-
config.api.get('publicUrl'),
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
await (0, packages_1.startUI)(ctx);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
exports.buildStartCommand = buildStartCommand;
|
|
56
|
-
//# sourceMappingURL=start.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,gEAAmC;AAEnC,sCAAyC;AAEzC,0CAIqB;AAErB,SAAgB,iBAAiB,CAAC,GAAQ;IACtC,GAAG;SACE,OAAO,CAAC,qBAAqB,EAAE,6BAA6B,CAAC;SAC7D,MAAM,CAAC,KAAK,EAAE,QAAkB,EAAE,EAAE;QACjC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAW,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,IAAI,GAAG,sBAAO,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,GAAE,CAAC;QAEpC,IAAI,QAAQ,CAAC,OAAO,CAAC,sBAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC3C,MAAM,GAAG,GAA4B;gBACjC,IAAI,EAAE;oBACF,IAAI;iBACP;gBACD,GAAG,EAAE;oBACD,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;oBAC5B,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,uBAAuB,CAAC;iBACnE;aACJ,CAAC;YAEF,MAAM,IAAA,sBAAW,EAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,QAAQ,CAAC,OAAO,CAAC,sBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC1C,MAAM,GAAG,GAA2B;gBAChC,IAAI,EAAE;oBACF,IAAI;iBACP;gBACD,GAAG,EAAE;oBACD,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;oBAC3B,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;oBAC3B,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC;oBACtC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAC9B,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;wBACzB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;iBAClC;aACJ,CAAC;YAEF,MAAM,IAAA,kBAAO,EAAC,GAAG,CAAC,CAAC;QACvB,CAAC;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AA3CD,8CA2CC"}
|
package/dist/commands/ui.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/commands/ui.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,QAsCtC"}
|
package/dist/commands/ui.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
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
|
-
.option('-d, --apiUrl [apiUrl]', 'Specify the apiUrl of the backend application.')
|
|
23
|
-
.action(async (command, ctx) => {
|
|
24
|
-
const config = await (0, config_1.createConfig)();
|
|
25
|
-
let { apiUrl } = ctx;
|
|
26
|
-
if (!apiUrl && config.ui.has('apiUrl')) {
|
|
27
|
-
apiUrl = config.ui.get('apiUrl');
|
|
28
|
-
}
|
|
29
|
-
if (!apiUrl) {
|
|
30
|
-
apiUrl = config.api.get('publicUrl');
|
|
31
|
-
}
|
|
32
|
-
switch (command) {
|
|
33
|
-
case packages_1.UICommand.START: {
|
|
34
|
-
await (0, packages_1.startUI)({
|
|
35
|
-
env: {
|
|
36
|
-
PORT: ctx.port || config.ui.get('port'),
|
|
37
|
-
HOST: ctx.host || config.ui.get('host'),
|
|
38
|
-
PUBLIC_URL: config.ui.get('publicUrl'),
|
|
39
|
-
API_URL: apiUrl,
|
|
40
|
-
},
|
|
41
|
-
envFromProcess: true,
|
|
42
|
-
});
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
default: {
|
|
46
|
-
consola_1.default.warn(`The command ${chalk_1.default.red(command)} was not recognized.`);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
exports.buildUiCommand = buildUiCommand;
|
|
53
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/commands/ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/commands/ui.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,kDAA0B;AAC1B,sDAA8B;AAC9B,sCAAyC;AACzC,0CAAiD;AAEjD,SAAgB,cAAc,CAAC,GAAQ;IACnC,GAAG;SACE,OAAO,CAAC,UAAU,EAAE,wBAAwB,CAAC;SAC7C,MAAM,CAAC,mBAAmB,EAAE,gDAAgD,CAAC;SAC7E,MAAM,CAAC,mBAAmB,EAAE,uDAAuD,CAAC;SACpF,MAAM,CAAC,uBAAuB,EAAE,gDAAgD,CAAC;SACjF,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,GAAwB,EAAE,EAAE;QACxD,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,GAAE,CAAC;QAEpC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;QAErB,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;QAED,QAAQ,OAAO,EAAE,CAAC;YACd,KAAK,oBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnB,MAAM,IAAA,kBAAO,EAAC;oBACV,GAAG,EAAE;wBACD,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;wBACvC,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;wBACvC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC;wBACtC,OAAO,EAAE,MAAM;qBAClB;oBACD,cAAc,EAAE,IAAI;iBACvB,CAAC,CAAC;gBACH,MAAM;YACV,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACN,iBAAO,CAAC,IAAI,CAAC,eAAe,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;gBACtE,MAAM;YACV,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAtCD,wCAsCC"}
|
package/dist/config/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
package/dist/config/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=index.js.map
|
package/dist/config/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB"}
|
package/dist/config/module.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/config/module.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,wBAAsB,YAAY,IAAK,OAAO,CAAC,MAAM,CAAC,CAwBrD"}
|
package/dist/config/module.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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 core_1 = require("@authup/core");
|
|
11
|
-
const server_api_1 = require("@authup/server-api");
|
|
12
|
-
const server_core_1 = require("@authup/server-core");
|
|
13
|
-
const packages_1 = require("../packages");
|
|
14
|
-
async function createConfig() {
|
|
15
|
-
const global = await (0, server_core_1.readConfigFile)();
|
|
16
|
-
const api = (0, server_api_1.createConfig)();
|
|
17
|
-
const ui = (0, packages_1.createUIConfig)();
|
|
18
|
-
api.setRaw(global.api || {});
|
|
19
|
-
ui.setRaw(global.ui || {});
|
|
20
|
-
if (!ui.has('apiUrl') && api.has('publicUrl')) {
|
|
21
|
-
ui.setRaw('apiUrl', (0, core_1.makeURLPublicAccessible)(api.get('publicUrl')));
|
|
22
|
-
}
|
|
23
|
-
if (!ui.has('publicUrl') && api.has('authorizeRedirectUrl')) {
|
|
24
|
-
ui.set('publicUrl', api.get('authorizeRedirectUrl'));
|
|
25
|
-
}
|
|
26
|
-
(0, packages_1.extendServerConfigWithEnv)(api);
|
|
27
|
-
(0, packages_1.extendUIConfigWithEnv)(ui);
|
|
28
|
-
return {
|
|
29
|
-
api,
|
|
30
|
-
ui,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
exports.createConfig = createConfig;
|
|
34
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/config/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAuD;AACvD,mDAAqE;AACrE,qDAAqD;AACrD,0CAA+F;AAGxF,KAAK,UAAU,YAAY;IAC9B,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAc,GAAE,CAAC;IAEtC,MAAM,GAAG,GAAG,IAAA,yBAAe,GAAE,CAAC;IAC9B,MAAM,EAAE,GAAG,IAAA,yBAAc,GAAE,CAAC;IAE5B,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAC7B,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3B,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAA,8BAAuB,EAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAC1D,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,IAAA,oCAAyB,EAAC,GAAG,CAAC,CAAC;IAC/B,IAAA,gCAAqB,EAAC,EAAE,CAAC,CAAC;IAE1B,OAAO;QACH,GAAG;QACH,EAAE;KACL,CAAC;AACN,CAAC;AAxBD,oCAwBC"}
|
package/dist/config/type.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/config/type.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,MAAM,GAAG;IACjB,GAAG,EAAE,SAAS,CAAC;IACf,EAAE,EAAE,QAAQ,CAAA;CACf,CAAC"}
|
package/dist/config/type.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
package/dist/config/type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/config/type.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
package/dist/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) 2022.
|
|
5
|
-
* Author Peter Placzek (tada5hi)
|
|
6
|
-
* For the full copyright and license information,
|
|
7
|
-
* view the LICENSE file that was distributed with this source code.
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const cac_1 = __importDefault(require("cac"));
|
|
14
|
-
const commands_1 = require("./commands");
|
|
15
|
-
const cli = (0, cac_1.default)();
|
|
16
|
-
(0, commands_1.buildInfoCommand)(cli);
|
|
17
|
-
(0, commands_1.buildStartCommand)(cli);
|
|
18
|
-
(0, commands_1.buildServerCommand)(cli);
|
|
19
|
-
(0, commands_1.buildUiCommand)(cli);
|
|
20
|
-
cli.help();
|
|
21
|
-
cli.parse();
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA;;;;;GAKG;;;;;AAEH,8CAAsB;AAEtB,yCAKoB;AAEpB,MAAM,GAAG,GAAG,IAAA,aAAG,GAAE,CAAC;AAElB,IAAA,2BAAgB,EAAC,GAAG,CAAC,CAAC;AACtB,IAAA,4BAAiB,EAAC,GAAG,CAAC,CAAC;AACvB,IAAA,6BAAkB,EAAC,GAAG,CAAC,CAAC;AACxB,IAAA,yBAAc,EAAC,GAAG,CAAC,CAAC;AAEpB,GAAG,CAAC,IAAI,EAAE,CAAC;AAEX,GAAG,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packages/api/commands/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
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("./type"), exports);
|
|
27
|
-
__exportStar(require("./utils"), exports);
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packages/api/commands/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { ChildProcess } from 'node:child_process';
|
|
3
|
-
import type { CommandExecutionContext } from '../../type';
|
|
4
|
-
import type { ServerCommand } from '../constants';
|
|
5
|
-
export declare function executeServerCommand(command: `${ServerCommand}`, ctx?: CommandExecutionContext): Promise<ChildProcess>;
|
|
6
|
-
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/packages/api/commands/module.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,GAAG,aAAa,EAAE,EAC3B,GAAG,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC,YAAY,CAAC,CAiCxB"}
|
|
@@ -1,50 +0,0 @@
|
|
|
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.executeServerCommand = void 0;
|
|
13
|
-
const node_child_process_1 = require("node:child_process");
|
|
14
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
15
|
-
const node_process_1 = __importDefault(require("node:process"));
|
|
16
|
-
const consola_1 = __importDefault(require("consola"));
|
|
17
|
-
const resolve_package_path_1 = __importDefault(require("resolve-package-path"));
|
|
18
|
-
const utils_1 = require("../../../utils");
|
|
19
|
-
async function executeServerCommand(command, ctx) {
|
|
20
|
-
ctx = ctx || {};
|
|
21
|
-
ctx.env = ctx.env || {};
|
|
22
|
-
ctx.args = ctx.args || {};
|
|
23
|
-
return new Promise((resolve, reject) => {
|
|
24
|
-
let base = 'npx @authup/server-api';
|
|
25
|
-
const modulePath = (0, resolve_package_path_1.default)('@authup/server-api', node_process_1.default.cwd()) ||
|
|
26
|
-
(0, resolve_package_path_1.default)('@authup/server-api', (0, utils_1.getClosestNodeModulesPath)());
|
|
27
|
-
if (typeof modulePath === 'string') {
|
|
28
|
-
const directory = node_path_1.default.dirname(modulePath);
|
|
29
|
-
const outputPath = node_path_1.default.join(directory, 'dist', 'cli', 'index.js');
|
|
30
|
-
base = `node ${outputPath}`;
|
|
31
|
-
}
|
|
32
|
-
const childProcess = (0, node_child_process_1.exec)(`${base} ${command} ${(0, utils_1.stringifyObjectArgs)(ctx.args)}`, {
|
|
33
|
-
env: {
|
|
34
|
-
PATH: node_process_1.default.env.PATH,
|
|
35
|
-
...(ctx.envFromProcess ? node_process_1.default.env : {}),
|
|
36
|
-
...ctx.env,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
childProcess.on('spawn', () => {
|
|
40
|
-
resolve(childProcess);
|
|
41
|
-
});
|
|
42
|
-
childProcess.stderr.setEncoding('utf-8');
|
|
43
|
-
childProcess.stderr.on('data', (data) => {
|
|
44
|
-
consola_1.default.warn(data);
|
|
45
|
-
reject(data);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
exports.executeServerCommand = executeServerCommand;
|
|
50
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/packages/api/commands/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,2DAA0C;AAC1C,0DAA6B;AAC7B,gEAAmC;AACnC,sDAA8B;AAC9B,gFAAqD;AACrD,0CAAgF;AAIzE,KAAK,UAAU,oBAAoB,CACtC,OAA2B,EAC3B,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,IAAI,IAAI,GAAG,wBAAwB,CAAC;QACpC,MAAM,UAAU,GAAG,IAAA,8BAAiB,EAAC,oBAAoB,EAAE,sBAAO,CAAC,GAAG,EAAE,CAAC;YACrE,IAAA,8BAAiB,EAAC,oBAAoB,EAAE,IAAA,iCAAyB,GAAE,CAAC,CAAC;QAEzE,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,mBAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC3C,MAAM,UAAU,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;YACnE,IAAI,GAAG,QAAQ,UAAU,EAAE,CAAC;QAChC,CAAC;QAED,MAAM,YAAY,GAAG,IAAA,yBAAI,EAAC,GAAG,IAAI,IAAI,OAAO,IAAI,IAAA,2BAAmB,EAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE;YAC7E,GAAG,EAAE;gBACD,IAAI,EAAE,sBAAO,CAAC,GAAG,CAAC,IAAI;gBACtB,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,sBAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1C,GAAG,GAAG,CAAC,GAAG;aACb;SACJ,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;AApCD,oDAoCC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { ChildProcess } from 'node:child_process';
|
|
3
|
-
import type { CommandExecutionContext } from '../../type';
|
|
4
|
-
export declare function resetServer(ctx?: CommandExecutionContext): Promise<ChildProcess>;
|
|
5
|
-
//# sourceMappingURL=reset.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../src/packages/api/commands/reset.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,wBAAsB,WAAW,CAAC,GAAG,CAAC,EAAE,uBAAuB,GAAI,OAAO,CAAC,YAAY,CAAC,CAQvF"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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.resetServer = void 0;
|
|
13
|
-
const consola_1 = __importDefault(require("consola"));
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
const module_1 = require("./module");
|
|
16
|
-
const utils_1 = require("./utils");
|
|
17
|
-
async function resetServer(ctx) {
|
|
18
|
-
consola_1.default.info('Server: Cleanup configuration, database, ...');
|
|
19
|
-
const childProcess = await (0, module_1.executeServerCommand)(constants_1.ServerCommand.RESET, ctx);
|
|
20
|
-
consola_1.default.success('Server: Cleaned up');
|
|
21
|
-
(0, utils_1.handleServerCommandOutput)(childProcess);
|
|
22
|
-
return childProcess;
|
|
23
|
-
}
|
|
24
|
-
exports.resetServer = resetServer;
|
|
25
|
-
//# sourceMappingURL=reset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../../src/packages/api/commands/reset.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,sDAA8B;AAE9B,4CAA6C;AAC7C,qCAAgD;AAChD,mCAAoD;AAE7C,KAAK,UAAU,WAAW,CAAC,GAA6B;IAC3D,iBAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAoB,EAAC,yBAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC1E,iBAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEtC,IAAA,iCAAyB,EAAC,YAAY,CAAC,CAAC;IAExC,OAAO,YAAY,CAAC;AACxB,CAAC;AARD,kCAQC"}
|