cordo 2.12.0 → 2.12.2
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
CHANGED
package/src/core/hooks.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LockfileInternals } from "../core/files/lockfile"
|
|
2
2
|
import { CordoMagic } from "../core/magic"
|
|
3
3
|
import { RoutingResolve } from "../core/routing/resolve"
|
|
4
|
-
import { MissingContextError } from "../errors/builtin/missing-context"
|
|
5
4
|
import { LibIds } from "../lib/ids"
|
|
6
5
|
import { LibUtils } from "../lib/utils"
|
|
7
6
|
import { FunctInternals, type CordoFunct } from "./funct"
|
|
@@ -67,7 +66,8 @@ export namespace FunctCompiler {
|
|
|
67
66
|
// encode arguments
|
|
68
67
|
const lut = CordoMagic.getLockfile()?.lut
|
|
69
68
|
if (!lut)
|
|
70
|
-
|
|
69
|
+
console.warn('toCustomId called without a lockfile.')
|
|
70
|
+
// throw new MissingContextError('toCustomId failed, no lockfile found in context.')
|
|
71
71
|
|
|
72
72
|
let argusStr = ''
|
|
73
73
|
let counter = -1
|
|
@@ -82,7 +82,7 @@ export namespace FunctCompiler {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// check if this argument is part of the lut
|
|
85
|
-
const lutIndex = lut
|
|
85
|
+
const lutIndex = lut?.indexOf(arg) ?? -1
|
|
86
86
|
if (lutIndex >= 0) {
|
|
87
87
|
argusStr += LutArgumentIndicator + LibIds.stringify(lutIndex, LockfileInternals.Const.idLength)
|
|
88
88
|
continue
|
|
@@ -40,7 +40,7 @@ export function goto(
|
|
|
40
40
|
? FunctInternals.readFunct(path).path
|
|
41
41
|
: path
|
|
42
42
|
|
|
43
|
-
const flags = parseFlags(opts, FunctInternals.readFunct(path as any)?.flags ?? CordoMagic.getConfig()?.functDefaultFlags
|
|
43
|
+
const flags = parseFlags(opts, FunctInternals.readFunct(path as any)?.flags ?? CordoMagic.getConfig()?.functDefaultFlags?.gotoBits ?? 0)
|
|
44
44
|
|
|
45
45
|
return FunctInternals.createFunct({
|
|
46
46
|
type: 'goto',
|
|
@@ -57,7 +57,7 @@ export function run(
|
|
|
57
57
|
? FunctInternals.readFunct(path).path
|
|
58
58
|
: path
|
|
59
59
|
|
|
60
|
-
const flags = parseFlags(opts, FunctInternals.readFunct(path as any)?.flags ?? CordoMagic.getConfig()?.functDefaultFlags
|
|
60
|
+
const flags = parseFlags(opts, FunctInternals.readFunct(path as any)?.flags ?? CordoMagic.getConfig()?.functDefaultFlags?.runBits ?? 0)
|
|
61
61
|
|
|
62
62
|
return FunctInternals.createFunct({
|
|
63
63
|
type: 'run',
|
package/src/lib/ids.test.ts
CHANGED