@devvit/public-api 0.11.0-next-2024-07-15-c5542123c.0 → 0.11.0-next-2024-07-15-30b6e0459.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,10 +5,6 @@ export type AsyncOptions = {
5
5
  * The data loader will re-run if the value of `depends` changes.
6
6
  */
7
7
  depends?: JSONValue;
8
- /**
9
- * If `enabled` is false, the data loader will not run.
10
- */
11
- enabled?: boolean;
12
8
  };
13
9
  /**
14
10
  * This is the preferred way to handle async state in Devvit.
@@ -1 +1 @@
1
- {"version":3,"file":"useAsync.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQ3F,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA8GF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,EAC1C,WAAW,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACxC,OAAO,GAAE,YAAiB,GACzB,cAAc,CAAC,CAAC,CAAC,CAUnB"}
1
+ {"version":3,"file":"useAsync.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQ3F,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AA2GF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,EAC1C,WAAW,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACxC,OAAO,GAAE,YAAiB,GACzB,cAAc,CAAC,CAAC,CAAC,CAUnB"}
@@ -30,9 +30,6 @@ class AsyncHook {
30
30
  __classPrivateFieldSet(this, _AsyncHook_invalidate, params.invalidate, "f");
31
31
  __classPrivateFieldSet(this, _AsyncHook_ctx, params.context, "f");
32
32
  __classPrivateFieldSet(this, _AsyncHook_localDepends, options.depends ?? null, "f");
33
- if (!(options.enabled ?? true)) {
34
- this.state.load_state = 'disabled';
35
- }
36
33
  }
37
34
  /**
38
35
  * After we look at our state, we need to decide if we need to dispatch a request to load the data.
package/meta.json CHANGED
@@ -8400,7 +8400,7 @@
8400
8400
  "format": "esm"
8401
8401
  },
8402
8402
  "../protos/dist/types/devvit/plugin/redditapi/flair/flair_msg.js": {
8403
- "bytes": 89260,
8403
+ "bytes": 85603,
8404
8404
  "imports": [
8405
8405
  {
8406
8406
  "path": "../../node_modules/long/src/long.js",
@@ -9924,7 +9924,7 @@
9924
9924
  "format": "esm"
9925
9925
  },
9926
9926
  "../protos/dist/types/devvit/plugin/redditapi/newmodmail/newmodmail_svc.js": {
9927
- "bytes": 49210,
9927
+ "bytes": 55107,
9928
9928
  "imports": [
9929
9929
  {
9930
9930
  "path": "../../node_modules/protobufjs/minimal.js",
@@ -13387,7 +13387,7 @@
13387
13387
  "format": "esm"
13388
13388
  },
13389
13389
  "src/devvit/internals/blocks/handler/useAsync.ts": {
13390
- "bytes": 5170,
13390
+ "bytes": 4992,
13391
13391
  "imports": [
13392
13392
  {
13393
13393
  "path": "../shared-types/dist/CircuitBreaker.js",
@@ -14107,7 +14107,7 @@
14107
14107
  "bytesInOutput": 699
14108
14108
  },
14109
14109
  "../protos/dist/types/devvit/plugin/redditapi/flair/flair_msg.js": {
14110
- "bytesInOutput": 81653
14110
+ "bytesInOutput": 78359
14111
14111
  },
14112
14112
  "../protos/dist/types/devvit/plugin/redditapi/postcollections/postcollections_msg.js": {
14113
14113
  "bytesInOutput": 38118
@@ -14281,7 +14281,7 @@
14281
14281
  "bytesInOutput": 3667
14282
14282
  },
14283
14283
  "../protos/dist/types/devvit/plugin/redditapi/newmodmail/newmodmail_svc.js": {
14284
- "bytesInOutput": 28123
14284
+ "bytesInOutput": 31880
14285
14285
  },
14286
14286
  "../protos/dist/types/devvit/plugin/redditapi/newmodmail/newmodmail_msg.js": {
14287
14287
  "bytesInOutput": 213915
@@ -14611,10 +14611,10 @@
14611
14611
  "bytesInOutput": 50
14612
14612
  },
14613
14613
  "src/devvit/internals/blocks/handler/useAsync.ts": {
14614
- "bytesInOutput": 4450
14614
+ "bytesInOutput": 4358
14615
14615
  }
14616
14616
  },
14617
- "bytes": 15125169
14617
+ "bytes": 15127896
14618
14618
  }
14619
14619
  }
14620
14620
  }
package/meta.min.json CHANGED
@@ -4628,7 +4628,7 @@
4628
4628
  "format": "esm"
4629
4629
  },
4630
4630
  "src/devvit/internals/blocks/handler/useAsync.ts": {
4631
- "bytes": 5170,
4631
+ "bytes": 4992,
4632
4632
  "imports": [
4633
4633
  {
4634
4634
  "path": "../shared-types/dist/CircuitBreaker.js",
@@ -4725,7 +4725,7 @@
4725
4725
  "imports": [],
4726
4726
  "exports": [],
4727
4727
  "inputs": {},
4728
- "bytes": 1180786
4728
+ "bytes": 1180562
4729
4729
  },
4730
4730
  "dist/public-api.min.js": {
4731
4731
  "imports": [
@@ -5534,10 +5534,10 @@
5534
5534
  "bytesInOutput": 28
5535
5535
  },
5536
5536
  "src/devvit/internals/blocks/handler/useAsync.ts": {
5537
- "bytesInOutput": 2135
5537
+ "bytesInOutput": 2083
5538
5538
  }
5539
5539
  },
5540
- "bytes": 251356
5540
+ "bytes": 251304
5541
5541
  }
5542
5542
  }
5543
5543
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/public-api",
3
- "version": "0.11.0-next-2024-07-15-c5542123c.0",
3
+ "version": "0.11.0-next-2024-07-15-30b6e0459.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "types": "./index.d.ts",
32
32
  "dependencies": {
33
- "@devvit/protos": "0.11.0-next-2024-07-15-c5542123c.0",
34
- "@devvit/shared-types": "0.11.0-next-2024-07-15-c5542123c.0",
33
+ "@devvit/protos": "0.11.0-next-2024-07-15-30b6e0459.0",
34
+ "@devvit/shared-types": "0.11.0-next-2024-07-15-30b6e0459.0",
35
35
  "base64-js": "1.5.1",
36
36
  "clone-deep": "4.0.1",
37
37
  "core-js": "3.27.2",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@ampproject/filesize": "4.3.0",
42
- "@devvit/eslint-config": "0.11.0-next-2024-07-15-c5542123c.0",
43
- "@devvit/repo-tools": "0.11.0-next-2024-07-15-c5542123c.0",
44
- "@devvit/tsconfig": "0.11.0-next-2024-07-15-c5542123c.0",
42
+ "@devvit/eslint-config": "0.11.0-next-2024-07-15-30b6e0459.0",
43
+ "@devvit/repo-tools": "0.11.0-next-2024-07-15-30b6e0459.0",
44
+ "@devvit/tsconfig": "0.11.0-next-2024-07-15-30b6e0459.0",
45
45
  "@microsoft/api-extractor": "7.41.0",
46
46
  "@reddit/faceplate-ui": "11.3.3",
47
47
  "@types/clone-deep": "4.0.1",
@@ -64,5 +64,5 @@
64
64
  }
65
65
  },
66
66
  "source": "./src/index.ts",
67
- "gitHead": "59030d09e8eb2948a002181212230c9d1975fdf3"
67
+ "gitHead": "a2a851e1677515c9c04850d15ae9bf679f853852"
68
68
  }
package/public-api.d.ts CHANGED
@@ -1517,10 +1517,6 @@ declare type AsyncOptions = {
1517
1517
  * The data loader will re-run if the value of `depends` changes.
1518
1518
  */
