aontu 0.29.0 → 0.30.1

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.
Files changed (89) hide show
  1. package/dist/aontu.d.ts +17 -13
  2. package/dist/aontu.js +145 -60
  3. package/dist/aontu.js.map +1 -1
  4. package/package.json +18 -34
  5. package/aontu.ts +0 -92
  6. package/dist/lib/err.d.ts +0 -4
  7. package/dist/lib/err.js +0 -61
  8. package/dist/lib/err.js.map +0 -1
  9. package/dist/lib/lang.d.ts +0 -15
  10. package/dist/lib/lang.js +0 -409
  11. package/dist/lib/lang.js.map +0 -1
  12. package/dist/lib/op/disjunct.d.ts +0 -3
  13. package/dist/lib/op/disjunct.js +0 -28
  14. package/dist/lib/op/disjunct.js.map +0 -1
  15. package/dist/lib/op/op.d.ts +0 -6
  16. package/dist/lib/op/op.js +0 -9
  17. package/dist/lib/op/op.js.map +0 -1
  18. package/dist/lib/op/unite.d.ts +0 -3
  19. package/dist/lib/op/unite.js +0 -100
  20. package/dist/lib/op/unite.js.map +0 -1
  21. package/dist/lib/type.d.ts +0 -49
  22. package/dist/lib/type.js +0 -7
  23. package/dist/lib/type.js.map +0 -1
  24. package/dist/lib/unify.d.ts +0 -38
  25. package/dist/lib/unify.js +0 -67
  26. package/dist/lib/unify.js.map +0 -1
  27. package/dist/lib/utility.d.ts +0 -3
  28. package/dist/lib/utility.js +0 -16
  29. package/dist/lib/utility.js.map +0 -1
  30. package/dist/lib/val/ConjunctVal.d.ts +0 -17
  31. package/dist/lib/val/ConjunctVal.js +0 -171
  32. package/dist/lib/val/ConjunctVal.js.map +0 -1
  33. package/dist/lib/val/DisjunctVal.d.ts +0 -17
  34. package/dist/lib/val/DisjunctVal.js +0 -95
  35. package/dist/lib/val/DisjunctVal.js.map +0 -1
  36. package/dist/lib/val/ListVal.d.ts +0 -18
  37. package/dist/lib/val/ListVal.js +0 -120
  38. package/dist/lib/val/ListVal.js.map +0 -1
  39. package/dist/lib/val/MapVal.d.ts +0 -18
  40. package/dist/lib/val/MapVal.js +0 -117
  41. package/dist/lib/val/MapVal.js.map +0 -1
  42. package/dist/lib/val/Nil.d.ts +0 -22
  43. package/dist/lib/val/Nil.js +0 -84
  44. package/dist/lib/val/Nil.js.map +0 -1
  45. package/dist/lib/val/NullVal.d.ts +0 -15
  46. package/dist/lib/val/NullVal.js +0 -38
  47. package/dist/lib/val/NullVal.js.map +0 -1
  48. package/dist/lib/val/OpVal.d.ts +0 -17
  49. package/dist/lib/val/OpVal.js +0 -89
  50. package/dist/lib/val/OpVal.js.map +0 -1
  51. package/dist/lib/val/PlusVal.d.ts +0 -12
  52. package/dist/lib/val/PlusVal.js +0 -32
  53. package/dist/lib/val/PlusVal.js.map +0 -1
  54. package/dist/lib/val/PrefVal.d.ts +0 -17
  55. package/dist/lib/val/PrefVal.js +0 -87
  56. package/dist/lib/val/PrefVal.js.map +0 -1
  57. package/dist/lib/val/RefVal.d.ts +0 -22
  58. package/dist/lib/val/RefVal.js +0 -247
  59. package/dist/lib/val/RefVal.js.map +0 -1
  60. package/dist/lib/val/ValBase.d.ts +0 -26
  61. package/dist/lib/val/ValBase.js +0 -77
  62. package/dist/lib/val/ValBase.js.map +0 -1
  63. package/dist/lib/val/VarVal.d.ts +0 -15
  64. package/dist/lib/val/VarVal.js +0 -84
  65. package/dist/lib/val/VarVal.js.map +0 -1
  66. package/dist/lib/val.d.ts +0 -81
  67. package/dist/lib/val.js +0 -191
  68. package/dist/lib/val.js.map +0 -1
  69. package/lib/err.ts +0 -83
  70. package/lib/lang.ts +0 -585
  71. package/lib/op/disjunct.ts +0 -51
  72. package/lib/op/op.ts +0 -18
  73. package/lib/op/unite.ts +0 -143
  74. package/lib/type.ts +0 -95
  75. package/lib/unify.ts +0 -128
  76. package/lib/utility.ts +0 -24
  77. package/lib/val/ConjunctVal.ts +0 -265
  78. package/lib/val/DisjunctVal.ts +0 -160
  79. package/lib/val/ListVal.ts +0 -196
  80. package/lib/val/MapVal.ts +0 -181
  81. package/lib/val/Nil.ts +0 -144
  82. package/lib/val/NullVal.ts +0 -72
  83. package/lib/val/OpVal.ts +0 -159
  84. package/lib/val/PlusVal.ts +0 -76
  85. package/lib/val/PrefVal.ts +0 -154
  86. package/lib/val/RefVal.ts +0 -362
  87. package/lib/val/ValBase.ts +0 -109
  88. package/lib/val/VarVal.ts +0 -157
  89. package/lib/val.ts +0 -327
