@olane/o-tool 0.7.12-alpha.55 → 0.7.12-alpha.57
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/package.json +6 -6
- package/dist/src/router/o-request.router.d.ts +0 -15
- package/dist/src/router/o-request.router.d.ts.map +0 -1
- package/dist/src/router/o-request.router.js +0 -10
- package/dist/src/utils/tool.utils.d.ts +0 -6
- package/dist/src/utils/tool.utils.d.ts.map +0 -1
- package/dist/src/utils/tool.utils.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-tool",
|
|
3
|
-
"version": "0.7.12-alpha.
|
|
3
|
+
"version": "0.7.12-alpha.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test:node": "aegir test -t node",
|
|
21
21
|
"deep:clean": "rm -rf node_modules && rm package-lock.json",
|
|
22
22
|
"test:browser": "aegir test -t browser",
|
|
23
|
-
"build": "tsc",
|
|
23
|
+
"build": "rm -rf dist && tsc",
|
|
24
24
|
"start:prod": "node dist/index.js",
|
|
25
25
|
"prepublishOnly": "npm run build",
|
|
26
26
|
"lint": "aegir lint"
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"typescript": "^5.8.3"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@olane/o-config": "0.7.12-alpha.
|
|
58
|
-
"@olane/o-core": "0.7.12-alpha.
|
|
59
|
-
"@olane/o-protocol": "0.7.12-alpha.
|
|
57
|
+
"@olane/o-config": "0.7.12-alpha.57",
|
|
58
|
+
"@olane/o-core": "0.7.12-alpha.57",
|
|
59
|
+
"@olane/o-protocol": "0.7.12-alpha.57",
|
|
60
60
|
"debug": "^4.4.1",
|
|
61
61
|
"dotenv": "^16.5.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "71a484e394405a5398d0955dabac179465384e89"
|
|
64
64
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { oProtocolMethods, oRouterRequest as oRouterRequestInterface, RequestParams } from '@olane/o-protocol';
|
|
2
|
-
import { oRequest } from '@olane/o-core';
|
|
3
|
-
import { Stream } from '@olane/o-config';
|
|
4
|
-
export declare class oRouterRequest extends oRequest implements oRouterRequestInterface {
|
|
5
|
-
method: oProtocolMethods.ROUTE;
|
|
6
|
-
stream?: Stream | undefined;
|
|
7
|
-
params: RequestParams & {
|
|
8
|
-
address: string;
|
|
9
|
-
payload: {
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
constructor(config: oRouterRequestInterface);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=o-request.router.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"o-request.router.d.ts","sourceRoot":"","sources":["../../../src/router/o-request.router.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,IAAI,uBAAuB,EACzC,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,cACX,SAAQ,QACR,YAAW,uBAAuB;IAElC,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,aAAa,GAAG;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE;YACP,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,CAAC;gBACU,MAAM,EAAE,uBAAuB;CAO5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool.utils.d.ts","sourceRoot":"","sources":["../../../src/utils/tool.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,qBAAa,SAAS;IACpB,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS;CAc5E"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { oResponse } from '@olane/o-core';
|
|
2
|
-
export class ToolUtils {
|
|
3
|
-
static buildResponse(request, result, error) {
|
|
4
|
-
let success = true;
|
|
5
|
-
if (error) {
|
|
6
|
-
success = false;
|
|
7
|
-
}
|
|
8
|
-
return new oResponse({
|
|
9
|
-
id: request.id,
|
|
10
|
-
data: result,
|
|
11
|
-
error: result?.error,
|
|
12
|
-
...{ success },
|
|
13
|
-
_requestMethod: request.method,
|
|
14
|
-
_connectionId: request.params?._connectionId,
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|