@devvit/public-api 0.10.22-next-2024-06-06-0f86ae113.0 → 0.10.22-next-2024-06-10-a7341f40e.0

Sign up to get free protection for your applications and to get access to all the features.
package/meta.min.json CHANGED
@@ -2682,12 +2682,12 @@
2682
2682
  "format": "esm"
2683
2683
  },
2684
2684
  "src/apis/AssetsClient/AssetsClient.ts": {
2685
- "bytes": 3761,
2685
+ "bytes": 2616,
2686
2686
  "imports": [
2687
2687
  {
2688
- "path": "../../devvit/Devvit.js",
2688
+ "path": "src/devvit/Devvit.ts",
2689
2689
  "kind": "import-statement",
2690
- "external": true
2690
+ "original": "../../devvit/Devvit.js"
2691
2691
  },
2692
2692
  {
2693
2693
  "path": "<runtime>",
@@ -2909,7 +2909,7 @@
2909
2909
  "format": "esm"
2910
2910
  },
2911
2911
  "src/apis/makeAPIClients.ts": {
2912
- "bytes": 3418,
2912
+ "bytes": 3345,
2913
2913
  "imports": [
2914
2914
  {
2915
2915
  "path": "src/devvit/internals/blocks/useChannel.ts",
@@ -2931,11 +2931,6 @@
2931
2931
  "kind": "import-statement",
2932
2932
  "original": "../devvit/internals/blocks/useState.js"
2933
2933
  },
2934
- {
2935
- "path": "src/index.ts",
2936
- "kind": "import-statement",
2937
- "original": "../index.js"
2938
- },
2939
2934
  {
2940
2935
  "path": "src/apis/AssetsClient/AssetsClient.ts",
2941
2936
  "kind": "import-statement",
@@ -3067,11 +3062,6 @@
3067
3062
  ],
3068
3063
  "format": "esm"
3069
3064
  },
3070
- "../shared-types/dist/imageUtil.js": {
3071
- "bytes": 2722,
3072
- "imports": [],
3073
- "format": "esm"
3074
- },
3075
3065
  "src/apis/ui/helpers/getEffectsFromUIClient.ts": {
3076
3066
  "bytes": 368,
3077
3067
  "imports": [],
@@ -3099,7 +3089,7 @@
3099
3089
  "format": "esm"
3100
3090
  },
3101
3091
  "src/devvit/internals/blocks/BlocksTransformer.ts": {
3102
- "bytes": 27859,
3092
+ "bytes": 28008,
3103
3093
  "imports": [
3104
3094
  {
3105
3095
  "path": "@devvit/protos",
@@ -3115,12 +3105,17 @@
3115
3105
  "path": "src/devvit/internals/helpers/color.ts",
3116
3106
  "kind": "import-statement",
3117
3107
  "original": "../helpers/color.js"
3108
+ },
3109
+ {
3110
+ "path": "<runtime>",
3111
+ "kind": "import-statement",
3112
+ "external": true
3118
3113
  }
3119
3114
  ],
3120
3115
  "format": "esm"
3121
3116
  },
3122
3117
  "src/devvit/internals/blocks/BlocksReconciler.ts": {
3123
- "bytes": 19632,
3118
+ "bytes": 18195,
3124
3119
  "imports": [
3125
3120
  {
3126
3121
  "path": "@devvit/protos",
@@ -3132,11 +3127,6 @@
3132
3127
  "kind": "import-statement",
3133
3128
  "original": "@devvit/shared-types/Header.js"
3134
3129
  },
3135
- {
3136
- "path": "../shared-types/dist/imageUtil.js",
3137
- "kind": "import-statement",
3138
- "original": "@devvit/shared-types/imageUtil.js"
3139
- },
3140
3130
  {
3141
3131
  "path": "src/apis/makeAPIClients.ts",
3142
3132
  "kind": "import-statement",
@@ -3631,7 +3621,7 @@
3631
3621
  "format": "esm"
3632
3622
  },
3633
3623
  "src/devvit/internals/blocks/handler/ContextBuilder.ts": {
3634
- "bytes": 3111,
3624
+ "bytes": 3081,
3635
3625
  "imports": [
3636
3626
  {
3637
3627
  "path": "../shared-types/dist/Header.js",
@@ -3683,11 +3673,6 @@
3683
3673
  "kind": "import-statement",
3684
3674
  "original": "../../../../apis/settings/SettingsClient.js"
3685
3675
  },
3686
- {
3687
- "path": "src/devvit/Devvit.ts",
3688
- "kind": "import-statement",
3689
- "original": "../../../Devvit.js"
3690
- },
3691
3676
  {
3692
3677
  "path": "src/devvit/internals/context.ts",
3693
3678
  "kind": "import-statement",
@@ -3721,50 +3706,14 @@
3721
3706
  ],
3722
3707
  "format": "esm"
3723
3708
  },
3724
- "../shared-types/dist/CircuitBreaker.js": {
3725
- "bytes": 943,
3726
- "imports": [],
3727
- "format": "esm"
3728
- },
3729
- "src/devvit/internals/blocks/handler/useAsync.ts": {
3730
- "bytes": 4653,
3731
- "imports": [
3732
- {
3733
- "path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
3734
- "kind": "import-statement",
3735
- "original": "./BlocksHandler.js"
3736
- },
3737
- {
3738
- "path": "../../node_modules/lodash.isequal/index.js",
3739
- "kind": "import-statement",
3740
- "original": "lodash.isequal"
3741
- },
3742
- {
3743
- "path": "../shared-types/dist/CircuitBreaker.js",
3744
- "kind": "import-statement",
3745
- "original": "@devvit/shared-types/CircuitBreaker.js"
3746
- },
3747
- {
3748
- "path": "<runtime>",
3749
- "kind": "import-statement",
3750
- "external": true
3751
- }
3752
- ],
3753
- "format": "esm"
3754
- },
3755
3709
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
3756
- "bytes": 16152,
3710
+ "bytes": 15102,
3757
3711
  "imports": [
3758
3712
  {
3759
3713
  "path": "@devvit/protos",
3760
3714
  "kind": "import-statement",
3761
3715
  "external": true
3762
3716
  },
3763
- {
3764
- "path": "../shared-types/dist/imageUtil.js",
3765
- "kind": "import-statement",
3766
- "original": "@devvit/shared-types/imageUtil.js"
3767
- },
3768
3717
  {
3769
3718
  "path": "../../node_modules/lodash.isequal/index.js",
3770
3719
  "kind": "import-statement",
@@ -3790,11 +3739,6 @@
3790
3739
  "kind": "import-statement",
3791
3740
  "original": "./types.js"
3792
3741
  },
3793
- {
3794
- "path": "src/devvit/internals/blocks/handler/useAsync.ts",
3795
- "kind": "import-statement",
3796
- "original": "./useAsync.js"
3797
- },
3798
3742
  {
3799
3743
  "path": "<runtime>",
3800
3744
  "kind": "import-statement",
@@ -3830,7 +3774,7 @@
3830
3774
  "format": "esm"
3831
3775
  },
3832
3776
  "src/devvit/Devvit.ts": {
3833
- "bytes": 34309,
3777
+ "bytes": 33892,
3834
3778
  "imports": [
3835
3779
  {
3836
3780
  "path": "@devvit/protos",
@@ -4591,6 +4535,37 @@
4591
4535
  ],
4592
4536
  "format": "esm"
4593
4537
  },
4538
+ "../shared-types/dist/CircuitBreaker.js": {
4539
+ "bytes": 943,
4540
+ "imports": [],
4541
+ "format": "esm"
4542
+ },
4543
+ "src/devvit/internals/blocks/handler/useAsync.ts": {
4544
+ "bytes": 4653,
4545
+ "imports": [
4546
+ {
4547
+ "path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
4548
+ "kind": "import-statement",
4549
+ "original": "./BlocksHandler.js"
4550
+ },
4551
+ {
4552
+ "path": "../../node_modules/lodash.isequal/index.js",
4553
+ "kind": "import-statement",
4554
+ "original": "lodash.isequal"
4555
+ },
4556
+ {
4557
+ "path": "../shared-types/dist/CircuitBreaker.js",
4558
+ "kind": "import-statement",
4559
+ "original": "@devvit/shared-types/CircuitBreaker.js"
4560
+ },
4561
+ {
4562
+ "path": "<runtime>",
4563
+ "kind": "import-statement",
4564
+ "external": true
4565
+ }
4566
+ ],
4567
+ "format": "esm"
4568
+ },
4594
4569
  "src/index.ts": {
4595
4570
  "bytes": 707,
4596
4571
  "imports": [
@@ -4658,7 +4633,7 @@
4658
4633
  "imports": [],
4659
4634
  "exports": [],
4660
4635
  "inputs": {},
4661
- "bytes": 1133674
4636
+ "bytes": 1123964
4662
4637
  },
4663
4638
  "dist/public-api.min.js": {
4664
4639
  "imports": [
@@ -5194,7 +5169,7 @@
5194
5169
  "bytesInOutput": 1365
5195
5170
  },
5196
5171
  "src/devvit/Devvit.ts": {
5197
- "bytesInOutput": 6102
5172
+ "bytesInOutput": 5920
5198
5173
  },
5199
5174
  "../shared-types/dist/Actor.js": {
5200
5175
  "bytesInOutput": 31
@@ -5245,7 +5220,7 @@
5245
5220
  "bytesInOutput": 502
5246
5221
  },
5247
5222
  "src/apis/AssetsClient/AssetsClient.ts": {
5248
- "bytesInOutput": 931
5223
+ "bytesInOutput": 550
5249
5224
  },
5250
5225
  "src/apis/key-value-storage/KeyValueStorage.ts": {
5251
5226
  "bytesInOutput": 456
@@ -5281,7 +5256,7 @@
5281
5256
  "bytesInOutput": 154
5282
5257
  },
5283
5258
  "src/apis/makeAPIClients.ts": {
5284
- "bytesInOutput": 870
5259
+ "bytesInOutput": 848
5285
5260
  },
5286
5261
  "src/devvit/internals/context.ts": {
5287
5262
  "bytesInOutput": 368
@@ -5290,10 +5265,7 @@
5290
5265
  "bytesInOutput": 350
5291
5266
  },
5292
5267
  "src/devvit/internals/blocks/BlocksReconciler.ts": {
5293
- "bytesInOutput": 7383
5294
- },
5295
- "../shared-types/dist/imageUtil.js": {
5296
- "bytesInOutput": 722
5268
+ "bytesInOutput": 7114
5297
5269
  },
5298
5270
  "src/apis/ui/helpers/getEffectsFromUIClient.ts": {
5299
5271
  "bytesInOutput": 34
@@ -5302,7 +5274,7 @@
5302
5274
  "bytesInOutput": 101
5303
5275
  },
5304
5276
  "src/devvit/internals/blocks/BlocksTransformer.ts": {
5305
- "bytesInOutput": 12190
5277
+ "bytesInOutput": 12236
5306
5278
  },
5307
5279
  "src/devvit/internals/semanticColors.ts": {
5308
5280
  "bytesInOutput": 11055
@@ -5335,7 +5307,7 @@
5335
5307
  "bytesInOutput": 260
5336
5308
  },
5337
5309
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
5338
- "bytesInOutput": 5741
5310
+ "bytesInOutput": 5510
5339
5311
  },
5340
5312
  "src/devvit/internals/blocks/handler/UIClient.ts": {
5341
5313
  "bytesInOutput": 974
@@ -5359,13 +5331,7 @@
5359
5331
  "bytesInOutput": 1225
5360
5332
  },
5361
5333
  "src/devvit/internals/blocks/handler/ContextBuilder.ts": {
5362
- "bytesInOutput": 627
5363
- },
5364
- "src/devvit/internals/blocks/handler/useAsync.ts": {
5365
- "bytesInOutput": 1874
5366
- },
5367
- "../shared-types/dist/CircuitBreaker.js": {
5368
- "bytesInOutput": 28
5334
+ "bytesInOutput": 605
5369
5335
  },
5370
5336
  "src/apis/reddit/helpers/makeGettersEnumerable.ts": {
5371
5337
  "bytesInOutput": 166
@@ -5441,9 +5407,15 @@
5441
5407
  },
5442
5408
  "src/apis/ui/helpers/svg.ts": {
5443
5409
  "bytesInOutput": 178
5410
+ },
5411
+ "src/devvit/internals/blocks/handler/useAsync.ts": {
5412
+ "bytesInOutput": 1874
5413
+ },
5414
+ "../shared-types/dist/CircuitBreaker.js": {
5415
+ "bytesInOutput": 28
5444
5416
  }
5445
5417
  },
5446
- "bytes": 240608
5418
+ "bytes": 238825
5447
5419
  }
5448
5420
  }
5449
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-06-0f86ae113.0",
3
+ "version": "0.10.22-next-2024-06-10-a7341f40e.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-06-0f86ae113.0",
34
- "@devvit/shared-types": "0.10.22-next-2024-06-06-0f86ae113.0",
33
+ "@devvit/protos": "0.10.22-next-2024-06-10-a7341f40e.0",
34
+ "@devvit/shared-types": "0.10.22-next-2024-06-10-a7341f40e.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-06-0f86ae113.0",
44
+ "@devvit/tsconfig": "0.10.22-next-2024-06-10-a7341f40e.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": "2d281619c3a9a358cb8851ff2f58ee52fb0bbf6b"
67
+ "gitHead": "473316667f1e2cf61d90cfb7ae7d9342991c0d4d"
68
68
  }
package/public-api.d.ts CHANGED
@@ -1339,7 +1339,7 @@ declare const Args: {
1339
1339
  */
1340
1340
  declare type AssetMap = {
1341
1341
  [path: string]: string;
1342
- } | undefined;
1342
+ };
1343
1343
 
1344
1344
  declare interface AssetResolver {
1345
1345
  /** Gets a public URL for a given asset */
@@ -1421,19 +1421,19 @@ declare const AssetResolverServiceName = "devvit.plugin.assetresolver.AssetResol
1421
1421
 
1422
1422
  declare class AssetsClient {
1423
1423
  #private;
1424
- constructor(metadata: Metadata, assetsPluginFetcher: () => AssetResolver);
1424
+ constructor();
1425
1425
  /**
1426
1426
  * Gets the public URLs for an asset.
1427
1427
  * @param assetPath A path, relative to the 'assets/' folder.
1428
1428
  * @returns The public URL for that asset (https://i.redd.it/<id>.<ext>)
1429
1429
  */
1430
- getURL(assetPath: string): Promise<string>;
1430
+ getURL(assetPath: string): string;
1431
1431
  /**
1432
1432
  * Gets the public URLs for multiple assets.
1433
1433
  * @param assetPaths An array of paths, relative to the 'assets/' folder.
1434
1434
  * @returns A map of each asset path to its public URL (https://i.redd.it/<id>.<ext>)
1435
1435
  */
1436
- getURL(assetPaths: string[]): Promise<NonNullable<AssetMap>>;
1436
+ getURL(assetPaths: string[]): AssetMap;
1437
1437
  }
1438
1438
 
1439
1439
  export declare type AsyncError = {
@@ -9916,16 +9916,6 @@ export declare namespace Devvit {
9916
9916
  }
9917
9917
  }
9918
9918
 
9919
- export declare type DevvitGlobalScope = WindowOrWorkerGlobalScope & {
9920
- devvit?: {
9921
- config?: {
9922
- assets: {
9923
- readonly [path: string]: string;
9924
- };
9925
- };
9926
- };
9927
- };
9928
-
9929
9919
  declare interface DevvitProfiler {
9930
9920
  GetProfile(request: GetProfileRequest, metadata?: Metadata): Promise<GetProfileResponse>;
9931
9921
  }
@@ -74229,11 +74219,3 @@ declare global {
74229
74219
  type ComponentFunction = (props: JSX.Props, context: Devvit.Context) => JSX.Element;
74230
74220
  }
74231
74221
  }
74232
-
74233
- export type DevvitGlobalScope = WindowOrWorkerGlobalScope & {
74234
- devvit?: {
74235
- config?: {
74236
- assets: { readonly [path: string]: string };
74237
- };
74238
- };
74239
- };