@xyo-network/pentair-plugin 4.1.1 → 5.0.0
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/index.d.ts +3 -22
- package/package.json +16 -13
- package/src/spec/Plugin.spec.ts +19 -0
- package/src/spec/Witness.spec.ts +17 -0
- package/typedoc.json +0 -5
- package/xy.config.ts +0 -10
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { Schema, Payload } from '@xyo-network/payload-model';
|
|
5
|
-
import { WitnessParams, WitnessConfig } from '@xyo-network/witness-model';
|
|
6
|
-
|
|
7
|
-
type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
8
|
-
declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
9
|
-
type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
10
|
-
schema: PentairScreenlogicWitnessConfigSchema;
|
|
11
|
-
}>;
|
|
12
|
-
type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
13
|
-
declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
14
|
-
static readonly configSchemas: Schema[];
|
|
15
|
-
static readonly defaultConfigSchema: Schema;
|
|
16
|
-
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare const PentairScreenlogicPlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<PentairScreenlogicWitness<PentairScreenlogicWitnessParams>>;
|
|
20
|
-
|
|
21
|
-
export { PentairScreenlogicPlugin, PentairScreenlogicWitness, PentairScreenlogicWitnessConfigSchema, PentairScreenlogicPlugin as default };
|
|
22
|
-
export type { PentairScreenlogicWitnessConfig, PentairScreenlogicWitnessParams };
|
|
1
|
+
export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
|
|
2
|
+
export * from './Witness.ts';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/pentair-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -28,22 +28,25 @@
|
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"src"
|
|
34
|
+
],
|
|
31
35
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^
|
|
33
|
-
"@xyo-network/abstract-witness": "^
|
|
34
|
-
"@xyo-network/module-model": "^
|
|
35
|
-
"@xyo-network/payload-model": "^
|
|
36
|
-
"@xyo-network/payloadset-plugin": "^
|
|
37
|
-
"@xyo-network/pentair-payload-plugin": "^
|
|
38
|
-
"@xyo-network/witness-model": "^
|
|
36
|
+
"@xylabs/assert": "^5.0.0",
|
|
37
|
+
"@xyo-network/abstract-witness": "^5.0.0",
|
|
38
|
+
"@xyo-network/module-model": "^5.0.0",
|
|
39
|
+
"@xyo-network/payload-model": "^5.0.0",
|
|
40
|
+
"@xyo-network/payloadset-plugin": "^5.0.0",
|
|
41
|
+
"@xyo-network/pentair-payload-plugin": "^5.0.0",
|
|
42
|
+
"@xyo-network/witness-model": "^5.0.0",
|
|
39
43
|
"node-screenlogic": "^2.1.1"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.
|
|
43
|
-
"@xylabs/tsconfig": "^7.0.
|
|
44
|
-
"@xylabs/vitest-extended": "^
|
|
45
|
-
"@xyo-network/payload-wrapper": "^
|
|
46
|
-
"knip": "^5.62.0",
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.2",
|
|
47
|
+
"@xylabs/tsconfig": "^7.0.2",
|
|
48
|
+
"@xylabs/vitest-extended": "^5.0.0",
|
|
49
|
+
"@xyo-network/payload-wrapper": "^5.0.0",
|
|
47
50
|
"typescript": "^5.8.3",
|
|
48
51
|
"vitest": "^3.2.4"
|
|
49
52
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '@xylabs/vitest-extended'
|
|
2
|
+
|
|
3
|
+
import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
|
|
4
|
+
import {
|
|
5
|
+
describe, expect,
|
|
6
|
+
test,
|
|
7
|
+
} from 'vitest'
|
|
8
|
+
|
|
9
|
+
import { PentairScreenlogicPlugin } from '../Plugin.ts'
|
|
10
|
+
import { PentairScreenlogicWitnessConfigSchema } from '../Witness.ts'
|
|
11
|
+
|
|
12
|
+
describe('PentairScreenlogicPlugin', () => {
|
|
13
|
+
test('Add to Resolver', async () => {
|
|
14
|
+
const plugin = PentairScreenlogicPlugin()
|
|
15
|
+
const resolver = await new PayloadSetPluginResolver().register(plugin, { config: { schema: PentairScreenlogicWitnessConfigSchema } })
|
|
16
|
+
expect(await resolver.resolve(plugin.set)).toBeObject()
|
|
17
|
+
expect(await resolver.witness(plugin.set)).toBeObject()
|
|
18
|
+
})
|
|
19
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@xylabs/vitest-extended'
|
|
2
|
+
|
|
3
|
+
import { PayloadWrapper } from '@xyo-network/payload-wrapper'
|
|
4
|
+
import {
|
|
5
|
+
describe, expect,
|
|
6
|
+
test,
|
|
7
|
+
} from 'vitest'
|
|
8
|
+
|
|
9
|
+
import { PentairScreenlogicWitness } from '../Witness.ts'
|
|
10
|
+
|
|
11
|
+
describe('PentairScreenLogicWitness', () => {
|
|
12
|
+
test.skipIf(process.env.TEST_PENTAIR !== 'true')('Witnessing [no config]', async () => {
|
|
13
|
+
const witness = await PentairScreenlogicWitness.create({ account: 'random' })
|
|
14
|
+
const [observation] = await witness.observe()
|
|
15
|
+
expect(await PayloadWrapper.wrap(observation).getValid()).toBe(true)
|
|
16
|
+
})
|
|
17
|
+
})
|
package/typedoc.json
DELETED