1519
1519
  depends?: JSONValue;
1520
- /**
1521
- * If `enabled` is false, the data loader will not run.
1522
- */
1523
- enabled?: boolean;
1524
1520
  };
1525
1521
 
1526
1522
  declare interface AsyncRequest {
@@ -12503,16 +12499,11 @@ declare const FlairDefinition: {
12503
12499
  id?: string | undefined;
12504
12500
  cssClass?: string | undefined;
12505
12501
  maxEmojis?: number;
12502
+ richtext?: string[];
12506
12503
  textEditable?: boolean;
12507
12504
  overrideCss?: boolean;
12508
12505
  type?: string | undefined;
12509
12506
  flairType?: string | undefined;
12510
- richtext?: {
12511
- e?: string | undefined;
12512
- t?: string | undefined;
12513
- a?: string | undefined;
12514
- u?: string | undefined;
12515
- }[];
12516
12507
  } | undefined): FlairObject;
12517
12508
  fromPartial(object: {
12518
12509
  allowableContent?: string | undefined;
@@ -12523,16 +12514,11 @@ declare const FlairDefinition: {
12523
12514
  id?: string | undefined;
12524
12515
  cssClass?: string | undefined;
12525
12516
  maxEmojis?: number;
12517
+ richtext?: string[];
12526
12518
  textEditable?: boolean;
12527
12519
  overrideCss?: boolean;
12528
12520
  type?: string | undefined;
12529
12521
  flairType?: string | undefined;
12530
- richtext?: {
12531
- e?: string | undefined;
12532
- t?: string | undefined;
12533
- a?: string | undefined;
12534
- u?: string | undefined;
12535
- }[];
12536
12522
  }): FlairObject;
12537
12523
  };
