Fixes.
h3rald h3rald@h3rald.com
Wed, 23 Dec 2020 18:43:06 +0100
2 files changed,
16 insertions(+),
4 deletions(-)
M
lib/min_dstore.nim
→
lib/min_dstore.nim
@@ -118,10 +118,9 @@ raiseInvalid("collection/id not specified")
let id = parts[1] var data = i.dget(ds, "data".newVal) if not dhas(data, collection): - raiseInvalid("Collection '$#' does not exist" % collection) + i.dset(data, collection, newDict(i.scope)) var cll = i.dget(data, collection) i.dset(cll, id, d) - #i.dset(ds, "data", data) i.push ds def.symbol("dsdelete") do (i: In):
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -88,7 +88,13 @@ if not file.endsWith(".min"):
file = file & ".min" info("[load] File: ", file) if MINCOMPILED: - var compiledFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var normalizedFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var compiledFile = normalizedFile + var normalizedCurrFile = strutils.replace(strutils.replace(i.filename, "\\", "/"), "./", "") + var parts = normalizedCurrFile.split("/") + if parts.len > 1: + discard parts.pop + compiledFile = parts.join("/") & "/" & normalizedFile if COMPILEDMINFILES.hasKey(compiledFile): COMPILEDMINFILES[compiledFile](i) return@@ -105,7 +111,14 @@ if not file.endsWith(".min"):
file = file & ".min" info("[require] File: ", file) if MINCOMPILED: - var compiledFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var normalizedFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var compiledFile = normalizedFile + var normalizedCurrFile = strutils.replace(strutils.replace(i.filename, "\\", "/"), "./", "") + var parts = normalizedCurrFile.split("/") + if parts.len > 1: + discard parts.pop + compiledFile = parts.join("/") & "/" & normalizedFile + echo compiledFile, " - ", normalizedFile, " - ", i.filename, " - ", normalizedCurrFile if COMPILEDMINFILES.hasKey(compiledFile): var i2 = i.copy(file) COMPILEDMINFILES[compiledFile](i2)