@distilled.cloud/gcp 0.19.1 → 0.20.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.
@@ -1,7 +1,7 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  import * as Context from "effect/Context";
2
3
  import * as Layer from "effect/Layer";
3
4
  import * as Redacted from "effect/Redacted";
4
- import { ConfigError } from "@distilled.cloud/core/errors";
5
5
  export interface Config {
6
6
  readonly accessToken: Redacted.Redacted<string>;
7
7
  readonly project?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAOJ,eAAO,MAAM,kBAAkB,8CAc9B,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAOJ,eAAO,MAAM,kBAAkB,8CAc9B,CAAC"}
@@ -1,17 +1,17 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  import * as EffectConfig from "effect/Config";
2
3
  import * as Context from "effect/Context";
3
4
  import * as Effect from "effect/Effect";
4
5
  import * as Layer from "effect/Layer";
5
6
  import * as Option from "effect/Option";
6
7
  import * as Redacted from "effect/Redacted";
7
- import { ConfigError } from "@distilled.cloud/core/errors";
8
8
  export class Credentials extends Context.Service()("GCPCredentials") {
9
9
  }
10
10
  const envConfig = EffectConfig.all({
11
11
  accessToken: EffectConfig.string("GOOGLE_ACCESS_TOKEN"),
12
12
  project: EffectConfig.option(EffectConfig.string("GOOGLE_PROJECT_ID")),
13
13
  });
14
- export const CredentialsFromEnv = Layer.effect(Credentials, envConfig.asEffect().pipe(Effect.mapError(() => new ConfigError({
14
+ export const CredentialsFromEnv = Layer.effect(Credentials, envConfig.pipe(Effect.mapError(() => new ConfigError({
15
15
  message: "GOOGLE_ACCESS_TOKEN environment variable is required",
16
16
  })), Effect.map(({ accessToken, project }) => ({
17
17
  accessToken: Redacted.make(accessToken),
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,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,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAO3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAuB,CAC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MAAM,CAAC,qBAAqB,CAAC;IACvD,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;CACvE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAC5C,WAAW,EACX,SAAS,CAAC,IAAI,CACZ,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;IACd,OAAO,EAAE,sDAAsD;CAChE,CAAC,CACL,EACD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC;CACxC,CAAC,CAAC,CACJ,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/gcp",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -62,7 +62,7 @@
62
62
  "specs:update": "git -C specs/distilled-spec-gcp fetch && git -C specs/distilled-spec-gcp checkout main && git -C specs/distilled-spec-gcp pull"
63
63
  },
64
64
  "dependencies": {
65
- "@distilled.cloud/core": "0.19.1"
65
+ "@distilled.cloud/core": "0.20.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/bun": "^1.3.0",
@@ -71,6 +71,6 @@
71
71
  "vitest": "^3.2.3"
72
72
  },
73
73
  "peerDependencies": {
74
- "effect": ">=4.0.0-beta.60 || >=4.0.0"
74
+ "effect": ">=4.0.0-beta.66 || >=4.0.0"
75
75
  }
76
76
  }
@@ -1,10 +1,10 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  import * as EffectConfig from "effect/Config";
2
3
  import * as Context from "effect/Context";
3
4
  import * as Effect from "effect/Effect";
4
5
  import * as Layer from "effect/Layer";
5
6
  import * as Option from "effect/Option";
6
7
  import * as Redacted from "effect/Redacted";
7
- import { ConfigError } from "@distilled.cloud/core/errors";
8
8
 
9
9
  export interface Config {
10
10
  readonly accessToken: Redacted.Redacted<string>;
@@ -22,7 +22,7 @@ const envConfig = EffectConfig.all({
22
22
 
23
23
  export const CredentialsFromEnv = Layer.effect(
24
24
  Credentials,
25
- envConfig.asEffect().pipe(
25
+ envConfig.pipe(
26
26
  Effect.mapError(
27
27
  () =>
28
28
  new ConfigError({