12538
12524
  readonly responseStream: false;
@@ -12578,16 +12564,11 @@ declare const FlairDefinition: {
12578
12564
  id?: string | undefined;
12579
12565
  cssClass?: string | undefined;
12580
12566
  maxEmojis?: number;
12567
+ richtext?: string[];
12581
12568
  textEditable?: boolean;
12582
12569
  overrideCss?: boolean;
12583
12570
  type?: string | undefined;
12584
12571
  flairType?: string | undefined;
12585
- richtext?: {
12586
- e?: string | undefined;
12587
- t?: string | undefined;
12588
- a?: string | undefined;
12589
- u?: string | undefined;
12590
- }[];
12591
12572
  }[];
12592
12573
  } | undefined): FlairArray;
12593
12574
  fromPartial(object: {
@@ -12600,16 +12581,11 @@ declare const FlairDefinition: {
12600
12581
  id?: string | undefined;
12601
12582
  cssClass?: string | undefined;
12602
12583
  maxEmojis?: number;
12584
+ richtext?: string[];
12603
12585
  textEditable?: boolean;
12604
12586
  overrideCss?: boolean;
12605
12587
  type?: string | undefined;
12606
12588
  flairType?: string | undefined;
12607
- richtext?: {
12608
- e?: string | undefined;
12609
- t?: string | undefined;
12610
- a?: string | undefined;
12611
- u?: string | undefined;
12612
- }[];
12613
12589
  }[];
12614
12590
  }): FlairArray;
12615
12591
  };
@@ -12756,16 +12732,11 @@ declare const FlairDefinition: {
12756
12732
  id?: string | undefined;
12757
12733
  cssClass?: string | undefined;
12758
12734
  maxEmojis?: number;
12735
+ richtext?: string[];
12759
12736
  textEditable?: boolean;
12760
12737
  overrideCss?: boolean;
12761
12738
  type?: string | undefined;
12762
12739
  flairType?: string | undefined;
12763
- richtext?: {
12764
- e?: string | undefined;
12765
- t?: string | undefined;
12766
- a?: string | undefined;
12767
- u?: string | undefined;
12768
- }[];
12769
12740
  }[];
12770
12741
  } | undefined): FlairArray;
12771
12742
  fromPartial(object: {
@@ -12778,16 +12749,11 @@ declare const FlairDefinition: {
12778
12749
  id?: string | undefined;
12779
12750
  cssClass?: string | undefined;
12780
12751
  maxEmojis?: number;
12752
+ richtext?: string[];
12781
12753
  textEditable?: boolean;
12782
12754
  overrideCss?: boolean;
12783
12755
  type?: string | undefined;
12784
12756
  flairType?: string | undefined;
12785
- richtext?: {
12786
- e?: string | undefined;
12787
- t?: string | undefined;
12788
- a?: string | undefined;
12789
- u?: string | undefined;
12790
- }[];
12791
12757
  }[];
12792
12758
  }): FlairArray;
