@prosopo/cli 3.1.4 → 3.1.6
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/CHANGELOG.md +50 -0
- package/dist/bundle/provider.cli.bundle.js +32204 -32053
- package/dist/cjs/start.cjs +5 -2
- package/dist/start.js +5 -2
- package/package.json +17 -17
package/dist/cjs/start.cjs
CHANGED
|
@@ -23,7 +23,7 @@ const getClientApiPathsExcludingVerify = () => {
|
|
|
23
23
|
async function startApi(env2, admin = false, port) {
|
|
24
24
|
env2.logger.info(() => ({ msg: "Starting Prosopo API" }));
|
|
25
25
|
const apiApp = express();
|
|
26
|
-
const apiPort = port || env2.config.server
|
|
26
|
+
const apiPort = port || env2.config.server?.port;
|
|
27
27
|
const apiEndpointAdapter = apiExpressRouter.createApiExpressDefaultEndpointAdapter(
|
|
28
28
|
common.parseLogLevel(env2.config.logLevel)
|
|
29
29
|
);
|
|
@@ -105,7 +105,10 @@ async function start(env$1, admin, port) {
|
|
|
105
105
|
unsolved: { count: 0 }
|
|
106
106
|
});
|
|
107
107
|
const pair = keyring.getPair(secret);
|
|
108
|
-
|
|
108
|
+
let authAccount;
|
|
109
|
+
if (config.authAccount) {
|
|
110
|
+
authAccount = keyring.getPair(void 0, config.authAccount.address);
|
|
111
|
+
}
|
|
109
112
|
env$1 = new env.ProviderEnvironment(config, pair, authAccount);
|
|
110
113
|
} else {
|
|
111
114
|
env$1.logger.debug(() => ({ msg: "Env already defined" }));
|
package/dist/start.js
CHANGED
|
@@ -21,7 +21,7 @@ const getClientApiPathsExcludingVerify = () => {
|
|
|
21
21
|
async function startApi(env, admin = false, port) {
|
|
22
22
|
env.logger.info(() => ({ msg: "Starting Prosopo API" }));
|
|
23
23
|
const apiApp = express();
|
|
24
|
-
const apiPort = port || env.config.server
|
|
24
|
+
const apiPort = port || env.config.server?.port;
|
|
25
25
|
const apiEndpointAdapter = createApiExpressDefaultEndpointAdapter(
|
|
26
26
|
parseLogLevel(env.config.logLevel)
|
|
27
27
|
);
|
|
@@ -103,7 +103,10 @@ async function start(env, admin, port) {
|
|
|
103
103
|
unsolved: { count: 0 }
|
|
104
104
|
});
|
|
105
105
|
const pair = getPair(secret);
|
|
106
|
-
|
|
106
|
+
let authAccount;
|
|
107
|
+
if (config.authAccount) {
|
|
108
|
+
authAccount = getPair(void 0, config.authAccount.address);
|
|
109
|
+
}
|
|
107
110
|
env = new ProviderEnvironment(config, pair, authAccount);
|
|
108
111
|
} else {
|
|
109
112
|
env.logger.debug(() => ({ msg: "Env already defined" }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "CLI for Prosopo Provider",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
|
|
21
|
-
"build": "NODE_ENV=${NODE_ENV:-
|
|
21
|
+
"build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
|
|
22
22
|
"build:tsc": "tsc --build --verbose",
|
|
23
|
-
"build:cjs": "NODE_ENV=${NODE_ENV:-
|
|
23
|
+
"build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
|
|
24
24
|
"typecheck": "tsc --build --declaration --emitDeclarationOnly",
|
|
25
25
|
"test": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --config ./vite.test.config.ts",
|
|
26
|
-
"bundle": "NODE_ENV=${NODE_ENV:-
|
|
26
|
+
"bundle": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.config.ts --mode $NODE_ENV",
|
|
27
27
|
"cli": "node ./dist/cli.js",
|
|
28
28
|
"start": "node ./dist/cli.js --api",
|
|
29
29
|
"start:admin": "node ./dist/cli.js --api --adminApi",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@polkadot/types-codec": "10.13.1",
|
|
34
|
-
"@prosopo/api": "3.1.
|
|
35
|
-
"@prosopo/api-express-router": "3.0.
|
|
36
|
-
"@prosopo/common": "3.1.
|
|
37
|
-
"@prosopo/config": "3.1.
|
|
38
|
-
"@prosopo/dotenv": "3.0.
|
|
39
|
-
"@prosopo/env": "3.1.
|
|
40
|
-
"@prosopo/keyring": "2.8.
|
|
41
|
-
"@prosopo/locale": "3.1.
|
|
42
|
-
"@prosopo/provider": "3.
|
|
43
|
-
"@prosopo/types": "3.0.
|
|
44
|
-
"@prosopo/user-access-policy": "3.
|
|
45
|
-
"@prosopo/util": "3.0.
|
|
46
|
-
"@prosopo/util-crypto": "13.5.
|
|
34
|
+
"@prosopo/api": "3.1.3",
|
|
35
|
+
"@prosopo/api-express-router": "3.0.6",
|
|
36
|
+
"@prosopo/common": "3.1.2",
|
|
37
|
+
"@prosopo/config": "3.1.3",
|
|
38
|
+
"@prosopo/dotenv": "3.0.7",
|
|
39
|
+
"@prosopo/env": "3.1.4",
|
|
40
|
+
"@prosopo/keyring": "2.8.9",
|
|
41
|
+
"@prosopo/locale": "3.1.2",
|
|
42
|
+
"@prosopo/provider": "3.3.0",
|
|
43
|
+
"@prosopo/types": "3.0.6",
|
|
44
|
+
"@prosopo/user-access-policy": "3.4.0",
|
|
45
|
+
"@prosopo/util": "3.0.5",
|
|
46
|
+
"@prosopo/util-crypto": "13.5.4",
|
|
47
47
|
"@typegoose/auto-increment": "4.13.0",
|
|
48
48
|
"axios": "1.10.0",
|
|
49
49
|
"cors": "2.8.5",
|