dfx 0.79.0 → 0.80.1

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/src/types.ts CHANGED
@@ -3774,8 +3774,10 @@ export interface ExecuteWebhookParams {
3774
3774
  readonly attachments: Array<Attachment>
3775
3775
  /** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
3776
3776
  readonly flags: number
3777
- /** name of thread to create (requires the webhook channel to be a forum channel) */
3777
+ /** name of thread to create (requires the webhook channel to be a forum or media channel) */
3778
3778
  readonly thread_name: string
3779
+ /** array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel) */
3780
+ readonly applied_tags: Array<Snowflake>
3779
3781
  }
3780
3782
  export enum ExplicitContentFilterLevel {
3781
3783
  /** media content will not be scanned */
@@ -5933,12 +5935,10 @@ export interface Response {
5933
5935
  readonly user?: User
5934
5936
  }
5935
5937
  export interface ResponseBody {
5936
- /** the public, archived threads */
5938
+ /** the active threads */
5937
5939
  readonly threads: Array<Channel>
5938
5940
  /** a thread member object for each returned thread the current user has joined */
5939
5941
  readonly members: Array<ThreadMember>
5940
- /** whether there are potentially additional threads that could be returned on a subsequent call */
5941
- readonly has_more: boolean
5942
5942
  }
5943
5943
  export interface Resume {
5944
5944
  /** Session token */
@@ -4,7 +4,6 @@ import * as Effect from "effect/Effect"
4
4
  import type * as Fiber from "effect/Fiber"
5
5
  import * as PubSub from "effect/PubSub"
6
6
  import * as Queue from "effect/Queue"
7
- import * as ScopedRef from "effect/ScopedRef"
8
7
 
9
8
  export const subscribeForEachPar = <R, E, A, X>(
10
9
  self: PubSub.PubSub<A>,
@@ -16,7 +15,7 @@ export const subscribeForEachPar = <R, E, A, X>(
16
15
  Effect.flatMap(queue =>
17
16
  Effect.forever(
18
17
  Effect.flatMap(Queue.take(queue), _ =>
19
- Effect.forkScoped(
18
+ Effect.fork(
20
19
  Effect.catchAllCause(effect(_), _ =>
21
20
  Deferred.failCause(deferred, _),
22
21
  ),
@@ -38,24 +37,27 @@ export const foreverSwitch = <R, E, A, R1, E1, X>(
38
37
  f: (_: A) => Effect.Effect<R1, E1, X>,
39
38
  ): Effect.Effect<R | R1, E | E1, never> =>
40
39
  pipe(
41
- Effect.all([
42
- Deferred.make<E1, never>(),
43
- ScopedRef.fromAcquire<R1, never, Fiber.RuntimeFiber<unknown, unknown>>(
44
- Effect.fork(Effect.unit),
45
- ),
46
- ]),
47
- Effect.flatMap(([causeDeferred, fiberRef]) => {
48
- const run = Effect.forever(
49
- Effect.flatMap(self, _ =>
50
- ScopedRef.set(
51
- fiberRef,
52
- Effect.forkScoped(
53
- Effect.tapErrorCause(f(_), _ =>
54
- Deferred.failCause(causeDeferred, _),
55
- ),
56
- ),
40
+ Effect.all([Deferred.make<E1, never>(), Effect.fiberId]),
41
+ Effect.flatMap(([causeDeferred, fiberId]) => {
42
+ let fiber: Fiber.RuntimeFiber<unknown, unknown> | undefined
43
+
44
+ const run = pipe(
45
+ self,
46
+ Effect.tap(() =>
47
+ fiber ? fiber.interruptAsFork(fiberId) : Effect.unit,
48
+ ),
49
+ Effect.flatMap(_ =>
50
+ pipe(
51
+ f(_),
52
+ Effect.tapErrorCause(_ => Deferred.failCause(causeDeferred, _)),
53
+ Effect.fork,
57
54
  ),
58
55
  ),
56
+ Effect.tap(fiber_ =>
57
+ Effect.sync(() => {
58
+ fiber = fiber_
59
+ }),
60
+ ),
59
61
  )
60
62
 
61
63
  return Effect.all([run, Deferred.await(causeDeferred)], {
@@ -63,5 +65,4 @@ export const foreverSwitch = <R, E, A, R1, E1, X>(
63
65
  discard: true,
64
66
  }) as Effect.Effect<R | R1, E | E1, never>
65
67
  }),
66
- Effect.scoped,
67
68
  )
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.79.0";
1
+ export const LIB_VERSION = "0.80.1";
package/types.d.ts CHANGED
@@ -1839,8 +1839,10 @@ export interface ExecuteWebhookParams {
1839
1839
  readonly attachments: Array<Attachment>;
1840
1840
  /** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
1841
1841
  readonly flags: number;
1842
- /** name of thread to create (requires the webhook channel to be a forum channel) */
1842
+ /** name of thread to create (requires the webhook channel to be a forum or media channel) */
1843
1843
  readonly thread_name: string;
1844
+ /** array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel) */
1845
+ readonly applied_tags: Array<Snowflake>;
1844
1846
  }
1845
1847
  export declare enum ExplicitContentFilterLevel {
1846
1848
  /** media content will not be scanned */
@@ -3920,12 +3922,10 @@ export interface Response {
3920
3922
  readonly user?: User;
3921
3923
  }
3922
3924
  export interface ResponseBody {
3923
- /** the public, archived threads */
3925
+ /** the active threads */
3924
3926
  readonly threads: Array<Channel>;
3925
3927
  /** a thread member object for each returned thread the current user has joined */
3926
3928
  readonly members: Array<ThreadMember>;
3927
- /** whether there are potentially additional threads that could be returned on a subsequent call */
3928
- readonly has_more: boolean;
3929
3929
  }
3930
3930
  export interface Resume {
3931
3931
  /** Session token */