@devvit/public-api 0.11.0-next-2024-08-06-2b2a01b37.0 → 0.11.0-next-2024-08-06-ff8bfebcc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/devvit/internals/ui-request-handler.d.ts +3 -0
- package/devvit/internals/ui-request-handler.d.ts.map +1 -1
- package/devvit/internals/ui-request-handler.js +2 -2
- package/devvit/internals/ui-request-handler.test.d.ts.map +1 -0
- package/meta.json +3 -3
- package/meta.min.json +4 -4
- package/package.json +7 -7
- package/public-api.iife.js +2 -2
- package/public-api.min.js +1 -1
- package/public-api.min.js.map +2 -2
@@ -1,3 +1,6 @@
|
|
1
|
+
import type { Metadata, UIRequest } from '@devvit/protos';
|
2
|
+
import { UIResponse } from '@devvit/protos';
|
1
3
|
import type { Config } from '@devvit/shared-types/Config.js';
|
4
|
+
export declare function makeHandler(component: JSX.ComponentFunction): (req: UIRequest, metadata: Metadata) => Promise<UIResponse>;
|
2
5
|
export declare function registerUIRequestHandlers(config: Config): void;
|
3
6
|
//# sourceMappingURL=ui-request-handler.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ui-request-handler.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/ui-request-handler.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ui-request-handler.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/ui-request-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAwB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAgB7D,wBAAgB,WAAW,CACzB,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAC/B,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC,CAK7D;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9D"}
|
@@ -12,10 +12,10 @@ const UIComponentBindings = [
|
|
12
12
|
(_props, context) => Devvit.customPostType?.render(context) ?? null,
|
13
13
|
],
|
14
14
|
];
|
15
|
-
function makeHandler(component) {
|
15
|
+
export function makeHandler(component) {
|
16
16
|
return async (req, metadata) => {
|
17
17
|
const handler = new BlocksHandler(component);
|
18
|
-
return UIResponse.fromJSON(handler.handle(req, metadata));
|
18
|
+
return UIResponse.fromJSON(await handler.handle(req, metadata));
|
19
19
|
};
|
20
20
|
}
|
21
21
|
export function registerUIRequestHandlers(config) {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ui-request-handler.test.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/ui-request-handler.test.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,+BAA+B"}
|
package/meta.json
CHANGED
@@ -12545,7 +12545,7 @@
|
|
12545
12545
|
"format": "esm"
|
12546
12546
|
},
|
12547
12547
|
"src/devvit/internals/ui-request-handler.ts": {
|
12548
|
-
"bytes":
|
12548
|
+
"bytes": 1280,
|
12549
12549
|
"imports": [
|
12550
12550
|
{
|
12551
12551
|
"path": "../protos/dist/index.js",
|
@@ -14449,7 +14449,7 @@
|
|
14449
14449
|
"bytesInOutput": 14675
|
14450
14450
|
},
|
14451
14451
|
"src/devvit/internals/ui-request-handler.ts": {
|
14452
|
-
"bytesInOutput":
|
14452
|
+
"bytesInOutput": 645
|
14453
14453
|
},
|
14454
14454
|
"src/devvit/Devvit.ts": {
|
14455
14455
|
"bytesInOutput": 18680
|
@@ -14530,7 +14530,7 @@
|
|
14530
14530
|
"bytesInOutput": 370
|
14531
14531
|
}
|
14532
14532
|
},
|
14533
|
-
"bytes":
|
14533
|
+
"bytes": 14786501
|
14534
14534
|
}
|
14535
14535
|
}
|
14536
14536
|
}
|
package/meta.min.json
CHANGED
@@ -3874,7 +3874,7 @@
|
|
3874
3874
|
"format": "esm"
|
3875
3875
|
},
|
3876
3876
|
"src/devvit/internals/ui-request-handler.ts": {
|
3877
|
-
"bytes":
|
3877
|
+
"bytes": 1280,
|
3878
3878
|
"imports": [
|
3879
3879
|
{
|
3880
3880
|
"path": "@devvit/protos",
|
@@ -4738,7 +4738,7 @@
|
|
4738
4738
|
"imports": [],
|
4739
4739
|
"exports": [],
|
4740
4740
|
"inputs": {},
|
4741
|
-
"bytes":
|
4741
|
+
"bytes": 1191244
|
4742
4742
|
},
|
4743
4743
|
"dist/public-api.min.js": {
|
4744
4744
|
"imports": [
|
@@ -5430,7 +5430,7 @@
|
|
5430
5430
|
"bytesInOutput": 1418
|
5431
5431
|
},
|
5432
5432
|
"src/devvit/internals/ui-request-handler.ts": {
|
5433
|
-
"bytesInOutput":
|
5433
|
+
"bytesInOutput": 313
|
5434
5434
|
},
|
5435
5435
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
5436
5436
|
"bytesInOutput": 967
|
@@ -5550,7 +5550,7 @@
|
|
5550
5550
|
"bytesInOutput": 178
|
5551
5551
|
}
|
5552
5552
|
},
|
5553
|
-
"bytes":
|
5553
|
+
"bytes": 250906
|
5554
5554
|
}
|
5555
5555
|
}
|
5556
5556
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/public-api",
|
3
|
-
"version": "0.11.0-next-2024-08-06-
|
3
|
+
"version": "0.11.0-next-2024-08-06-ff8bfebcc.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-08-06-
|
34
|
-
"@devvit/shared-types": "0.11.0-next-2024-08-06-
|
33
|
+
"@devvit/protos": "0.11.0-next-2024-08-06-ff8bfebcc.0",
|
34
|
+
"@devvit/shared-types": "0.11.0-next-2024-08-06-ff8bfebcc.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-08-06-
|
43
|
-
"@devvit/repo-tools": "0.11.0-next-2024-08-06-
|
44
|
-
"@devvit/tsconfig": "0.11.0-next-2024-08-06-
|
42
|
+
"@devvit/eslint-config": "0.11.0-next-2024-08-06-ff8bfebcc.0",
|
43
|
+
"@devvit/repo-tools": "0.11.0-next-2024-08-06-ff8bfebcc.0",
|
44
|
+
"@devvit/tsconfig": "0.11.0-next-2024-08-06-ff8bfebcc.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": "
|
67
|
+
"gitHead": "fb83b31574ab5394e251ab432770ce94413500e9"
|
68
68
|
}
|