dougong 0.8.0 → 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 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 }, // the dependency lives here
79
+ requires: { clock: CLOCK },
80
80
  setup(ctx) {
81
- console.log(ctx.clock.now()) // only declared dependencies exist, or it fails to compile
81
+ console.log(ctx.clock.now())
82
82
  },
83
83
  })
84
84
 
85
85
  const host = createHost({ name: "hello" })
86
- host.install(greeter) // install order does not decide start order
86
+ host.install(greeter)
87
87
  host.install(clock)
88
- await host.start() // topology derived from declarations, layers start concurrently
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**.
@@ -1 +1 @@
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"}
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.0",
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/core": "0.8.0",
28
- "@dougongjs/platform": "0.8.0",
29
- "@dougongjs/reactive": "0.8.0"
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",