@xyo-network/domain-plugin 4.2.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/domain-plugin",
3
- "version": "4.2.0",
3
+ "version": "5.0.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -28,19 +28,23 @@
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/promise": "^4.15.1",
33
- "@xyo-network/abstract-witness": "^4.3.0",
34
- "@xyo-network/domain-payload-plugin": "^4.3.0",
35
- "@xyo-network/module-model": "^4.3.0",
36
- "@xyo-network/payload-model": "^4.3.0",
37
- "@xyo-network/payloadset-plugin": "^4.3.0",
38
- "@xyo-network/witness-model": "^4.3.0"
36
+ "@xylabs/promise": "^5.0.0",
37
+ "@xyo-network/abstract-witness": "^5.0.0",
38
+ "@xyo-network/domain-payload-plugin": "^5.0.0",
39
+ "@xyo-network/module-model": "^5.0.0",
40
+ "@xyo-network/payload-model": "^5.0.0",
41
+ "@xyo-network/payloadset-plugin": "^5.0.0",
42
+ "@xyo-network/witness-model": "^5.0.0"
39
43
  },
40
44
  "devDependencies": {
41
- "@xylabs/ts-scripts-yarn3": "^7.0.1",
42
- "@xylabs/tsconfig": "^7.0.1",
43
- "@xylabs/vitest-extended": "^4.15.1",
45
+ "@xylabs/ts-scripts-yarn3": "^7.0.2",
46
+ "@xylabs/tsconfig": "^7.0.2",
47
+ "@xylabs/vitest-extended": "^5.0.0",
44
48
  "typescript": "^5.8.3",
45
49
  "vitest": "^3.2.4"
46
50
  },
@@ -0,0 +1,18 @@
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 { DomainPlugin } from '../Plugin.ts'
10
+
11
+ describe('DomainPlugin', () => {
12
+ test('Add to Resolver', async () => {
13
+ const plugin = DomainPlugin()
14
+ const resolver = await new PayloadSetPluginResolver().register(plugin)
15
+ expect(await resolver.resolve(plugin.set)).toBeObject()
16
+ expect(await resolver.witness(plugin.set)).toBeObject()
17
+ })
18
+ })
@@ -0,0 +1,27 @@
1
+ import '@xylabs/vitest-extended'
2
+
3
+ import {
4
+ describe, expect,
5
+ test,
6
+ } from 'vitest'
7
+
8
+ import { DomainWitnessConfigSchema } from '../Config.ts'
9
+ import { DomainWitness } from '../Witness.ts'
10
+
11
+ describe('DomainConfigWitness', () => {
12
+ test('valid-instantiation', async () => {
13
+ const witness = await DomainWitness.create({
14
+ account: 'random',
15
+ config: {
16
+ domain: 'xyo.network',
17
+ schema: DomainWitnessConfigSchema,
18
+ },
19
+ })
20
+ expect(witness).toBeTruthy()
21
+ expect(DomainWitness.dmarc).toBe('_xyo')
22
+ })
23
+
24
+ test('generatesDmarc', () => {
25
+ expect(DomainWitness.generateDmarc('foo')).toBe('_xyo.foo')
26
+ })
27
+ })
package/typedoc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://typedoc.org/schema.json",
3
- "entryPoints": ["./src/index.ts"],
4
- "tsconfig": "./tsconfig.typedoc.json"
5
- }
package/xy.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
- const config: XyTsupConfig = {
3
- compile: {
4
- browser: {},
5
- node: {},
6
- neutral: { src: true },
7
- },
8
- }
9
-
10
- export default config