From 4df54db767f72b7ac11e08ea0a66c226fa3f3efa Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 10 Jul 2022 15:38:56 +0300 Subject: [PATCH] review... Signed-off-by: Alex A. Naanou --- pwiki2.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pwiki2.js b/pwiki2.js index 0aec5a7..9b571e0 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -1,6 +1,15 @@ /********************************************************************** * * +* +* Architecture: +* store +* +* page +* renderer +* +* +* * XXX might be a good idea to try signature based security: * - sign changes * - sign sync session @@ -75,6 +84,8 @@ module.path = { 'NotFound', ], + // Default alternate search locations... + // // NOTE: if a path here is relative it is also searched relative to // the target path. SEARCH_PATHS: [ @@ -83,6 +94,12 @@ module.path = { '/System', ], + // Path utils... + // + // Path can be in one of two formats: + // string + // array + // // NOTE: trailing/leading '/' are represented by '' at end/start of // path list... normalize: function(path='.', format='auto'){ @@ -229,7 +246,16 @@ module.path = { // .load(..) // // -// NOTE: store keys must be normalized... +// NOTE: store keys must be normalized to avoid conditions where two +// forms of the same path exist at the same time... +// +// +// XXX potential architectural problems: +// - .paths() +// external index -- is this good??? +// bottleneck?? +// cache/index??? +// ...can we avoid this?? // // XXX LEADING_SLASH should this be strict about leading '/' in paths??? // ...this may lead to duplicate paths created -- '/a/b' and 'a/b'