@devvit/shared-types 0.12.1-next-2025-09-11-20-25-40-b95d46a26.0 → 0.12.1-next-2025-09-11-21-17-38-7b3afe6d4.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.
package/client/emit-effect.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ type Effect = Omit<SharedEffects, 'interval'> & {
|
|
|
19
19
|
* and resolves the promise when a matching response is received
|
|
20
20
|
* 2. Effects that don't require a response: Posts the message and resolves immediately
|
|
21
21
|
*/
|
|
22
|
-
export declare const emitEffect: (effect: Effect) => Promise<WebViewInternalEventMessage | undefined>;
|
|
22
|
+
export declare const emitEffect: (effect: Readonly<Effect>) => Promise<WebViewInternalEventMessage | undefined>;
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=emit-effect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-effect.d.ts","sourceRoot":"","sources":["../../src/client/emit-effect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAc,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2EAA2E,CAAC;AAKvH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EACL,2BAA2B,EAE5B,MAAM,2DAA2D,CAAC;AAEnE,KAAK,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;IAC9C,aAAa,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACvD,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAOF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"emit-effect.d.ts","sourceRoot":"","sources":["../../src/client/emit-effect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAc,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2EAA2E,CAAC;AAKvH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EACL,2BAA2B,EAE5B,MAAM,2DAA2D,CAAC;AAEnE,KAAK,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;IAC9C,aAAa,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACvD,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAOF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,QAAQ,CAAC,MAAM,CAAC,KACvB,OAAO,CAAC,2BAA2B,GAAG,SAAS,CA6CjD,CAAC"}
|
package/client/emit-effect.js
CHANGED
|
@@ -35,10 +35,13 @@ export const emitEffect = (effect) => {
|
|
|
35
35
|
else {
|
|
36
36
|
message.effect = effect;
|
|
37
37
|
}
|
|
38
|
-
// For temporary backward compatibility, we set both message.effect
|
|
38
|
+
// For temporary backward compatibility, we set both `message.effect` above, its types counterpart, below
|
|
39
39
|
if (effect.showToast) {
|
|
40
40
|
message.showToast = effect.showToast;
|
|
41
41
|
}
|
|
42
|
+
else if (effect.navigateToUrl) {
|
|
43
|
+
message.navigateToUrl = effect.navigateToUrl;
|
|
44
|
+
}
|
|
42
45
|
// Only set message id and add a listener for effects which require a response
|
|
43
46
|
if (EFFECTS_WITH_RESPONSE.includes(effect.type)) {
|
|
44
47
|
const id = self.crypto.randomUUID();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/shared-types",
|
|
3
|
-
"version": "0.12.1-next-2025-09-11-
|
|
3
|
+
"version": "0.12.1-next-2025-09-11-21-17-38-7b3afe6d4.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@devvit/protos": "0.12.1-next-2025-09-11-
|
|
36
|
+
"@devvit/protos": "0.12.1-next-2025-09-11-21-17-38-7b3afe6d4.0",
|
|
37
37
|
"jsonschema": "1.4.1",
|
|
38
38
|
"uuid": "9.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@devvit/repo-tools": "0.12.1-next-2025-09-11-
|
|
42
|
-
"@devvit/tsconfig": "0.12.1-next-2025-09-11-
|
|
41
|
+
"@devvit/repo-tools": "0.12.1-next-2025-09-11-21-17-38-7b3afe6d4.0",
|
|
42
|
+
"@devvit/tsconfig": "0.12.1-next-2025-09-11-21-17-38-7b3afe6d4.0",
|
|
43
43
|
"@types/redis-mock": "0.17.1",
|
|
44
44
|
"@types/uuid": "9.0.0",
|
|
45
45
|
"chokidar-cli": "3.0.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"vitest": "1.6.1"
|
|
52
52
|
},
|
|
53
53
|
"source": "./src/index.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "3e126234e1059b54c4ca83e390bb2ba45c3234b3"
|
|
55
55
|
}
|