pinokiod 3.9.12 → 3.9.14
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/kernel/api/index.js
CHANGED
|
@@ -495,12 +495,15 @@ class Api {
|
|
|
495
495
|
let method
|
|
496
496
|
let dirname
|
|
497
497
|
let mod
|
|
498
|
+
console.log(">> resolveMethod", { req, cwd })
|
|
498
499
|
if (req.method && typeof req.method === "function") {
|
|
500
|
+
console.log(">> 1")
|
|
499
501
|
modpath = null
|
|
500
502
|
method = req.method
|
|
501
503
|
dirname = __dirname
|
|
502
504
|
mod = null
|
|
503
505
|
} else if (req.uri) {
|
|
506
|
+
console.log(">> 2")
|
|
504
507
|
modpath = this.resolvePath(cwd, req.uri)
|
|
505
508
|
let m = (await this.loader.load(modpath))
|
|
506
509
|
const stats = await fs.promises.stat(modpath)
|
|
@@ -532,6 +535,7 @@ class Api {
|
|
|
532
535
|
}
|
|
533
536
|
mod = m.resolved
|
|
534
537
|
dirname = m.dirname
|
|
538
|
+
console.log({ m })
|
|
535
539
|
method = mod[req.method].bind(mod)
|
|
536
540
|
} else {
|
|
537
541
|
// KERNEL
|
|
@@ -653,7 +657,7 @@ class Api {
|
|
|
653
657
|
cwd = request.cwd
|
|
654
658
|
}
|
|
655
659
|
|
|
656
|
-
console.log("STEP", request)
|
|
660
|
+
console.log("STEP", { request, rawrpc, input, args })
|
|
657
661
|
|
|
658
662
|
let id = request.id || request.path
|
|
659
663
|
|
|
@@ -710,6 +714,7 @@ class Api {
|
|
|
710
714
|
}
|
|
711
715
|
// replace {{{ }}} with {{ }}
|
|
712
716
|
rpc = this.kernel.template.flatten(rpc)
|
|
717
|
+
console.log({ rpc })
|
|
713
718
|
|
|
714
719
|
// 6. rpc must have method names
|
|
715
720
|
if (rpc.method) {
|
|
@@ -724,6 +729,8 @@ class Api {
|
|
|
724
729
|
// 7. resolve the rpc
|
|
725
730
|
let resolved = await this.resolveMethod(rpc, cwd)
|
|
726
731
|
|
|
732
|
+
console.log({ resolved })
|
|
733
|
+
|
|
727
734
|
// 8. the endpoint must exist
|
|
728
735
|
if (!resolved.method) {
|
|
729
736
|
this.ondata({
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*
|
|
1
2
|
aside .menu, aside .temp-menu, aside .footer, aside .grid-btns, aside .system, aside #new-tab {
|
|
2
3
|
-webkit-app-region: no-drag !important;
|
|
3
4
|
cursor: auto;
|
|
@@ -11,6 +12,7 @@ aside {
|
|
|
11
12
|
-webkit-app-region: drag;
|
|
12
13
|
padding: 25px 0px 0px !important;
|
|
13
14
|
}
|
|
15
|
+
*/
|
|
14
16
|
.grabbable {
|
|
15
17
|
cursor: grab;
|
|
16
18
|
-webkit-app-region: drag;
|