@devvit/shared-types 0.12.6-next-2025-12-05-15-56-58-f3fde924b.0 → 0.12.6-next-2025-12-05-20-00-45-8a5827c28.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/shared-types",
3
- "version": "0.12.6-next-2025-12-05-15-56-58-f3fde924b.0",
3
+ "version": "0.12.6-next-2025-12-05-20-00-45-8a5827c28.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.6-next-2025-12-05-15-56-58-f3fde924b.0",
36
+ "@devvit/protos": "0.12.6-next-2025-12-05-20-00-45-8a5827c28.0",
37
37
  "jsonschema": "1.4.1",
38
38
  "uuid": "9.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@devvit/repo-tools": "0.12.6-next-2025-12-05-15-56-58-f3fde924b.0",
42
- "@devvit/tsconfig": "0.12.6-next-2025-12-05-15-56-58-f3fde924b.0",
41
+ "@devvit/repo-tools": "0.12.6-next-2025-12-05-20-00-45-8a5827c28.0",
42
+ "@devvit/tsconfig": "0.12.6-next-2025-12-05-20-00-45-8a5827c28.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": "1657a194d2514b2634d4f6e10497dd558bddd10f"
54
+ "gitHead": "8fe5d0140935bfdd2604f96d4404810e20f2c896"
55
55
  }
package/test/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import '../shared/devvit-worker-global.js';
2
2
  import type { Config } from '../Config.js';
3
+ import type { AppConfig } from '../schemas/config-file.v1.js';
3
4
  export declare const MOCK_HEADERS: {
4
5
  "devvit-subreddit": string;
5
6
  "devvit-subreddit-name": string;
@@ -7,8 +8,10 @@ export declare const MOCK_HEADERS: {
7
8
  "devvit-app-user": string;
8
9
  "devvit-app": string;
9
10
  "devvit-version": string;
11
+ "devvit-app-viewer-authorization": string;
10
12
  };
11
- export declare const installGlobalConfig: (config: Config) => void;
13
+ export declare const installGlobalConfig: (config: Config, appConfig?: AppConfig) => void;
14
+ export declare const getDefaultAppConfig: () => AppConfig;
12
15
  export declare const makeConfig: ({ plugins, }?: {
13
16
  plugins?: Record<string, unknown>;
14
17
  }) => Config;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,IAIpD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,eAExB;IACD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,KAAG,MA0BR,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,YAAY,SAAS,KAAG,IAK3E,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,SAoCtC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,eAExB;IACD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,KAAG,MA0BR,CAAC"}
package/test/index.js CHANGED
@@ -7,12 +7,51 @@ export const MOCK_HEADERS = {
7
7
  [Header.AppUser]: 't2_testuser',
8
8
  [Header.App]: 'test-app',
9
9
  [Header.Version]: '0.0.0-test',
10
+ [Header.AppViewerAuthToken]: 'test-token',
10
11
  };
11
- export const installGlobalConfig = (config) => {
12
+ export const installGlobalConfig = (config, appConfig) => {
12
13
  var _a;
13
14
  globalThis.devvit ?? (globalThis.devvit = {});
14
15
  globalThis.devvit.config = config;
15
16
  (_a = globalThis.devvit).compute ?? (_a.compute = { platform: 'node' });
17
+ globalThis.devvit.appConfig = appConfig ?? getDefaultAppConfig();
18
+ };
19
+ export const getDefaultAppConfig = () => {
20
+ return {
21
+ schema: 'v1',
22
+ name: 'test-app',
23
+ permissions: {
24
+ http: { enable: true, domains: [] },
25
+ media: true,
26
+ menu: true,
27
+ payments: true,
28
+ realtime: true,
29
+ redis: true,
30
+ reddit: { enable: true, scope: 'user', asUser: [] },
31
+ settings: true,
32
+ triggers: true,
33
+ },
34
+ post: {
35
+ dir: 'webroot',
36
+ entrypoints: {
37
+ default: {
38
+ inline: true,
39
+ entry: 'splash.html',
40
+ height: 'tall',
41
+ name: 'default',
42
+ },
43
+ game: {
44
+ entry: 'game.html',
45
+ height: 'regular',
46
+ name: 'game',
47
+ },
48
+ },
49
+ },
50
+ json: {
51
+ name: 'test-app',
52
+ permissions: { reddit: true },
53
+ },
54
+ };
16
55
  };
17
56
  export const makeConfig = ({ plugins = {}, } = {}) => {
18
57
  return {