@devvit/build-pack 0.11.20-next-2025-07-29-04-29-31-36003bf76.0 → 0.11.20-next-2025-07-29-18-35-16-706259e64.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.template.d.ts","sourceRoot":"","sources":["../../../src/esbuild/templatizer/blocks.template.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blocks.template.d.ts","sourceRoot":"","sources":["../../../src/esbuild/templatizer/blocks.template.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,MAAM,EACN,KAAK,OAAO,EAIb,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAsBjD,oFAAoF;AACpF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AAmH7D,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CA4D/D;AA+JD,eAAe,MAAM,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { LoggerDefinition, Severity } from '@devvit/protos';
|
|
2
|
-
import {
|
|
2
|
+
import { Height, } from '@devvit/protos/json/devvit/ui/effects/web_view/v1alpha/context.js';
|
|
3
|
+
import { Devvit, } from '@devvit/public-api';
|
|
3
4
|
import { getServerPort } from '@devvit/server';
|
|
5
|
+
import { Header } from '@devvit/shared-types/Header.js';
|
|
4
6
|
import { getDevvitConfig } from '@devvit/shared-types/server/get-devvit-config.js';
|
|
5
7
|
import { StringUtil } from '@devvit/shared-types/StringUtil.js';
|
|
8
|
+
import { Splash } from '@devvit/splash/splash.js';
|
|
6
9
|
// Hack: rename config2 to workaround declaration in
|
|
7
10
|
// packages/runtime-lite/src/runtime/SandboxedRuntimeLite.ts.
|
|
8
11
|
// __devvit__ is undefined in tests only.
|
|
@@ -27,12 +30,20 @@ function configurePermissions(permissions) {
|
|
|
27
30
|
redis: permissions.redis,
|
|
28
31
|
});
|
|
29
32
|
}
|
|
30
|
-
function configurePost(post) {
|
|
31
|
-
// TODO: support post entrypoints beyond default.
|
|
33
|
+
function configurePost(name, post) {
|
|
32
34
|
const defaultEntrypoint = post.entrypoints.default;
|
|
33
35
|
Devvit.addCustomPostType({
|
|
34
36
|
name: '',
|
|
35
|
-
render: () =>
|
|
37
|
+
render: (ctx) => {
|
|
38
|
+
const postDataHeader = ctx.metadata[Header.PostData]?.values[0];
|
|
39
|
+
const postData = postDataHeader ? JSON.parse(postDataHeader) : {};
|
|
40
|
+
const splash = postData.splash;
|
|
41
|
+
return (Devvit.createElement(Splash, { appDisplayName: splash?.appDisplayName || name, appIconURI: splash?.appIconUri, backgroundURI: splash?.backgroundUri, buttonLabel: splash?.buttonLabel, description: splash?.description, entryURI: splash?.entryUri || defaultEntrypoint.entry, height: splash?.height == null
|
|
42
|
+
? defaultEntrypoint.height
|
|
43
|
+
: splash.height === Height.TALL
|
|
44
|
+
? 'tall'
|
|
45
|
+
: 'regular', title: splash?.title }));
|
|
46
|
+
},
|
|
36
47
|
height: defaultEntrypoint.height,
|
|
37
48
|
});
|
|
38
49
|
}
|
|
@@ -251,16 +262,10 @@ function configureScheduler(schedulerConfig) {
|
|
|
251
262
|
});
|
|
252
263
|
}
|
|
253
264
|
}
|
|
254
|
-
function renderModal(path) {
|
|
255
|
-
const webView = useWebView({ url: path, onMessage() { } });
|
|
256
|
-
return (Devvit.createElement("vstack", { alignment: "center middle", height: "100%" },
|
|
257
|
-
Devvit.createElement("button", { onPress: webView.mount }, "Launch App"),
|
|
258
|
-
";"));
|
|
259
|
-
}
|
|
260
265
|
if (config2) {
|
|
261
266
|
configurePermissions(config2.permissions);
|
|
262
267
|
if (config2.post)
|
|
263
|
-
configurePost(config2.post);
|
|
268
|
+
configurePost(config2.name, config2.post);
|
|
264
269
|
if (config2.menu?.items) {
|
|
265
270
|
configureMenuItems(config2.menu.items);
|
|
266
271
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/build-pack",
|
|
3
|
-
"version": "0.11.20-next-2025-07-29-
|
|
3
|
+
"version": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@devvit/protos": "0.11.20-next-2025-07-29-
|
|
27
|
-
"@devvit/shared-types": "0.11.20-next-2025-07-29-
|
|
26
|
+
"@devvit/protos": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
27
|
+
"@devvit/shared-types": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
28
|
+
"@devvit/splash": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
28
29
|
"esbuild": "0.23.0",
|
|
29
30
|
"rxjs": "7.8.1",
|
|
30
31
|
"tsv": "0.2.0",
|
|
@@ -35,12 +36,12 @@
|
|
|
35
36
|
"@devvit/shared": "*"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@devvit/public-api": "0.11.20-next-2025-07-29-
|
|
39
|
-
"@devvit/repo-tools": "0.11.20-next-2025-07-29-
|
|
40
|
-
"@devvit/scheduler": "0.11.20-next-2025-07-29-
|
|
41
|
-
"@devvit/server": "0.11.20-next-2025-07-29-
|
|
42
|
-
"@devvit/shared": "0.11.20-next-2025-07-29-
|
|
43
|
-
"@devvit/tsconfig": "0.11.20-next-2025-07-29-
|
|
39
|
+
"@devvit/public-api": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
40
|
+
"@devvit/repo-tools": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
41
|
+
"@devvit/scheduler": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
42
|
+
"@devvit/server": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
43
|
+
"@devvit/shared": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
44
|
+
"@devvit/tsconfig": "0.11.20-next-2025-07-29-18-35-16-706259e64.0",
|
|
44
45
|
"@types/tsv": "0.2.1",
|
|
45
46
|
"eslint": "9.11.1",
|
|
46
47
|
"vitest": "1.6.1"
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"directory": "dist"
|
|
50
51
|
},
|
|
51
52
|
"source": "./src/index.ts",
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d0bb41a970e45c710d407461d8c46f281ff8cfed"
|
|
53
54
|
}
|