@xylabs/creatable 4.12.44 → 4.13.1

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.
@@ -0,0 +1,122 @@
1
+ import type { BaseClassName } from '@xylabs/base';
2
+ import { BaseEmitter } from '@xylabs/events';
3
+ import type { BaseEmitterParams } from '@xylabs/events';
4
+ import { CreatableStatusReporter as CreatableStatusReporter_2 } from './model/CreatableStatusReporter.ts';
5
+ import type { EventData } from '@xylabs/events';
6
+ import { Logger } from '@xylabs/logger';
7
+ import type { Promisable } from '@xylabs/promise';
8
+
9
+ export declare class AbstractCreatable<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> extends BaseEmitter<Partial<TParams>, TEventData> {
10
+ defaultLogger?: Logger;
11
+ private _validatedParams?;
12
+ constructor(key: unknown, params: Partial<TParams>);
13
+ get name(): CreatableName;
14
+ get params(): TParams;
15
+ get statusReporter(): CreatableStatusReporter_2<void> | undefined;
16
+ static create<T extends CreatableInstance>(this: Creatable<T>, inParams?: Partial<T['params']>): Promise<T>;
17
+ static createHandler<T extends CreatableInstance>(this: Creatable<T>, instance: T): Promisable<T>;
18
+ static paramsHandler<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promisable<T['params']>;
19
+ createHandler(): Promisable<void>;
20
+ paramsValidator(params: Partial<TParams>): TParams;
21
+ start(): Promise<boolean>;
22
+ stop(): Promise<boolean>;
23
+ protected _noOverride(functionName?: string): void;
24
+ protected startHandler(): Promisable<void>;
25
+ protected stopHandler(): Promisable<void>;
26
+ }
27
+
28
+ export declare class AbstractCreatableWithFactory<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> extends AbstractCreatable<TParams, TEventData> {
29
+ static factory<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): CreatableFactory<T>;
30
+ }
31
+
32
+ export declare interface Creatable<T extends CreatableInstance = CreatableInstance> {
33
+ defaultLogger?: Logger;
34
+ new (key: unknown, params: Partial<CreatableParams>): T & AbstractCreatable<T['params']>;
35
+ create<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promise<T>;
36
+ createHandler<T extends CreatableInstance>(this: Creatable<T>, instance: T): Promisable<T>;
37
+ paramsHandler<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promisable<T['params']>;
38
+ }
39
+
40
+ /**
41
+ * Class annotation to be used to decorate Modules which support
42
+ * an asynchronous creation pattern
43
+ * @returns The decorated Module requiring it implement the members
44
+ * of the CreatableModule as statics properties/methods
45
+ */
46
+ export declare function creatable<T extends CreatableInstance>(): <U extends Creatable<T>>(constructor: U) => void;
47
+
48
+ export declare interface CreatableFactory<T extends CreatableInstance = CreatableInstance> extends Omit<Creatable<T>, 'create' | 'createHandler' | 'paramsHandler' | 'defaultLogger' | 'factory'> {
49
+ create(this: CreatableFactory<T>, params?: Partial<T['params']>): Promise<T>;
50
+ }
51
+
52
+ /**
53
+ * Class annotation to be used to decorate Modules which support
54
+ * an asynchronous creation factory pattern
55
+ * @returns The decorated Module requiring it implement the members
56
+ * of the CreatableModule as statics properties/methods
57
+ */
58
+ export declare function creatableFactory(): <U extends CreatableFactory>(constructor: U) => void;
59
+
60
+ export declare interface CreatableInstance<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> {
61
+ eventData: TEventData;
62
+ name: CreatableName;
63
+ params: TParams;
64
+ }
65
+
66
+ export declare type CreatableName = Exclude<string, 'creatable-name-reserved-32546239486'> & BaseClassName;
67
+
68
+ export declare interface CreatableParams extends BaseEmitterParams {
69
+ name?: CreatableName;
70
+ statusReporter?: CreatableStatusReporter;
71
+ }
72
+
73
+ export declare type CreatableStatus = 'creating' | 'created' | 'starting' | 'started' | 'stopping' | 'stopped' | 'error';
74
+
75
+ export declare interface CreatableStatusReporter<T extends void | string = void> {
76
+ report(name: BaseClassName, status: Exclude<T extends void ? CreatableStatus : CreatableStatus | T, 'error'>, progress?: number): void;
77
+ report(name: BaseClassName, status: Extract<T extends void ? CreatableStatus : CreatableStatus | T, 'error'>, error?: Error): void;
78
+ }
79
+
80
+ export declare interface CreatableWithFactory<T extends CreatableInstance = CreatableInstance> extends Creatable<T> {
81
+ factory<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): CreatableFactory<T>;
82
+ }
83
+
84
+ export declare class Factory<T extends CreatableInstance = CreatableInstance> implements CreatableFactory<T> {
85
+ creatable: Creatable<T>;
86
+ defaultParams?: Partial<T['params']>;
87
+ labels?: Labels;
88
+ constructor(creatable: Creatable<T>, params?: Partial<T['params']>, labels?: Labels);
89
+ static withParams<T extends CreatableInstance>(creatableModule: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): Factory<T>;
90
+ create(params?: Partial<T['params']>): Promise<T>;
91
+ }
92
+
93
+ /**
94
+ * Returns true if the source object has all the labels from the required set
95
+ * @param source Source object to check against
96
+ * @param required Set of labels to check for in source
97
+ * @returns True of the source object has all the labels from the required set
98
+ */
99
+ export declare const hasAllLabels: (source?: Labels, required?: Labels) => boolean;
100
+
101
+ /**
102
+ * Object used to represent labels identifying a resource.
103
+ */
104
+ export declare interface Labels {
105
+ [key: string]: string | undefined;
106
+ }
107
+
108
+ /**
109
+ * Interface for objects that have labels.
110
+ */
111
+ export declare interface WithLabels<T extends Labels = Labels> {
112
+ labels: T;
113
+ }
114
+
115
+ /**
116
+ * Interface for objects that have labels.
117
+ */
118
+ export declare interface WithOptionalLabels<T extends Labels = Labels> {
119
+ labels?: T;
120
+ }
121
+
122
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/creatable",
3
- "version": "4.12.44",
3
+ "version": "4.13.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,24 +21,24 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.12.44",
33
- "@xylabs/base": "^4.12.44",
34
- "@xylabs/events": "^4.12.44",
35
- "@xylabs/logger": "^4.12.44",
36
- "@xylabs/promise": "^4.12.44",
37
- "@xylabs/typeof": "^4.12.44"
32
+ "@xylabs/assert": "^4.13.1",
33
+ "@xylabs/base": "^4.13.1",
34
+ "@xylabs/events": "^4.13.1",
35
+ "@xylabs/logger": "^4.13.1",
36
+ "@xylabs/promise": "^4.13.1",
37
+ "@xylabs/typeof": "^4.13.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@xylabs/ts-scripts-yarn3": "^6.5.12",
41
- "@xylabs/tsconfig": "^6.5.12",
40
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.7",
41
+ "@xylabs/tsconfig": "^7.0.0-rc.7",
42
42
  "tslib": "^2.8.1",
