vla 0.1.4 → 0.1.5

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/README.md CHANGED
@@ -1,8 +1,11 @@
1
- # Vla
2
-
3
- _A smooth dutch dessert that goes with everything._
4
-
5
- A TypeScript data layer kernel for backend- and fullstack apps. Compatible with whatever framework or library you're using.
1
+ <p align="center">
2
+ <img src=".github/logo-large.png" width="400px" align="center" alt="Vla Logo" />
3
+ <h1 align="center">Vla Smooth TypeScript Backends</h1>
4
+ <p align="center">
5
+ Vla is the missing backend layer for scalable TypeScript apps that integrates into any framework and existing codebases.
6
+ </p>
7
+ </p>
8
+ <br/>
6
9
 
7
10
  🚧 WIP, under development. Exports and names will very likely change often.
8
11
 
@@ -125,7 +128,7 @@ class UserRepo extends Users.Repo {
125
128
  }
126
129
 
127
130
  class Database extends Vla.Resource {
128
- static override unwrap = "db"
131
+ static readonly unwrap = "db"
129
132
  // Unwraps a property when injecting the resource:
130
133
  // When another class injects the database with `this.inject(Database)`,
131
134
  // the `unwrap` will cause that it doesn't return the instance of the
package/dist/index.d.mts CHANGED
@@ -86,16 +86,6 @@ declare abstract class BaseAction {
86
86
  };
87
87
  }
88
88
  //#endregion
89
- //#region src/kernel/scoped-als.d.ts
90
- declare function withKernel<T>(scopedKernel: Kernel, fn: () => T): T;
91
- //#endregion
92
- //#region src/kernel/scoped-global.d.ts
93
- declare function setGlobalInvokeKernel(kernel: Kernel): void;
94
- //#endregion
95
- //#region src/kernel/scoped-provider.d.ts
96
- type CurrentKernelFn = () => Kernel | Promise<Kernel>;
97
- declare function setInvokeKernelProvider(fn: CurrentKernelFn): void;
98
- //#endregion
99
89
  //#region src/concerns/devstable.d.ts
100
90
  type BaseCtor<T = object> = abstract new (...args: any[]) => T;
101
91
  declare function DevStable<TBase extends BaseCtor>(Base: TBase): ((abstract new (...args: any[]) => {
@@ -211,6 +201,16 @@ declare function createModule<const ModuleName extends string>(moduleName: Modul
211
201
  DevStable: typeof DevStable;
212
202
  };
213
203
  //#endregion
204
+ //#region src/kernel/scoped-als.d.ts
205
+ declare function withKernel<T>(scopedKernel: Kernel, fn: () => T): T;
206
+ //#endregion
207
+ //#region src/kernel/scoped-global.d.ts
208
+ declare function setGlobalInvokeKernel(kernel: Kernel): void;
209
+ //#endregion
210
+ //#region src/kernel/scoped-provider.d.ts
211
+ type CurrentKernelFn = () => Kernel | Promise<Kernel>;
212
+ declare function setInvokeKernelProvider(fn: CurrentKernelFn): void;
213
+ //#endregion
214
214
  //#region src/index.d.ts
215
215
  declare const Vla: {
216
216
  createModule: typeof createModule;
@@ -218,6 +218,7 @@ declare const Vla: {
218
218
  withKernel: typeof withKernel;
219
219
  setGlobalInvokeKernel: typeof setGlobalInvokeKernel;
220
220
  setInvokeKernelProvider: typeof setInvokeKernelProvider;
221
+ Kernel: typeof Kernel;
221
222
  Facade: (abstract new () => {
222
223
  inject<TKey extends ModuleClass<string>>(key: TKey extends ModuleClass<string, infer TargetLayer extends Layer> ? TKey extends {
223
224
  readonly parentLayers: readonly Layer[];
package/dist/index.mjs CHANGED
@@ -413,7 +413,8 @@ const Vla = {
413
413
  createContext,
414
414
  withKernel,
415
415
  setGlobalInvokeKernel,
416
- setInvokeKernelProvider
416
+ setInvokeKernelProvider,
417
+ Kernel
417
418
  };
418
419
 
419
420
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vla",
3
3
  "type": "module",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "description": "Data layer kernel for backend- and fullstack apps",
6
6
  "author": "Timo Mämecke <hello@timo.wtf>",
7
7
  "license": "MIT",