@distilled.cloud/expo-eas 0.23.1 → 0.24.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/lib/credentials.d.ts +3 -10
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/package.json +2 -2
- package/src/credentials.ts +6 -4
package/lib/credentials.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EAS (Expo Application Services) credentials.
|
|
3
|
-
*
|
|
4
|
-
* The EAS backend is a single GraphQL endpoint. Authentication is via a
|
|
5
|
-
* Personal/Organization Access Token issued from
|
|
6
|
-
* https://expo.dev/settings/access-tokens, sent as `Authorization: Bearer <token>`.
|
|
7
|
-
*/
|
|
8
|
-
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
9
1
|
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
10
3
|
import * as Layer from "effect/Layer";
|
|
11
4
|
import * as Redacted from "effect/Redacted";
|
|
12
5
|
/** Default EAS GraphQL host. The endpoint path (`/graphql`) is set per operation. */
|
|
@@ -15,7 +8,7 @@ export interface Config {
|
|
|
15
8
|
readonly accessToken: Redacted.Redacted<string>;
|
|
16
9
|
readonly apiBaseUrl: string;
|
|
17
10
|
}
|
|
18
|
-
declare const Credentials_base: Context.ServiceClass<Credentials, "EasCredentials", Config
|
|
11
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "EasCredentials", Effect.Effect<Config, never, never>>;
|
|
19
12
|
export declare class Credentials extends Credentials_base {
|
|
20
13
|
}
|
|
21
14
|
/**
|
|
@@ -27,6 +20,6 @@ export declare class Credentials extends Credentials_base {
|
|
|
27
20
|
* https://api.expo.dev). Set to `https://staging-api.expo.dev` to target
|
|
28
21
|
* staging, mirroring eas-cli's `EXPO_STAGING=1` flag.
|
|
29
22
|
*/
|
|
30
|
-
export declare const CredentialsFromEnv: Layer.Layer<Credentials,
|
|
23
|
+
export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
|
|
31
24
|
export {};
|
|
32
25
|
//# sourceMappingURL=credentials.d.ts.map
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAGZ;CAAG;AASxB;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,wCAe9B,CAAC"}
|
package/lib/credentials.js
CHANGED
|
@@ -28,10 +28,10 @@ const envConfig = EffectConfig.all({
|
|
|
28
28
|
* https://api.expo.dev). Set to `https://staging-api.expo.dev` to target
|
|
29
29
|
* staging, mirroring eas-cli's `EXPO_STAGING=1` flag.
|
|
30
30
|
*/
|
|
31
|
-
export const CredentialsFromEnv = Layer.
|
|
31
|
+
export const CredentialsFromEnv = Layer.succeed(Credentials, envConfig.pipe(Effect.mapError(() => new ConfigError({
|
|
32
32
|
message: "EXPO_TOKEN environment variable is required",
|
|
33
33
|
})), Effect.map(({ accessToken, apiBaseUrl }) => ({
|
|
34
34
|
accessToken: Redacted.make(accessToken),
|
|
35
35
|
apiBaseUrl,
|
|
36
|
-
}))));
|
|
36
|
+
})), Effect.orDie));
|
|
37
37
|
//# sourceMappingURL=credentials.js.map
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,qFAAqF;AACrF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAO3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,qFAAqF;AACrF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAO3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,gBAAgB,CAAC;CAAG;AAExB,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC;IACjC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC;IAC9C,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAClD,YAAY,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAC/C;CACF,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAC7C,WAAW,EACX,SAAS,CAAC,IAAI,CACZ,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;IACd,OAAO,EAAE,6CAA6C;CACvD,CAAC,CACL,EACD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;IACvC,UAAU;CACX,CAAC,CAAC,EACH,MAAM,CAAC,KAAK,CACb,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/expo-eas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"specs:update": "git -C specs/eas-cli fetch && git -C specs/eas-cli checkout main && git -C specs/eas-cli pull && git -C specs/expo fetch && git -C specs/expo checkout main && git -C specs/expo pull"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@distilled.cloud/core": "0.
|
|
76
|
+
"@distilled.cloud/core": "0.24.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/bun": "^1.3.0",
|
package/src/credentials.ts
CHANGED
|
@@ -20,9 +20,10 @@ export interface Config {
|
|
|
20
20
|
readonly apiBaseUrl: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export class Credentials extends Context.Service<
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
export class Credentials extends Context.Service<
|
|
24
|
+
Credentials,
|
|
25
|
+
Effect.Effect<Config>
|
|
26
|
+
>()("EasCredentials") {}
|
|
26
27
|
|
|
27
28
|
const envConfig = EffectConfig.all({
|
|
28
29
|
accessToken: EffectConfig.string("EXPO_TOKEN"),
|
|
@@ -40,7 +41,7 @@ const envConfig = EffectConfig.all({
|
|
|
40
41
|
* https://api.expo.dev). Set to `https://staging-api.expo.dev` to target
|
|
41
42
|
* staging, mirroring eas-cli's `EXPO_STAGING=1` flag.
|
|
42
43
|
*/
|
|
43
|
-
export const CredentialsFromEnv = Layer.
|
|
44
|
+
export const CredentialsFromEnv = Layer.succeed(
|
|
44
45
|
Credentials,
|
|
45
46
|
envConfig.pipe(
|
|
46
47
|
Effect.mapError(
|
|
@@ -53,5 +54,6 @@ export const CredentialsFromEnv = Layer.effect(
|
|
|
53
54
|
accessToken: Redacted.make(accessToken),
|
|
54
55
|
apiBaseUrl,
|
|
55
56
|
})),
|
|
57
|
+
Effect.orDie,
|
|
56
58
|
),
|
|
57
59
|
);
|