@devvit/ui-renderer 0.11.0-next-2024-08-07-17c63f679.0 → 0.11.0-next-2024-08-07-a3b749928.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,18 +1,16 @@
1
- import type { DevvitSubredditMetadata, LinkedBundle } from '@devvit/protos';
1
+ import type { LinkedBundle } from '@devvit/protos';
2
2
  /**
3
3
  * @arg dx The static "DX_Bundle" LinkedBundle embedded in the post body. Even
4
4
  * skinnier than a skinny LinkedBundle, only defining hostname and
5
5
  * provides. See LinksAndCommentsSubmitCustomPost(). This should always
6
6
  * be available but element properties can be undefined.
7
- * @arg meta The current subreddit manifest.
8
7
  * @return true if an app's @devvit/public-api version is > than 0.11.0 (forcing UI request to be on)
9
8
  * RenderPostContent(UIRequest), false if only
10
9
  * RenderPost(RenderPostRequest) is supported, undefined if unknown
11
10
  * (caller should choose a safe default).
12
11
  *
13
- * @deprecated Use shouldUseUIRequest
14
12
  */
15
13
  export declare function shouldUseUIRequest(dx: Readonly<{
16
14
  hostname: string;
17
- } & Partial<LinkedBundle>> | undefined, meta: Readonly<DevvitSubredditMetadata> | undefined): boolean | undefined;
15
+ } & Partial<LinkedBundle>> | undefined): boolean | undefined;
18
16
  //# sourceMappingURL=api-version-util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-version-util.d.ts","sourceRoot":"","sources":["../../library/src/client/api-version-util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,SAAS,EACtE,IAAI,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,SAAS,GAClD,OAAO,GAAG,SAAS,CAOrB"}
1
+ {"version":3,"file":"api-version-util.d.ts","sourceRoot":"","sources":["../../library/src/client/api-version-util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK5E;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,SAAS,GACrE,OAAO,GAAG,SAAS,CAKrB"}
@@ -6,21 +6,16 @@ import { compareVersions } from 'compare-versions';
6
6
  * skinnier than a skinny LinkedBundle, only defining hostname and
7
7
  * provides. See LinksAndCommentsSubmitCustomPost(). This should always
8
8
  * be available but element properties can be undefined.
9
- * @arg meta The current subreddit manifest.
10
9
  * @return true if an app's @devvit/public-api version is > than 0.11.0 (forcing UI request to be on)
11
10
  * RenderPostContent(UIRequest), false if only
12
11
  * RenderPost(RenderPostRequest) is supported, undefined if unknown
13
12
  * (caller should choose a safe default).
14
13
  *
15
- * @deprecated Use shouldUseUIRequest
16
14
  */
17
- export function shouldUseUIRequest(dx, meta) {
18
- if (!dx || !meta)
15
+ export function shouldUseUIRequest(dx) {
16
+ if (!dx)
19
17
  return;
20
- const skinny = meta.installedRemoteApps.find((skinny) => skinny.hostname === dx.hostname);
21
- if (!skinny)
22
- return;
23
- const version = skinny.buildInfo?.dependencies['@devvit/public-api'];
18
+ const version = dx.buildInfo?.dependencies['@devvit/public-api'];
24
19
  if (!version)
25
20
  return;
26
21
  return compareVersions(version, '0.10.1000') > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/ui-renderer",
3
- "version": "0.11.0-next-2024-08-07-17c63f679.0",
3
+ "version": "0.11.0-next-2024-08-07-a3b749928.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,9 +59,9 @@
59
59
  "types": "./index.d.ts",
60
60
  "dependencies": {
61
61
  "@devvit/multiplatform": "0.0.1-20240529-491771c9",
62
- "@devvit/protos": "0.11.0-next-2024-08-07-17c63f679.0",
63
- "@devvit/runtime-lite": "0.11.0-next-2024-08-07-17c63f679.0",
64
- "@devvit/shared-types": "0.11.0-next-2024-08-07-17c63f679.0",
62
+ "@devvit/protos": "0.11.0-next-2024-08-07-a3b749928.0",
63
+ "@devvit/runtime-lite": "0.11.0-next-2024-08-07-a3b749928.0",
64
+ "@devvit/shared-types": "0.11.0-next-2024-08-07-a3b749928.0",
65
65
  "@dotlottie/player-component": "2.7.2",
66
66
  "compare-versions": "6.1.0",
67
67
  "nice-grpc-web": "3.3.3",
@@ -89,10 +89,10 @@
89
89
  },
90
90
  "devDependencies": {
91
91
  "@ampproject/filesize": "4.3.0",
92
- "@devvit/eslint-config": "0.11.0-next-2024-08-07-17c63f679.0",
93
- "@devvit/public-api": "0.11.0-next-2024-08-07-17c63f679.0",
94
- "@devvit/repo-tools": "0.11.0-next-2024-08-07-17c63f679.0",
95
- "@devvit/tsconfig": "0.11.0-next-2024-08-07-17c63f679.0",
92
+ "@devvit/eslint-config": "0.11.0-next-2024-08-07-a3b749928.0",
93
+ "@devvit/public-api": "0.11.0-next-2024-08-07-a3b749928.0",
94
+ "@devvit/repo-tools": "0.11.0-next-2024-08-07-a3b749928.0",
95
+ "@devvit/tsconfig": "0.11.0-next-2024-08-07-a3b749928.0",
96
96
  "@lit-labs/ssr": "^2.2.3",
97
97
  "@lit/localize": "0.11.4",
98
98
  "@open-wc/testing-helpers": "2.3.0",
@@ -139,5 +139,5 @@
139
139
  }
140
140
  },
141
141
  "source": "./src/index.ts",
142
- "gitHead": "59a5a0d7befe03fa85460602d7265cec2ee3cdca"
142
+ "gitHead": "2dfe592c3f696783dc1b00452292822eb4ec6dd2"
143
143
  }