12793
12759
  };
@@ -12853,11 +12819,11 @@ declare interface FlairObject {
12853
12819
  id?: string | undefined;
12854
12820
  cssClass?: string | undefined;
12855
12821
  maxEmojis: number;
12822
+ richtext: string[];
12856
12823
  textEditable: boolean;
12857
12824
  overrideCss: boolean;
12858
12825
  type?: string | undefined;
12859
12826
  flairType?: string | undefined;
12860
- richtext: FlairObject_FlairRichText[];
12861
12827
  }
12862
12828
 
12863
12829
  declare const FlairObject: {
@@ -12870,28 +12836,6 @@ declare const FlairObject: {
12870
12836
  fromPartial(object: DeepPartial_55<FlairObject>): FlairObject;
12871
12837
  };
12872
12838
 
12873
- /** RichText document for flair */
12874
- declare interface FlairObject_FlairRichText {
12875
- /** enum of element types. e.g. emoji or text */
12876
- e?: string | undefined;
12877
- /** text to show up in the flair, e.g. "Need Advice" */
12878
- t?: string | undefined;
12879
- /** emoji references, e.g. ":rainbow:" */
12880
- a?: string | undefined;
12881
- /** url string, e.g. "https://reddit.com/" */
12882
- u?: string | undefined;
12883
- }
12884
-
12885
- declare const FlairObject_FlairRichText: {
12886
- $type: "devvit.plugin.redditapi.flair.FlairObject.FlairRichText";
12887
- encode(message: FlairObject_FlairRichText, writer?: _m0.Writer): _m0.Writer;
12888
- decode(input: _m0.Reader | Uint8Array, length?: number): FlairObject_FlairRichText;
12889
- fromJSON(object: any): FlairObject_FlairRichText;
12890
- toJSON(message: FlairObject_FlairRichText): unknown;
12891
- create(base?: DeepPartial_55<FlairObject_FlairRichText>): FlairObject_FlairRichText;
12892
- fromPartial(object: DeepPartial_55<FlairObject_FlairRichText>): FlairObject_FlairRichText;
12893
- };
12894
-
12895
12839
  declare interface FlairRequest {
12896
12840
  /** subreddit name without the r/ e.g. 'devvit_test' */
12897
12841
  subreddit: string;
@@ -29415,7 +29359,11 @@ declare const NewModmailDefinition: {
29415
29359
  }): GetConversationsResponse_2;
29416
29360
  };
29417
29361
  readonly responseStream: false;
29418
- readonly options: {};
29362
+ readonly options: {
29363
+ readonly _unknownFields: {
29364
+ readonly 480010: readonly [Uint8Array];
29365
+ };
29366
+ };
29419
29367
  };
29420
29368
  /** https://www.reddit.com/dev/api#POST_api_mod_conversations */
29421
29369
  readonly createConversation: {
@@ -30079,7 +30027,11 @@ declare const NewModmailDefinition: {
30079
30027
  }): GetConversationResponse_2;
30080
30028
  };
30081
30029
  readonly responseStream: false;
30082
- readonly options: {};
30030
+ readonly options: {
30031
+ readonly _unknownFields: {
30032
+ readonly 480010: readonly [Uint8Array];
30033
+ };
30034
+ };
30083
30035
  };
30084
30036
  /** https://www.reddit.com/dev/api#POST_api_mod_conversations_:conversation_id */
30085
30037
  readonly createConversationMessage: {
@@ -42995,7 +42947,6 @@ declare namespace protos {
42995
42947
  SelectFlairRequest,
42996
42948
  SetFlairEnabledRequest,
42997
42949
  FlairObject,
42998
- FlairObject_FlairRichText,
42999
42950
  FlairArray,
43000
42951
  FlairSelectorResponseOption,
43001
42952
  FlairSelectorResponse,