@xyo-network/xml-plugin 3.0.3 → 3.0.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/neutral/Diviner/Config.d.ts +4 -0
- package/dist/neutral/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Diviner/Diviner.d.ts +13 -0
- package/dist/neutral/Diviner/Diviner.d.ts.map +1 -0
- package/dist/neutral/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Diviner/Schema.d.ts +3 -0
- package/dist/neutral/Diviner/Schema.d.ts.map +1 -0
- package/dist/neutral/Diviner/index.d.ts +3 -0
- package/dist/neutral/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Diviner/lib/StringDataField.d.ts +5 -0
- package/dist/neutral/Diviner/lib/StringDataField.d.ts.map +1 -0
- package/dist/neutral/Diviner/lib/index.d.ts +3 -0
- package/dist/neutral/Diviner/lib/index.d.ts.map +1 -0
- package/dist/neutral/Diviner/lib/toXml.d.ts +4 -0
- package/dist/neutral/Diviner/lib/toXml.d.ts.map +1 -0
- package/dist/neutral/Payload.d.ts +17 -0
- package/dist/neutral/Payload.d.ts.map +1 -0
- package/dist/neutral/Schema.d.ts +3 -0
- package/dist/neutral/Schema.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +4 -43
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +5 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +34 -34
- package/src/Diviner/Diviner.ts +3 -1
- package/src/Payload.ts +3 -1
- package/xy.config.ts +1 -3
|
@@ -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 targetSchema: string;
|
|
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,OAAgB,YAAY,SAAY;cAEf,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,kCAA4C,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 @@
|
|
|
1
|
+
{"version":3,"file":"StringDataField.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/lib/StringDataField.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAI9B,IAAI,EAAE,MAAM,CAAA;CACb;AAOD,eAAO,MAAM,kBAAkB,SAAU,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 @@
|
|
|
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;AAO3D,eAAO,MAAM,KAAK,QAAS,eAAe,KAAG,OAAO,CAAC,GAAG,CAYvD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { JsonObject } from '@xylabs/object';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { XmlSchema } from './Schema.ts';
|
|
4
|
+
export interface XmlFields {
|
|
5
|
+
xml: JsonObject;
|
|
6
|
+
}
|
|
7
|
+
export type Xml = Payload<XmlFields, XmlSchema>;
|
|
8
|
+
export declare const isXml: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & XmlFields & {
|
|
9
|
+
schema: "network.xyo.xml";
|
|
10
|
+
};
|
|
11
|
+
export declare const isXmlWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & XmlFields & {
|
|
12
|
+
schema: "network.xyo.xml";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const isXmlWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & XmlFields & {
|
|
15
|
+
schema: "network.xyo.xml";
|
|
16
|
+
}>;
|
|
17
|
+
//# 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;AAKzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAKvC,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,UAAU,CAAA;CAChB;AAKD,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAK/C,eAAO,MAAM,KAAK;;CAAwC,CAAA;AAK1D,eAAO,MAAM,gBAAgB;;EAAmD,CAAA;AAKhF,eAAO,MAAM,aAAa;;EAAgD,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"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & XmlFields & {
|
|
21
|
-
schema: "network.xyo.xml";
|
|
22
|
-
};
|
|
23
|
-
declare const isXmlWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & XmlFields & {
|
|
24
|
-
schema: "network.xyo.xml";
|
|
25
|
-
}>;
|
|
26
|
-
declare const isXmlWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & XmlFields & {
|
|
27
|
-
schema: "network.xyo.xml";
|
|
28
|
-
}, void>;
|
|
29
|
-
|
|
30
|
-
interface StringDataField {
|
|
31
|
-
data: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type XmlParsingDivinerParams<TConfig extends AnyConfigSchema<XmlParsingDivinerConfig> = AnyConfigSchema<XmlParsingDivinerConfig>> = DivinerParams<TConfig>;
|
|
35
|
-
|
|
36
|
-
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> {
|
|
37
|
-
static readonly configSchemas: Schema[];
|
|
38
|
-
static readonly defaultConfigSchema: Schema;
|
|
39
|
-
static targetSchema: string;
|
|
40
|
-
protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { type Xml, type XmlFields, XmlParsingDiviner, type XmlParsingDivinerConfig, XmlSchema, isXml, isXmlWithMeta, isXmlWithSources };
|
|
1
|
+
export * from './Diviner/index.ts';
|
|
2
|
+
export * from './Payload.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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/dist/neutral/index.mjs
CHANGED
|
@@ -60,7 +60,11 @@ XmlParsingDiviner = __decorateClass([
|
|
|
60
60
|
], XmlParsingDiviner);
|
|
61
61
|
|
|
62
62
|
// src/Payload.ts
|
|
63
|
-
import {
|
|
63
|
+
import {
|
|
64
|
+
isPayloadOfSchemaType,
|
|
65
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
66
|
+
isPayloadOfSchemaTypeWithSources
|
|
67
|
+
} from "@xyo-network/payload-model";
|
|
64
68
|
var isXml = isPayloadOfSchemaType(XmlSchema);
|
|
65
69
|
var isXmlWithSources = isPayloadOfSchemaTypeWithSources(XmlSchema);
|
|
66
70
|
var isXmlWithMeta = isPayloadOfSchemaTypeWithMeta(XmlSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Diviner/Diviner.ts","../../src/Schema.ts","../../src/Diviner/lib/StringDataField.ts","../../src/Diviner/lib/toXml.ts","../../src/Diviner/Schema.ts","../../src/Payload.ts"],"sourcesContent":["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { Xml } from '../Payload.ts'\nimport { XmlSchema } from '../Schema.ts'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Diviner/Diviner.ts","../../src/Schema.ts","../../src/Diviner/lib/StringDataField.ts","../../src/Diviner/lib/toXml.ts","../../src/Diviner/Schema.ts","../../src/Payload.ts"],"sourcesContent":["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { Xml } from '../Payload.ts'\nimport { XmlSchema } from '../Schema.ts'\nimport {\n hasStringDataField, StringDataField, toXml,\n} from './lib/index.ts'\nimport { XmlParsingDivinerParams } from './Params.ts'\nimport { XmlParsingDivinerConfigSchema } from './Schema.ts'\n\n@creatableModule()\nexport class XmlParsingDiviner<\n TParams extends XmlParsingDivinerParams = XmlParsingDivinerParams,\n TIn extends Payload<StringDataField> = Payload<StringDataField>,\n TOut extends Xml | Payload = Xml | Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, XmlParsingDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = XmlParsingDivinerConfigSchema\n static override targetSchema = XmlSchema\n\n protected override async divineHandler(payloads: TIn[] = []): Promise<TOut[]> {\n const results = await Promise.all(payloads.filter(hasStringDataField).map(toXml))\n return results as TOut[]\n }\n}\n","export const XmlSchema = 'network.xyo.xml'\nexport type XmlSchema = typeof XmlSchema\n","/**\n * Interface representing an object with a string data field\n */\nexport interface StringDataField {\n /**\n * The string data\n */\n data: string\n}\n\n/**\n * Identity for StringDataField\n * @param obj The input object\n * @returns True if the object is a StringDataField, false otherwise\n */\nexport const hasStringDataField = (obj?: unknown): obj is StringDataField => {\n return typeof obj === 'object' && obj !== null && 'data' in obj && typeof (obj as StringDataField)?.data === 'string'\n}\n","import { Parser } from 'xml2js'\n\nimport type { Xml } from '../../Payload.ts'\nimport { XmlSchema } from '../../Schema.ts'\nimport type { StringDataField } from './StringDataField.ts'\n\n/**\n * Takes a string data field containing xml and converts it to an XML object\n * @param obj The input object which contains the stringified xml data\n * @returns A promise that resolves to an XML payload\n */\nexport const toXml = (obj: StringDataField): Promise<Xml> => {\n const parser = new Parser()\n return new Promise<Xml>((resolve, reject) => {\n parser.parseString(obj.data, (err, result) => {\n if (err) {\n reject(err)\n } else {\n const xml = { schema: XmlSchema, xml: result } as const\n resolve(xml)\n }\n })\n })\n}\n","export const XmlParsingDivinerConfigSchema = 'network.xyo.diviner.xml.config' as const\nexport type XmlParsingDivinerConfigSchema = typeof XmlParsingDivinerConfigSchema\n","import type { JsonObject } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nimport { XmlSchema } from './Schema.ts'\n\n/**\n * The fields of an Xml Payload\n */\nexport interface XmlFields {\n xml: JsonObject\n}\n\n/**\n * An Xml Payload\n */\nexport type Xml = Payload<XmlFields, XmlSchema>\n\n/**\n * Identity function for determine if an object is an Xml Payload\n */\nexport const isXml = isPayloadOfSchemaType<Xml>(XmlSchema)\n\n/**\n * Identity function for determine if an object is an Xml Payload with sources\n */\nexport const isXmlWithSources = isPayloadOfSchemaTypeWithSources<Xml>(XmlSchema)\n\n/**\n * Identity function for determine if an object is an Xml Payload with meta\n */\nexport const isXmlWithMeta = isPayloadOfSchemaTypeWithMeta<Xml>(XmlSchema)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;;;ACFzB,IAAM,YAAY;;;ACelB,IAAM,qBAAqB,CAAC,QAA0C;AAC3E,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,UAAU,OAAO,OAAQ,KAAyB,SAAS;AAC/G;;;ACjBA,SAAS,cAAc;AAWhB,IAAM,QAAQ,CAAC,QAAuC;AAC3D,QAAM,SAAS,IAAI,OAAO;AAC1B,SAAO,IAAI,QAAa,CAAC,SAAS,WAAW;AAC3C,WAAO,YAAY,IAAI,MAAM,CAAC,KAAK,WAAW;AAC5C,UAAI,KAAK;AACP,eAAO,GAAG;AAAA,MACZ,OAAO;AACL,cAAM,MAAM,EAAE,QAAQ,WAAW,KAAK,OAAO;AAC7C,gBAAQ,GAAG;AAAA,MACb;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;;;ACvBO,IAAM,gCAAgC;;;AJctC,IAAM,oBAAN,cASG,gBAAgD;AAAA,EAKxD,MAAyB,cAAc,WAAkB,CAAC,GAAoB;AAC5E,UAAM,UAAU,MAAM,QAAQ,IAAI,SAAS,OAAO,kBAAkB,EAAE,IAAI,KAAK,CAAC;AAChF,WAAO;AAAA,EACT;AACF;AARE,cAVW,mBAUc,iBAA0B,CAAC,GAAG,iDAAM,kBAAe,6BAA6B;AACzG,cAXW,mBAWc,uBAA8B;AACvD,cAZW,mBAYK,gBAAe;AAZpB,oBAAN;AAAA,EADN,gBAAgB;AAAA,GACJ;;;AKZb;AAAA,EACE;AAAA,EAAuB;AAAA,EAA+B;AAAA,OACjD;AAmBA,IAAM,QAAQ,sBAA2B,SAAS;AAKlD,IAAM,mBAAmB,iCAAsC,SAAS;AAKxE,IAAM,gBAAgB,8BAAmC,SAAS;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xml-plugin",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"url": "https://xyo.network"
|
|
7
|
-
},
|
|
3
|
+
"version": "3.0.4",
|
|
4
|
+
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
|
+
"homepage": "https://xyo.network",
|
|
8
6
|
"bugs": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
7
|
+
"url": "git+https://github.com/XYOracleNetwork/plugins/issues",
|
|
8
|
+
"email": "support@xyo.network"
|
|
11
9
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"@xyo-network/diviner-model": "^3.0.3",
|
|
16
|
-
"@xyo-network/module-model": "^3.0.3",
|
|
17
|
-
"@xyo-network/payload-model": "^3.0.3",
|
|
18
|
-
"xml2js": "^0.6.2"
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/XYOracleNetwork/plugins.git"
|
|
19
13
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"@xylabs/tsconfig": "^4.0.0-rc.20",
|
|
26
|
-
"@xyo-network/api-call-witness": "^3.0.3",
|
|
27
|
-
"jest": "^29.7.0",
|
|
28
|
-
"typescript": "^5.5.4"
|
|
14
|
+
"license": "LGPL-3.0-only",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "XYO Development Team",
|
|
17
|
+
"email": "support@xyo.network",
|
|
18
|
+
"url": "https://xyo.network"
|
|
29
19
|
},
|
|
30
|
-
"
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"type": "module",
|
|
31
22
|
"exports": {
|
|
32
23
|
".": {
|
|
33
24
|
"types": "./dist/neutral/index.d.ts",
|
|
@@ -37,16 +28,25 @@
|
|
|
37
28
|
},
|
|
38
29
|
"module": "dist/neutral/index.mjs",
|
|
39
30
|
"types": "dist/neutral/index.d.ts",
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@xylabs/object": "^4.0.4",
|
|
33
|
+
"@xyo-network/diviner-abstract": "^3.0.10",
|
|
34
|
+
"@xyo-network/diviner-model": "^3.0.10",
|
|
35
|
+
"@xyo-network/module-model": "^3.0.10",
|
|
36
|
+
"@xyo-network/payload-model": "^3.0.10",
|
|
37
|
+
"xml2js": "^0.6.2"
|
|
44
38
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/xml2js": "^0.4.14",
|
|
41
|
+
"@xylabs/assert": "^4.0.4",
|
|
42
|
+
"@xylabs/jest-helpers": "^4.0.4",
|
|
43
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.7",
|
|
44
|
+
"@xylabs/tsconfig": "^4.0.7",
|
|
45
|
+
"@xyo-network/api-call-witness": "^3.0.4",
|
|
46
|
+
"jest": "^29.7.0",
|
|
47
|
+
"typescript": "^5.5.4"
|
|
48
48
|
},
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
52
52
|
}
|
package/src/Diviner/Diviner.ts
CHANGED
|
@@ -5,7 +5,9 @@ import { Payload, Schema } from '@xyo-network/payload-model'
|
|
|
5
5
|
|
|
6
6
|
import { Xml } from '../Payload.ts'
|
|
7
7
|
import { XmlSchema } from '../Schema.ts'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
hasStringDataField, StringDataField, toXml,
|
|
10
|
+
} from './lib/index.ts'
|
|
9
11
|
import { XmlParsingDivinerParams } from './Params.ts'
|
|
10
12
|
import { XmlParsingDivinerConfigSchema } from './Schema.ts'
|
|
11
13
|
|
package/src/Payload.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { JsonObject } from '@xylabs/object'
|
|
2
2
|
import type { Payload } from '@xyo-network/payload-model'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources,
|
|
5
|
+
} from '@xyo-network/payload-model'
|
|
4
6
|
|
|
5
7
|
import { XmlSchema } from './Schema.ts'
|
|
6
8
|
|