alepha 0.2.0 → 0.4.0
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 +2 -24
- package/dist/index.cjs +44 -9
- package/dist/index.d.cts +8 -3
- package/dist/index.d.mts +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +14 -9
- package/src/index.ts +8 -3
package/README.md
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Alepha
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { Alepha, inject, t } from '@alepha/core';
|
|
13
|
-
|
|
14
|
-
class B {
|
|
15
|
-
env = inject(
|
|
16
|
-
t.object({
|
|
17
|
-
HELLO: t.string(),
|
|
18
|
-
})
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
class A {
|
|
23
|
-
b = inject(B);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const app = Alepha.create({ HELLO: "WORLD" });
|
|
27
|
-
|
|
28
|
-
app.log.info(app.get(A).b.env.HELLO); // WORLD
|
|
6
|
+
npm install alepha
|
|
29
7
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var cache = require('@alepha/cache');
|
|
3
4
|
var core = require('@alepha/core');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
5
|
+
var datastore = require('@alepha/datastore');
|
|
6
|
+
var lock = require('@alepha/lock');
|
|
7
|
+
var postgres = require('@alepha/postgres');
|
|
8
|
+
var queue = require('@alepha/queue');
|
|
6
9
|
var redis = require('@alepha/redis');
|
|
10
|
+
var scheduler = require('@alepha/scheduler');
|
|
11
|
+
var security = require('@alepha/security');
|
|
7
12
|
var server = require('@alepha/server');
|
|
8
|
-
var
|
|
13
|
+
var topic = require('@alepha/topic');
|
|
9
14
|
|
|
10
15
|
|
|
11
16
|
|
|
17
|
+
Object.keys(cache).forEach(function (k) {
|
|
18
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return cache[k]; }
|
|
21
|
+
});
|
|
22
|
+
});
|
|
12
23
|
Object.keys(core).forEach(function (k) {
|
|
13
24
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
14
25
|
enumerable: true,
|
|
15
26
|
get: function () { return core[k]; }
|
|
16
27
|
});
|
|
17
28
|
});
|
|
18
|
-
Object.keys(
|
|
29
|
+
Object.keys(datastore).forEach(function (k) {
|
|
30
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return datastore[k]; }
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
Object.keys(lock).forEach(function (k) {
|
|
36
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return lock[k]; }
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
Object.keys(postgres).forEach(function (k) {
|
|
19
42
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
20
43
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
44
|
+
get: function () { return postgres[k]; }
|
|
22
45
|
});
|
|
23
46
|
});
|
|
24
|
-
Object.keys(
|
|
47
|
+
Object.keys(queue).forEach(function (k) {
|
|
25
48
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
26
49
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
50
|
+
get: function () { return queue[k]; }
|
|
28
51
|
});
|
|
29
52
|
});
|
|
30
53
|
Object.keys(redis).forEach(function (k) {
|
|
@@ -33,15 +56,27 @@ Object.keys(redis).forEach(function (k) {
|
|
|
33
56
|
get: function () { return redis[k]; }
|
|
34
57
|
});
|
|
35
58
|
});
|
|
59
|
+
Object.keys(scheduler).forEach(function (k) {
|
|
60
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return scheduler[k]; }
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
Object.keys(security).forEach(function (k) {
|
|
66
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return security[k]; }
|
|
69
|
+
});
|
|
70
|
+
});
|
|
36
71
|
Object.keys(server).forEach(function (k) {
|
|
37
72
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
38
73
|
enumerable: true,
|
|
39
74
|
get: function () { return server[k]; }
|
|
40
75
|
});
|
|
41
76
|
});
|
|
42
|
-
Object.keys(
|
|
77
|
+
Object.keys(topic).forEach(function (k) {
|
|
43
78
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
44
79
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
80
|
+
get: function () { return topic[k]; }
|
|
46
81
|
});
|
|
47
82
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export * from '@alepha/cache';
|
|
1
2
|
export * from '@alepha/core';
|
|
2
|
-
export * from '@alepha/
|
|
3
|
-
export * from '@alepha/
|
|
3
|
+
export * from '@alepha/datastore';
|
|
4
|
+
export * from '@alepha/lock';
|
|
5
|
+
export * from '@alepha/postgres';
|
|
6
|
+
export * from '@alepha/queue';
|
|
4
7
|
export * from '@alepha/redis';
|
|
8
|
+
export * from '@alepha/scheduler';
|
|
9
|
+
export * from '@alepha/security';
|
|
5
10
|
export * from '@alepha/server';
|
|
6
|
-
export * from '@alepha/
|
|
11
|
+
export * from '@alepha/topic';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export * from '@alepha/cache';
|
|
1
2
|
export * from '@alepha/core';
|
|
2
|
-
export * from '@alepha/
|
|
3
|
-
export * from '@alepha/
|
|
3
|
+
export * from '@alepha/datastore';
|
|
4
|
+
export * from '@alepha/lock';
|
|
5
|
+
export * from '@alepha/postgres';
|
|
6
|
+
export * from '@alepha/queue';
|
|
4
7
|
export * from '@alepha/redis';
|
|
8
|
+
export * from '@alepha/scheduler';
|
|
9
|
+
export * from '@alepha/security';
|
|
5
10
|
export * from '@alepha/server';
|
|
6
|
-
export * from '@alepha/
|
|
11
|
+
export * from '@alepha/topic';
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export * from '@alepha/cache';
|
|
1
2
|
export * from '@alepha/core';
|
|
2
|
-
export * from '@alepha/
|
|
3
|
-
export * from '@alepha/
|
|
3
|
+
export * from '@alepha/datastore';
|
|
4
|
+
export * from '@alepha/lock';
|
|
5
|
+
export * from '@alepha/postgres';
|
|
6
|
+
export * from '@alepha/queue';
|
|
4
7
|
export * from '@alepha/redis';
|
|
8
|
+
export * from '@alepha/scheduler';
|
|
9
|
+
export * from '@alepha/security';
|
|
5
10
|
export * from '@alepha/server';
|
|
6
|
-
export * from '@alepha/
|
|
11
|
+
export * from '@alepha/topic';
|
package/package.json
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alepha",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
8
8
|
"types": "./dist/index.d.cts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@alepha/
|
|
11
|
-
"@alepha/
|
|
12
|
-
"@alepha/
|
|
13
|
-
"@alepha/
|
|
14
|
-
"@alepha/
|
|
15
|
-
"@alepha/
|
|
10
|
+
"@alepha/cache": "0.4.0",
|
|
11
|
+
"@alepha/core": "0.4.0",
|
|
12
|
+
"@alepha/datastore": "0.4.0",
|
|
13
|
+
"@alepha/lock": "0.4.0",
|
|
14
|
+
"@alepha/postgres": "0.4.0",
|
|
15
|
+
"@alepha/queue": "0.4.0",
|
|
16
|
+
"@alepha/redis": "0.4.0",
|
|
17
|
+
"@alepha/scheduler": "0.4.0",
|
|
18
|
+
"@alepha/security": "0.4.0",
|
|
19
|
+
"@alepha/server": "0.4.0",
|
|
20
|
+
"@alepha/testing": "0.4.0",
|
|
21
|
+
"@alepha/topic": "0.4.0"
|
|
16
22
|
},
|
|
17
23
|
"devDependencies": {
|
|
18
24
|
"pkgroll": "^2.6.0",
|
|
19
|
-
"typescript": "^5.7.2"
|
|
20
|
-
"vitest": "^2.1.8"
|
|
25
|
+
"typescript": "^5.7.2"
|
|
21
26
|
},
|
|
22
27
|
"scripts": {
|
|
23
28
|
"build": "pkgroll --clean-dist"
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export * from "@alepha/cache";
|
|
1
2
|
export * from "@alepha/core";
|
|
2
|
-
export * from "@alepha/
|
|
3
|
-
export * from "@alepha/
|
|
3
|
+
export * from "@alepha/datastore";
|
|
4
|
+
export * from "@alepha/lock";
|
|
5
|
+
export * from "@alepha/postgres";
|
|
6
|
+
export * from "@alepha/queue";
|
|
4
7
|
export * from "@alepha/redis";
|
|
8
|
+
export * from "@alepha/scheduler";
|
|
9
|
+
export * from "@alepha/security";
|
|
5
10
|
export * from "@alepha/server";
|
|
6
|
-
export * from "@alepha/
|
|
11
|
+
export * from "@alepha/topic";
|