@devvit/web-view-scripts 0.12.10-next-2026-01-22-22-08-59-4328e6a29.0 → 0.12.10
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/devvit-global.d.ts +2 -0
- package/devvit-global.d.ts.map +1 -1
- package/devvit-global.js +3 -0
- package/devvit.v1.js +2 -0
- package/meta.json +1 -1
- package/package.json +7 -7
- package/scripts/devvit.v1.min.js +1 -1
- package/scripts/devvit.v1.min.js.map +3 -3
- package/token.d.ts +1 -3
- package/token.d.ts.map +1 -1
- package/token.js +24 -0
package/devvit-global.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DevvitGlobal, WebViewScriptsVersion } from '@devvit/shared-types/client/devvit-global.js';
|
|
2
|
+
import { type WebbitToken } from '@devvit/shared-types/webbit.js';
|
|
2
3
|
declare global {
|
|
3
4
|
var devvit: DevvitGlobal;
|
|
4
5
|
/** Defined by build.js. */
|
|
5
6
|
var webViewScriptsVersion: Readonly<WebViewScriptsVersion>;
|
|
6
7
|
}
|
|
8
|
+
export declare function updateToken(token: WebbitToken): void;
|
|
7
9
|
//# sourceMappingURL=devvit-global.d.ts.map
|
package/devvit-global.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devvit-global.d.ts","sourceRoot":"","sources":["../src/devvit-global.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"devvit-global.d.ts","sourceRoot":"","sources":["../src/devvit-global.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAKlE,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,MAAM,EAAE,YAAY,CAAC;IACzB,2BAA2B;IAE3B,IAAI,qBAAqB,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;CAC5D;AAsCD,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAEpD"}
|
package/devvit-global.js
CHANGED
|
@@ -31,6 +31,9 @@ export const initDevvitGlobal = (document, location, window) => {
|
|
|
31
31
|
startTime: bridge?.startTime ?? undefined,
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
export function updateToken(token) {
|
|
35
|
+
globalThis.devvit.token = token;
|
|
36
|
+
}
|
|
34
37
|
/** @internal */
|
|
35
38
|
export function contextFromRequestContext(reqCtx, client, postData) {
|
|
36
39
|
if (!reqCtx.app)
|
package/devvit.v1.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { initAnalytics } from './analytics.js';
|
|
2
2
|
import { initDevvitGlobal } from './devvit-global.js';
|
|
3
3
|
import { initFetch } from './fetch.js';
|
|
4
|
+
import { initToken } from './token.js';
|
|
4
5
|
initDevvitGlobal(document, location, window);
|
|
5
6
|
initAnalytics();
|
|
6
7
|
initFetch();
|
|
8
|
+
initToken();
|