@devvit/public-api 0.10.22-next-2024-06-10-b2b48f9e0.0 → 0.10.22-next-2024-06-10-e3193479b.0

Sign up to get free protection for your applications and to get access to all the features.
package/meta.min.json CHANGED
@@ -2420,7 +2420,7 @@
2420
2420
  "format": "esm"
2421
2421
  },
2422
2422
  "src/types/context.ts": {
2423
- "bytes": 4965,
2423
+ "bytes": 5559,
2424
2424
  "imports": [],
2425
2425
  "format": "esm"
2426
2426
  },
@@ -2598,7 +2598,7 @@
2598
2598
  "format": "esm"
2599
2599
  },
2600
2600
  "../shared-types/dist/Header.js": {
2601
- "bytes": 961,
2601
+ "bytes": 1800,
2602
2602
  "imports": [],
2603
2603
  "format": "esm"
2604
2604
  },
@@ -2990,7 +2990,7 @@
2990
2990
  "format": "esm"
2991
2991
  },
2992
2992
  "src/devvit/internals/context.ts": {
2993
- "bytes": 990,
2993
+ "bytes": 2390,
2994
2994
  "imports": [
2995
2995
  {
2996
2996
  "path": "../shared-types/dist/Header.js",
@@ -3115,7 +3115,7 @@
3115
3115
  "format": "esm"
3116
3116
  },
3117
3117
  "src/devvit/internals/blocks/BlocksReconciler.ts": {
3118
- "bytes": 18195,
3118
+ "bytes": 18194,
3119
3119
  "imports": [
3120
3120
  {
3121
3121
  "path": "@devvit/protos",
@@ -3558,7 +3558,7 @@
3558
3558
  "format": "esm"
3559
3559
  },
3560
3560
  "src/devvit/internals/blocks/handler/RenderContext.ts": {
3561
- "bytes": 5447,
3561
+ "bytes": 5495,
3562
3562
  "imports": [
3563
3563
  {
3564
3564
  "path": "<runtime>",
@@ -3707,7 +3707,7 @@
3707
3707
  "format": "esm"
3708
3708
  },
3709
3709
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
3710
- "bytes": 15102,
3710
+ "bytes": 15738,
3711
3711
  "imports": [
3712
3712
  {
3713
3713
  "path": "@devvit/protos",
@@ -3774,7 +3774,7 @@
3774
3774
  "format": "esm"
3775
3775
  },
3776
3776
  "src/devvit/Devvit.ts": {
3777
- "bytes": 33892,
3777
+ "bytes": 34066,
3778
3778
  "imports": [
3779
3779
  {
3780
3780
  "path": "@devvit/protos",
@@ -4541,12 +4541,12 @@
4541
4541
  "format": "esm"
4542
4542
  },
4543
4543
  "src/devvit/internals/blocks/handler/useAsync.ts": {
4544
- "bytes": 4653,
4544
+ "bytes": 4856,
4545
4545
  "imports": [
4546
4546
  {
4547
- "path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
4547
+ "path": "../shared-types/dist/CircuitBreaker.js",
4548
4548
  "kind": "import-statement",
4549
- "original": "./BlocksHandler.js"
4549
+ "original": "@devvit/shared-types/CircuitBreaker.js"
4550
4550
  },
4551
4551
  {
4552
4552
  "path": "../../node_modules/lodash.isequal/index.js",
@@ -4554,9 +4554,9 @@
4554
4554
  "original": "lodash.isequal"
4555
4555
  },
4556
4556
  {
4557
- "path": "../shared-types/dist/CircuitBreaker.js",
4557
+ "path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
4558
4558
  "kind": "import-statement",
4559
- "original": "@devvit/shared-types/CircuitBreaker.js"
4559
+ "original": "./BlocksHandler.js"
4560
4560
  },
4561
4561
  {
4562
4562
  "path": "<runtime>",
@@ -4633,7 +4633,7 @@
4633
4633
  "imports": [],
4634
4634
  "exports": [],
4635
4635
  "inputs": {},
4636
- "bytes": 1123964
4636
+ "bytes": 1128820
4637
4637
  },
4638
4638
  "dist/public-api.min.js": {
4639
4639
  "imports": [
@@ -5169,7 +5169,7 @@
5169
5169
  "bytesInOutput": 1365
5170
5170
  },
5171
5171
  "src/devvit/Devvit.ts": {
5172
- "bytesInOutput": 5920
5172
+ "bytesInOutput": 5891
5173
5173
  },
5174
5174
  "../shared-types/dist/Actor.js": {
5175
5175
  "bytesInOutput": 31
@@ -5205,7 +5205,7 @@
5205
5205
  "bytesInOutput": 1537
5206
5206
  },
5207
5207
  "../shared-types/dist/Header.js": {
5208
- "bytesInOutput": 696
5208
+ "bytesInOutput": 869
5209
5209
  },
5210
5210
  "src/apis/ui/helpers/getFormValues.ts": {
5211
5211
  "bytesInOutput": 407
@@ -5259,13 +5259,13 @@
5259
5259
  "bytesInOutput": 848
5260
5260
  },
5261
5261
  "src/devvit/internals/context.ts": {
5262
- "bytesInOutput": 368
5262
+ "bytesInOutput": 849
5263
5263
  },
5264
5264
  "src/devvit/internals/custom-post.ts": {
5265
5265
  "bytesInOutput": 350
5266
5266
  },
5267
5267
  "src/devvit/internals/blocks/BlocksReconciler.ts": {
5268
- "bytesInOutput": 7114
5268
+ "bytesInOutput": 7132
5269
5269
  },
5270
5270
  "src/apis/ui/helpers/getEffectsFromUIClient.ts": {
5271
5271
  "bytesInOutput": 34
@@ -5307,7 +5307,7 @@
5307
5307
  "bytesInOutput": 260
5308
5308
  },
5309
5309
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
5310
- "bytesInOutput": 5510
5310
+ "bytesInOutput": 5936
5311
5311
  },
5312
5312
  "src/devvit/internals/blocks/handler/UIClient.ts": {
5313
5313
  "bytesInOutput": 974
@@ -5322,7 +5322,7 @@
5322
5322
  "bytesInOutput": 1184
5323
5323
  },
5324
5324
  "src/devvit/internals/blocks/handler/RenderContext.ts": {
5325
- "bytesInOutput": 2007
5325
+ "bytesInOutput": 2051
5326
5326
  },
5327
5327
  "src/devvit/internals/blocks/handler/types.ts": {
5328
5328
  "bytesInOutput": 29
@@ -5408,14 +5408,14 @@
5408
5408
  "src/apis/ui/helpers/svg.ts": {
5409
5409
  "bytesInOutput": 178
5410
5410
  },
5411
- "src/devvit/internals/blocks/handler/useAsync.ts": {
5412
- "bytesInOutput": 1874
5413
- },
5414
5411
  "../shared-types/dist/CircuitBreaker.js": {
5415
5412
  "bytesInOutput": 28
5413
+ },
5414
+ "src/devvit/internals/blocks/handler/useAsync.ts": {
5415
+ "bytesInOutput": 2042
5416
5416
  }
5417
5417
  },
5418
- "bytes": 238825
5418
+ "bytes": 240106
5419
5419
  }
5420
5420
  }
5421
5421
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/public-api",
3
- "version": "0.10.22-next-2024-06-10-b2b48f9e0.0",
3
+ "version": "0.10.22-next-2024-06-10-e3193479b.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.10.22-next-2024-06-10-b2b48f9e0.0",
34
- "@devvit/shared-types": "0.10.22-next-2024-06-10-b2b48f9e0.0",
33
+ "@devvit/protos": "0.10.22-next-2024-06-10-e3193479b.0",
34
+ "@devvit/shared-types": "0.10.22-next-2024-06-10-e3193479b.0",
35
35
  "base64-js": "1.5.1",
36
36
  "clone-deep": "4.0.1",
37
37
  "core-js": "3.27.2",
@@ -41,7 +41,7 @@
41
41
  "@ampproject/filesize": "4.3.0",
42
42
  "@devvit/eslint-config": "0.10.21",
43
43
  "@devvit/repo-tools": "0.10.21",
44
- "@devvit/tsconfig": "0.10.22-next-2024-06-10-b2b48f9e0.0",
44
+ "@devvit/tsconfig": "0.10.22-next-2024-06-10-e3193479b.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": "7eeb6fe8425380991b032ea21ec26931d00a924d"
67
+ "gitHead": "73f76c26469720f6e9a65986572612734fe2c02b"
68
68
  }
package/public-api.d.ts CHANGED
@@ -830,6 +830,28 @@ declare function apiClientConfig_BodyTypeFromJSON(object: any): ApiClientConfig_
830
830
 
831
831
  declare function apiClientConfig_BodyTypeToJSON(object: ApiClientConfig_BodyType): number;
832
832
 
833
+ /** See DevvitGlobal and ContextDebugInfo. */
834
+ declare const enum AppDebug {
835
+ /** Enable debug logging for blocks. */
836
+ Blocks = "blocks",
837
+ /**
838
+ * Log the entire reified blocks JSX/XML tree on each render. Eg:
839
+ *
840
+ * <hstack><text>hi world</text></hstack>
841
+ */
842
+ EmitSnapshots = "emitSnapshots",
843
+ /** Log app state changes. */
844
+ EmitState = "emitState",
845
+ /** Enable runtime and dispatcher logging. */
846
+ Runtime = "runtime",
847
+ /** Enable debug logging for devvit-surface and dispatcher. */
848
+ Surface = "surface",
849
+ /** Enable debug logging for the useAsync() hook family. */
850
+ UseAsync = "useAsync",
851
+ /** Enable debug logging for useChannel() hook. */
852
+ UseChannel = "useChannel"
853
+ }
854
+
833
855
  /** The event name for when your app is installed */
834
856
  export declare type AppInstall = 'AppInstall';
835
857
 
@@ -5310,8 +5332,8 @@ declare const ComposeRequest: {
5310
5332
  * method. Devvit almost implements this class.
5311
5333
  */
5312
5334
  declare type Config = {
5313
- assets: Readonly<AssetMap>;
5314
- providedDefinitions: Readonly<Definition>[];
5335
+ readonly assets: Readonly<AssetMap>;
5336
+ readonly providedDefinitions: Readonly<Definition>[];
5315
5337
  export(namespace: Readonly<Namespace>): DependencySpec;
5316
5338
  provides(definition: Readonly<Definition>): void;
5317
5339
  use<T>(definition: Readonly<Definition>, options?: Readonly<DeepPartial_15<PackageQuery>>): T;
@@ -5726,8 +5748,10 @@ export declare type ContextAPIClients = {
5726
5748
  };
5727
5749
 
5728
5750
  export declare type ContextDebugInfo = {
5729
- metadata: Metadata;
5730
5751
  effects?: EffectEmitter;
5752
+ metadata: Metadata;
5753
+ } & {
5754
+ [key in AppDebug]?: string;
5731
5755
  };
5732
5756
 
5733
5757
  declare enum ContextType {
@@ -9463,23 +9487,7 @@ declare const DescriptorProto_ReservedRange: {
9463
9487
 
9464
9488
  export declare class Devvit extends Actor {
9465
9489
  #private;
9466
- /**
9467
- * Home for debug flags, settings, and other information.
9468
- */
9469
- static debug: {
9470
- /**
9471
- * Should debug block rendering in console.log according to the reified JSX/XML output. Example:
9472
- *
9473
- * <hstack><text>hi world</text></hstack>
9474
- *
9475
- */
9476
- emitSnapshots: boolean;
9477
- /**
9478
- * Should console.log the state of the app after every event.
9479
- *
9480
- */
9481
- emitState: boolean;
9482
- };
9490
+ static debug: DevvitDebug;
9483
9491
  /**
9484
9492
  * To use certain APIs and features of Devvit, you must enable them using this function.
9485
9493
  *
@@ -9916,6 +9924,27 @@ export declare namespace Devvit {
9916
9924
  }
9917
9925
  }
9918
9926
 
9927
+ /**
9928
+ * Home for debug flags, settings, and other information. Any type removals
9929
+ * may cause type errors but not runtime errors.
9930
+ *
9931
+ * **Favor ContextDebugInfo since request-based state is preferred.**
9932
+ */
9933
+ declare type DevvitDebug = {
9934
+ /**
9935
+ * Should debug block rendering in console.log according to the reified JSX/XML output. Example:
9936
+ *
9937
+ * <hstack><text>hi world</text></hstack>
9938
+ *
9939
+ */
9940
+ emitSnapshots?: boolean | undefined;
9941
+ /**
9942
+ * Should console.log the state of the app after every event.
9943
+ *
9944
+ */
9945
+ emitState?: boolean | undefined;
9946
+ };
9947
+
9919
9948
  declare interface DevvitProfiler {
9920
9949
  GetProfile(request: GetProfileRequest, metadata?: Metadata): Promise<GetProfileResponse>;
9921
9950
  }