@distilled.cloud/gcp 0.7.12 → 0.9.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,12 +1,12 @@
1
1
  import * as Layer from "effect/Layer";
2
2
  import * as Redacted from "effect/Redacted";
3
- import * as ServiceMap from "effect/ServiceMap";
3
+ import * as Context from "effect/Context";
4
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;
8
8
  }
9
- declare const Credentials_base: ServiceMap.ServiceClass<Credentials, "GCPCredentials", Config>;
9
+ declare const Credentials_base: Context.ServiceClass<Credentials, "GCPCredentials", Config>;
10
10
  export declare class Credentials extends Credentials_base {
11
11
  }
12
12
  export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,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;AAEJ,eAAO,MAAM,kBAAkB,8CAgB9B,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,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;AAEJ,eAAO,MAAM,kBAAkB,8CAgB9B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
3
  import * as Redacted from "effect/Redacted";
4
- import * as ServiceMap from "effect/ServiceMap";
4
+ import * as Context from "effect/Context";
5
5
  import { ConfigError } from "@distilled.cloud/core/errors";
6
- export class Credentials extends ServiceMap.Service()("GCPCredentials") {
6
+ export class Credentials extends Context.Service()("GCPCredentials") {
7
7
  }
8
8
  export const CredentialsFromEnv = Layer.effect(Credentials, Effect.gen(function* () {
9
9
  const accessToken = process.env.GOOGLE_ACCESS_TOKEN;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAO3D,MAAM,OAAO,WAAY,SAAQ,UAAU,CAAC,OAAO,EAAuB,CACxE,gBAAgB,CACjB;CAAG;AAEJ,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAC5C,WAAW,EACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;IAEpD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,sDAAsD;SAChE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;QACvC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;KACvC,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAO3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAuB,CACrE,gBAAgB,CACjB;CAAG;AAEJ,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAC5C,WAAW,EACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;IAEpD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,sDAAsD;SAChE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;QACvC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;KACvC,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
package/lib/errors.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
5
5
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
6
6
  import * as Schema from "effect/Schema";
7
- declare const UnknownGCPError_base: Schema.ErrorClass<UnknownGCPError, Schema.TaggedStruct<"UnknownGCPError", {
7
+ declare const UnknownGCPError_base: Schema.Class<UnknownGCPError, Schema.TaggedStruct<"UnknownGCPError", {
8
8
  readonly code: Schema.optional<Schema.Number>;
9
9
  readonly message: Schema.optional<Schema.String>;
10
10
  readonly status: Schema.optional<Schema.String>;
@@ -16,7 +16,7 @@ declare const UnknownGCPError_base: Schema.ErrorClass<UnknownGCPError, Schema.Ta
16
16
  });
17
17
  export declare class UnknownGCPError extends UnknownGCPError_base {
18
18
  }
19
- declare const GCPParseError_base: Schema.ErrorClass<GCPParseError, Schema.TaggedStruct<"GCPParseError", {
19
+ declare const GCPParseError_base: Schema.Class<GCPParseError, Schema.TaggedStruct<"GCPParseError", {
20
20
  readonly body: Schema.Unknown;
21
21
  readonly cause: Schema.Unknown;
22
22
  }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
package/lib/retry.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as Effect from "effect/Effect";
2
- import * as ServiceMap from "effect/ServiceMap";
2
+ import * as Context from "effect/Context";
3
3
  export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
4
4
  import type { Policy } from "@distilled.cloud/core/retry";
5
- declare const Retry_base: ServiceMap.ServiceClass<Retry, "GCPRetry", Policy>;
5
+ declare const Retry_base: Context.ServiceClass<Retry, "GCPRetry", Policy>;
6
6
  export declare class Retry extends Retry_base {
7
7
  }
8
8
  export declare const policy: (optionsOrFactory: Policy) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D,qBAAa,KAAM,SAAQ,UAA+C;CAAG;AAE7E,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D,qBAAa,KAAM,SAAQ,UAA4C;CAAG;AAE1E,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
package/lib/retry.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
- import * as ServiceMap from "effect/ServiceMap";
3
+ import * as Context from "effect/Context";
4
4
  export { makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
5
- export class Retry extends ServiceMap.Service()("GCPRetry") {
5
+ export class Retry extends Context.Service()("GCPRetry") {
6
6
  }
7
7
  export const policy = (optionsOrFactory) => Effect.provide(Layer.succeed(Retry, optionsOrFactory));
8
8
  export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
package/lib/retry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,OAAO,KAAM,SAAQ,UAAU,CAAC,OAAO,EAAiB,CAAC,UAAU,CAAC;CAAG;AAE7E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
1
+ {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,UAAU,CAAC;CAAG;AAE1E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/gcp",
3
- "version": "0.7.12",
3
+ "version": "0.9.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -50,21 +50,21 @@
50
50
  "fmt": "oxfmt --write src",
51
51
  "lint": "oxlint --fix src",
52
52
  "check": "tsgo && oxlint src && oxfmt --check src",
53
- "test": "bunx vitest run test",
53
+ "test": "bunx vitest run test --exclude specs",
54
54
  "publish:npm": "bun run build && bun publish --access public",
55
55
  "generate": "bun run scripts/generate.ts && oxlint --fix src && oxfmt --write src && oxfmt --write src",
56
56
  "specs:fetch": "git submodule update --force --init --recursive --depth=1 specs/distilled-spec-gcp && git -C specs/distilled-spec-gcp checkout -- .",
57
57
  "specs:update": "git -C specs/distilled-spec-gcp fetch && git -C specs/distilled-spec-gcp checkout main && git -C specs/distilled-spec-gcp pull"
58
58
  },
59
59
  "dependencies": {
60
- "@distilled.cloud/core": "0.7.12",
61
- "effect": "4.0.0-beta.43"
60
+ "@distilled.cloud/core": "0.9.0",
61
+ "effect": "4.0.0-beta.46"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/bun": "^1.3.0",
65
65
  "@types/node": "^25.3.5"
66
66
  },
67
67
  "peerDependencies": {
68
- "effect": "4.0.0-beta.43"
68
+ "effect": "4.0.0-beta.46"
69
69
  }
70
70
  }
@@ -1,7 +1,7 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
3
  import * as Redacted from "effect/Redacted";
4
- import * as ServiceMap from "effect/ServiceMap";
4
+ import * as Context from "effect/Context";
5
5
  import { ConfigError } from "@distilled.cloud/core/errors";
6
6
 
7
7
  export interface Config {
@@ -9,7 +9,7 @@ export interface Config {
9
9
  readonly project?: string;
10
10
  }
11
11
 
12
- export class Credentials extends ServiceMap.Service<Credentials, Config>()(
12
+ export class Credentials extends Context.Service<Credentials, Config>()(
13
13
  "GCPCredentials",
14
14
  ) {}
15
15
 
package/src/retry.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
- import * as ServiceMap from "effect/ServiceMap";
3
+ import * as Context from "effect/Context";
4
4
  export {
5
5
  type Options,
6
6
  type Factory,
@@ -13,7 +13,7 @@ export {
13
13
  } from "@distilled.cloud/core/retry";
14
14
  import type { Policy } from "@distilled.cloud/core/retry";
15
15
 
16
- export class Retry extends ServiceMap.Service<Retry, Policy>()("GCPRetry") {}
16
+ export class Retry extends Context.Service<Retry, Policy>()("GCPRetry") {}
17
17
 
18
18
  export const policy = (optionsOrFactory: Policy) =>
19
19
  Effect.provide(Layer.succeed(Retry, optionsOrFactory));