alepha 0.13.3 → 0.13.4

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.
@@ -17,6 +17,7 @@ import {
17
17
  type Service,
18
18
  type ServiceEntry,
19
19
  } from "./interfaces/Service.ts";
20
+ import type { Atom, AtomStatic, TAtomObject } from "./primitives/$atom.ts";
20
21
  import type { InjectOptions } from "./primitives/$inject.ts";
21
22
  import { Module, type WithModule } from "./primitives/$module.ts";
22
23
  import { AlsProvider } from "./providers/AlsProvider.ts";
@@ -325,6 +326,19 @@ export class Alepha {
325
326
  this.init = init;
326
327
  }
327
328
 
329
+ public set<T extends TAtomObject>(
330
+ target: Atom<T>,
331
+ value: AtomStatic<T>,
332
+ ): this;
333
+ public set<Key extends keyof State>(
334
+ target: Key,
335
+ value: State[Key] | undefined,
336
+ ): this;
337
+ public set(target: any, value: any): this {
338
+ this.store.set(target, value);
339
+ return this;
340
+ }
341
+
328
342
  /**
329
343
  * True when start() is called.
330
344
  *
@@ -144,7 +144,7 @@ export abstract class Module {
144
144
 
145
145
  public abstract register(alepha: Alepha): void;
146
146
 
147
- static NAME_REGEX = /^[a-z]+(\.[a-z][a-z0-9-]*)*$/;
147
+ static NAME_REGEX = /^[a-z-]+(\.[a-z-][a-z0-9-]*)*$/;
148
148
 
149
149
  /**
150
150
  * Check if a Service is a Module.