package/dist/aontu.d.ts CHANGED
@@ -1,16 +1,20 @@
1
- import type { Val, Options, FST } from './lib/type';
2
- import { Lang } from './lib/lang';
3
- import { Context } from './lib/unify';
4
- import { Nil } from './lib/val/Nil';
5
- declare function Aontu(src: string | Partial<Options>, popts?: Partial<Options>): Val;
6
- declare function prepareOptions(src: string | Partial<Options>, popts?: Partial<Options>): Options;
7
- declare function parse(opts: Options, ctx: {
8
- deps: any;
9
- fs?: FST;
10
- }): Val;
1
+ import type { Val, AontuOptions } from './type';
2
+ import { Lang } from './lang';
3
+ import { AontuContext, AontuContextConfig } from './ctx';
4
+ import { formatExplain } from './utility';
5
+ import { AontuError } from './err';
6
+ declare class Aontu {
7
+ opts: AontuOptions;
8
+ lang: Lang;
9
+ constructor(popts?: AontuOptions);
10
+ ctx(cfg?: AontuContextConfig): AontuContext;
11
+ parse(src: string, opts?: AontuOptions, ac?: AontuContext): Val | undefined;
12
+ unify(src: string | Val, opts?: AontuOptions, ac?: AontuContext | any): Val;
13
+ generate(src: string, opts?: any, ac?: AontuContext): any;
14
+ }
15
+ declare function runparse(src: string, lang: Lang, ctx: AontuContext): Val;
11
16
  declare const util: {
12
- parse: typeof parse;
13
- options: typeof prepareOptions;
17
+ runparse: typeof runparse;
14
18
  };
15
- export { Aontu, Val, Nil, Lang, Context, parse, util };
19
+ export { Aontu, AontuOptions, AontuContext, AontuError, Val, Lang, runparse, util, formatExplain };
16
20
  export default Aontu;
package/dist/aontu.js CHANGED
@@ -1,72 +1,157 @@
1
1
  "use strict";
2
- /* Copyright (c) 2021-2024 Richard Rodger, MIT License */
2
+ /* Copyright (c) 2021-2025 Richard Rodger, MIT License */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.util = exports.Context = exports.Lang = exports.Nil = void 0;
5
- exports.Aontu = Aontu;
6
- exports.parse = parse;
7
- const lang_1 = require("./lib/lang");
4
+ exports.formatExplain = exports.util = exports.Lang = exports.AontuError = exports.AontuContext = exports.Aontu = void 0;
5
+ exports.runparse = runparse;
6
+ const lang_1 = require("./lang");
8
7
  Object.defineProperty(exports, "Lang", { enumerable: true, get: function () { return lang_1.Lang; } });
