@effected/app 0.21.1 → 0.21.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/AppStore.js +3 -3
- package/README.md +2 -2
- package/index.d.ts +3 -3
- package/package.json +5 -5
package/AppStore.js
CHANGED
|
@@ -35,10 +35,10 @@ var AppStore = class {
|
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
37
|
* The ensure-before-open ordering is the load-bearing glue.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* The store layer cannot create a missing parent directory — it fails setup
|
|
39
|
+
* instead; `AppDirs.ensureState` is a `mkdir -p` on a **typed**
|
|
40
40
|
* `AppDirsError` channel. Running the ensure inside `Layer.unwrap`, before the
|
|
41
|
-
* store layer is built,
|
|
41
|
+
* store layer is built, makes the directory exist before the open — "the
|
|
42
42
|
* state directory could not be created" is an expected, recoverable boundary
|
|
43
43
|
* failure and it stays on `E`. Nothing is `orDie`d. A `subdir` is created
|
|
44
44
|
* with a recursive `mkdir` after the directory is ensured — that is why
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ The application control plane for Effect. `App.layer` gives an application its X
|
|
|
21
21
|
|
|
22
22
|
## Why @effected/app
|
|
23
23
|
|
|
24
|
-
Every application built on this kit writes the same forty lines of wiring, and it is the kind of wiring that looks right and is wrong. `@effected/xdg` resolves where a namespace's directories are. `@effected/store` opens a database at a path. Between them sits an ordering nobody thinks about until it bites:
|
|
24
|
+
Every application built on this kit writes the same forty lines of wiring, and it is the kind of wiring that looks right and is wrong. `@effected/xdg` resolves where a namespace's directories are. `@effected/store` opens a database at a path. Between them sits an ordering nobody thinks about until it bites: the store layer cannot create a missing parent directory, so the directory must be ensured *before* the store layer is built, or every first run fails to open its database.
|
|
25
25
|
|
|
26
26
|
The other half is the namespace itself. An application names it for its directories, then names it again for its config file, and the two strings drift — `"myapp"` here, `"my-app"` there — and now it reads config from a directory nothing else in the process ever writes to.
|
|
27
27
|
|
|
@@ -186,7 +186,7 @@ Its `native` option defaults to **`true`** — the opposite of `AppDirsOptions.n
|
|
|
186
186
|
|
|
187
187
|
## Ensure before open
|
|
188
188
|
|
|
189
|
-
The one thing this package actually claims. `AppStore.layer` yields `AppDirs`, runs `ensureState`, joins the path, and only then hands it to `Store.layerSqlite`; `AppCache.layer` does the same over `ensureCache`. That ordering
|
|
189
|
+
The one thing this package actually claims. `AppStore.layer` yields `AppDirs`, runs `ensureState`, joins the path, and only then hands it to `Store.layerSqlite`; `AppCache.layer` does the same over `ensureCache`. That ordering makes the directory exist before the open — `AppDirs.ensure*` is a `mkdir -p` on a **typed** `AppDirsError` channel, so "the state directory could not be created" arrives as a recoverable boundary failure rather than a die.
|
|
190
190
|
|
|
191
191
|
Nothing is `orDie`d to make a signature tidier. A regression test pins an unwritable ancestor to a typed failure and watches for a die.
|
|
192
192
|
|
package/index.d.ts
CHANGED
|
@@ -216,10 +216,10 @@ export declare class AppStore {
|
|
|
216
216
|
*
|
|
217
217
|
* @remarks
|
|
218
218
|
* The ensure-before-open ordering is the load-bearing glue.
|
|
219
|
-
*
|
|
220
|
-
*
|
|
219
|
+
* The store layer cannot create a missing parent directory — it fails setup
|
|
220
|
+
* instead; `AppDirs.ensureState` is a `mkdir -p` on a **typed**
|
|
221
221
|
* `AppDirsError` channel. Running the ensure inside `Layer.unwrap`, before the
|
|
222
|
-
* store layer is built,
|
|
222
|
+
* store layer is built, makes the directory exist before the open — "the
|
|
223
223
|
* state directory could not be created" is an expected, recoverable boundary
|
|
224
224
|
* failure and it stays on `E`. Nothing is `orDie`d. A `subdir` is created
|
|
225
225
|
* with a recursive `mkdir` after the directory is ensured — that is why
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/app",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application control plane for Effect: one layer wiring XDG-namespaced directories, a migrated SQLite store, a TTL cache and a config file to the same place.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@effected/config-file": "^0.14.2",
|
|
43
43
|
"@effected/glob": "^0.10.0",
|
|
44
|
-
"@effected/jsonc": "^0.15.
|
|
45
|
-
"@effected/store": "^0.13.
|
|
46
|
-
"@effected/toml": "^0.11.
|
|
44
|
+
"@effected/jsonc": "^0.15.1",
|
|
45
|
+
"@effected/store": "^0.13.1",
|
|
46
|
+
"@effected/toml": "^0.11.1",
|
|
47
47
|
"@effected/walker": "^0.15.0",
|
|
48
48
|
"@effected/xdg": "^0.9.0",
|
|
49
|
-
"@effected/yaml": "^0.19.
|
|
49
|
+
"@effected/yaml": "^0.19.1",
|
|
50
50
|
"effect": "^4.0.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|