@ygracs/xobj-lib-js 0.2.6-b → 0.2.8-b

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/CHANGELOG.md CHANGED
@@ -3,6 +3,7 @@
3
3
  Release version.
4
4
 
5
5
  > - update `xObj.md`;
6
+ > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.3.3;
6
7
  > - add a new `EvalKeyNameError` class;
7
8
  > - some fixes.
8
9
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2025 Yuri Grachev
3
+ Copyright (c) 2019-2026 Yuri Grachev
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/index.d.ts CHANGED
@@ -41,10 +41,12 @@ declare const _exports: {
41
41
  genXObjENameDescr: typeof import("./lib/xObj-lib").genXObjENameDescr;
42
42
  insertXObjElements: typeof import("./lib/xObj-lib").insertXObjElements;
43
43
  insertXObjEChain: typeof import("./lib/xObj-lib").insertXObjEChain;
44
- TXmlContentParseOptions: typeof TXmlContentParseOptions;
44
+
45
+ TXmlContentParseOptions: typeof TXmlContentParseOptions; // [?] class declaration
45
46
  DEF_XML_PARSE_OPTIONS: typeof DEF_XML_PARSE_OPTIONS;
46
47
  XOBJ_DEF_TNAMES: typeof XOBJ_DEF_TNAMES;
47
- EvalKeyNameError: typeof EvalKeyNameError;
48
+
49
+ EvalKeyNameError: typeof EvalKeyNameError; // [?] class declaration
48
50
 
49
51
  xml2jsParseOptions: xml2jsParseOptions;
50
52
  js2xmlParseOptions: js2xmlParseOptions;
@@ -70,40 +70,14 @@ export type js2xmlParseOptions = {
70
70
  spaces?: any;
71
71
  };
72
72
 
73
- export const XOBJ_DEF_PARAM_TNAME: "__text";
74
- export const XOBJ_DEF_ATTR_TNAME: "__attr";
75
73
  export namespace XOBJ_DEF_TNAMES {
76
74
  export { XOBJ_DEF_PARAM_TNAME };
77
75
  export { XOBJ_DEF_ATTR_TNAME };
78
76
  export { XOBJ_DEF_DECL_TNAME };
79
77
  export { XOBJ_DEF_CDATA_TNAME };
80
78
  }
81
- export namespace DEF_XML_PARSE_OPTIONS {
82
- export let compact: boolean;
83
- export { XOBJ_DEF_DECL_TNAME as declarationKey };
84
- export { XOBJ_DEF_ATTR_TNAME as attributesKey };
85
- export { XOBJ_DEF_PARAM_TNAME as textKey };
86
- export let commentKey: string;
87
- export { XOBJ_DEF_CDATA_TNAME as cdataKey };
88
- export let nameKey: string;
89
- export let typeKey: string;
90
- export let parentKey: string;
91
- export let elementsKey: string;
92
- export let ignoreDeclaration: boolean;
93
- export let ignoreDocType: boolean;
94
- /** @deprecated */
95
- export let ignoreInstractions: boolean;
96
- export let ignoreInstraction: boolean;
97
- export let ignoreText: boolean;
98
- /** @deprecated */
99
- export let ignoreComments: boolean;
100
- export let ignoreComment: boolean;
101
- export let ignoreCData: boolean;
102
- export let fullTagEmptyElement: boolean;
103
- export let addParent: boolean;
104
- export let trim: boolean;
105
- export let spaces: number;
106
- }
79
+
80
+ export const DEF_XML_PARSE_OPTIONS: OPT_parserOptions;
107
81
 
108
82
  /**
109
83
  * @classdesc Implements a container that provide a functionality to work
@@ -137,6 +111,8 @@ export class TXmlContentParseOptions {
137
111
  #private;
138
112
  }
139
113
 
114
+ declare const XOBJ_DEF_PARAM_TNAME: "__text";
115
+ declare const XOBJ_DEF_ATTR_TNAME: "__attr";
140
116
  declare const XOBJ_DEF_DECL_TNAME: "__decl";
141
117
  declare const XOBJ_DEF_CDATA_TNAME: "__cdata";
142
118
  export {};
package/lib/xObj-defs.js CHANGED
@@ -1,4 +1,4 @@
1
- // [v0.1.068-20251229]
1
+ // [v0.1.067-20260101]
2
2
 
3
3
  // === module init block ===
4
4
 
@@ -25,6 +25,9 @@ const XOBJ_DEF_TNAMES = {
25
25
  XOBJ_DEF_DECL_TNAME,
26
26
  XOBJ_DEF_CDATA_TNAME,
27
27
  };
28
+ //module.exports.XOBJ_DEF_PARAM_TNAME = XOBJ_DEF_PARAM_TNAME;
29
+ //module.exports.XOBJ_DEF_ATTR_TNAME = XOBJ_DEF_ATTR_TNAME;
30
+ module.exports.XOBJ_DEF_TNAMES = XOBJ_DEF_TNAMES;
28
31
 
29
32
  /**
30
33
  * A parser options settings
@@ -78,6 +81,7 @@ const DEF_XML_PARSE_OPTIONS = {
78
81
  trim: true,
79
82
  spaces: 2,
80
83
  };
84
+ module.exports.DEF_XML_PARSE_OPTIONS = DEF_XML_PARSE_OPTIONS;
81
85
 
82
86
  /***
83
87
  * (* function definitions *)
@@ -281,12 +285,4 @@ class TXmlContentParseOptions {
281
285
  }
282
286
 
283
287
  }
284
-
285
- // === module exports block ===
286
-
287
- module.exports.XOBJ_DEF_PARAM_TNAME = XOBJ_DEF_PARAM_TNAME;
288
- module.exports.XOBJ_DEF_ATTR_TNAME = XOBJ_DEF_ATTR_TNAME;
289
- module.exports.XOBJ_DEF_TNAMES = XOBJ_DEF_TNAMES;
290
- module.exports.DEF_XML_PARSE_OPTIONS = DEF_XML_PARSE_OPTIONS;
291
-
292
288
  module.exports.TXmlContentParseOptions = TXmlContentParseOptions;
package/lib/xObj-lib.d.ts CHANGED
@@ -2,38 +2,56 @@
2
2
  * A result of a value check ops.
3
3
  */
4
4
  export type RVAL_reason = {
5
- /** - message ID */
5
+ /**
6
+ * - message ID
7
+ */
6
8
  code: string;
7
- /** - message text */
9
+ /**
10
+ * - message text
11
+ */
8
12
  msg: string;
9
13
  };
10
14
  /**
11
15
  * A result of a value check ops.
12
16
  */
13
17
  export type VCOR_evalkname = {
14
- /** - ops flag */
18
+ /**
19
+ * - ops flag
20
+ */
15
21
  isSucceed: boolean;
16
- /** - result value or reson if failed */
22
+ /**
23
+ * - result value or reson if failed
24
+ */
17
25
  value: string | RVAL_reason;
18
26
  };
19
27
  /**
20
28
  * A result of an element name pattern evaluation ops.
21
29
  */
22
30
  export type XObjENameDescr = {
23
- /** - ops flag */
31
+ /**
32
+ * - ops flag
33
+ */
24
34
  isERR: boolean;
25
- /** - element name */
35
+ /**
36
+ * - element name
37
+ */
26
38
  name: null | number | string;
27
- /** - some conditions applied to an element */
39
+ /**
40
+ * - some conditions applied to an element
41
+ */
28
42
  conditions: object | null;
29
43
  };
30
44
  /**
31
45
  * A result of an xObj modification ops
32
46
  */
33
47
  export type RVAL_emodif = {
34
- /** - flag that indicates whether an ops is succeed or not */
48
+ /**
49
+ * - flag that indicates whether an ops is succeed or not
50
+ */
35
51
  isSucceed: boolean;
36
- /** - some element as a result */
52
+ /**
53
+ * - some element as a result
54
+ */
37
55
  item: object | object[] | null;
38
56
  };
39
57
  /**
@@ -295,3 +313,4 @@ export function insertXObjElements(obj: object, ...args: any[]): number;
295
313
  * @throws {TypeError} if first param is not an object
296
314
  */
297
315
  export function insertXObjEChain(obj: object, ...args: any[]): any | null;
316
+ export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ygracs/xobj-lib-js",
3
- "version": "0.2.6-b",
3
+ "version": "0.2.8-b",
4
4
  "description": "A helper library to work with xml-js module",
5
5
  "author": "ygracs <cs70th-om@rambler.ru>",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "#test-dir/*": "./__test__/*"
32
32
  },
33
33
  "dependencies": {
34
- "@ygracs/bsfoc-lib-js": "^0.3.1-b"
34
+ "@ygracs/bsfoc-lib-js": "^0.3.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@ygracs/test-helper": "~0.0.1-b",