43
43
  "typescript": "^5.8.3",
44
44
  "vitest": "^3.2.4"
@@ -1,28 +0,0 @@
1
- import type { EventData } from '@xylabs/events';
2
- import { BaseEmitter } from '@xylabs/events';
3
- import { type Logger } from '@xylabs/logger';
4
- import type { Promisable } from '@xylabs/promise';
5
- import { type Creatable, CreatableFactory } from './Creatable.ts';
6
- import type { CreatableInstance, CreatableName, CreatableParams, Labels } from './model/index.ts';
7
- export declare class AbstractCreatable<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> extends BaseEmitter<Partial<TParams>, TEventData> {
8
- defaultLogger?: Logger;
9
- private _validatedParams?;
10
- constructor(key: unknown, params: Partial<TParams>);
11
- get name(): CreatableName;
12
- get params(): TParams;
13
- get statusReporter(): import("./model/CreatableStatusReporter.ts").CreatableStatusReporter<void> | undefined;
14
- static create<T extends CreatableInstance>(this: Creatable<T>, inParams?: Partial<T['params']>): Promise<T>;
15
- static createHandler<T extends CreatableInstance>(this: Creatable<T>, instance: T): Promisable<T>;
16
- static paramsHandler<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promisable<T['params']>;
17
- createHandler(): Promisable<void>;
18
- paramsValidator(params: Partial<TParams>): TParams;
19
- start(): Promise<boolean>;
20
- stop(): Promise<boolean>;
21
- protected _noOverride(functionName?: string): void;
22
- protected startHandler(): Promisable<void>;
23
- protected stopHandler(): Promisable<void>;
24
- }
25
- export declare class AbstractCreatableWithFactory<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> extends AbstractCreatable<TParams, TEventData> {
26
- static factory<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): CreatableFactory<T>;
27
- }
28
- //# sourceMappingURL=AbstractCreatable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractCreatable.d.ts","sourceRoot":"","sources":["../../src/AbstractCreatable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGjD,OAAO,EACL,KAAK,SAAS,EAAa,gBAAgB,EAC5C,MAAM,gBAAgB,CAAA;AAGvB,OAAO,KAAK,EACV,iBAAiB,EAAE,aAAa,EAAE,eAAe,EACjD,MAAM,EACP,MAAM,kBAAkB,CAAA;AAIzB,qBACa,iBAAiB,CAAC,OAAO,SAAS,eAAe,GAAG,eAAe,EAC9E,UAAU,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IAC3F,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,OAAO,CAAC,gBAAgB,CAAC,CAAS;gBAEtB,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IAKlD,IAAI,IAAI,IAAI,aAAa,CAExB;IAED,IAAa,MAAM,IAAI,OAAO,CAG7B;IAED,IAAI,cAAc,2FAEjB;WAEY,MAAM,CAAC,CAAC,SAAS,iBAAiB,EAC7C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,QAAQ,GAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAM,GAClC,OAAO,CAAC,CAAC,CAAC;IAgBb,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,iBAAiB,EAC9C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,QAAQ,EAAE,CAAC,GACV,UAAU,CAAC,CAAC,CAAC;IAIhB,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,iBAAiB,EAC9C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,MAAM,GAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAM,GAChC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAI1B,aAAa,IAAI,UAAU,CAAC,IAAI,CAAC;IAEjC,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO;IAI5C,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAazB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAa9B,SAAS,CAAC,WAAW,CAAC,YAAY,SAAqB;IAQvD,SAAS,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC;IAI1C,SAAS,CAAC,WAAW,IAAI,UAAU,CAAC,IAAI,CAAC;CAG1C;AAED,qBACa,4BAA4B,CAAC,OAAO,SAAS,eAAe,GAAG,eAAe,EACzF,UAAU,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC;IACxF,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,iBAAiB,EACxC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,CAAC,CAAC,CAAC;CAGvB"}
@@ -1,32 +0,0 @@
1
- import type { Logger } from '@xylabs/logger';
2
- import type { Promisable } from '@xylabs/promise';
3
- import type { AbstractCreatable } from './AbstractCreatable.ts';
4
- import type { CreatableInstance, CreatableParams, Labels } from './model/index.ts';
5
- export interface CreatableFactory<T extends CreatableInstance = CreatableInstance> extends Omit<Creatable<T>, 'create' | 'createHandler' | 'paramsHandler' | 'defaultLogger' | 'factory'> {
6
- create(this: CreatableFactory<T>, params?: Partial<T['params']>): Promise<T>;
7
- }
8
- export interface Creatable<T extends CreatableInstance = CreatableInstance> {
9
- defaultLogger?: Logger;
10
- new (key: unknown, params: Partial<CreatableParams>): T & AbstractCreatable<T['params']>;
11
- create<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promise<T>;
12
- createHandler<T extends CreatableInstance>(this: Creatable<T>, instance: T): Promisable<T>;
13
- paramsHandler<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>): Promisable<T['params']>;
14
- }
15
- export interface CreatableWithFactory<T extends CreatableInstance = CreatableInstance> extends Creatable<T> {
16
- factory<T extends CreatableInstance>(this: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): CreatableFactory<T>;
17
- }
18
- /**
19
- * Class annotation to be used to decorate Modules which support
20
- * an asynchronous creation pattern
21
- * @returns The decorated Module requiring it implement the members
22
- * of the CreatableModule as statics properties/methods
23
- */
24
- export declare function creatable<T extends CreatableInstance>(): <U extends Creatable<T>>(constructor: U) => void;
25
- /**
26
- * Class annotation to be used to decorate Modules which support
27
- * an asynchronous creation factory pattern
28
- * @returns The decorated Module requiring it implement the members
29
- * of the CreatableModule as statics properties/methods
30
- */
31
- export declare function creatableFactory(): <U extends CreatableFactory>(constructor: U) => void;
32
- //# sourceMappingURL=Creatable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Creatable.d.ts","sourceRoot":"","sources":["../../src/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EACV,iBAAiB,EAAE,eAAe,EAAE,MAAM,EAC3C,MAAM,kBAAkB,CAAA;AAEzB,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAC/E,SAAQ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC;IAEtG,MAAM,CACJ,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IAExE,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,KAAI,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEvF,MAAM,CAAC,CAAC,SAAS,iBAAiB,EAChC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5C,aAAa,CAAC,CAAC,SAAS,iBAAiB,EACvC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,QAAQ,EAAE,CAAC,GACV,UAAU,CAAC,CAAC,CAAC,CAAA;IAEhB,aAAa,CAAC,CAAC,SAAS,iBAAiB,EACvC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;CAC9E;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACzG,OAAO,CAAC,CAAC,SAAS,iBAAiB,EACjC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,iBAAiB,MAC3C,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,UAI/C;AAED;;;;;GAKG;AAEH,wBAAgB,gBAAgB,KACtB,CAAC,SAAS,gBAAgB,EAAE,aAAa,CAAC,UAInD"}
@@ -1,11 +0,0 @@
1
- import { type Creatable, type CreatableFactory } from './Creatable.ts';
2
- import type { CreatableInstance, Labels } from './model/index.ts';
3
- export declare class Factory<T extends CreatableInstance = CreatableInstance> implements CreatableFactory<T> {
4
- creatable: Creatable<T>;
5
- defaultParams?: Partial<T['params']>;
6
- labels?: Labels;
7
- constructor(creatable: Creatable<T>, params?: Partial<T['params']>, labels?: Labels);
8
- static withParams<T extends CreatableInstance>(creatableModule: Creatable<T>, params?: Partial<T['params']>, labels?: Labels): Factory<T>;
9
- create(params?: Partial<T['params']>): Promise<T>;
10
- }
11
- //# sourceMappingURL=Factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Factory.d.ts","sourceRoot":"","sources":["../../src/Factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,KAAK,EACV,iBAAiB,EAAE,MAAM,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,qBAAa,OAAO,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAAE,YAAW,gBAAgB,CAAC,CAAC,CAAC;IAClG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAEvB,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEpC,MAAM,CAAC,EAAE,MAAM,CAAA;gBAGb,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAC7B,MAAM,GAAE,MAAW;IAOrB,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,iBAAiB,EAC3C,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAC7B,MAAM,GAAE,MAAW;IAKrB,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAOlD"}
@@ -1,5 +0,0 @@
1
- export * from './AbstractCreatable.ts';
2
- export * from './Creatable.ts';
3
- export * from './Factory.ts';
4
- export * from './model/index.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function getFunctionName(depth?: number): string;
2
- //# sourceMappingURL=getFunctionName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFunctionName.d.ts","sourceRoot":"","sources":["../../../src/lib/getFunctionName.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,SAAI,UAexC"}
@@ -1,2 +0,0 @@
1
- export declare function getRootFunction(obj: unknown, funcName: string): any;
2
- //# sourceMappingURL=getRootFunction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRootFunction.d.ts","sourceRoot":"","sources":["../../../src/lib/getRootFunction.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAO7D"}
@@ -1,3 +0,0 @@
1
- export * from './getFunctionName.ts';
2
- export * from './getRootFunction.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { EventData } from '@xylabs/events';
2
- import type { CreatableName, CreatableParams } from './CreatableParams.ts';
3
- export interface CreatableInstance<TParams extends CreatableParams = CreatableParams, TEventData extends EventData = EventData> {
4
- eventData: TEventData;
5
- name: CreatableName;
6
- params: TParams;
7
- }
8
- //# sourceMappingURL=CreatableInstance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatableInstance.d.ts","sourceRoot":"","sources":["../../../src/model/CreatableInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE1E,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,eAAe,GAAG,eAAe,EAAE,UAAU,SAAS,SAAS,GAAG,SAAS;IAC5H,SAAS,EAAE,UAAU,CAAA;IACrB,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;CAChB"}
@@ -1,9 +0,0 @@
1
- import type { BaseClassName } from '@xylabs/base';
2
- import type { BaseEmitterParams } from '@xylabs/events';
3
- import type { CreatableStatusReporter } from './CreatableStatusReporter.ts';
4
- export type CreatableName = Exclude<string, 'creatable-name-reserved-32546239486'> & BaseClassName;
5
- export interface CreatableParams extends BaseEmitterParams {
6
- name?: CreatableName;
7
- statusReporter?: CreatableStatusReporter;
8
- }
9
- //# sourceMappingURL=CreatableParams.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatableParams.d.ts","sourceRoot":"","sources":["../../../src/model/CreatableParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAE3E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,qCAAqC,CAAC,GAAG,aAAa,CAAA;AAElG,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,cAAc,CAAC,EAAE,uBAAuB,CAAA;CACzC"}
@@ -1,7 +0,0 @@
1
- import type { BaseClassName } from '@xylabs/base';
2
- export type CreatableStatus = 'creating' | 'created' | 'starting' | 'started' | 'stopping' | 'stopped' | 'error';
3
- export interface CreatableStatusReporter<T extends void | string = void> {
4
- report(name: BaseClassName, status: Exclude<T extends void ? CreatableStatus : CreatableStatus | T, 'error'>, progress?: number): void;
5
- report(name: BaseClassName, status: Extract<T extends void ? CreatableStatus : CreatableStatus | T, 'error'>, error?: Error): void;
6
- }
7
- //# sourceMappingURL=CreatableStatusReporter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatableStatusReporter.d.ts","sourceRoot":"","sources":["../../../src/model/CreatableStatusReporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAA;AAEhH,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI;IACrE,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,eAAe,GAAG,eAAe,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtI,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,eAAe,GAAG,eAAe,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CACnI"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Object used to represent labels identifying a resource.
3
- */
4
- export interface Labels {
5
- [key: string]: string | undefined;
6
- }
7
- /**
8
- * Interface for objects that have labels.
9
- */
10
- export interface WithLabels<T extends Labels = Labels> {
11
- labels: T;
12
- }
13
- /**
14
- * Interface for objects that have labels.
15
- */
16
- export interface WithOptionalLabels<T extends Labels = Labels> {
17
- labels?: T;
18
- }
19
- /**
20
- * Returns true if the source object has all the labels from the required set
21
- * @param source Source object to check against
22
- * @param required Set of labels to check for in source
23
- * @returns True of the source object has all the labels from the required set
24
- */
25
- export declare const hasAllLabels: (source?: Labels, required?: Labels) => boolean;
26
- //# sourceMappingURL=Labels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.d.ts","sourceRoot":"","sources":["../../../src/model/Labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,MAAM,EAAE,CAAC,CAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAA;CACX;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,WAAW,MAAM,KAAG,OAKjE,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './CreatableInstance.ts';
2
- export * from './CreatableParams.ts';
3
- export * from './CreatableStatusReporter.ts';
4
- export * from './Labels.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,aAAa,CAAA"}