@xyo-network/xml-plugin 3.4.2 → 3.4.4
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/dist/types/Diviner/Config.d.ts +4 -0
- package/dist/types/Diviner/Config.d.ts.map +1 -0
- package/dist/types/Diviner/Diviner.d.ts +13 -0
- package/dist/types/Diviner/Diviner.d.ts.map +1 -0
- package/dist/types/Diviner/Params.d.ts +5 -0
- package/dist/types/Diviner/Params.d.ts.map +1 -0
- package/dist/types/Diviner/Schema.d.ts +3 -0
- package/dist/types/Diviner/Schema.d.ts.map +1 -0
- package/dist/types/Diviner/index.d.ts +3 -0
- package/dist/types/Diviner/index.d.ts.map +1 -0
- package/dist/types/Diviner/lib/StringDataField.d.ts +16 -0
- package/dist/types/Diviner/lib/StringDataField.d.ts.map +1 -0
- package/dist/types/Diviner/lib/index.d.ts +3 -0
- package/dist/types/Diviner/lib/index.d.ts.map +1 -0
- package/dist/types/Diviner/lib/toXml.d.ts +9 -0
- package/dist/types/Diviner/lib/toXml.d.ts.map +1 -0
- package/dist/types/Payload.d.ts +22 -0
- package/dist/types/Payload.d.ts.map +1 -0
- package/dist/types/Schema.d.ts +3 -0
- package/dist/types/Schema.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +16 -16
- package/dist/neutral/index.d.ts +0 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAEhE,MAAM,MAAM,uBAAuB,GAAG,aAAa,CACjD,EAEC,EACD,6BAA6B,CAC9B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
2
|
+
import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import { Xml } from '../Payload.ts';
|
|
5
|
+
import { StringDataField } from './lib/index.ts';
|
|
6
|
+
import { XmlParsingDivinerParams } from './Params.ts';
|
|
7
|
+
export declare class XmlParsingDiviner<TParams extends XmlParsingDivinerParams = XmlParsingDivinerParams, TIn extends Payload<StringDataField> = Payload<StringDataField>, TOut extends Xml | Payload = Xml | Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
|
|
8
|
+
static readonly configSchemas: Schema[];
|
|
9
|
+
static readonly defaultConfigSchema: Schema;
|
|
10
|
+
static readonly targetSchema = "network.xyo.xml";
|
|
11
|
+
protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEpF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAEnC,OAAO,EACe,eAAe,EACpC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAGrD,qBACa,iBAAiB,CAC5B,OAAO,SAAS,uBAAuB,GAAG,uBAAuB,EACjE,GAAG,SAAS,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,EAC/D,IAAI,SAAS,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,EAC1C,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA0D;IAC1G,gBAAyB,mBAAmB,EAAE,MAAM,CAAgC;IACpF,gBAAyB,YAAY,qBAAY;cAExB,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAI9E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DivinerParams } from '@xyo-network/diviner-model';
|
|
2
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import type { XmlParsingDivinerConfig } from './Config.ts';
|
|
4
|
+
export type XmlParsingDivinerParams<TConfig extends AnyConfigSchema<XmlParsingDivinerConfig> = AnyConfigSchema<XmlParsingDivinerConfig>> = DivinerParams<TConfig>;
|
|
5
|
+
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE1D,MAAM,MAAM,uBAAuB,CAAC,OAAO,SAAS,eAAe,CAAC,uBAAuB,CAAC,GAAG,eAAe,CAAC,uBAAuB,CAAC,IACrI,aAAa,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,EAAG,gCAAyC,CAAA;AACtF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing an object with a string data field
|
|
3
|
+
*/
|
|
4
|
+
export interface StringDataField {
|
|
5
|
+
/**
|
|
6
|
+
* The string data
|
|
7
|
+
*/
|
|
8
|
+
data: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Identity for StringDataField
|
|
12
|
+
* @param obj The input object
|
|
13
|
+
* @returns True if the object is a StringDataField, false otherwise
|
|
14
|
+
*/
|
|
15
|
+
export declare const hasStringDataField: (obj?: unknown) => obj is StringDataField;
|
|
16
|
+
//# sourceMappingURL=StringDataField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringDataField.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/lib/StringDataField.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,OAAO,KAAG,GAAG,IAAI,eAEzD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Xml } from '../../Payload.ts';
|
|
2
|
+
import type { StringDataField } from './StringDataField.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Takes a string data field containing xml and converts it to an XML object
|
|
5
|
+
* @param obj The input object which contains the stringified xml data
|
|
6
|
+
* @returns A promise that resolves to an XML payload
|
|
7
|
+
*/
|
|
8
|
+
export declare const toXml: (obj: StringDataField) => Promise<Xml>;
|
|
9
|
+
//# sourceMappingURL=toXml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toXml.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/lib/toXml.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,GAAG,CAYvD,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JsonObject } from '@xylabs/object';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { XmlSchema } from './Schema.ts';
|
|
4
|
+
/**
|
|
5
|
+
* The fields of an Xml Payload
|
|
6
|
+
*/
|
|
7
|
+
export interface XmlFields {
|
|
8
|
+
xml: JsonObject;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An Xml Payload
|
|
12
|
+
*/
|
|
13
|
+
export type Xml = Payload<XmlFields, XmlSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Identity function for determine if an object is an Xml Payload
|
|
16
|
+
*/
|
|
17
|
+
export declare const isXml: (x?: unknown | null) => x is Xml;
|
|
18
|
+
/**
|
|
19
|
+
* Identity function for determine if an object is an Xml Payload with sources
|
|
20
|
+
*/
|
|
21
|
+
export declare const isXmlWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Xml>;
|
|
22
|
+
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,UAAU,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,KAAK,kCAAwC,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,gBAAgB,oFAAmD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,oBAAoB,CAAA;AAC1C,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xml-plugin",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,31 +21,31 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/types/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/object": "^4.
|
|
33
|
-
"@xyo-network/diviner-abstract": "^3.9.
|
|
34
|
-
"@xyo-network/diviner-model": "^3.9.
|
|
35
|
-
"@xyo-network/module-model": "^3.9.
|
|
36
|
-
"@xyo-network/payload-model": "^3.9.
|
|
32
|
+
"@xylabs/object": "^4.6.0",
|
|
33
|
+
"@xyo-network/diviner-abstract": "^3.9.36",
|
|
34
|
+
"@xyo-network/diviner-model": "^3.9.36",
|
|
35
|
+
"@xyo-network/module-model": "^3.9.36",
|
|
36
|
+
"@xyo-network/payload-model": "^3.9.36",
|
|
37
37
|
"xml2js": "^0.6.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/xml2js": "^0.4.14",
|
|
41
|
-
"@xylabs/assert": "^4.
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
43
|
-
"@xylabs/tsconfig": "^
|
|
44
|
-
"@xylabs/vitest-extended": "^4.
|
|
45
|
-
"@xylabs/vitest-matchers": "^4.
|
|
46
|
-
"@xyo-network/api-call-witness": "^3.4.
|
|
47
|
-
"typescript": "^5.
|
|
48
|
-
"vitest": "^3.0.
|
|
41
|
+
"@xylabs/assert": "^4.6.0",
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^6.0.5",
|
|
43
|
+
"@xylabs/tsconfig": "^6.0.5",
|
|
44
|
+
"@xylabs/vitest-extended": "^4.6.0",
|
|
45
|
+
"@xylabs/vitest-matchers": "^4.6.0",
|
|
46
|
+
"@xyo-network/api-call-witness": "^3.4.4",
|
|
47
|
+
"typescript": "^5.8.2",
|
|
48
|
+
"vitest": "^3.0.8"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
package/dist/neutral/index.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DivinerConfig, DivinerParams, DivinerModuleEventData, DivinerInstance } from '@xyo-network/diviner-model';
|
|
2
|
-
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
3
|
-
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
4
|
-
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import { JsonObject } from '@xylabs/object';
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
7
|
-
|
|
8
|
-
declare const XmlParsingDivinerConfigSchema: "network.xyo.diviner.xml.config";
|
|
9
|
-
type XmlParsingDivinerConfigSchema = typeof XmlParsingDivinerConfigSchema;
|
|
10
|
-
|
|
11
|
-
type XmlParsingDivinerConfig = DivinerConfig<{}, XmlParsingDivinerConfigSchema>;
|
|
12
|
-
|
|
13
|
-
declare const XmlSchema = "network.xyo.xml";
|
|
14
|
-
type XmlSchema = typeof XmlSchema;
|
|
15
|
-
|
|
16
|
-
interface XmlFields {
|
|
17
|
-
xml: JsonObject;
|
|
18
|
-
}
|
|
19
|
-
type Xml = Payload<XmlFields, XmlSchema>;
|
|
20
|
-
declare const isXml: (x?: unknown | null) => x is Xml;
|
|
21
|
-
declare const isXmlWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<Xml>;
|
|
22
|
-
|
|
23
|
-
interface StringDataField {
|
|
24
|
-
data: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
type XmlParsingDivinerParams<TConfig extends AnyConfigSchema<XmlParsingDivinerConfig> = AnyConfigSchema<XmlParsingDivinerConfig>> = DivinerParams<TConfig>;
|
|
28
|
-
|
|
29
|
-
declare class XmlParsingDiviner<TParams extends XmlParsingDivinerParams = XmlParsingDivinerParams, TIn extends Payload<StringDataField> = Payload<StringDataField>, TOut extends Xml | Payload = Xml | Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
|
|
30
|
-
static readonly configSchemas: Schema[];
|
|
31
|
-
static readonly defaultConfigSchema: Schema;
|
|
32
|
-
static readonly targetSchema = "network.xyo.xml";
|
|
33
|
-
protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { type Xml, type XmlFields, XmlParsingDiviner, type XmlParsingDivinerConfig, XmlSchema, isXml, isXmlWithSources };
|