@xyo-network/xml-plugin 5.4.7 → 5.4.10
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
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';
|
|
2
|
+
import type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import type { Xml } from '../Payload.ts';
|
|
5
|
+
import type { StringDataField } from './lib/index.ts';
|
|
6
|
+
import type { XmlParsingDivinerParams } from './Params.ts';
|
|
7
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
8
|
static readonly configSchemas: Schema[];
|
|
9
9
|
static readonly defaultConfigSchema: Schema;
|
|
@@ -1 +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;
|
|
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,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAG1D,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;;MAAY;cAExB,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAI9E"}
|
|
@@ -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 type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\n\nimport type { Xml } from '../Payload.ts'\nimport { XmlSchema } from '../Schema.ts'\nimport type { StringDataField } from './lib/index.ts'\nimport { hasStringDataField, toXml } from './lib/index.ts'\nimport type { 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 readonly 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","import { asSchema } from '@xyo-network/payload-model'\n\nexport const XmlSchema = asSchema('network.xyo.xml', true)\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","import { asSchema } from '@xyo-network/payload-model'\n\nexport const XmlParsingDivinerConfigSchema = asSchema('network.xyo.diviner.xml.config', true)\nexport type XmlParsingDivinerConfigSchema = typeof XmlParsingDivinerConfigSchema\n","import type { JsonObject } from '@xylabs/sdk-js'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } 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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o-network/xml-plugin",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.10",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -31,88 +31,83 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
34
|
+
"@bitauth/libauth": "~3.0.0",
|
|
35
|
+
"@metamask/providers": "^22.1.1",
|
|
36
|
+
"@opentelemetry/api": "^1.9.1",
|
|
37
|
+
"@opentelemetry/sdk-trace-base": "^2.7.0",
|
|
38
|
+
"@scure/base": "^2.2.0",
|
|
39
|
+
"@scure/bip39": "~2.2.0",
|
|
40
|
+
"@types/node": "^25.6.0",
|
|
36
41
|
"@types/xml2js": "~0.4.14",
|
|
37
|
-
"@xylabs/
|
|
38
|
-
"@xylabs/
|
|
39
|
-
"@xylabs/
|
|
40
|
-
"@xylabs/
|
|
41
|
-
"@xylabs/
|
|
42
|
-
"@xylabs/vitest-
|
|
43
|
-
"@
|
|
44
|
-
"@xyo-network/account": "~5.
|
|
45
|
-
"@xyo-network/account-model": "
|
|
46
|
-
"@xyo-network/api
|
|
47
|
-
"@xyo-network/
|
|
48
|
-
"@xyo-network/
|
|
49
|
-
"@xyo-network/
|
|
50
|
-
"@xyo-network/
|
|
51
|
-
"@xyo-network/
|
|
52
|
-
"@xyo-network/
|
|
53
|
-
"@xyo-network/
|
|
54
|
-
"@xyo-network/
|
|
55
|
-
"@xyo-network/
|
|
56
|
-
"@xyo-network/
|
|
57
|
-
"@xyo-network/
|
|
58
|
-
"@xyo-network/
|
|
59
|
-
"@xyo-network/
|
|
60
|
-
"@xyo-network/
|
|
61
|
-
"@xyo-network/
|
|
62
|
-
"@xyo-network/
|
|
63
|
-
"@xyo-network/
|
|
64
|
-
"@xyo-network/
|
|
65
|
-
"@xyo-network/
|
|
66
|
-
"@xyo-network/
|
|
67
|
-
"@xyo-network/
|
|
68
|
-
"@xyo-network/
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"@xyo-network/sdk-js": "^5.3.30",
|
|
87
|
-
"@xyo-network/sentinel-abstract": "~5.3.30",
|
|
88
|
-
"@xyo-network/sentinel-memory": "~5.3.30",
|
|
89
|
-
"@xyo-network/sentinel-model": "~5.3.30",
|
|
90
|
-
"@xyo-network/wallet-model": "~5.3.30",
|
|
91
|
-
"@xyo-network/wasm": "~5.3.30",
|
|
92
|
-
"@xyo-network/witness-adhoc": "~5.3.30",
|
|
93
|
-
"@xyo-network/witness-model": "^5.3.30",
|
|
94
|
-
"axios": "^1.15.0",
|
|
95
|
-
"base64-js": "^1",
|
|
96
|
-
"es6-dynamic-template": "^2",
|
|
97
|
-
"esbuild": ">=0.18",
|
|
98
|
-
"ethers": "^6",
|
|
42
|
+
"@xylabs/geo": "^5.0.101",
|
|
43
|
+
"@xylabs/sdk-js": "^5.0.100",
|
|
44
|
+
"@xylabs/threads": "^5.0.100",
|
|
45
|
+
"@xylabs/toolchain": "~7.11.12",
|
|
46
|
+
"@xylabs/tsconfig": "~7.11.12",
|
|
47
|
+
"@xylabs/vitest-extended": "~5.0.100",
|
|
48
|
+
"@xylabs/vitest-matchers": "~5.0.100",
|
|
49
|
+
"@xyo-network/account": "~5.5.2",
|
|
50
|
+
"@xyo-network/account-model": "^5.5.2",
|
|
51
|
+
"@xyo-network/api": "~5.5.2",
|
|
52
|
+
"@xyo-network/api-models": "~5.5.2",
|
|
53
|
+
"@xyo-network/boundwitness-builder": "~5.5.2",
|
|
54
|
+
"@xyo-network/boundwitness-model": "^5.5.2",
|
|
55
|
+
"@xyo-network/boundwitness-validator": "^5.5.2",
|
|
56
|
+
"@xyo-network/boundwitness-wrapper": "~5.5.2",
|
|
57
|
+
"@xyo-network/config-payload-plugin": "~5.5.2",
|
|
58
|
+
"@xyo-network/diviner-abstract": "^5.5.6",
|
|
59
|
+
"@xyo-network/diviner-model": "^5.5.6",
|
|
60
|
+
"@xyo-network/huri": "~5.5.2",
|
|
61
|
+
"@xyo-network/manifest-model": "~5.5.2",
|
|
62
|
+
"@xyo-network/module-model": "^5.5.6",
|
|
63
|
+
"@xyo-network/payload-builder": "~5.5.2",
|
|
64
|
+
"@xyo-network/payload-model": "^5.5.2",
|
|
65
|
+
"@xyo-network/payload-plugin": "~5.5.2",
|
|
66
|
+
"@xyo-network/payload-wrapper": "~5.5.2",
|
|
67
|
+
"@xyo-network/query-payload-plugin": "~5.5.2",
|
|
68
|
+
"@xyo-network/sdk-js": "^5.5.6",
|
|
69
|
+
"@xyo-network/sdk-protocol-js": "~5.5.2",
|
|
70
|
+
"@xyo-network/wallet": "~5.5.2",
|
|
71
|
+
"@xyo-network/wallet-model": "~5.5.2",
|
|
72
|
+
"@xyo-network/witness-abstract": "^5.5.6",
|
|
73
|
+
"@xyo-network/witness-model": "^5.5.6",
|
|
74
|
+
"ajv": "^8.18.0",
|
|
75
|
+
"async-mutex": "^0.5.0",
|
|
76
|
+
"axios": "^1.15.2",
|
|
77
|
+
"base64-js": "^1.5.1",
|
|
78
|
+
"bn.js": "^5.2.3",
|
|
79
|
+
"buffer": "^6.0.3",
|
|
80
|
+
"chalk": "^5.6.2",
|
|
81
|
+
"debug": "~4.4.3",
|
|
82
|
+
"es6-dynamic-template": "^2.0.0",
|
|
83
|
+
"esbuild": "~0.28.0",
|
|
84
|
+
"eslint": "^10.2.1",
|
|
85
|
+
"ethers": "^6.16.0",
|
|
86
|
+
"hash-wasm": "^4.12.0",
|
|
87
|
+
"idb": "^8.0.3",
|
|
88
|
+
"lru-cache": "^11.3.5",
|
|
89
|
+
"mapbox-gl": "^3.22.0",
|
|
90
|
+
"observable-fns": "~0.6.1",
|
|
99
91
|
"pako": "~2.1.0",
|
|
92
|
+
"store2": "~2.14.4",
|
|
100
93
|
"tslib": "^2.8.1",
|
|
101
94
|
"typescript": "~5.9.3",
|
|
102
|
-
"vite": "^8.0.
|
|
103
|
-
"vitest": "
|
|
104
|
-
"
|
|
95
|
+
"vite": "^8.0.10",
|
|
96
|
+
"vitest": "^4.1.5",
|
|
97
|
+
"wasm-feature-detect": "~1.8.0",
|
|
98
|
+
"webextension-polyfill": "^0.12.0",
|
|
99
|
+
"xml2js": "^0.6.2",
|
|
105
100
|
"zod": "^4.3.6",
|
|
106
|
-
"@xyo-network/api-call-witness": "~5.4.
|
|
101
|
+
"@xyo-network/api-call-witness": "~5.4.10"
|
|
107
102
|
},
|
|
108
103
|
"peerDependencies": {
|
|
109
|
-
"@xylabs/sdk-js": "
|
|
110
|
-
"@xyo-network/diviner-abstract": "
|
|
111
|
-
"@xyo-network/diviner-model": "
|
|
112
|
-
"@xyo-network/module-model": "
|
|
113
|
-
"@xyo-network/payload-model": "
|
|
114
|
-
"xml2js": "
|
|
115
|
-
"zod": "
|
|
104
|
+
"@xylabs/sdk-js": ">=5.0.100 <6",
|
|
105
|
+
"@xyo-network/diviner-abstract": ">=5.5.6 <6",
|
|
106
|
+
"@xyo-network/diviner-model": ">=5.5.6 <6",
|
|
107
|
+
"@xyo-network/module-model": ">=5.5.6 <6",
|
|
108
|
+
"@xyo-network/payload-model": ">=5.5.2 <6",
|
|
109
|
+
"xml2js": ">=0.6.2 <1",
|
|
110
|
+
"zod": ">=4.3.6 <5"
|
|
116
111
|
},
|
|
117
112
|
"publishConfig": {
|
|
118
113
|
"access": "public"
|