9
- const unify_1 = require("./lib/unify");
10
- Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return unify_1.Context; } });
11
- const Nil_1 = require("./lib/val/Nil");
12
- Object.defineProperty(exports, "Nil", { enumerable: true, get: function () { return Nil_1.Nil; } });
13
- const MapVal_1 = require("./lib/val/MapVal");
14
- const err_1 = require("./lib/err");
15
- // TODO: BUG: foo: { bar: {} } zed: {} puts zed a wrong level
16
- // TODO: exclude tests from dist!!!
17
- // TODO: propogate property path and url properly over unification, and multisource
18
- /*
19
- NEXT:
20
- inject path from multisource into Vals when created
21
- report via nil error
22
- also trace deps into top val and watch via model
23
- */
24
- // TODO: error reporting
25
- // TODO: debug tracing
26
- // TODO: providers - e.g source files from paths
27
- // TODO: Aontu should return final generated version?
28
- /* `Aontu('a:1') => opts={src:'a:1',print:0,...}`
29
- * `Aontu('a:1',{print:1}) => opts={src:'a:1',print:1,...}`
30
- * `Aontu({src:'a:1'},{src:'a:2'}) => opts={src:'a:2',print:0,...}`
31
- */
32
- function Aontu(src, popts) {
33
- // TODO: review: why is an undefined src allowed?
34
- let opts = prepareOptions(src, popts);
35
- let deps = {};
36
- // TODO: handle empty src
37
- let val = parse(opts, { deps });
38
- if (null == val) {
39
- val = new MapVal_1.MapVal({ peg: {} });
8
+ const unify_1 = require("./unify");
9
+ const ctx_1 = require("./ctx");
10
+ Object.defineProperty(exports, "AontuContext", { enumerable: true, get: function () { return ctx_1.AontuContext; } });
11
+ const MapVal_1 = require("./val/MapVal");
12
+ const utility_1 = require("./utility");
13
+ Object.defineProperty(exports, "formatExplain", { enumerable: true, get: function () { return utility_1.formatExplain; } });
14
+ const err_1 = require("./err");
15
+ Object.defineProperty(exports, "AontuError", { enumerable: true, get: function () { return err_1.AontuError; } });
16
+ class Aontu {
17
+ constructor(popts) {
18
+ this.opts = popts ?? {};
19
+ this.lang = new lang_1.Lang(this.opts);
20
+ }
21
+ // Create a new context.
22
+ ctx(cfg) {
23
+ cfg = cfg ?? {};
24
+ const ac = new ctx_1.AontuContext(cfg);
25
+ return ac;
26
+ }
27
+ // Parse source into a matching Val AST, not yet unified.
28
+ parse(src, opts, ac) {
29
+ let out;
30
+ let errs = [];
31
+ if (null == src) {
32
+ src = '';
33
+ }
34
+ ac = ac ?? this.ctx();
35
+ ac.addopts({ ...(opts ?? {}), src });
36
+ if ('string' !== typeof src) {
37
+ out = (0, err_1.makeNilErr)(ac, 'parse_bad_src');
38
+ errs.push(out);
39
+ }
40
+ if (0 === errs.length) {
41
+ out = runparse(src, this.lang, ac);
42
+ out.deps = ac.deps;
43
+ ac.root = out;
44
+ }
45
+ handleErrors(errs, out, ac);
46
+ return out;
47
+ }
48
+ // Unify source or Val, returning a fully unified Val.
49
+ unify(src, opts, ac) {
50
+ let out;
51
+ let errs = [];
52
+ ac = ac ?? this.ctx();
53
+ ac.addopts({ ...(opts ?? {}), src });
54
+ let pval;
55
+ if (null == src) {
56
+ src = '';
57
+ }
58
+ if ('string' === typeof src) {
59
+ pval = this.parse(src, undefined, ac);
60
+ }
61
+ else if (src && src.isVal) {
62
+ pval = src;
63
+ }
64
+ else {
65
+ out = (0, err_1.makeNilErr)(ac, 'unify_no_src');
66
+ errs.push(out);
67
+ }
68
+ if (null != pval && 0 === errs.length) {
69
+ let uni = new unify_1.Unify(pval, this.lang, ac, src);
70
+ errs = uni.err;
71
+ out = uni.res;
72
+ if (null == out) {
73
+ out = (0, err_1.makeNilErr)(ac, 'unify_no_res');
74
+ if (0 === errs.length) {
75
+ errs = [out];
76
+ }
77
+ }
78
+ out.deps = pval.deps;
79
+ out.err = errs;
80
+ ac.root = out;
81
+ }
82
+ handleErrors(errs, out, ac);
83
+ return out;
84
+ }
85
+ // Generate output structure from source, which must parse and fully unify.
86
+ generate(src, opts, ac) {
87
+ try {
88
+ let out = undefined;
89
+ ac = ac ?? this.ctx();
90
+ ac.addopts({ ...(opts ?? {}), src });
91
+ let pval = this.parse(src, undefined, ac);
92
+ if (undefined !== pval && 0 === pval.err.length) {
93
+ let uval = this.unify(pval, undefined, ac);
94
+ if (undefined !== uval && 0 === uval.err.length) {
95
+ out = uval.isNil ? (ac.adderr(uval), undefined) : uval.gen(ac);
96
+ if (0 < ac.err.length) {
97
+ if (!ac.collect) {
98
+ throw new err_1.AontuError(ac.errmsg(), ac.err);
99
+ }
100
+ out = undefined;
101
+ }
102
+ }
103
+ }
104
+ return out;
105
+ }
106
+ catch (err) {
107
+ if (err instanceof err_1.AontuError || true === err.aontu) {
108
+ throw err;
109
+ }
110
+ const unex = new err_1.AontuError('Aontu: unexpected error: ' + err.message);
111
+ Object.assign(unex, err);
112
+ unex.stack = err.stack;
113
+ throw unex;
114
+ }
40
115
  }
41
- let uni = new unify_1.Unify(val);
42
- let res = uni.res;
43
- let err = uni.err;
44
- (0, err_1.descErr)(uni.err, { src: opts.src, fs: opts.fs });
45
- res.deps = deps;
46
- res.err = err;
47
- return res;
48
116
  }
49
- function prepareOptions(src, popts) {
50
- // Convert convenience first param into Options.src
51
- let srcopts = 'string' === typeof src ? { src } : src;
52
- let opts = {
53
- ...{
54
- src: '',
55
- print: 0,
56
- },
57
- ...srcopts,
58
- ...(popts || {}),
59
- };
60
- return opts;
117
+ exports.Aontu = Aontu;
118
+ // Either throw an exception or add collected errors to result.
119
+ function handleErrors(errs, out, ac) {
120
+ errs.map((err) => ac.adderr(err));
121
+ if (out) {
122
+ out.err.map((err) => ac.adderr(err));
123
+ }
124
+ if (0 < ac.err.length) {
125
+ if (ac.collect) {
126
+ if (out) {
127
+ out.err = ac.err;
128
+ }
129
+ }
130
+ else {
131
+ throw new err_1.AontuError(ac.errmsg(), ac.err);
132
+ }
133
+ }
61
134
  }
62
- function parse(opts, ctx) {
63
- let lang = new lang_1.Lang(opts);
64
- let val = lang.parse(opts.src, { deps: ctx.deps });
135
+ // Perform parse of source code (minor customizations over Lang.parse).
136
+ function runparse(src, lang, ctx) {
137
+ const popts = {
138
+ // src: ctx.src,
139
+ deps: ctx.deps,
140
+ fs: ctx.fs,
141
+ path: ctx.opts.path
142
+ };
143
+ let val;
144
+ const tsrc = src.trim().replace(/^(\n\s*)+/, '');
145
+ if ('string' === typeof src && '' !== tsrc) {
146
+ val = lang.parse(src, popts);
147
+ }
148
+ if (undefined === val) {
149
+ val = new MapVal_1.MapVal({ peg: {} });
150
+ }
65
151
  return val;
66
152
  }
67
153
  const util = {
68
- parse,
69
- options: prepareOptions,
154
+ runparse,
70
155
  };
71
156
  exports.util = util;
72
157
  exports.default = Aontu;
package/dist/aontu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"aontu.js","sourceRoot":"","sources":["../aontu.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAyFhD,sBAAK;AAA2B,sBAAK;AArF9C,qCAAiC;AAqFP,qFArFjB,WAAI,OAqFiB;AApF9B,uCAA4C;AAoFZ,wFApFhB,eAAO,OAoFgB;AAnFvC,uCAAmC;AAmFd,oFAnFZ,SAAG,OAmFY;AAlFxB,6CAAyC;AACzC,mCAAmC;AAEnC,6DAA6D;AAE7D,mCAAmC;AACnC,mFAAmF;AAEnF;;;;;EAKE;AAEF,wBAAwB;AAExB,sBAAsB;AACtB,gDAAgD;AAEhD,qDAAqD;AAErD;;;GAGG;AACH,SAAS,KAAK,CAAC,GAA8B,EAAE,KAAwB;IACrE,iDAAiD;IAEjD,IAAI,IAAI,GAAG,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAErC,IAAI,IAAI,GAA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,EAAE,CAAC,CAAA;IAC/B,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC;AAGD,MAAM,IAAI,GAAG;IACX,QAAQ;CACT,CAAA;AAYC,oBAAI;AAKN,kBAAe,KAAK,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aontu",
3
- "version": "0.29.0",
3
+ "version": "0.30.1",
4
4
  "main": "dist/aontu.js",
5
5
  "type": "commonjs",
6
6
  "browser": "dist/aontu.min.js",
@@ -16,27 +16,20 @@
16
16
  "url": "git://github.com/rjrodger/aontu.git"
17
17
  },
18
18
  "scripts": {
19
- "test": "npm run version && jest --coverage",
20
- "test-pure": "npm run version && jest --coverage --config jest.config.pure.js",
21
- "test-some": "npm run version && jest -t",
22
- "test-some-pure": "npm run version && jest --config jest.config.pure.js -t",
23
- "test-watch": "npm run version && jest --coverage --watchAll",
24
- "test-web": "npm run build-web && browserify -i util -o test/web.js -e test/entry.js -im -t aliasify && open test/web.html",
25
- "watch": "tsc -w -d",
26
- "prettier": "prettier --write --no-semi --single-quote *.ts test/*.js",
27
- "build": "tsc -d",
28
- "build-web": "tsc -d && npm run build-browser",
29
- "build-browser": "cp dist/aontu.js dist/aontu.min.js && browserify -o dist/aontu.min.js -e dist/aontu.js -s Aontu -im -i assert -p tinyify -t aliasify",
30
- "clean": "rm -rf dist node_modules yarn.lock package-lock.json",
19
+ "test": "node --enable-source-maps --test \"dist-test/**/*.test.js\"",
20
+ "test-some": "node --enable-source-maps --test-name-pattern=\"$npm_config_pattern\" --test \"dist-test/**/*.test.js\"",
21
+ "watch": "tsc --build src test -w",
22
+ "build": "tsc --build src test",
23
+ "clean": "rm -rf dist dist-test node_modules yarn.lock package-lock.json",
31
24
  "reset": "npm run clean && npm i && npm run build && npm test",
32
25
  "version": "node -r fs -e \"v=require('./package.json').version;s=fs.readFileSync('./aontu.ts').toString();if(!s.includes('VERSION = \\''+v+'\\'')){s=s.replace(/VERSION = '.*?'/,'VERSION = \\''+v+'\\'');fs.writeFileSync('./aontu.ts',s)}\"",
33
26
  "repo-tag": "REPO_VERSION=`node -e \"console.log(require('./package').version)\"` && echo TAG: v$REPO_VERSION && git commit -a -m v$REPO_VERSION && git push && git tag v$REPO_VERSION && git push --tags;",
34
27
  "repo-publish": "npm run clean && npm i && npm run repo-publish-quick",
35
- "repo-publish-quick": "npm run prettier && npm run build && npm run test && npm run repo-tag && npm publish --registry https://registry.npmjs.org "
28
+ "repo-publish-quick": "npm run build && npm run test && npm run repo-tag && npm publish --registry https://registry.npmjs.org "
36
29
  },
37
30
  "license": "MIT",
38
31
  "engines": {
39
- "node": ">=16"
32
+ "node": ">=22"
40
33
  },
41
34
  "files": [
42
35
  "aontu.ts",
@@ -46,32 +39,23 @@
46
39
  "LICENSE"
47
40
  ],
48
41
  "dependencies": {
49
- "@jsonic/directive": "^1.1.0",
50
- "@jsonic/expr": "^1.3.0",
51
- "jsonic": "^2.16.0",
52
- "@jsonic/multisource": "^1.9.0",
53
- "@jsonic/path": "^1.4.0"
42
+ "@jsonic/directive": "^1.2.0",
43
+ "@jsonic/expr": "^2.0.0",
44
+ "@jsonic/multisource": "^2.1.0",
45
+ "@jsonic/path": "^1.5.1",
46
+ "jsonic": "^2.18.0"
54
47
  },
55
48
  "devDependencies": {
56
- "@types/jest": "^30.0.0",
57
- "@types/node": "^24.3.0",
58
- "aliasify": "^2.1.0",
59
- "browserify": "^17.0.1",
60
- "es-jest": "^2.1.0",
61
- "esbuild": "^0.25.9",
62
- "jest": "^30.1.3",
63
- "prettier": "^3.6.2",
64
- "serve": "^14.2.4",
65
- "tinyify": "^4.0.0",
66
- "ts-jest": "^29.4.1",
67
- "typescript": "^5.9.2"
49
+ "@hapi/code": "^9.0.3",
50
+ "@types/node": "^24.10.1",
51
+ "memfs": "^4.51.0",
52
+ "typescript": "^5.9.3"
68
53
  },
69
54
  "aliasify": {
70
55
  "aliases": {
71
56
  "@jsonic/multisource/resolver/file": "@jsonic/multisource/dist/resolver/file.js",
72
57
  "@jsonic/multisource/resolver/pkg": "@jsonic/multisource/dist/resolver/pkg.js",
73
- "@jsonic/multisource/resolver/mem": "@jsonic/multisource/dist/resolver/mem.js",
74
- "@jsonic/jsonic-next/debug": "@jsonic/jsonic-next/dist/debug.js"
58
+ "@jsonic/multisource/resolver/mem": "@jsonic/multisource/dist/resolver/mem.js"
75
59
  }
76
60
  }
77
61
  }
package/aontu.ts DELETED
@@ -1,92 +0,0 @@
1
- /* Copyright (c) 2021-2024 Richard Rodger, MIT License */
2
-
3
- import type { Val, Options, FST } from './lib/type'
4
-
5
- import { Lang } from './lib/lang'
6
- import { Unify, Context } from './lib/unify'
7
- import { Nil } from './lib/val/Nil'
8
- import { MapVal } from './lib/val/MapVal'
9
- import { descErr } from './lib/err'
10
-
11
- // TODO: BUG: foo: { bar: {} } zed: {} puts zed a wrong level
12
-
13
- // TODO: exclude tests from dist!!!
14
- // TODO: propogate property path and url properly over unification, and multisource
15
-
16
- /*
17
- NEXT:
18
- inject path from multisource into Vals when created
19
- report via nil error
20
- also trace deps into top val and watch via model
21
- */
22
-
23
- // TODO: error reporting
24
-
25
- // TODO: debug tracing
26
- // TODO: providers - e.g source files from paths
27
-
28
- // TODO: Aontu should return final generated version?
29
-
30
- /* `Aontu('a:1') => opts={src:'a:1',print:0,...}`
31
- * `Aontu('a:1',{print:1}) => opts={src:'a:1',print:1,...}`
32
- * `Aontu({src:'a:1'},{src:'a:2'}) => opts={src:'a:2',print:0,...}`
33
- */
34
- function Aontu(src: string | Partial<Options>, popts?: Partial<Options>): Val {
35
- // TODO: review: why is an undefined src allowed?
36
-
37
- let opts = prepareOptions(src, popts)
38
-
39
- let deps = {}
40
-
41
- // TODO: handle empty src
42
- let val = parse(opts, { deps })
43
-
44
- if (null == val) {
45
- val = new MapVal({ peg: {} })
46
- }
47
-
48
- let uni = new Unify(val as unknown as Val)
49
- let res = uni.res
50
- let err = uni.err
51
-
52
- descErr(uni.err, { src: opts.src, fs: opts.fs })
53
-
54
- res.deps = deps
55
- res.err = err
56
-
57
- return res
58
- }
59
-
60
- function prepareOptions(
61
- src: string | Partial<Options>,
62
- popts?: Partial<Options>,
63
- ): Options {
64
- // Convert convenience first param into Options.src
65
- let srcopts: Partial<Options> = 'string' === typeof src ? { src } : src
66
-
67
- let opts: Options = {
68
- ...{
69
- src: '',
70
- print: 0,
71
- },
72
- ...srcopts,
73
- ...(popts || {}),
74
- }
75
-
76
- return opts
77
- }
78
-
79
- function parse(opts: Options, ctx: { deps: any; fs?: FST }): Val {
80
- let lang = new Lang(opts)
81
- let val = lang.parse(opts.src, { deps: ctx.deps })
82
- return val
83
- }
84
-
85
- const util = {
86
- parse,
87
- options: prepareOptions,
88
- }
89
-
90
- export { Aontu, Val, Nil, Lang, Context, parse, util }
91
-
92
- export default Aontu
package/dist/lib/err.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { ErrContext } from './type';
2
- import { Nil } from './val/Nil';
3
- declare function descErr<NILS extends Nil | Nil[]>(err: NILS | any, errctx?: ErrContext): any;
4
- export { descErr };
package/dist/lib/err.js DELETED
@@ -1,61 +0,0 @@
1
- "use strict";
2
- /* Copyright (c) 2021-2025 Richard Rodger, MIT License */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.descErr = descErr;
5
- const jsonic_1 = require("jsonic");
6
- const { errmsg } = jsonic_1.util;
7
- // TODO: move to utility?
8
- function descErr(err, errctx) {
9
- var _a, _b, _c;
10
- if (err === null || err === void 0 ? void 0 : err.isNil) {
11
- // console.trace()
12
- if (null == err.msg || '' === err.msg) {
13
- let v1 = err.primary;
14
- let v2 = err.secondary;
15
- let v1src = resolveSrc(v1, errctx);
16
- let v2src = resolveSrc(v2, errctx);
17
- let valpath = (0 < ((_a = err.path) === null || _a === void 0 ? void 0 : _a.length) ? err.path.join('.') : '');
18
- let attempt = (null == v2 ? 'resolve' : 'unify');
19
- err.msg = [
20
- errmsg({
21
- color: true,
22
- name: 'aontu',
23
- code: err.why,
24
- msg: 'Cannot ' +
25
- attempt +
26
- ' path $.' + valpath + ' value' + (null == v2 ? '' : 's'),
27
- }),
28
- (null != v1 && errmsg({
29
- color: true,
30
- msg: 'Cannot ' + attempt + ' value: ' + v1.canon +
31
- (null == v2 ? '' : ' with value: ' + v2.canon),
32
- smsg: 'value was: ' + v1.canon,
33
- file: (_b = v1.url) === null || _b === void 0 ? void 0 : _b.replace(process.cwd() + '/', ''),
34
- src: v1src,
35
- row: v1.row,
36
- col: v1.col,
37
- })),
38
- (null != v2 && errmsg({
39
- color: true,
40
- msg: 'Cannot ' + attempt + ' value: ' + v2.canon + ' with value: ' + v1.canon,
41
- smsg: 'value was: ' + v2.canon,
42
- file: (_c = v2.url) === null || _c === void 0 ? void 0 : _c.replace(process.cwd() + '/', ''),
43
- src: v2src,
44
- row: v2.row,
45
- col: v2.col,
46
- })),
47
- ].filter(n => null != n && false !== n).join('\n');
48
- }
49
- return err;
50
- }
51
- else {
52
- return err.map((n) => descErr(n, errctx));
53
- }
54
- }
55
- function resolveSrc(v, errctx) {
56
- var _a;
57
- let src = null == v || null == v.url ? errctx === null || errctx === void 0 ? void 0 : errctx.src :
58
- ((_a = errctx === null || errctx === void 0 ? void 0 : errctx.fs) === null || _a === void 0 ? void 0 : _a.existsSync(v.url)) ? errctx.fs.readFileSync(v.url, 'utf8') : '';
59
- return src;
60
- }
61
- //# sourceMappingURL=err.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"err.js","sourceRoot":"","sources":["../../lib/err.ts"],"names":[],"mappings":";AAAA,yDAAyD;;AAiFvD,0BAAO;AA9ET,mCAA6B;AAM7B,MAAM,EAAE,MAAM,EAAE,GAAG,aAAI,CAAA;AAGvB,yBAAyB;AACzB,SAAS,OAAO,CACd,GAAe,EACf,MAAmB;;IAEnB,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,EAAE,CAAC;QACf,kBAAkB;QAElB,IAAI,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,KA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EAAE,0CAAE,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5E,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Jsonic } from 'jsonic';
2
- import type { Val, Options } from './type';
3
- declare class Site {
4
- row: number;
5
- col: number;
6
- url: string;
7
- constructor(val: Val);
8
- }
9
- declare class Lang {
10
- jsonic: Jsonic;
11
- options: Options;
12
- constructor(options?: Partial<Options>);
13
- parse(src: string, opts?: Partial<Options>): Val;
14
- }
15
- export { Lang, Site, };