@xyo-network/witness-environment 5.3.22 → 5.3.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/witness-environment",
3
- "version": "5.3.22",
3
+ "version": "5.3.24",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,45 +30,41 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
35
  "!**/*.test.*",
37
36
  "README.md"
38
37
  ],
39
38
  "dependencies": {
40
- "@xyo-network/abstract-witness": "~5.3.22",
41
- "@xyo-network/module-model": "~5.3.22",
42
- "@xyo-network/payload-model": "~5.3.22",
43
- "@xyo-network/value-payload-plugin": "~5.3.22",
44
- "@xyo-network/witness-model": "~5.3.22"
39
+ "@xyo-network/abstract-witness": "~5.3.24",
40
+ "@xyo-network/payload-model": "~5.3.24",
41
+ "@xyo-network/witness-model": "~5.3.24",
42
+ "@xyo-network/module-model": "~5.3.24",
43
+ "@xyo-network/value-payload-plugin": "~5.3.24"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@opentelemetry/api": "^1.9.1",
48
47
  "@types/node": "^25.5.0",
49
- "@xylabs/sdk-js": "^5.0.91",
50
- "@xylabs/ts-scripts-common": "~7.6.8",
51
- "@xylabs/ts-scripts-yarn3": "~7.6.8",
52
- "@xylabs/tsconfig": "~7.6.8",
53
- "@xylabs/vitest-extended": "~5.0.91",
54
- "@xyo-network/abstract-witness": "~5.3.22",
55
- "@xyo-network/account": "~5.3.22",
56
- "@xyo-network/module-model": "~5.3.22",
57
- "@xyo-network/payload-model": "~5.3.22",
58
- "@xyo-network/value-payload-plugin": "~5.3.22",
59
- "@xyo-network/witness-model": "~5.3.22",
48
+ "@xylabs/sdk-js": "^5.0.93",
49
+ "@xylabs/ts-scripts-common": "~7.6.16",
50
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
51
+ "@xylabs/tsconfig": "~7.6.16",
52
+ "@xylabs/vitest-extended": "~5.0.93",
60
53
  "acorn": "^8.16.0",
61
54
  "axios": "^1.14.0",
62
- "cosmiconfig": "^9.0.1",
63
- "esbuild": "^0.27.4",
64
- "eslint": "^10.1.0",
55
+ "esbuild": "^0.28.0",
65
56
  "ethers": "^6.16.0",
66
- "rollup": "^4.60.1",
67
57
  "tslib": "^2.8.1",
68
58
  "typescript": "~5.9.3",
69
59
  "vite": "^8.0.3",
70
60
  "vitest": "~4.1.2",
71
- "zod": "^4.3.6"
61
+ "zod": "^4.3.6",
62
+ "@xyo-network/abstract-witness": "~5.3.24",
63
+ "@xyo-network/module-model": "~5.3.24",
64
+ "@xyo-network/payload-model": "~5.3.24",
65
+ "@xyo-network/value-payload-plugin": "~5.3.24",
66
+ "@xyo-network/account": "~5.3.24",
67
+ "@xyo-network/witness-model": "~5.3.24"
72
68
  },
73
69
  "peerDependencies": {
74
70
  "@xylabs/sdk-js": "^5",
@@ -78,4 +74,4 @@
78
74
  "publishConfig": {
79
75
  "access": "public"
80
76
  }
81
- }
77
+ }
package/src/Config.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { WithAdditional } from '@xylabs/sdk-js'
2
- import { asSchema, type Payload } from '@xyo-network/payload-model'
3
- import type { WitnessConfig } from '@xyo-network/witness-model'
4
-
5
- export const EnvironmentWitnessConfigSchema = asSchema('network.xyo.witness.environment.config', true)
6
- export type EnvironmentWitnessConfigSchema = typeof EnvironmentWitnessConfigSchema
7
-
8
- export type EnvironmentWitnessConfig<TConfig extends Payload | undefined = undefined> = WitnessConfig<
9
- WithAdditional<
10
- {
11
- schema: TConfig extends Payload ? TConfig['schema'] : EnvironmentWitnessConfigSchema
12
- },
13
- TConfig
14
- >
15
- >
package/src/Params.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { AnyConfigSchema } from '@xyo-network/module-model'
2
- import type { WitnessParams } from '@xyo-network/witness-model'
3
-
4
- import type { EnvironmentWitnessConfig } from './Config.ts'
5
-
6
- export type EnvironmentWitnessParams<TConfig extends AnyConfigSchema<EnvironmentWitnessConfig> = AnyConfigSchema<EnvironmentWitnessConfig>>
7
- = WitnessParams<TConfig>
package/src/Payload.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
- import { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'
3
-
4
- import { EnvironmentSchema } from './Schema.ts'
5
-
6
- export const EnvironmentSubsetSchema = asSchema(`${EnvironmentSchema}.subset`, true)
7
- export type EnvironmentSubsetSchema = typeof EnvironmentSubsetSchema
8
-
9
- export type EnvironmentSubset = Payload<{ values: string[] }, EnvironmentSubsetSchema>
10
-
11
- export const isEnvironmentSubsetPayload = isPayloadOfSchemaType<EnvironmentSubset>(EnvironmentSubsetSchema)
package/src/Schema.ts DELETED
@@ -1,4 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- export const EnvironmentSchema = asSchema('network.xyo.environment', true)
4
- export type EnvironmentSchema = typeof EnvironmentSchema
package/src/Witness.ts DELETED
@@ -1,27 +0,0 @@
1
- import type { JsonValue } from '@xylabs/sdk-js'
2
- import { AbstractWitness } from '@xyo-network/abstract-witness'
3
- import type { Payload, Schema } from '@xyo-network/payload-model'
4
- import type { Value } from '@xyo-network/value-payload-plugin'
5
- import { ValueSchema } from '@xyo-network/value-payload-plugin'
6
-
7
- import { EnvironmentWitnessConfigSchema } from './Config.ts'
8
- import type { EnvironmentWitnessParams } from './Params.ts'
9
- import type { EnvironmentSubset } from './Payload.ts'
10
- import { isEnvironmentSubsetPayload } from './Payload.ts'
11
-
12
- const schema = ValueSchema
13
-
14
- export class EnvironmentWitness<P extends EnvironmentWitnessParams = EnvironmentWitnessParams> extends AbstractWitness<P> {
15
- static override readonly configSchemas: Schema[] = [...super.configSchemas, EnvironmentWitnessConfigSchema]
16
- static override readonly defaultConfigSchema: Schema = EnvironmentWitnessConfigSchema
17
- protected override observeHandler(payloads?: Payload[]): Payload[] {
18
- const subsets = payloads?.filter(isEnvironmentSubsetPayload) ?? [undefined]
19
- return subsets.map(getEnv)
20
- }
21
- }
22
-
23
- const getEnv = (payload?: EnvironmentSubset): Value => {
24
- const subset = payload?.values
25
- const env = (subset ? Object.fromEntries(subset.map(key => [key, process.env[key]])) : process.env) as JsonValue
26
- return { schema, value: env }
27
- }
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './Config.ts'
2
- export * from './Params.ts'
3
- export * from './Payload.ts'
4
- export * from './Witness.ts'