@raptortrade/core 0.1.5 → 0.1.7
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/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,18 +20,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
apply_features: () => apply_features
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
|
|
27
27
|
// src/features.ts
|
|
28
|
-
function
|
|
28
|
+
function apply_features(instance, client, features, registry) {
|
|
29
29
|
for (const f of features) {
|
|
30
30
|
registry[f](instance, client);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
34
|
0 && (module.exports = {
|
|
35
|
-
|
|
35
|
+
apply_features
|
|
36
36
|
});
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/features.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/features.ts"],"sourcesContent":["export { apply_features } from \"./features.js\";\nexport type { UnionToIntersection, WithFeatures, FeatureRegistry } from \"./features.js\";\n","export type UnionToIntersection<U> =\n (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;\n\nexport type WithFeatures<\n Base,\n Map extends Record<string, object>,\n F extends readonly (keyof Map)[]\n> = Base & UnionToIntersection<Map[F[number]]>;\n\nexport type FeatureRegistry<K extends string> =\n Record<K, (instance: any, client: any) => void>;\n\nexport function apply_features<K extends string>(\n instance: any,\n client: any,\n features: readonly K[],\n registry: FeatureRegistry<K>,\n): void {\n for (const f of features) {\n registry[f](instance, client);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACYO,SAAS,eACd,UACA,QACA,UACA,UACM;AACN,aAAW,KAAK,UAAU;AACxB,aAAS,CAAC,EAAE,UAAU,MAAM;AAAA,EAC9B;AACF;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
2
2
|
type WithFeatures<Base, Map extends Record<string, object>, F extends readonly (keyof Map)[]> = Base & UnionToIntersection<Map[F[number]]>;
|
|
3
3
|
type FeatureRegistry<K extends string> = Record<K, (instance: any, client: any) => void>;
|
|
4
|
-
declare function
|
|
4
|
+
declare function apply_features<K extends string>(instance: any, client: any, features: readonly K[], registry: FeatureRegistry<K>): void;
|
|
5
5
|
|
|
6
|
-
export { type FeatureRegistry, type UnionToIntersection, type WithFeatures,
|
|
6
|
+
export { type FeatureRegistry, type UnionToIntersection, type WithFeatures, apply_features };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
2
2
|
type WithFeatures<Base, Map extends Record<string, object>, F extends readonly (keyof Map)[]> = Base & UnionToIntersection<Map[F[number]]>;
|
|
3
3
|
type FeatureRegistry<K extends string> = Record<K, (instance: any, client: any) => void>;
|
|
4
|
-
declare function
|
|
4
|
+
declare function apply_features<K extends string>(instance: any, client: any, features: readonly K[], registry: FeatureRegistry<K>): void;
|
|
5
5
|
|
|
6
|
-
export { type FeatureRegistry, type UnionToIntersection, type WithFeatures,
|
|
6
|
+
export { type FeatureRegistry, type UnionToIntersection, type WithFeatures, apply_features };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/features.ts
|
|
2
|
-
function
|
|
2
|
+
function apply_features(instance, client, features, registry) {
|
|
3
3
|
for (const f of features) {
|
|
4
4
|
registry[f](instance, client);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
apply_features
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/features.ts"],"sourcesContent":["export type UnionToIntersection<U> =\n (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;\n\nexport type WithFeatures<\n Base,\n Map extends Record<string, object>,\n F extends readonly (keyof Map)[]\n> = Base & UnionToIntersection<Map[F[number]]>;\n\nexport type FeatureRegistry<K extends string> =\n Record<K, (instance: any, client: any) => void>;\n\nexport function
|
|
1
|
+
{"version":3,"sources":["../src/features.ts"],"sourcesContent":["export type UnionToIntersection<U> =\n (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;\n\nexport type WithFeatures<\n Base,\n Map extends Record<string, object>,\n F extends readonly (keyof Map)[]\n> = Base & UnionToIntersection<Map[F[number]]>;\n\nexport type FeatureRegistry<K extends string> =\n Record<K, (instance: any, client: any) => void>;\n\nexport function apply_features<K extends string>(\n instance: any,\n client: any,\n features: readonly K[],\n registry: FeatureRegistry<K>,\n): void {\n for (const f of features) {\n registry[f](instance, client);\n }\n}\n"],"mappings":";AAYO,SAAS,eACd,UACA,QACA,UACA,UACM;AACN,aAAW,KAAK,UAAU;AACxB,aAAS,CAAC,EAAE,UAAU,MAAM;AAAA,EAC9B;AACF;","names":[]}
|