@devvit/build-pack 0.11.19-next-2025-07-22-22-20-07-fbab46345.0 → 0.11.19-next-2025-07-23-15-39-09-193dcaf0f.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":"AAEA,OAAO,EAEL,MAAM,EACN,KAAK,OAAO,EAKb,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAmBtE,oFAAoF;AACpF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AA8F7D,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CA4D/D;AA8JD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"blocks.template.d.ts","sourceRoot":"","sources":["../../../src/esbuild/templatizer/blocks.template.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,MAAM,EACN,KAAK,OAAO,EAKb,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAmBtE,oFAAoF;AACpF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AA8F7D,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CA4D/D;AAgKD,eAAe,MAAM,CAAC"}
@@ -37,8 +37,8 @@ function configurePost(post) {
37
37
  height: 'tall',
38
38
  });
39
39
  }
40
- function configureMenuActions(menuActions) {
41
- for (const action of menuActions) {
40
+ function configureMenuItems(menuItems) {
41
+ for (const action of menuItems) {
42
42
  const menuItem = {
43
43
  label: action.label,
44
44
  location: action.location,
@@ -97,7 +97,7 @@ export function validateUiResponse(uiResponse) {
97
97
  const validKeys = ['showToast', 'navigateTo', 'showForm'];
98
98
  const invalidKeys = Object.keys(uiResponse).filter((key) => !validKeys.includes(key));
99
99
  if (invalidKeys.length > 0) {
100
- throw new Error(`Invalid fields found in UiResponse: ${invalidKeys.join(', ')}. Valid fields are: ${validKeys.join(', ')}`);
100
+ throw new Error(`Invalid fields found in UiResponse: "${invalidKeys.join('", "')}". Valid fields are: "${validKeys.join('", "')}"`);
101
101
  }
102
102
  // (2) showForm must have a name that exists in the formKeyMap.
103
103
  if (uiResponse.showForm) {
@@ -105,7 +105,7 @@ export function validateUiResponse(uiResponse) {
105
105
  throw new Error('showForm must have a name');
106
106
  }
107
107
  if (!formKeyMap[uiResponse.showForm.name]) {
108
- throw new Error(`Form with name ${uiResponse.showForm.name} not found in devvit.json. Consider adding '"forms"."${uiResponse.showForm.name}"="/internal/your/endpoint"'.`);
108
+ throw new Error(`Form with name "${uiResponse.showForm.name}" not found in devvit.json. Consider adding:\n\n "forms": {"${uiResponse.showForm.name}":"/internal/your/endpoint"}\n\n`);
109
109
  }
110
110
  }
111
111
  // (3) showToast must be a string or an object with only fields [text, appearance]
@@ -120,7 +120,7 @@ export function validateUiResponse(uiResponse) {
120
120
  const validToastKeys = ['text', 'appearance'];
121
121
  const invalidToastKeys = toastKeys.filter((key) => !validToastKeys.includes(key));
122
122
  if (invalidToastKeys.length > 0) {
123
- throw new Error(`Invalid fields found in showToast: ${invalidToastKeys.join(', ')}. Valid fields are: ${validToastKeys.join(', ')}`);
123
+ throw new Error(`Invalid fields found in showToast: "${invalidToastKeys.join('", "')}". Valid fields are: "${validToastKeys.join('", ')}"`);
124
124
  }
125
125
  if (typeof uiResponse.showToast.text !== 'string') {
126
126
  throw new Error('showToast.text is required and must be a string');
@@ -253,8 +253,9 @@ if (config2) {
253
253
  configurePermissions(config2.permissions);
254
254
  if (config2.post)
255
255
  configurePost(config2.post);
256
- if (config2.menuActions)
257
- configureMenuActions(config2.menuActions);
256
+ if (config2.menu?.items) {
257
+ configureMenuItems(config2.menu.items);
258
+ }
258
259
  if (config2.scheduler)
259
260
  configureScheduler(config2.scheduler);
260
261
  if (config2.forms)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/build-pack",
3
- "version": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
3
+ "version": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "types": "./index.d.ts",
25
25
  "dependencies": {
26
- "@devvit/protos": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
27
- "@devvit/shared-types": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
26
+ "@devvit/protos": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
27
+ "@devvit/shared-types": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
28
28
  "esbuild": "0.23.0",
29
29
  "rxjs": "7.8.1",
30
30
  "tsv": "0.2.0",
@@ -35,12 +35,12 @@
35
35
  "@devvit/shared": "*"
36
36
  },
37
37
  "devDependencies": {
38
- "@devvit/public-api": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
39
- "@devvit/repo-tools": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
40
- "@devvit/scheduler": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
41
- "@devvit/server": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
42
- "@devvit/shared": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
43
- "@devvit/tsconfig": "0.11.19-next-2025-07-22-22-20-07-fbab46345.0",
38
+ "@devvit/public-api": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
39
+ "@devvit/repo-tools": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
40
+ "@devvit/scheduler": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
41
+ "@devvit/server": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
42
+ "@devvit/shared": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
43
+ "@devvit/tsconfig": "0.11.19-next-2025-07-23-15-39-09-193dcaf0f.0",
44
44
  "@types/tsv": "0.2.1",
45
45
  "eslint": "9.11.1",
46
46
  "vitest": "1.6.1"
@@ -49,5 +49,5 @@
49
49
  "directory": "dist"
50
50
  },
51
51
  "source": "./src/index.ts",
52
- "gitHead": "711432f8276deddc6099d29a35a9161c836de206"
52
+ "gitHead": "931d28a3f24b056d8f352a6727fbaf99c8f29bbf"
53
53
  }