@xyo-network/xl1-test 1.25.27
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/getTestProviderContext.d.ts +9 -0
- package/dist/neutral/getTestProviderContext.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +2 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +17 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/package.json +63 -0
- package/src/getTestProviderContext.ts +17 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Config } from '@xyo-network/xl1-protocol-sdk';
|
|
2
|
+
import { ProviderFactoryLocator } from '@xyo-network/xl1-protocol-sdk';
|
|
3
|
+
/** Result of getTestProviderContext with concrete locator type */
|
|
4
|
+
export interface TestProviderContext {
|
|
5
|
+
locator: ProviderFactoryLocator;
|
|
6
|
+
}
|
|
7
|
+
/** Creates a test provider context with a fresh ProviderFactoryLocator */
|
|
8
|
+
export declare function getTestProviderContext(config?: Config): TestProviderContext;
|
|
9
|
+
//# sourceMappingURL=getTestProviderContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTestProviderContext.d.ts","sourceRoot":"","sources":["../../src/getTestProviderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAa,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAEjF,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,sBAAsB,CAAA;CAChC;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,MAA4B,GAAG,mBAAmB,CAOhG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/getTestProviderContext.ts
|
|
2
|
+
import { ConfigZod, ProviderFactoryLocator } from "@xyo-network/xl1-protocol-sdk";
|
|
3
|
+
function getTestProviderContext(config = ConfigZod.parse({})) {
|
|
4
|
+
const singletons = {};
|
|
5
|
+
const caches = {};
|
|
6
|
+
const locator = new ProviderFactoryLocator({
|
|
7
|
+
config,
|
|
8
|
+
singletons,
|
|
9
|
+
caches,
|
|
10
|
+
logger: console
|
|
11
|
+
});
|
|
12
|
+
return { locator };
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
getTestProviderContext
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/getTestProviderContext.ts"],"sourcesContent":["import type { Config } from '@xyo-network/xl1-protocol-sdk'\nimport { ConfigZod, ProviderFactoryLocator } from '@xyo-network/xl1-protocol-sdk'\n\n/** Result of getTestProviderContext with concrete locator type */\nexport interface TestProviderContext {\n locator: ProviderFactoryLocator\n}\n\n/** Creates a test provider context with a fresh ProviderFactoryLocator */\nexport function getTestProviderContext(config: Config = ConfigZod.parse({})): TestProviderContext {\n const singletons = {}\n const caches = {}\n const locator = new ProviderFactoryLocator({\n config, singletons, caches, logger: console,\n })\n return { locator }\n}\n"],"mappings":";AACA,SAAS,WAAW,8BAA8B;AAQ3C,SAAS,uBAAuB,SAAiB,UAAU,MAAM,CAAC,CAAC,GAAwB;AAChG,QAAM,aAAa,CAAC;AACpB,QAAM,SAAS,CAAC;AAChB,QAAM,UAAU,IAAI,uBAAuB;AAAA,IACzC;AAAA,IAAQ;AAAA,IAAY;AAAA,IAAQ,QAAQ;AAAA,EACtC,CAAC;AACD,SAAO,EAAE,QAAQ;AACnB;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xyo-network/xl1-test",
|
|
3
|
+
"version": "1.25.27",
|
|
4
|
+
"description": "XYO Layer One Test Utilities",
|
|
5
|
+
"homepage": "https://xylabs.com",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "git+https://github.com/xylabs/xyo-chain/issues",
|
|
8
|
+
"email": "support@xylabs.com"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/xylabs/xyo-chain.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "LGPL-3.0-only",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "XY Labs Development Team",
|
|
17
|
+
"email": "support@xylabs.com",
|
|
18
|
+
"url": "https://xylabs.com"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
|
+
"source": "./src/index.ts",
|
|
26
|
+
"default": "./dist/neutral/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"module": "./dist/neutral/index.mjs",
|
|
31
|
+
"source": "./src/index.ts",
|
|
32
|
+
"types": "./dist/neutral/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"src",
|
|
36
|
+
"!**/*.bench.*",
|
|
37
|
+
"!**/*.spec.*",
|
|
38
|
+
"!**/*.test.*"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@xyo-network/xl1-protocol-sdk": "~1.25.27"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^25.5.0",
|
|
45
|
+
"@xylabs/sdk-js": "^5.0.86",
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.25",
|
|
47
|
+
"@xylabs/tsconfig": "~7.4.25",
|
|
48
|
+
"typescript": "~5.9.3",
|
|
49
|
+
"vitest": "~4.1.1",
|
|
50
|
+
"zod": "~4.3.6"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@xylabs/sdk-js": "^5",
|
|
54
|
+
"zod": "^4"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=22.3 <23"
|
|
58
|
+
},
|
|
59
|
+
"engineStrict": true,
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Config } from '@xyo-network/xl1-protocol-sdk'
|
|
2
|
+
import { ConfigZod, ProviderFactoryLocator } from '@xyo-network/xl1-protocol-sdk'
|
|
3
|
+
|
|
4
|
+
/** Result of getTestProviderContext with concrete locator type */
|
|
5
|
+
export interface TestProviderContext {
|
|
6
|
+
locator: ProviderFactoryLocator
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Creates a test provider context with a fresh ProviderFactoryLocator */
|
|
10
|
+
export function getTestProviderContext(config: Config = ConfigZod.parse({})): TestProviderContext {
|
|
11
|
+
const singletons = {}
|
|
12
|
+
const caches = {}
|
|
13
|
+
const locator = new ProviderFactoryLocator({
|
|
14
|
+
config, singletons, caches, logger: console,
|
|
15
|
+
})
|
|
16
|
+
return { locator }
|
|
17
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getTestProviderContext.ts'
|