@devvit/build-pack 0.12.4-next-2025-11-17-20-36-35-57741856e.0 → 0.12.4-next-2025-11-18-16-03-20-1590f278d.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":"AAKA,OAAO,KAAK,EAAU,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAMvD,OAAO,EAEL,MAAM,EACN,KAAK,OAAO,EAMb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"blocks.template.d.ts","sourceRoot":"","sources":["../../../src/esbuild/templatizer/blocks.template.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAU,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAMvD,OAAO,EAEL,MAAM,EACN,KAAK,OAAO,EAMb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,0BAA0B,EAAyB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAa,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAmB7F,OAAO,QAAQ,oBAAoB,CAAC;IAGlC,UAAU,MAAM,CAAC;QACf,SAAS,UAAU,IAAI,IAAI,CAAC;QAC5B,SAAS,SAAS,IAAI,IAAI,CAAC;QAC3B,SAAS,cAAc,IAAI,IAAI,CAAC;QAChC,SAAS,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;KAC7D;CACF;AAQD,oFAAoF;AACpF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AAE7D,gBAAgB;AAChB,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAoID,gBAAgB;AAChB,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAC/B,OAAO,CAAC,GAAG,IAAI,UAAU,CA+D3B;AAmBD,gBAAgB;AAChB,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,GACxB,OAAO,CAAC,GAAG,IAAI,0BAA0B,CAO3C;AA4CD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EACjC,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,GACvB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAoEjC;AAoJD,eAAe,MAAM,CAAC"}
|
|
@@ -150,9 +150,7 @@ export function assertUiResponse(endpoint, rsp) {
|
|
|
150
150
|
if (rsp.showToast == null ||
|
|
151
151
|
Array.isArray(rsp.showToast) ||
|
|
152
152
|
(typeof rsp.showToast !== 'string' && typeof rsp.showToast !== 'object') ||
|
|
153
|
-
(typeof rsp.showToast === 'object' &&
|
|
154
|
-
(typeof rsp.showToast.text !== 'string' ||
|
|
155
|
-
(rsp.showToast.appearance !== 'neutral' && rsp.showToast.appearance !== 'success'))))
|
|
153
|
+
(typeof rsp.showToast === 'object' && !isValidToastObject(rsp.showToast)))
|
|
156
154
|
throw Error(`${preamble} showToast must be a string or \`{"text": string}\`: ${abbreviate(JSON.stringify(rsp.showToast))}`);
|
|
157
155
|
}
|
|
158
156
|
if ('showForm' in rsp) {
|
|
@@ -172,6 +170,20 @@ export function assertUiResponse(endpoint, rsp) {
|
|
|
172
170
|
throw new Error('navigateTo and showForm cannot be used together in UiResponse');
|
|
173
171
|
}
|
|
174
172
|
}
|
|
173
|
+
function isValidToastObject(showToast) {
|
|
174
|
+
// Check text
|
|
175
|
+
if (typeof showToast.text !== 'string') {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
// Check appearance is either not set, or one of the valid values
|
|
179
|
+
if (showToast.appearance !== 'neutral' &&
|
|
180
|
+
showToast.appearance !== 'success' &&
|
|
181
|
+
showToast.appearance != null) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
// Check that no other properties exist
|
|
185
|
+
return Object.keys(showToast).every((key) => ['text', 'appearance'].includes(key));
|
|
186
|
+
}
|
|
175
187
|
/** @internal */
|
|
176
188
|
export function assertSettingsValidationResponse(rsp) {
|
|
177
189
|
if (!('success' in rsp) || typeof rsp.success !== 'boolean') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/build-pack",
|
|
3
|
-
"version": "0.12.4-next-2025-11-
|
|
3
|
+
"version": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@devvit/payments": "0.12.4-next-2025-11-
|
|
35
|
-
"@devvit/protos": "0.12.4-next-2025-11-
|
|
36
|
-
"@devvit/shared-types": "0.12.4-next-2025-11-
|
|
37
|
-
"@devvit/splash": "0.12.4-next-2025-11-
|
|
34
|
+
"@devvit/payments": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
35
|
+
"@devvit/protos": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
36
|
+
"@devvit/shared-types": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
37
|
+
"@devvit/splash": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
38
38
|
"esbuild": "0.25.9",
|
|
39
39
|
"rxjs": "7.8.1",
|
|
40
40
|
"tsv": "0.2.0",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"@devvit/shared": "*"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@devvit/public-api": "0.12.4-next-2025-11-
|
|
49
|
-
"@devvit/repo-tools": "0.12.4-next-2025-11-
|
|
50
|
-
"@devvit/scheduler": "0.12.4-next-2025-11-
|
|
51
|
-
"@devvit/server": "0.12.4-next-2025-11-
|
|
52
|
-
"@devvit/shared": "0.12.4-next-2025-11-
|
|
53
|
-
"@devvit/tsconfig": "0.12.4-next-2025-11-
|
|
48
|
+
"@devvit/public-api": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
49
|
+
"@devvit/repo-tools": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
50
|
+
"@devvit/scheduler": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
51
|
+
"@devvit/server": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
52
|
+
"@devvit/shared": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
53
|
+
"@devvit/tsconfig": "0.12.4-next-2025-11-18-16-03-20-1590f278d.0",
|
|
54
54
|
"@types/tsv": "0.2.1",
|
|
55
55
|
"eslint": "9.11.1",
|
|
56
56
|
"vitest": "1.6.1"
|
|
57
57
|
},
|
|
58
58
|
"source": "./src/index.ts",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6732e549779fcfac249ba8d9d0dd1d16861ff552"
|
|
60
60
|
}
|