dougong 0.8.1 → 0.8.2
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 +8 -8
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -27,16 +27,16 @@ const clock = definePlugin({
|
|
|
27
27
|
|
|
28
28
|
const greeter = definePlugin({
|
|
29
29
|
name: "app.greeter",
|
|
30
|
-
requires: { clock: CLOCK },
|
|
30
|
+
requires: { clock: CLOCK },
|
|
31
31
|
setup(ctx) {
|
|
32
|
-
console.log(ctx.clock.now())
|
|
32
|
+
console.log(ctx.clock.now())
|
|
33
33
|
},
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
const host = createHost({ name: "hello" })
|
|
37
|
-
host.install(greeter)
|
|
37
|
+
host.install(greeter)
|
|
38
38
|
host.install(clock)
|
|
39
|
-
await host.start()
|
|
39
|
+
await host.start()
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
六个原子:**Service**(稳定的一对一能力)、**ExtensionPoint**(开放贡献集合)、**Event**(瞬时事实)、**Lifetime**(结构化所有权)、**Plugin**、**Host**。
|
|
@@ -76,16 +76,16 @@ const clock = definePlugin({
|
|
|
76
76
|
|
|
77
77
|
const greeter = definePlugin({
|
|
78
78
|
name: "app.greeter",
|
|
79
|
-
requires: { clock: CLOCK },
|
|
79
|
+
requires: { clock: CLOCK },
|
|
80
80
|
setup(ctx) {
|
|
81
|
-
console.log(ctx.clock.now())
|
|
81
|
+
console.log(ctx.clock.now())
|
|
82
82
|
},
|
|
83
83
|
})
|
|
84
84
|
|
|
85
85
|
const host = createHost({ name: "hello" })
|
|
86
|
-
host.install(greeter)
|
|
86
|
+
host.install(greeter)
|
|
87
87
|
host.install(clock)
|
|
88
|
-
await host.start()
|
|
88
|
+
await host.start()
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Six atoms: **Service** (a stable one-to-one capability), **ExtensionPoint** (an open contribution set), **Event** (a transient fact), **Lifetime** (structured ownership), **Plugin**, **Host**.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,MAAM,GACZ,MAAM,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dougong",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dougongjs/
|
|
28
|
-
"@dougongjs/
|
|
29
|
-
"@dougongjs/reactive": "0.8.
|
|
27
|
+
"@dougongjs/platform": "0.8.2",
|
|
28
|
+
"@dougongjs/core": "0.8.2",
|
|
29
|
+
"@dougongjs/reactive": "0.8.2"
|
|
30
30
|
},
|
|
31
31
|
"description": "Capability composition and structured lifetime kernel, plus its plugin distribution layer.",
|
|
32
32
|
"license": "MIT",
|