Skip to content

Commit

Permalink
Add products to LinkedBundle.uses
Browse files Browse the repository at this point in the history
  • Loading branch information
niedzielski committed Jul 9, 2024
1 parent d1049f4 commit 029fb3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/bundler/linker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {LinkedBundle, SerializableServiceDefinition} from '@devvit/protos'
import type {AssetMap} from '@devvit/shared-types/Assets.js'
import type { LinkedBundle, SerializableServiceDefinition } from '@devvit/protos'
import type { AssetMap } from '@devvit/shared-types/Assets.js'

type LinkerAssetMaps = {
/** Standard assets from the /assets project path */
Expand Down Expand Up @@ -107,7 +107,8 @@ function provides(): SerializableServiceDefinition[] {
]
}

function uses(): LinkedBundle[] {
function uses(): (LinkedBundle & {products: unknown})[] {
// to-do: remove products ^ typing once schema is revised.
// Assume the app uses everything (`Devvit.configure({...})`). play doesn't
// have an evaluation phase. See provides() for generation notes.
return [
Expand Down Expand Up @@ -2660,9 +2661,10 @@ function uses(): LinkedBundle[] {
}
].map(partial => ({
...partial,
assets: {},
code: '',
products: {},
uses: [],
assets: {},
webviewAssets: {}
}))
}

0 comments on commit 029fb3a

Please sign in to comment.