@effected/xdg 0.2.1 → 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 +1 -1
- package/index.d.ts +14 -14
- package/package.json +4 -4
- package/tsdoc-metadata.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
XDG Base Directory resolution for Effect. `Xdg` reads the environment — `$HOME`, the four `*_HOME` variables, `$XDG_RUNTIME_DIR`, and the `$XDG_CONFIG_DIRS` / `$XDG_DATA_DIRS` search paths — once, at layer construction. `AppDirs` turns that into the config, data, cache, state and runtime directories for one application namespace, with on-demand creation. `NativeDirs` supplies the macOS and Windows conventions for applications that want them, and `XdgConfig` plugs the whole thing into [`@effected/config-file`](../config-file) as a resolver chain and a save target.
|
|
9
9
|
|
|
10
10
|
> **Pre-release.** This package is part of the `@effected/*` kit, in pre-`1.0.0`
|
|
11
|
-
> development against a single pinned Effect v4
|
|
11
|
+
> development against a single pinned Effect v4 prerelease. Packages graduate to
|
|
12
12
|
> `1.0.0` once Effect `4.0.0` ships. To hold your own `effect` versions at
|
|
13
13
|
> exactly the ones the kit is built and tested against, install
|
|
14
14
|
> [`@effected/pnpm-plugin-effect`](https://www.npmjs.com/package/@effected/pnpm-plugin-effect).
|
package/index.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ import { ConfigResolver } from "@effected/config-file";
|
|
|
11
11
|
*
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
declare const XdgPlatform: Schema.Literals<readonly ["aix", "android", "darwin", "freebsd", "haiku", "linux", "openbsd", "sunos", "win32", "cygwin", "netbsd"]>;
|
|
14
|
+
export declare const XdgPlatform: Schema.Literals<readonly ["aix", "android", "darwin", "freebsd", "haiku", "linux", "openbsd", "sunos", "win32", "cygwin", "netbsd"]>;
|
|
15
15
|
/**
|
|
16
16
|
* The decoded form of {@link (XdgPlatform:variable)}.
|
|
17
17
|
*
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
type XdgPlatform = typeof XdgPlatform.Type;
|
|
20
|
+
export type XdgPlatform = typeof XdgPlatform.Type;
|
|
21
21
|
/**
|
|
22
22
|
* The platform every native-directory decision is taken against.
|
|
23
23
|
*
|
|
@@ -30,7 +30,7 @@ type XdgPlatform = typeof XdgPlatform.Type;
|
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
declare const CurrentPlatform: Context.Reference<XdgPlatform>;
|
|
33
|
+
export declare const CurrentPlatform: Context.Reference<XdgPlatform>;
|
|
34
34
|
declare const XdgEnvError_base: Schema.Class<XdgEnvError, Schema.TaggedStruct<"XdgEnvError", {
|
|
35
35
|
/** The environment variable that was required and not found. */
|
|
36
36
|
readonly variable: Schema.String;
|
|
@@ -47,7 +47,7 @@ declare const XdgEnvError_base: Schema.Class<XdgEnvError, Schema.TaggedStruct<"X
|
|
|
47
47
|
*
|
|
48
48
|
* @public
|
|
49
49
|
*/
|
|
50
|
-
declare class XdgEnvError extends XdgEnvError_base {
|
|
50
|
+
export declare class XdgEnvError extends XdgEnvError_base {
|
|
51
51
|
get message(): string;
|
|
52
52
|
}
|
|
53
53
|
declare const XdgPaths_base: Schema.Class<XdgPaths, Schema.Struct<{
|
|
@@ -88,7 +88,7 @@ declare const XdgPaths_base: Schema.Class<XdgPaths, Schema.Struct<{
|
|
|
88
88
|
*
|
|
89
89
|
* @public
|
|
90
90
|
*/
|
|
91
|
-
declare class XdgPaths extends XdgPaths_base {}
|
|
91
|
+
export declare class XdgPaths extends XdgPaths_base {}
|
|
92
92
|
declare const Xdg_base: Context.ServiceClass<Xdg, "@effected/xdg/Xdg", XdgPaths>;
|
|
93
93
|
/**
|
|
94
94
|
* XDG Base Directory environment resolution.
|
|
@@ -103,7 +103,7 @@ declare const Xdg_base: Context.ServiceClass<Xdg, "@effected/xdg/Xdg", XdgPaths>
|
|
|
103
103
|
*
|
|
104
104
|
* @public
|
|
105
105
|
*/
|
|
106
|
-
declare class Xdg extends Xdg_base {
|
|
106
|
+
export declare class Xdg extends Xdg_base {
|
|
107
107
|
/**
|
|
108
108
|
* Read the XDG environment through Effect's `Config`.
|
|
109
109
|
*
|
|
@@ -130,13 +130,13 @@ declare class Xdg extends Xdg_base {
|
|
|
130
130
|
*
|
|
131
131
|
* @public
|
|
132
132
|
*/
|
|
133
|
-
declare const AppDirKind: Schema.Literals<readonly ["config", "data", "cache", "state", "runtime"]>;
|
|
133
|
+
export declare const AppDirKind: Schema.Literals<readonly ["config", "data", "cache", "state", "runtime"]>;
|
|
134
134
|
/**
|
|
135
135
|
* The decoded form of {@link (AppDirKind:variable)}.
|
|
136
136
|
*
|
|
137
137
|
* @public
|
|
138
138
|
*/
|
|
139
|
-
type AppDirKind = typeof AppDirKind.Type;
|
|
139
|
+
export type AppDirKind = typeof AppDirKind.Type;
|
|
140
140
|
declare const AppDirsError_base: Schema.Class<AppDirsError, Schema.TaggedStruct<"AppDirsError", {
|
|
141
141
|
/** Which directory kind failed. */
|
|
142
142
|
readonly directory: Schema.Literals<readonly ["config", "data", "cache", "state", "runtime"]>;
|
|
@@ -158,7 +158,7 @@ declare const AppDirsError_base: Schema.Class<AppDirsError, Schema.TaggedStruct<
|
|
|
158
158
|
*
|
|
159
159
|
* @public
|
|
160
160
|
*/
|
|
161
|
-
declare class AppDirsError extends AppDirsError_base {
|
|
161
|
+
export declare class AppDirsError extends AppDirsError_base {
|
|
162
162
|
get message(): string;
|
|
163
163
|
}
|
|
164
164
|
declare const ResolvedAppDirs_base: Schema.Class<ResolvedAppDirs, Schema.Struct<{
|
|
@@ -197,7 +197,7 @@ declare const ResolvedAppDirs_base: Schema.Class<ResolvedAppDirs, Schema.Struct<
|
|
|
197
197
|
*
|
|
198
198
|
* @public
|
|
199
199
|
*/
|
|
200
|
-
declare class ResolvedAppDirs extends ResolvedAppDirs_base {}
|
|
200
|
+
export declare class ResolvedAppDirs extends ResolvedAppDirs_base {}
|
|
201
201
|
/**
|
|
202
202
|
* Per-kind absolute directory overrides. Each wins outright over every other rung.
|
|
203
203
|
*
|
|
@@ -306,7 +306,7 @@ declare const AppDirs_base: Context.ServiceClass<AppDirs, "@effected/xdg/AppDirs
|
|
|
306
306
|
*
|
|
307
307
|
* @public
|
|
308
308
|
*/
|
|
309
|
-
declare class AppDirs extends AppDirs_base {
|
|
309
|
+
export declare class AppDirs extends AppDirs_base {
|
|
310
310
|
/**
|
|
311
311
|
* Resolve the namespace's directories against the ambient {@link Xdg}
|
|
312
312
|
* environment and platform.
|
|
@@ -341,7 +341,7 @@ declare const NativeDirs_base: Schema.Class<NativeDirs, Schema.Struct<{
|
|
|
341
341
|
*
|
|
342
342
|
* @public
|
|
343
343
|
*/
|
|
344
|
-
declare class NativeDirs extends NativeDirs_base {
|
|
344
|
+
export declare class NativeDirs extends NativeDirs_base {
|
|
345
345
|
/**
|
|
346
346
|
* Map a platform and an environment onto the native directories for a namespace.
|
|
347
347
|
*
|
|
@@ -377,7 +377,7 @@ declare class NativeDirs extends NativeDirs_base {
|
|
|
377
377
|
*
|
|
378
378
|
* @public
|
|
379
379
|
*/
|
|
380
|
-
declare class XdgConfig {
|
|
380
|
+
export declare class XdgConfig {
|
|
381
381
|
private constructor();
|
|
382
382
|
/**
|
|
383
383
|
* Search the app's XDG config search path for `filename`.
|
|
@@ -447,5 +447,5 @@ declare class XdgConfig {
|
|
|
447
447
|
static readonly savePath: (filename: string) => Effect.Effect<string, never, AppDirs | Path.Path>;
|
|
448
448
|
}
|
|
449
449
|
//#endregion
|
|
450
|
-
export {
|
|
450
|
+
export type { AppDirOverrides, AppDirsOptions, AppDirsShape };
|
|
451
451
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/xdg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "XDG Base Directory resolution for Effect: environment paths, app-namespaced directories, native OS conventions and config-file resolvers.",
|
|
6
6
|
"keywords": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@effected/config-file": "^0.
|
|
42
|
-
"@effected/walker": "^0.
|
|
43
|
-
"effect": "4.0.0-
|
|
41
|
+
"@effected/config-file": "^0.6.0",
|
|
42
|
+
"@effected/walker": "^0.6.0",
|
|
43
|
+
"effect": "4.0.0-rc.112"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24.11.0"
|