@dxos/plugin-youtube 0.8.4-main.bcb3aa67d6 → 0.8.4-main.fcfe5033a5

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.
Files changed (77) hide show
  1. package/dist/lib/browser/{chunk-5N5SWF3I.mjs → chunk-FEQD5TPI.mjs} +2 -2
  2. package/dist/lib/browser/{chunk-5N5SWF3I.mjs.map → chunk-FEQD5TPI.mjs.map} +2 -2
  3. package/dist/lib/browser/{chunk-SWWE4LUJ.mjs → chunk-GIRFSTHR.mjs} +4 -4
  4. package/dist/lib/browser/{chunk-SWWE4LUJ.mjs.map → chunk-GIRFSTHR.mjs.map} +3 -3
  5. package/dist/lib/browser/{clear-synced-videos-PIKJZET3.mjs → clear-synced-videos-PMP332H3.mjs} +8 -8
  6. package/dist/lib/browser/clear-synced-videos-PMP332H3.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +5 -5
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/{sync-II7O2LPG.mjs → sync-T34US6NO.mjs} +15 -15
  11. package/dist/lib/browser/sync-T34US6NO.mjs.map +7 -0
  12. package/dist/lib/node-esm/{chunk-RL46XZ2D.mjs → chunk-A3SKNJFU.mjs} +4 -4
  13. package/dist/lib/node-esm/{chunk-RL46XZ2D.mjs.map → chunk-A3SKNJFU.mjs.map} +3 -3
  14. package/dist/lib/node-esm/{chunk-BVKMXV2G.mjs → chunk-Q3TVMR5B.mjs} +2 -2
  15. package/dist/lib/node-esm/{chunk-BVKMXV2G.mjs.map → chunk-Q3TVMR5B.mjs.map} +2 -2
  16. package/dist/lib/node-esm/{clear-synced-videos-Q3MZO2CD.mjs → clear-synced-videos-SLEDJ5WI.mjs} +8 -8
  17. package/dist/lib/node-esm/clear-synced-videos-SLEDJ5WI.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +5 -5
  19. package/dist/lib/node-esm/index.mjs.map +3 -3
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/{sync-BEXQNNSH.mjs → sync-RQYQ5LII.mjs} +15 -15
  22. package/dist/lib/node-esm/sync-RQYQ5LII.mjs.map +7 -0
  23. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/index.d.ts +1 -1
  25. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/migrations.d.ts +1 -1
  27. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  28. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +1 -1
  29. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -1
  30. package/dist/types/src/containers/ChannelArticle/index.d.ts +1 -2
  31. package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -1
  32. package/dist/types/src/containers/ChannelProperties/ChannelProperties.d.ts +7 -0
  33. package/dist/types/src/containers/ChannelProperties/ChannelProperties.d.ts.map +1 -0
  34. package/dist/types/src/containers/ChannelProperties/index.d.ts +2 -0
  35. package/dist/types/src/containers/ChannelProperties/index.d.ts.map +1 -0
  36. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts +2 -2
  37. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts.map +1 -1
  38. package/dist/types/src/containers/VideoArticle/index.d.ts +1 -2
  39. package/dist/types/src/containers/VideoArticle/index.d.ts.map +1 -1
  40. package/dist/types/src/containers/VideoCard/VideoCard.d.ts +2 -2
  41. package/dist/types/src/containers/VideoCard/VideoCard.d.ts.map +1 -1
  42. package/dist/types/src/containers/VideoCard/index.d.ts +1 -2
  43. package/dist/types/src/containers/VideoCard/index.d.ts.map +1 -1
  44. package/dist/types/src/containers/index.d.ts +3 -3
  45. package/dist/types/src/containers/index.d.ts.map +1 -1
  46. package/dist/types/src/operations/apis/youtube/api.d.ts.map +1 -1
  47. package/dist/types/src/operations/clear-synced-videos.d.ts.map +1 -1
  48. package/dist/types/src/operations/definitions.d.ts +3 -3
  49. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  50. package/dist/types/src/operations/sync.d.ts.map +1 -1
  51. package/dist/types/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +40 -40
  53. package/src/YouTubePlugin.tsx +3 -3
  54. package/src/capabilities/app-graph-builder.ts +13 -14
  55. package/src/capabilities/react-surface.tsx +20 -21
  56. package/src/containers/ChannelArticle/ChannelArticle.tsx +1 -1
  57. package/src/containers/ChannelArticle/index.ts +1 -3
  58. package/src/containers/{ChannelSettings/ChannelSettings.tsx → ChannelProperties/ChannelProperties.tsx} +2 -2
  59. package/src/containers/ChannelProperties/index.ts +5 -0
  60. package/src/containers/VideoArticle/VideoArticle.tsx +2 -2
  61. package/src/containers/VideoArticle/index.ts +1 -3
  62. package/src/containers/VideoCard/VideoCard.tsx +2 -2
  63. package/src/containers/VideoCard/index.ts +1 -3
  64. package/src/containers/index.ts +4 -4
  65. package/src/operations/apis/youtube/api.ts +0 -1
  66. package/src/operations/clear-synced-videos.ts +3 -4
  67. package/src/operations/definitions.ts +3 -3
  68. package/src/operations/sync.ts +0 -1
  69. package/dist/lib/browser/clear-synced-videos-PIKJZET3.mjs.map +0 -7
  70. package/dist/lib/browser/sync-II7O2LPG.mjs.map +0 -7
  71. package/dist/lib/node-esm/clear-synced-videos-Q3MZO2CD.mjs.map +0 -7
  72. package/dist/lib/node-esm/sync-BEXQNNSH.mjs.map +0 -7
  73. package/dist/types/src/containers/ChannelSettings/ChannelSettings.d.ts +0 -7
  74. package/dist/types/src/containers/ChannelSettings/ChannelSettings.d.ts.map +0 -1
  75. package/dist/types/src/containers/ChannelSettings/index.d.ts +0 -3
  76. package/dist/types/src/containers/ChannelSettings/index.d.ts.map +0 -1
  77. package/src/containers/ChannelSettings/index.ts +0 -7
@@ -286,7 +286,7 @@ var makeYouTubeApiRequest = Effect2.fn("makeYouTubeApiRequest")(function* (url)
286
286
  if (response.error) {
287
287
  log2.catch(response.error, void 0, {
288
288
  F: __dxlog_file2,
289
- L: 81,
289
+ L: 80,
290
290
  S: this,
291
291
  C: (f, a) => f(...a)
292
292
  });
@@ -352,4 +352,4 @@ export {
352
352
  GoogleCredentials,
353
353
  youtube_exports
354
354
  };
355
- //# sourceMappingURL=chunk-5N5SWF3I.mjs.map
355
+ //# sourceMappingURL=chunk-FEQD5TPI.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/services/google-credentials.ts", "../../../src/operations/apis/youtube/index.ts", "../../../src/operations/apis/youtube/api.ts", "../../../src/operations/apis/youtube/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { Database, type Ref } from '@dxos/echo';\nimport { CredentialsService } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { type AccessToken } from '@dxos/types';\n\nimport type * as Channel from '../../types/Channel';\n\n/**\n * Creates the service interface from a cached token.\n * Falls back to database credentials if no cached token is provided.\n */\nconst makeService = (cachedToken: string | undefined): Context.Tag.Service<GoogleCredentials> => ({\n get: () =>\n cachedToken\n ? Effect.succeed(cachedToken)\n : Effect.map(CredentialsService.getCredential({ service: 'google.com' }), (credential) => credential.apiKey!),\n});\n\n/**\n * Loads access token from a ref if available.\n */\nconst loadAccessToken = (accessTokenRef: Ref.Ref<AccessToken.AccessToken> | undefined, label: string) =>\n Effect.gen(function* () {\n if (accessTokenRef) {\n const accessToken = yield* Database.load(accessTokenRef);\n if (accessToken?.token) {\n log(`using ${label}-specific access token`, { note: accessToken.note });\n return accessToken.token;\n }\n }\n return undefined;\n });\n\n/**\n * Service for accessing Google API credentials.\n * Provides the Google API token either from an object's access token or falls back to database credentials.\n */\n// TODO(dmaretskyi): Remove this service.\nexport class GoogleCredentials extends Context.Tag('GoogleCredentials')<\n GoogleCredentials,\n {\n /** Returns the Google API token. */\n get: () => Effect.Effect<string, never, CredentialsService>;\n }\n>() {\n /**\n * Creates a credentials layer from a channel.\n * Pre-loads the access token during layer construction.\n */\n static fromChannel = (channel: Channel.YouTubeChannel) =>\n Layer.effect(GoogleCredentials, Effect.map(loadAccessToken(channel.accessToken, 'channel'), makeService));\n\n /**\n * Creates a credentials layer from a channel ref.\n * Loads the channel and pre-loads the access token during layer construction.\n */\n static fromChannelRef = (channelRef: Ref.Ref<Channel.YouTubeChannel>) =>\n Layer.effect(\n GoogleCredentials,\n Effect.flatMap(Database.load(channelRef), (channel) =>\n Effect.map(loadAccessToken(channel.accessToken, 'channel'), makeService),\n ),\n );\n\n /**\n * Default layer that uses database credentials.\n * Use this for operations that don't have an associated channel.\n */\n static default = Layer.succeed(GoogleCredentials, makeService(undefined));\n\n /** Convenience accessor - returns the Google API token. */\n static get = () => Effect.flatMap(GoogleCredentials, (service) => service.get());\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport * from './api';\nexport * from './types';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as HttpClientRequest from '@effect/platform/HttpClientRequest';\nimport * as Effect from 'effect/Effect';\nimport type * as ParseResult from 'effect/ParseResult';\nimport * as Schedule from 'effect/Schedule';\nimport * as Schema from 'effect/Schema';\n\nimport { withAuthorization } from '@dxos/functions';\nimport { log } from '@dxos/log';\n\nimport { GoogleCredentials } from '../../services/google-credentials';\n\nimport {\n ChannelsResponse,\n ErrorResponse,\n PlaylistItemsResponse,\n SearchResponse,\n VideosResponse,\n YouTubeError,\n} from './types';\n\nconst API_URL = 'https://www.googleapis.com/youtube/v3';\n\n/**\n * Creates a URL from path segments and query parameters.\n */\nconst createUrl = (parts: (string | undefined)[], params?: Record<string, unknown>): URL => {\n const url = new URL(parts.filter(Boolean).join('/'));\n if (params) {\n Object.entries(params)\n .filter(([_, value]) => value != null)\n .forEach(([key, value]) => url.searchParams.set(key, String(value)));\n }\n return url;\n};\n\n/**\n * Decode response and handle YouTube API errors.\n */\nconst decodeAndHandleErrors =\n <S extends Schema.Schema.Any>(schema: S) =>\n (\n data: unknown,\n ): Effect.Effect<Schema.Schema.Type<S>, YouTubeError | ParseResult.ParseError, Schema.Schema.Context<S>> =>\n Schema.decodeUnknown(Schema.Union(schema, ErrorResponse))(data).pipe(\n Effect.flatMap((response) => {\n if ('error' in response) {\n return Effect.fail(YouTubeError.fromErrorResponse(response));\n } else {\n return Effect.succeed(response);\n }\n }),\n );\n\n/**\n * Makes an authenticated HTTP request to a YouTube API endpoint.\n */\nconst makeYouTubeApiRequest = Effect.fn('makeYouTubeApiRequest')(function* (url: string) {\n const token = yield* GoogleCredentials.get();\n\n const httpClient = yield* HttpClient.HttpClient.pipe(Effect.map(withAuthorization(token, 'Bearer')));\n const httpClientWithTracerDisabled = httpClient.pipe(HttpClient.withTracerDisabledWhen(() => true));\n\n const request = HttpClientRequest.get(url);\n\n const response = yield* request.pipe(\n HttpClientRequest.setHeader('accept', 'application/json'),\n httpClientWithTracerDisabled.execute,\n Effect.flatMap((res) => res.json),\n Effect.timeout('10 seconds'),\n Effect.retry(Schedule.exponential(1_000).pipe(Schedule.compose(Schedule.recurs(3)))),\n Effect.scoped,\n Effect.withSpan('YouTubeApiRequest'),\n );\n\n if ((response as Record<string, unknown>).error) {\n log.catch((response as Record<string, unknown>).error);\n }\n\n return response;\n});\n\n/**\n * Get channel details by channel ID.\n * https://developers.google.com/youtube/v3/docs/channels/list\n */\nexport const getChannel = Effect.fn(function* (channelId: string) {\n const url = createUrl([API_URL, 'channels'], {\n part: 'snippet,contentDetails',\n id: channelId,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(ChannelsResponse)));\n});\n\n/**\n * Get channel by username/handle.\n * https://developers.google.com/youtube/v3/docs/channels/list\n */\nexport const getChannelByHandle = Effect.fn(function* (handle: string) {\n const url = createUrl([API_URL, 'channels'], {\n part: 'snippet,contentDetails',\n forHandle: handle.startsWith('@') ? handle.slice(1) : handle,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(ChannelsResponse)));\n});\n\n/**\n * Search for channels by query.\n * https://developers.google.com/youtube/v3/docs/search/list\n */\nexport const searchChannels = Effect.fn(function* (query: string, maxResults = 10) {\n const url = createUrl([API_URL, 'search'], {\n part: 'snippet',\n type: 'channel',\n q: query,\n maxResults,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(SearchResponse)));\n});\n\n/**\n * List videos from a playlist (used to get uploads from a channel's uploads playlist).\n * https://developers.google.com/youtube/v3/docs/playlistItems/list\n */\nexport const listPlaylistItems = Effect.fn(function* (playlistId: string, maxResults = 50, pageToken?: string) {\n const url = createUrl([API_URL, 'playlistItems'], {\n part: 'snippet,contentDetails',\n playlistId,\n maxResults,\n pageToken,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(PlaylistItemsResponse)));\n});\n\n/**\n * Get detailed video information including statistics and duration.\n * https://developers.google.com/youtube/v3/docs/videos/list\n */\nexport const getVideoDetails = Effect.fn(function* (videoIds: string[]) {\n const url = createUrl([API_URL, 'videos'], {\n part: 'snippet,contentDetails,statistics',\n id: videoIds.join(','),\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(VideosResponse)));\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n/**\n * YouTube API error response.\n */\nexport class YouTubeError extends Schema.TaggedError<YouTubeError>()('YouTubeError', {\n code: Schema.Number,\n message: Schema.String,\n status: Schema.optional(Schema.String),\n}) {\n static fromErrorResponse(response: ErrorResponse) {\n return new YouTubeError({\n code: response.error.code,\n message: response.error.message,\n status: response.error.status,\n });\n }\n}\n\nexport const ErrorResponse = Schema.Struct({\n error: Schema.Struct({\n code: Schema.Number,\n message: Schema.String,\n status: Schema.optional(Schema.String),\n }),\n});\n\nexport type ErrorResponse = Schema.Schema.Type<typeof ErrorResponse>;\n\n/**\n * YouTube channel snippet from search/channel API.\n */\nexport const ChannelSnippet = Schema.Struct({\n title: Schema.String,\n description: Schema.optional(Schema.String),\n customUrl: Schema.optional(Schema.String),\n publishedAt: Schema.optional(Schema.String),\n thumbnails: Schema.optional(\n Schema.Struct({\n default: Schema.optional(Schema.Struct({ url: Schema.String })),\n medium: Schema.optional(Schema.Struct({ url: Schema.String })),\n high: Schema.optional(Schema.Struct({ url: Schema.String })),\n }),\n ),\n});\n\n/**\n * YouTube channel item from channels API.\n */\nexport const ChannelItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(ChannelSnippet),\n contentDetails: Schema.optional(\n Schema.Struct({\n relatedPlaylists: Schema.optional(\n Schema.Struct({\n uploads: Schema.optional(Schema.String),\n }),\n ),\n }),\n ),\n});\n\n/**\n * YouTube channels list response.\n */\nexport const ChannelsResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(ChannelItem),\n});\n\nexport type ChannelsResponse = Schema.Schema.Type<typeof ChannelsResponse>;\n\n/**\n * Video snippet from search/playlistItems API.\n */\nexport const VideoSnippet = Schema.Struct({\n publishedAt: Schema.String,\n channelId: Schema.optional(Schema.String),\n title: Schema.String,\n description: Schema.optional(Schema.String),\n thumbnails: Schema.optional(\n Schema.Struct({\n default: Schema.optional(Schema.Struct({ url: Schema.String })),\n medium: Schema.optional(Schema.Struct({ url: Schema.String })),\n high: Schema.optional(Schema.Struct({ url: Schema.String })),\n standard: Schema.optional(Schema.Struct({ url: Schema.String })),\n maxres: Schema.optional(Schema.Struct({ url: Schema.String })),\n }),\n ),\n channelTitle: Schema.optional(Schema.String),\n playlistId: Schema.optional(Schema.String),\n position: Schema.optional(Schema.Number),\n resourceId: Schema.optional(\n Schema.Struct({\n kind: Schema.String,\n videoId: Schema.String,\n }),\n ),\n});\n\n/**\n * Content details for a video.\n */\nexport const VideoContentDetails = Schema.Struct({\n videoId: Schema.optional(Schema.String),\n videoPublishedAt: Schema.optional(Schema.String),\n duration: Schema.optional(Schema.String),\n});\n\n/**\n * Video statistics.\n */\nexport const VideoStatistics = Schema.Struct({\n viewCount: Schema.optional(Schema.String),\n likeCount: Schema.optional(Schema.String),\n commentCount: Schema.optional(Schema.String),\n});\n\n/**\n * Video item from videos API.\n */\nexport const VideoItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(VideoSnippet),\n contentDetails: Schema.optional(VideoContentDetails),\n statistics: Schema.optional(VideoStatistics),\n});\n\nexport type VideoItem = Schema.Schema.Type<typeof VideoItem>;\n\n/**\n * YouTube videos list response.\n */\nexport const VideosResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(VideoItem),\n});\n\nexport type VideosResponse = Schema.Schema.Type<typeof VideosResponse>;\n\n/**\n * Playlist item from playlistItems API.\n */\nexport const PlaylistItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(VideoSnippet),\n contentDetails: Schema.optional(VideoContentDetails),\n});\n\n/**\n * YouTube playlist items response.\n */\nexport const PlaylistItemsResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(PlaylistItem),\n});\n\nexport type PlaylistItemsResponse = Schema.Schema.Type<typeof PlaylistItemsResponse>;\n\n/**\n * Search result item.\n */\nexport const SearchItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.Struct({\n kind: Schema.String,\n videoId: Schema.optional(Schema.String),\n channelId: Schema.optional(Schema.String),\n playlistId: Schema.optional(Schema.String),\n }),\n snippet: Schema.optional(VideoSnippet),\n});\n\n/**\n * YouTube search response.\n */\nexport const SearchResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(SearchItem),\n});\n\nexport type SearchResponse = Schema.Schema.Type<typeof SearchResponse>;\n\n/**\n * Caption track from captions.list.\n */\nexport const CaptionResource = Schema.Struct({\n id: Schema.String,\n snippet: Schema.optional(\n Schema.Struct({\n videoId: Schema.optional(Schema.String),\n language: Schema.optional(Schema.String),\n name: Schema.optional(Schema.String),\n trackKind: Schema.optional(Schema.String),\n }),\n ),\n});\n\n/**\n * YouTube captions.list response.\n */\nexport const CaptionsListResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n items: Schema.optional(Schema.Array(CaptionResource)),\n});\n\nexport type CaptionsListResponse = Schema.Schema.Type<typeof CaptionsListResponse>;\n"],
5
- "mappings": ";;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,gBAA0B;AACnC,SAASC,0BAA0B;AACnC,SAASC,WAAW;;AASpB,IAAMC,cAAc,CAACC,iBAA6E;EAChGC,KAAK,MACHD,cACWE,eAAQF,WAAAA,IACRG,WAAIN,mBAAmBO,cAAc;IAAEC,SAAS;EAAa,CAAA,GAAI,CAACC,eAAeA,WAAWC,MAAM;AACjH;AAKA,IAAMC,kBAAkB,CAACC,gBAA8DC,UAC9EC,WAAI,aAAA;AACT,MAAIF,gBAA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,kBAAyB9C,WAAG,WAAW+C,UAAkB;AACpE,QAAM3E,MAAMH,UAAU;IAACD;IAAS;KAAW;IACzC2D,MAAM;IACNC,IAAImB,SAASvE,KAAK,GAAA;EACpB,CAAA,EAAGqD,SAAQ;AACX,SAAO,OAAO9B,sBAAsB3B,GAAAA,EAAKoB,KAAYC,gBAAQP,sBAAsB8D,cAAAA,CAAAA,CAAAA;AACrF,CAAA;",
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { Database, type Ref } from '@dxos/echo';\nimport { CredentialsService } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { type AccessToken } from '@dxos/types';\n\nimport type * as Channel from '../../types/Channel';\n\n/**\n * Creates the service interface from a cached token.\n * Falls back to database credentials if no cached token is provided.\n */\nconst makeService = (cachedToken: string | undefined): Context.Tag.Service<GoogleCredentials> => ({\n get: () =>\n cachedToken\n ? Effect.succeed(cachedToken)\n : Effect.map(CredentialsService.getCredential({ service: 'google.com' }), (credential) => credential.apiKey!),\n});\n\n/**\n * Loads access token from a ref if available.\n */\nconst loadAccessToken = (accessTokenRef: Ref.Ref<AccessToken.AccessToken> | undefined, label: string) =>\n Effect.gen(function* () {\n if (accessTokenRef) {\n const accessToken = yield* Database.load(accessTokenRef);\n if (accessToken?.token) {\n log(`using ${label}-specific access token`, { note: accessToken.note });\n return accessToken.token;\n }\n }\n return undefined;\n });\n\n/**\n * Service for accessing Google API credentials.\n * Provides the Google API token either from an object's access token or falls back to database credentials.\n */\n// TODO(dmaretskyi): Remove this service.\nexport class GoogleCredentials extends Context.Tag('GoogleCredentials')<\n GoogleCredentials,\n {\n /** Returns the Google API token. */\n get: () => Effect.Effect<string, never, CredentialsService>;\n }\n>() {\n /**\n * Creates a credentials layer from a channel.\n * Pre-loads the access token during layer construction.\n */\n static fromChannel = (channel: Channel.YouTubeChannel) =>\n Layer.effect(GoogleCredentials, Effect.map(loadAccessToken(channel.accessToken, 'channel'), makeService));\n\n /**\n * Creates a credentials layer from a channel ref.\n * Loads the channel and pre-loads the access token during layer construction.\n */\n static fromChannelRef = (channelRef: Ref.Ref<Channel.YouTubeChannel>) =>\n Layer.effect(\n GoogleCredentials,\n Effect.flatMap(Database.load(channelRef), (channel) =>\n Effect.map(loadAccessToken(channel.accessToken, 'channel'), makeService),\n ),\n );\n\n /**\n * Default layer that uses database credentials.\n * Use this for operations that don't have an associated channel.\n */\n static default = Layer.succeed(GoogleCredentials, makeService(undefined));\n\n /** Convenience accessor - returns the Google API token. */\n static get = () => Effect.flatMap(GoogleCredentials, (service) => service.get());\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport * from './api';\nexport * from './types';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as HttpClientRequest from '@effect/platform/HttpClientRequest';\nimport * as Effect from 'effect/Effect';\nimport type * as ParseResult from 'effect/ParseResult';\nimport * as Schedule from 'effect/Schedule';\nimport * as Schema from 'effect/Schema';\n\nimport { withAuthorization } from '@dxos/functions';\nimport { log } from '@dxos/log';\n\nimport { GoogleCredentials } from '../../services/google-credentials';\nimport {\n ChannelsResponse,\n ErrorResponse,\n PlaylistItemsResponse,\n SearchResponse,\n VideosResponse,\n YouTubeError,\n} from './types';\n\nconst API_URL = 'https://www.googleapis.com/youtube/v3';\n\n/**\n * Creates a URL from path segments and query parameters.\n */\nconst createUrl = (parts: (string | undefined)[], params?: Record<string, unknown>): URL => {\n const url = new URL(parts.filter(Boolean).join('/'));\n if (params) {\n Object.entries(params)\n .filter(([_, value]) => value != null)\n .forEach(([key, value]) => url.searchParams.set(key, String(value)));\n }\n return url;\n};\n\n/**\n * Decode response and handle YouTube API errors.\n */\nconst decodeAndHandleErrors =\n <S extends Schema.Schema.Any>(schema: S) =>\n (\n data: unknown,\n ): Effect.Effect<Schema.Schema.Type<S>, YouTubeError | ParseResult.ParseError, Schema.Schema.Context<S>> =>\n Schema.decodeUnknown(Schema.Union(schema, ErrorResponse))(data).pipe(\n Effect.flatMap((response) => {\n if ('error' in response) {\n return Effect.fail(YouTubeError.fromErrorResponse(response));\n } else {\n return Effect.succeed(response);\n }\n }),\n );\n\n/**\n * Makes an authenticated HTTP request to a YouTube API endpoint.\n */\nconst makeYouTubeApiRequest = Effect.fn('makeYouTubeApiRequest')(function* (url: string) {\n const token = yield* GoogleCredentials.get();\n\n const httpClient = yield* HttpClient.HttpClient.pipe(Effect.map(withAuthorization(token, 'Bearer')));\n const httpClientWithTracerDisabled = httpClient.pipe(HttpClient.withTracerDisabledWhen(() => true));\n\n const request = HttpClientRequest.get(url);\n\n const response = yield* request.pipe(\n HttpClientRequest.setHeader('accept', 'application/json'),\n httpClientWithTracerDisabled.execute,\n Effect.flatMap((res) => res.json),\n Effect.timeout('10 seconds'),\n Effect.retry(Schedule.exponential(1_000).pipe(Schedule.compose(Schedule.recurs(3)))),\n Effect.scoped,\n Effect.withSpan('YouTubeApiRequest'),\n );\n\n if ((response as Record<string, unknown>).error) {\n log.catch((response as Record<string, unknown>).error);\n }\n\n return response;\n});\n\n/**\n * Get channel details by channel ID.\n * https://developers.google.com/youtube/v3/docs/channels/list\n */\nexport const getChannel = Effect.fn(function* (channelId: string) {\n const url = createUrl([API_URL, 'channels'], {\n part: 'snippet,contentDetails',\n id: channelId,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(ChannelsResponse)));\n});\n\n/**\n * Get channel by username/handle.\n * https://developers.google.com/youtube/v3/docs/channels/list\n */\nexport const getChannelByHandle = Effect.fn(function* (handle: string) {\n const url = createUrl([API_URL, 'channels'], {\n part: 'snippet,contentDetails',\n forHandle: handle.startsWith('@') ? handle.slice(1) : handle,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(ChannelsResponse)));\n});\n\n/**\n * Search for channels by query.\n * https://developers.google.com/youtube/v3/docs/search/list\n */\nexport const searchChannels = Effect.fn(function* (query: string, maxResults = 10) {\n const url = createUrl([API_URL, 'search'], {\n part: 'snippet',\n type: 'channel',\n q: query,\n maxResults,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(SearchResponse)));\n});\n\n/**\n * List videos from a playlist (used to get uploads from a channel's uploads playlist).\n * https://developers.google.com/youtube/v3/docs/playlistItems/list\n */\nexport const listPlaylistItems = Effect.fn(function* (playlistId: string, maxResults = 50, pageToken?: string) {\n const url = createUrl([API_URL, 'playlistItems'], {\n part: 'snippet,contentDetails',\n playlistId,\n maxResults,\n pageToken,\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(PlaylistItemsResponse)));\n});\n\n/**\n * Get detailed video information including statistics and duration.\n * https://developers.google.com/youtube/v3/docs/videos/list\n */\nexport const getVideoDetails = Effect.fn(function* (videoIds: string[]) {\n const url = createUrl([API_URL, 'videos'], {\n part: 'snippet,contentDetails,statistics',\n id: videoIds.join(','),\n }).toString();\n return yield* makeYouTubeApiRequest(url).pipe(Effect.flatMap(decodeAndHandleErrors(VideosResponse)));\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n/**\n * YouTube API error response.\n */\nexport class YouTubeError extends Schema.TaggedError<YouTubeError>()('YouTubeError', {\n code: Schema.Number,\n message: Schema.String,\n status: Schema.optional(Schema.String),\n}) {\n static fromErrorResponse(response: ErrorResponse) {\n return new YouTubeError({\n code: response.error.code,\n message: response.error.message,\n status: response.error.status,\n });\n }\n}\n\nexport const ErrorResponse = Schema.Struct({\n error: Schema.Struct({\n code: Schema.Number,\n message: Schema.String,\n status: Schema.optional(Schema.String),\n }),\n});\n\nexport type ErrorResponse = Schema.Schema.Type<typeof ErrorResponse>;\n\n/**\n * YouTube channel snippet from search/channel API.\n */\nexport const ChannelSnippet = Schema.Struct({\n title: Schema.String,\n description: Schema.optional(Schema.String),\n customUrl: Schema.optional(Schema.String),\n publishedAt: Schema.optional(Schema.String),\n thumbnails: Schema.optional(\n Schema.Struct({\n default: Schema.optional(Schema.Struct({ url: Schema.String })),\n medium: Schema.optional(Schema.Struct({ url: Schema.String })),\n high: Schema.optional(Schema.Struct({ url: Schema.String })),\n }),\n ),\n});\n\n/**\n * YouTube channel item from channels API.\n */\nexport const ChannelItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(ChannelSnippet),\n contentDetails: Schema.optional(\n Schema.Struct({\n relatedPlaylists: Schema.optional(\n Schema.Struct({\n uploads: Schema.optional(Schema.String),\n }),\n ),\n }),\n ),\n});\n\n/**\n * YouTube channels list response.\n */\nexport const ChannelsResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(ChannelItem),\n});\n\nexport type ChannelsResponse = Schema.Schema.Type<typeof ChannelsResponse>;\n\n/**\n * Video snippet from search/playlistItems API.\n */\nexport const VideoSnippet = Schema.Struct({\n publishedAt: Schema.String,\n channelId: Schema.optional(Schema.String),\n title: Schema.String,\n description: Schema.optional(Schema.String),\n thumbnails: Schema.optional(\n Schema.Struct({\n default: Schema.optional(Schema.Struct({ url: Schema.String })),\n medium: Schema.optional(Schema.Struct({ url: Schema.String })),\n high: Schema.optional(Schema.Struct({ url: Schema.String })),\n standard: Schema.optional(Schema.Struct({ url: Schema.String })),\n maxres: Schema.optional(Schema.Struct({ url: Schema.String })),\n }),\n ),\n channelTitle: Schema.optional(Schema.String),\n playlistId: Schema.optional(Schema.String),\n position: Schema.optional(Schema.Number),\n resourceId: Schema.optional(\n Schema.Struct({\n kind: Schema.String,\n videoId: Schema.String,\n }),\n ),\n});\n\n/**\n * Content details for a video.\n */\nexport const VideoContentDetails = Schema.Struct({\n videoId: Schema.optional(Schema.String),\n videoPublishedAt: Schema.optional(Schema.String),\n duration: Schema.optional(Schema.String),\n});\n\n/**\n * Video statistics.\n */\nexport const VideoStatistics = Schema.Struct({\n viewCount: Schema.optional(Schema.String),\n likeCount: Schema.optional(Schema.String),\n commentCount: Schema.optional(Schema.String),\n});\n\n/**\n * Video item from videos API.\n */\nexport const VideoItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(VideoSnippet),\n contentDetails: Schema.optional(VideoContentDetails),\n statistics: Schema.optional(VideoStatistics),\n});\n\nexport type VideoItem = Schema.Schema.Type<typeof VideoItem>;\n\n/**\n * YouTube videos list response.\n */\nexport const VideosResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(VideoItem),\n});\n\nexport type VideosResponse = Schema.Schema.Type<typeof VideosResponse>;\n\n/**\n * Playlist item from playlistItems API.\n */\nexport const PlaylistItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.String,\n snippet: Schema.optional(VideoSnippet),\n contentDetails: Schema.optional(VideoContentDetails),\n});\n\n/**\n * YouTube playlist items response.\n */\nexport const PlaylistItemsResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(PlaylistItem),\n});\n\nexport type PlaylistItemsResponse = Schema.Schema.Type<typeof PlaylistItemsResponse>;\n\n/**\n * Search result item.\n */\nexport const SearchItem = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n id: Schema.Struct({\n kind: Schema.String,\n videoId: Schema.optional(Schema.String),\n channelId: Schema.optional(Schema.String),\n playlistId: Schema.optional(Schema.String),\n }),\n snippet: Schema.optional(VideoSnippet),\n});\n\n/**\n * YouTube search response.\n */\nexport const SearchResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n nextPageToken: Schema.optional(Schema.String),\n prevPageToken: Schema.optional(Schema.String),\n pageInfo: Schema.optional(\n Schema.Struct({\n totalResults: Schema.Number,\n resultsPerPage: Schema.Number,\n }),\n ),\n items: Schema.Array(SearchItem),\n});\n\nexport type SearchResponse = Schema.Schema.Type<typeof SearchResponse>;\n\n/**\n * Caption track from captions.list.\n */\nexport const CaptionResource = Schema.Struct({\n id: Schema.String,\n snippet: Schema.optional(\n Schema.Struct({\n videoId: Schema.optional(Schema.String),\n language: Schema.optional(Schema.String),\n name: Schema.optional(Schema.String),\n trackKind: Schema.optional(Schema.String),\n }),\n ),\n});\n\n/**\n * YouTube captions.list response.\n */\nexport const CaptionsListResponse = Schema.Struct({\n kind: Schema.String,\n etag: Schema.String,\n items: Schema.optional(Schema.Array(CaptionResource)),\n});\n\nexport type CaptionsListResponse = Schema.Schema.Type<typeof CaptionsListResponse>;\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,gBAA0B;AACnC,SAASC,0BAA0B;AACnC,SAASC,WAAW;;AASpB,IAAMC,cAAc,CAACC,iBAA6E;EAChGC,KAAK,MACHD,cACWE,eAAQF,WAAAA,IACRG,WAAIN,mBAAmBO,cAAc;IAAEC,SAAS;EAAa,CAAA,GAAI,CAACC,eAAeA,WAAWC,MAAM;AACjH;AAKA,IAAMC,kBAAkB,CAACC,gBAA8DC,UAC9EC,WAAI,aAAA;AACT,MAAIF,gBAAgB;AAClB,UAAMG,cAAc,OAAOhB,SAASiB,KAAKJ,cAAAA;AACzC,QAAIG,aAAaE,OAAO;AACtBhB,UAAI,SAASY,KAAAA,0BAA+B;QAAEK,MAAMH,YAAYG;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EAAGqD,SAAQ;AACX,SAAO,OAAO9B,sBAAsB3B,GAAAA,EAAKoB,KAAYC,gBAAQP,sBAAsB8D,cAAAA,CAAAA,CAAAA;AACrF,CAAA;",
6
6
  "names": ["Context", "Effect", "Layer", "Database", "CredentialsService", "log", "makeService", "cachedToken", "get", "succeed", "map", "getCredential", "service", "credential", "apiKey", "loadAccessToken", "accessTokenRef", "label", "gen", "accessToken", "load", "token", "note", "undefined", "GoogleCredentials", "Tag", "fromChannel", "channel", "effect", "fromChannelRef", "channelRef", "flatMap", "default", "HttpClient", "HttpClientRequest", "Effect", "Schedule", "Schema", "withAuthorization", "log", "Schema", "YouTubeError", "TaggedError", "code", "Number", "message", "String", "status", "optional", "fromErrorResponse", "response", "error", "ErrorResponse", "Struct", "ChannelSnippet", "title", "description", "customUrl", "publishedAt", "thumbnails", "default", "url", "medium", "high", "ChannelItem", "kind", "etag", "id", "snippet", "contentDetails", "relatedPlaylists", "uploads", "ChannelsResponse", "pageInfo", "totalResults", "resultsPerPage", "items", "Array", "VideoSnippet", "channelId", "standard", "maxres", "channelTitle", "playlistId", "position", "resourceId", "videoId", "VideoContentDetails", "videoPublishedAt", "duration", "VideoStatistics", "viewCount", "likeCount", "commentCount", "VideoItem", "statistics", "VideosResponse", "nextPageToken", "prevPageToken", "PlaylistItem", "PlaylistItemsResponse", "SearchItem", "SearchResponse", "CaptionResource", "language", "name", "trackKind", "CaptionsListResponse", "API_URL", "createUrl", "parts", "params", "url", "URL", "filter", "Boolean", "join", "Object", "entries", "_", "value", "forEach", "key", "searchParams", "set", "String", "decodeAndHandleErrors", "schema", "data", "decodeUnknown", "Union", "ErrorResponse", "pipe", "flatMap", "response", "fail", "YouTubeError", "fromErrorResponse", "succeed", "makeYouTubeApiRequest", "fn", "token", "GoogleCredentials", "get", "httpClient", "HttpClient", "map", "withAuthorization", "httpClientWithTracerDisabled", "withTracerDisabledWhen", "request", "setHeader", "execute", "res", "json", "timeout", "retry", "exponential", "compose", "recurs", "scoped", "withSpan", "error", "log", "catch", "getChannel", "channelId", "part", "id", "toString", "ChannelsResponse", "getChannelByHandle", "handle", "forHandle", "startsWith", "slice", "searchChannels", "query", "maxResults", "type", "q", "SearchResponse", "listPlaylistItems", "playlistId", "pageToken", "PlaylistItemsResponse", "getVideoDetails", "videoIds", "VideosResponse"]
7
7
  }
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-GTIWG45H.mjs";
5
5
 
6
6
  // src/operations/definitions.ts
7
- import { Operation } from "@dxos/operation";
8
7
  import * as Schema from "effect/Schema";
9
8
  import { Database, Feed, Ref } from "@dxos/echo";
10
9
  import { CredentialsService } from "@dxos/functions";
10
+ import { Operation } from "@dxos/operation";
11
11
  var Sync = Operation.make({
12
12
  meta: {
13
13
  key: "dxos.org/function/youtube/sync",
@@ -35,7 +35,7 @@ var Sync = Operation.make({
35
35
  ],
36
36
  services: [
37
37
  Database.Service,
38
- Feed.Service,
38
+ Feed.FeedService,
39
39
  CredentialsService
40
40
  ]
41
41
  });
@@ -59,7 +59,7 @@ var ClearSyncedVideos = Operation.make({
59
59
  ],
60
60
  services: [
61
61
  Database.Service,
62
- Feed.Service
62
+ Feed.FeedService
63
63
  ]
64
64
  });
65
65
 
@@ -67,4 +67,4 @@ export {
67
67
  Sync,
68
68
  ClearSyncedVideos
69
69
  };
70
- //# sourceMappingURL=chunk-SWWE4LUJ.mjs.map
70
+ //# sourceMappingURL=chunk-GIRFSTHR.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/definitions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Operation } from '@dxos/operation';\nimport * as Schema from 'effect/Schema';\n\nimport { Database, Feed, Ref } from '@dxos/echo';\nimport { CredentialsService } from '@dxos/functions';\n\nimport { Channel, Video } from '../types';\n\nexport const Sync = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/sync',\n name: 'Sync YouTube Channel',\n description: 'Sync videos from a YouTube channel to the feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel to sync videos from.',\n }),\n restrictedMode: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Use restricted mode to limit to max 20 videos. Reduces API calls. Useful for testing or quick syncs.',\n }),\n Schema.optional,\n ),\n includeTranscripts: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Whether to fetch transcripts: Data API when your account can manage the video, otherwise watch-page captions (browser uses a public CORS proxy for YouTube fetches).',\n }),\n Schema.optional,\n ),\n }),\n output: Schema.Struct({\n newVideos: Schema.Number,\n channelTitle: Schema.String.pipe(Schema.optional),\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.Service, CredentialsService],\n});\n\nexport const ClearSyncedVideos = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/clear-synced-videos',\n name: 'Clear Synced YouTube Videos',\n description: 'Remove all synced videos from the channel by replacing its feed with a new empty feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel whose synced videos should be cleared.',\n }),\n }),\n output: Schema.Struct({\n removedVideos: Schema.Number,\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.Service],\n});\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,iBAAiB;AAC1B,YAAYC,YAAY;AAExB,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,0BAA0B;AAI5B,IAAMC,OAAOC,UAAUC,KAAK;EACjCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;IACAQ,gBAAuBC,eAAQC,KACtBH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;IAEjBC,oBAA2BH,eAAQC,KAC1BH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;EAEnB,CAAA;EACAE,QAAeX,cAAO;IACpBY,WAAkBC;IAClBC,cAAqBC,cAAOP,KAAYC,eAAQ;EAClD,CAAA;EACAO,OAAO;IAACb,gBAAQC;IAAgBa,cAAMC;;EACtCC,UAAU;IAACC,SAASC;IAASC,KAAKD;IAASE;;AAC7C,CAAA;AAEO,IAAMC,oBAAoB/B,UAAUC,KAAK;EAC9CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,QAAeX,cAAO;IACpByB,eAAsBZ;EACxB,CAAA;EACAG,OAAO;IAACb,gBAAQC;IAAgBa,cAAMC;;EACtCC,UAAU;IAACC,SAASC;IAASC,KAAKD;;AACpC,CAAA;",
6
- "names": ["Operation", "Schema", "Database", "Feed", "Ref", "CredentialsService", "Sync", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "channel", "Ref", "Channel", "YouTubeChannel", "annotations", "restrictedMode", "Boolean", "pipe", "optional", "includeTranscripts", "output", "newVideos", "Number", "channelTitle", "String", "types", "Video", "YouTubeVideo", "services", "Database", "Service", "Feed", "CredentialsService", "ClearSyncedVideos", "removedVideos"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Database, Feed, Ref } from '@dxos/echo';\nimport { CredentialsService } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\n\nimport { Channel, Video } from '../types';\n\nexport const Sync = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/sync',\n name: 'Sync YouTube Channel',\n description: 'Sync videos from a YouTube channel to the feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel to sync videos from.',\n }),\n restrictedMode: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Use restricted mode to limit to max 20 videos. Reduces API calls. Useful for testing or quick syncs.',\n }),\n Schema.optional,\n ),\n includeTranscripts: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Whether to fetch transcripts: Data API when your account can manage the video, otherwise watch-page captions (browser uses a public CORS proxy for YouTube fetches).',\n }),\n Schema.optional,\n ),\n }),\n output: Schema.Struct({\n newVideos: Schema.Number,\n channelTitle: Schema.String.pipe(Schema.optional),\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.FeedService, CredentialsService],\n});\n\nexport const ClearSyncedVideos = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/clear-synced-videos',\n name: 'Clear Synced YouTube Videos',\n description: 'Remove all synced videos from the channel by replacing its feed with a new empty feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel whose synced videos should be cleared.',\n }),\n }),\n output: Schema.Struct({\n removedVideos: Schema.Number,\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.FeedService],\n});\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,0BAA0B;AACnC,SAASC,iBAAiB;AAInB,IAAMC,OAAOC,UAAUC,KAAK;EACjCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;IACAQ,gBAAuBC,eAAQC,KACtBH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;IAEjBC,oBAA2BH,eAAQC,KAC1BH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;EAEnB,CAAA;EACAE,QAAeX,cAAO;IACpBY,WAAkBC;IAClBC,cAAqBC,cAAOP,KAAYC,eAAQ;EAClD,CAAA;EACAO,OAAO;IAACb,gBAAQC;IAAgBa,cAAMC;;EACtCC,UAAU;IAACC,SAASC;IAASC,KAAKC;IAAaC;;AACjD,CAAA;AAEO,IAAMC,oBAAoBhC,UAAUC,KAAK;EAC9CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,QAAeX,cAAO;IACpB0B,eAAsBb;EACxB,CAAA;EACAG,OAAO;IAACb,gBAAQC;IAAgBa,cAAMC;;EACtCC,UAAU;IAACC,SAASC;IAASC,KAAKC;;AACpC,CAAA;",
6
+ "names": ["Schema", "Database", "Feed", "Ref", "CredentialsService", "Operation", "Sync", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "channel", "Ref", "Channel", "YouTubeChannel", "annotations", "restrictedMode", "Boolean", "pipe", "optional", "includeTranscripts", "output", "newVideos", "Number", "channelTitle", "String", "types", "Video", "YouTubeVideo", "services", "Database", "Service", "Feed", "FeedService", "CredentialsService", "ClearSyncedVideos", "removedVideos"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ClearSyncedVideos
3
- } from "./chunk-SWWE4LUJ.mjs";
3
+ } from "./chunk-GIRFSTHR.mjs";
4
4
  import {
5
5
  Video_exports
6
6
  } from "./chunk-GTIWG45H.mjs";
@@ -17,7 +17,7 @@ var handler = ClearSyncedVideos.pipe(Operation.withHandler(({ channel: channelRe
17
17
  channel: channelRef.dxn.toString()
18
18
  }, {
19
19
  F: __dxlog_file,
20
- L: 18,
20
+ L: 17,
21
21
  S: this,
22
22
  C: (f, a) => f(...a)
23
23
  });
@@ -28,16 +28,16 @@ var handler = ClearSyncedVideos.pipe(Operation.withHandler(({ channel: channelRe
28
28
  count: videos.length
29
29
  }, {
30
30
  F: __dxlog_file,
31
- L: 23,
31
+ L: 22,
32
32
  S: this,
33
33
  C: (f, a) => f(...a)
34
34
  });
35
35
  const newFeed = Feed.make();
36
36
  yield* Database.add(newFeed);
37
37
  Obj.setParent(newFeed, channel);
38
- Obj.change(channel, (mutable) => {
39
- mutable.feed = Ref.make(newFeed);
40
- delete mutable.lastSyncedAt;
38
+ Obj.change(channel, (channel2) => {
39
+ channel2.feed = Ref.make(newFeed);
40
+ delete channel2.lastSyncedAt;
41
41
  });
42
42
  if (videos.length > 0) {
43
43
  yield* Feed.remove(oldFeed, videos);
@@ -50,7 +50,7 @@ var handler = ClearSyncedVideos.pipe(Operation.withHandler(({ channel: channelRe
50
50
  removedVideos: videos.length
51
51
  }, {
52
52
  F: __dxlog_file,
53
- L: 44,
53
+ L: 43,
54
54
  S: this,
55
55
  C: (f, a) => f(...a)
56
56
  });
@@ -62,4 +62,4 @@ var clear_synced_videos_default = handler;
62
62
  export {
63
63
  clear_synced_videos_default as default
64
64
  };
65
- //# sourceMappingURL=clear-synced-videos-PIKJZET3.mjs.map
65
+ //# sourceMappingURL=clear-synced-videos-PMP332H3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/clear-synced-videos.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { Operation } from '@dxos/operation';\n\nimport { Channel, Video } from '../types';\nimport { ClearSyncedVideos } from './definitions';\n\nconst handler: Operation.WithHandler<typeof ClearSyncedVideos> = ClearSyncedVideos.pipe(\n Operation.withHandler(({ channel: channelRef }) =>\n Effect.gen(function* () {\n log('clearing youtube channel synced videos', { channel: channelRef.dxn.toString() });\n const channel = (yield* Database.load(channelRef)) as Channel.YouTubeChannel;\n const oldFeed = yield* Database.load(channel.feed as Ref.Ref<Feed.Feed>);\n\n const videos = yield* Feed.runQuery(oldFeed, Filter.type(Video.YouTubeVideo));\n log('removing synced videos', { count: videos.length });\n\n const newFeed = Feed.make();\n yield* Database.add(newFeed);\n Obj.setParent(newFeed, channel);\n\n Obj.change(channel, (channel) => {\n channel.feed = Ref.make(newFeed);\n delete channel.lastSyncedAt;\n });\n\n if (videos.length > 0) {\n yield* Feed.remove(oldFeed, videos);\n }\n\n for (const video of videos) {\n yield* Database.remove(video);\n }\n\n yield* Database.remove(oldFeed);\n\n log('replaced youtube channel feed', { removedVideos: videos.length });\n return { removedVideos: videos.length };\n }),\n ),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,UAAUC,MAAMC,QAAQC,KAAKC,WAAW;AACjD,SAASC,WAAW;AACpB,SAASC,iBAAiB;;AAK1B,IAAMC,UAA2DC,kBAAkBC,KACjFC,UAAUC,YAAY,CAAC,EAAEC,SAASC,WAAU,MACnCC,WAAI,aAAA;AACTC,MAAI,0CAA0C;IAAEH,SAASC,WAAWG,IAAIC,SAAQ;EAAG,GAAA;;;;;;AACnF,QAAML,UAAW,OAAOM,SAASC,KAAKN,UAAAA;AACtC,QAAMO,UAAU,OAAOF,SAASC,KAAKP,QAAQS,IAAI;AAEjD,QAAMC,SAAS,OAAOC,KAAKC,SAASJ,SAASK,OAAOC,KAAKC,cAAMC,YAAY,CAAA;AAC3Eb,MAAI,0BAA0B;IAAEc,OAAOP,OAAOQ;EAAO,GAAA;;;;;;AAErD,QAAMC,UAAUR,KAAKS,KAAI;AACzB,SAAOd,SAASe,IAAIF,OAAAA;AACpBG,MAAIC,UAAUJ,SAASnB,OAAAA;AAEvBsB,MAAIE,OAAOxB,SAAS,CAACA,aAAAA;AACnBA,IAAAA,SAAQS,OAAOgB,IAAIL,KAAKD,OAAAA;AACxB,WAAOnB,SAAQ0B;EACjB,CAAA;AAEA,MAAIhB,OAAOQ,SAAS,GAAG;AACrB,WAAOP,KAAKgB,OAAOnB,SAASE,MAAAA;EAC9B;AAEA,aAAWkB,SAASlB,QAAQ;AAC1B,WAAOJ,SAASqB,OAAOC,KAAAA;EACzB;AAEA,SAAOtB,SAASqB,OAAOnB,OAAAA;AAEvBL,MAAI,iCAAiC;IAAE0B,eAAenB,OAAOQ;EAAO,GAAA;;;;;;AACpE,SAAO;IAAEW,eAAenB,OAAOQ;EAAO;AACxC,CAAA,CAAA,CAAA;AAIJ,IAAA,8BAAevB;",
6
+ "names": ["Effect", "Database", "Feed", "Filter", "Obj", "Ref", "log", "Operation", "handler", "ClearSyncedVideos", "pipe", "Operation", "withHandler", "channel", "channelRef", "gen", "log", "dxn", "toString", "Database", "load", "oldFeed", "feed", "videos", "Feed", "runQuery", "Filter", "type", "Video", "YouTubeVideo", "count", "length", "newFeed", "make", "add", "Obj", "setParent", "change", "Ref", "lastSyncedAt", "remove", "video", "removedVideos"]
7
+ }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  youtube_exports
3
- } from "./chunk-5N5SWF3I.mjs";
3
+ } from "./chunk-FEQD5TPI.mjs";
4
4
  import {
5
5
  ClearSyncedVideos,
6
6
  Sync
7
- } from "./chunk-SWWE4LUJ.mjs";
7
+ } from "./chunk-GIRFSTHR.mjs";
8
8
  import "./chunk-GTIWG45H.mjs";
9
9
  import "./chunk-J5LGTIGS.mjs";
10
10
 
@@ -27,7 +27,7 @@ var meta = {
27
27
 
28
28
  // src/operations/index.ts
29
29
  import { OperationHandlerSet } from "@dxos/operation";
30
- var YouTubeHandlers = OperationHandlerSet.lazy(() => import("./clear-synced-videos-PIKJZET3.mjs"), () => import("./sync-II7O2LPG.mjs"));
30
+ var YouTubeHandlers = OperationHandlerSet.lazy(() => import("./clear-synced-videos-PMP332H3.mjs"), () => import("./sync-T34US6NO.mjs"));
31
31
 
32
32
  // src/YouTubePlugin.tsx
33
33
  import * as Effect from "effect/Effect";
@@ -40,7 +40,9 @@ import { AttentionEvents } from "@dxos/plugin-attention/types";
40
40
  import { ClientEvents } from "@dxos/plugin-client/types";
41
41
  import { SpaceOperation } from "@dxos/plugin-space/operations";
42
42
  import { YouTubeBlueprint } from "#blueprints";
43
+ import { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from "#capabilities";
43
44
  import { meta as meta3 } from "#meta";
45
+ import { Channel as Channel2, Video as Video2 } from "#types";
44
46
 
45
47
  // src/translations.ts
46
48
  import { meta as meta2 } from "#meta";
@@ -95,8 +97,6 @@ var translations = [
95
97
  ];
96
98
 
97
99
  // src/YouTubePlugin.tsx
98
- import { Channel as Channel2, Video as Video2 } from "#types";
99
- import { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from "#capabilities";
100
100
  var YouTubePlugin = Plugin.define(meta3).pipe(AppPlugin.addAppGraphModule({
101
101
  activatesOn: ActivationEvent.allOf(AppActivationEvents.SetupAppGraph, AttentionEvents.AttentionReady),
102
102
  activate: AppGraphBuilder
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/meta.ts", "../../../src/operations/index.ts", "../../../src/YouTubePlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.youtube',\n name: 'YouTube',\n description: trim`\n YouTube channel subscription and video feed management.\n Sync videos from channels and access transcripts for analysis.\n `,\n icon: 'ph--youtube-logo--regular',\n iconHue: 'red',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-youtube',\n tags: ['labs'],\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport { YouTube } from './apis';\nexport * from './definitions';\n\nexport const YouTubeHandlers = OperationHandlerSet.lazy(\n () => import('./clear-synced-videos'),\n () => import('./sync'),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { ActivationEvent, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Annotation } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionEvents } from '@dxos/plugin-attention/types';\nimport { ClientEvents } from '@dxos/plugin-client/types';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\n\nimport { YouTubeBlueprint } from '#blueprints';\nimport { meta } from '#meta';\nimport { translations } from './translations';\nimport { Channel, Video } from '#types';\n\nimport { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from '#capabilities';\n\nexport const YouTubePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.SetupAppGraph, AttentionEvents.AttentionReady),\n activate: AppGraphBuilder,\n }),\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addMetadataModule({\n metadata: [\n {\n id: Channel.YouTubeChannel.typename,\n metadata: {\n label: (object: Channel.YouTubeChannel) => object.name ?? object.channelUrl ?? object.channelId ?? 'YouTube',\n icon: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).hue ?? 'white',\n blueprints: [YouTubeBlueprint.key],\n inputSchema: Channel.CreateYouTubeChannelSchema,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Channel.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n {\n id: Video.YouTubeVideo.typename,\n metadata: {\n label: (object: Video.YouTubeVideo) => object.title,\n icon: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).hue ?? 'white',\n },\n },\n ],\n }),\n AppPlugin.addSchemaModule({\n schema: [Channel.YouTubeChannel, Video.YouTubeVideo],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.SetupMigration,\n activate: Migrations,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { Channel, Video } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [Channel.YouTubeChannel.typename]: {\n 'typename.label': 'YouTube Channel',\n 'typename.label_zero': 'YouTube Channels',\n 'typename.label_one': 'YouTube Channel',\n 'typename.label_other': 'YouTube Channels',\n 'object-name.placeholder': 'New YouTube channel',\n 'add-object.label': 'Add YouTube channel',\n 'rename-object.label': 'Rename YouTube channel',\n 'delete-object.label': 'Delete YouTube channel',\n 'object-deleted.label': 'YouTube channel deleted',\n },\n [Video.YouTubeVideo.typename]: {\n 'typename.label': 'Video',\n 'typename.label_zero': 'Videos',\n 'typename.label_one': 'Video',\n 'typename.label_other': 'Videos',\n 'object-name.placeholder': 'New video',\n 'add-object.label': 'Add video',\n 'rename-object.label': 'Rename video',\n 'delete-object.label': 'Delete video',\n 'object-deleted.label': 'Video deleted',\n },\n [meta.id]: {\n 'plugin.name': 'YouTube',\n 'channel.label': 'YouTube Channel',\n 'video.label': 'Video',\n 'sync-channel.label': 'Sync channel',\n 'sync-channel-error.title': 'Failed to sync channel',\n 'clear-synced-videos.label': 'Clear synced videos',\n 'clear-synced-videos-error.title': 'Failed to clear synced videos',\n 'close.label': 'Close',\n 'new-channel.label': 'New YouTube Channel',\n 'empty-channel.message': 'No videos synced yet',\n 'no-video.message': 'Select a video to view it',\n\n 'channel-account.label': 'Account',\n 'channel-account.placeholder': 'Select account...',\n 'channel-sync.label': 'Channel Sync',\n\n 'enable-background-sync.label': 'Enable background sync',\n 'enabling-background-sync.label': 'Enabling...',\n 'disable-background-sync.label': 'Disable background sync',\n 'view-trigger.label': 'View trigger',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;AACT;;;ACdA,SAASC,2BAA2B;AAK7B,IAAMC,kBAAkBC,oBAAoBC,KACjD,MAAM,OAAO,oCAAA,GACb,MAAM,OAAO,qBAAA,CAAA;;;ACPf,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiBC,cAAc;AACxC,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAChC,SAASC,oBAAoB;AAE7B,SAASC,sBAAsB;AAE/B,SAASC,wBAAwB;AACjC,SAASC,QAAAA,aAAY;;;ACXrB,SAASC,QAAAA,aAAY;AACrB,SAASC,SAASC,aAAa;AAExB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,QAAQC,eAAeC,QAAQ,GAAG;QACjC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,MAAMC,aAAaF,QAAQ,GAAG;QAC7B,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACG,MAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,eAAe;QACf,sBAAsB;QACtB,4BAA4B;QAC5B,6BAA6B;QAC7B,mCAAm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AAY,EAAElD,KAAY6B,iBAAU,EAAEJ;QAChFK,SAASJ,WAAWC,eAAeC,IAAIqB,OAAMC,YAAY,EAAElD,KAAY6B,iBAAU,EAAEE,OAAO;MAC5F;IACF;;AAEJ,CAAA,GACA9B,UAAUmD,gBAAgB;EACxBC,QAAQ;IAACpC,SAAQC;IAAgB+B,OAAMC;;AACzC,CAAA,GACAjD,UAAUqD,iBAAiB;EAAE5C,UAAU6C;AAAa,CAAA,GACpDtD,UAAUuD,sBAAsB;EAAEC;AAAa,CAAA,GAC/C5D,OAAO6D,UAAU;EACfvD,aAAawD,aAAaC;EAC1BlD,UAAUmD;AACZ,CAAA,GACAhE,OAAO4C,IAAI;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "OperationHandlerSet", "YouTubeHandlers", "OperationHandlerSet", "lazy", "Effect", "Option", "ActivationEvent", "Plugin", "AppActivationEvents", "AppPlugin", "Annotation", "Operation", "AttentionEvents", "ClientEvents", "SpaceOperation", "YouTubeBlueprint", "meta", "meta", "Channel", "Video", "translations", "Channel", "YouTubeChannel", "typename", "Video", "YouTubeVideo", "meta", "id", "Channel", "Video", "AppGraphBuilder", "BlueprintDefinition", "Migrations", "ReactSurface", "YouTubePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activatesOn", "ActivationEvent", "allOf", "AppActivationEvents", "SetupAppGraph", "AttentionEvents", "AttentionReady", "activate", "AppGraphBuilder", "addBlueprintDefinitionModule", "BlueprintDefinition", "addMetadataModule", "metadata", "id", "Channel", "YouTubeChannel", "typename", "label", "object", "name", "channelUrl", "channelId", "icon", "Annotation", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "blueprints", "YouTubeBlueprint", "key", "inputSchema", "CreateYouTubeChannelSchema", "createObject", "props", "options", "gen", "make", "Operation", "invoke", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "Video", "YouTubeVideo", "title", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "ClientEvents", "SetupMigration", "Migrations"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.youtube',\n name: 'YouTube',\n description: trim`\n YouTube channel subscription and video feed management.\n Sync videos from channels and access transcripts for analysis.\n `,\n icon: 'ph--youtube-logo--regular',\n iconHue: 'red',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-youtube',\n tags: ['labs'],\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport { YouTube } from './apis';\nexport * from './definitions';\n\nexport const YouTubeHandlers = OperationHandlerSet.lazy(\n () => import('./clear-synced-videos'),\n () => import('./sync'),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { ActivationEvent, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Annotation } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionEvents } from '@dxos/plugin-attention/types';\nimport { ClientEvents } from '@dxos/plugin-client/types';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { YouTubeBlueprint } from '#blueprints';\nimport { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { Channel, Video } from '#types';\n\nimport { translations } from './translations';\n\nexport const YouTubePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.SetupAppGraph, AttentionEvents.AttentionReady),\n activate: AppGraphBuilder,\n }),\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addMetadataModule({\n metadata: [\n {\n id: Channel.YouTubeChannel.typename,\n metadata: {\n label: (object: Channel.YouTubeChannel) => object.name ?? object.channelUrl ?? object.channelId ?? 'YouTube',\n icon: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).hue ?? 'white',\n blueprints: [YouTubeBlueprint.key],\n inputSchema: Channel.CreateYouTubeChannelSchema,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Channel.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n {\n id: Video.YouTubeVideo.typename,\n metadata: {\n label: (object: Video.YouTubeVideo) => object.title,\n icon: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).hue ?? 'white',\n },\n },\n ],\n }),\n AppPlugin.addSchemaModule({\n schema: [Channel.YouTubeChannel, Video.YouTubeVideo],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.SetupMigration,\n activate: Migrations,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { Channel, Video } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [Channel.YouTubeChannel.typename]: {\n 'typename.label': 'YouTube Channel',\n 'typename.label_zero': 'YouTube Channels',\n 'typename.label_one': 'YouTube Channel',\n 'typename.label_other': 'YouTube Channels',\n 'object-name.placeholder': 'New YouTube channel',\n 'add-object.label': 'Add YouTube channel',\n 'rename-object.label': 'Rename YouTube channel',\n 'delete-object.label': 'Delete YouTube channel',\n 'object-deleted.label': 'YouTube channel deleted',\n },\n [Video.YouTubeVideo.typename]: {\n 'typename.label': 'Video',\n 'typename.label_zero': 'Videos',\n 'typename.label_one': 'Video',\n 'typename.label_other': 'Videos',\n 'object-name.placeholder': 'New video',\n 'add-object.label': 'Add video',\n 'rename-object.label': 'Rename video',\n 'delete-object.label': 'Delete video',\n 'object-deleted.label': 'Video deleted',\n },\n [meta.id]: {\n 'plugin.name': 'YouTube',\n 'channel.label': 'YouTube Channel',\n 'video.label': 'Video',\n 'sync-channel.label': 'Sync channel',\n 'sync-channel-error.title': 'Failed to sync channel',\n 'clear-synced-videos.label': 'Clear synced videos',\n 'clear-synced-videos-error.title': 'Failed to clear synced videos',\n 'close.label': 'Close',\n 'new-channel.label': 'New YouTube Channel',\n 'empty-channel.message': 'No videos synced yet',\n 'no-video.message': 'Select a video to view it',\n\n 'channel-account.label': 'Account',\n 'channel-account.placeholder': 'Select account...',\n 'channel-sync.label': 'Channel Sync',\n\n 'enable-background-sync.label': 'Enable background sync',\n 'enabling-background-sync.label': 'Enabling...',\n 'disable-background-sync.label': 'Disable background sync',\n 'view-trigger.label': 'View trigger',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;;;;;;;;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;AACT;;;ACdA,SAASC,2BAA2B;AAK7B,IAAMC,kBAAkBC,oBAAoBC,KACjD,MAAM,OAAO,oCAAA,GACb,MAAM,OAAO,qBAAA,CAAA;;;ACPf,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiBC,cAAc;AACxC,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAChC,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAG/B,SAASC,w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G,aAAa;QACnGC,MAAMC,WAAWC,eAAeC,IAAIX,SAAQC,cAAc,EAAElB,KAAY6B,iBAAU,EAAEJ;QACpFK,SAASJ,WAAWC,eAAeC,IAAIX,SAAQC,cAAc,EAAElB,KAAY6B,iBAAU,EAAEE,OAAO;QAC9FC,YAAY;UAACC,iBAAiBC;;QAC9BC,aAAalB,SAAQmB;QACrBC,cAAe,CAACC,OAAOC,YACdC,WAAI,aAAA;AACT,gBAAMnB,SAASJ,SAAQwB,KAAKH,KAAAA;AAC5B,iBAAO,OAAOI,UAAUC,OAAOC,eAAeC,WAAW;YACvDxB;YACAyB,QAAQP,QAAQO;YAChBC,QAAQ;YACRC,cAAcT,QAAQS;UACxB,CAAA;QACF,CAAA;MACJ;IACF;IACA;MACEhC,IAAIiC,OAAMC,aAAa/B;MACvBJ,UAAU;QACRK,OAAO,CAACC,WAA+BA,OAAO8B;QAC9C1B,MAAMC,WAAWC,eAAeC,IAAIqB,OAAMC,YAAY,EAAElD,KAAY6B,iBAAU,EAAEJ;QAChFK,SAASJ,WAAWC,eAAeC,IAAIqB,OAAMC,YAAY,EAAElD,KAAY6B,iBAAU,EAAEE,OAAO;MAC5F;IACF;;AAEJ,CAAA,GACA9B,UAAUmD,gBAAgB;EACxBC,QAAQ;IAACpC,SAAQC;IAAgB+B,OAAMC;;AACzC,CAAA,GACAjD,UAAUqD,iBAAiB;EAAE5C,UAAU6C;AAAa,CAAA,GACpDtD,UAAUuD,sBAAsB;EAAEC;AAAa,CAAA,GAC/C5D,OAAO6D,UAAU;EACfvD,aAAawD,aAAaC;EAC1BlD,UAAUmD;AACZ,CAAA,GACAhE,OAAO4C,IAAI;",
6
+ "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "OperationHandlerSet", "YouTubeHandlers", "OperationHandlerSet", "lazy", "Effect", "Option", "ActivationEvent", "Plugin", "AppActivationEvents", "AppPlugin", "Annotation", "Operation", "AttentionEvents", "ClientEvents", "SpaceOperation", "YouTubeBlueprint", "AppGraphBuilder", "BlueprintDefinition", "Migrations", "ReactSurface", "meta", "Channel", "Video", "meta", "Channel", "Video", "translations", "Channel", "YouTubeChannel", "typename", "Video", "YouTubeVideo", "meta", "id", "YouTubePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activatesOn", "ActivationEvent", "allOf", "AppActivationEvents", "SetupAppGraph", "AttentionEvents", "AttentionReady", "activate", "AppGraphBuilder", "addBlueprintDefinitionModule", "BlueprintDefinition", "addMetadataModule", "metadata", "id", "Channel", "YouTubeChannel", "typename", "label", "object", "name", "channelUrl", "channelId", "icon", "Annotation", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "blueprints", "YouTubeBlueprint", "key", "inputSchema", "CreateYouTubeChannelSchema", "createObject", "props", "options", "gen", "make", "Operation", "invoke", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "Video", "YouTubeVideo", "title", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "ClientEvents", "SetupMigration", "Migrations"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":1814,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/operations/services/google-credentials.ts":{"bytes":8737,"imports":[{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/types.ts":{"bytes":23699,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/api.ts":{"bytes":17178,"imports":[{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"../../services/google-credentials"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/youtube/index.ts":{"bytes":554,"imports":[{"path":"src/operations/apis/youtube/api.ts","kind":"import-statement","original":"./api"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/index.ts":{"bytes":532,"imports":[{"path":"src/operations/apis/youtube/index.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"},"src/types/types.ts":{"bytes":806,"imports":[],"format":"esm"},"src/types/Channel.ts":{"bytes":10872,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Video.ts":{"bytes":10281,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":741,"imports":[{"path":"src/types/types.ts","kind":"import-statement","original":"./types"},{"path":"src/types/Channel.ts","kind":"import-statement","original":"./Channel"},{"path":"src/types/Video.ts","kind":"import-statement","original":"./Video"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":7467,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/clear-synced-videos.ts":{"bytes":6177,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/transcript.ts":{"bytes":5119,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"format":"esm"},"src/operations/sync.ts":{"bytes":38138,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"./services/google-credentials"},{"path":"src/operations/transcript.ts","kind":"import-statement","original":"./transcript"}],"format":"esm"},"src/operations/index.ts":{"bytes":1253,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/clear-synced-videos.ts","kind":"dynamic-import","original":"./clear-synced-videos"},{"path":"src/operations/sync.ts","kind":"dynamic-import","original":"./sync"}],"format":"esm"},"src/translations.ts":{"bytes":6853,"imports":[{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/YouTubePlugin.tsx":{"bytes":10818,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"#types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":649,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/operations/index.ts","kind":"import-statement","original":"./operations"},{"path":"src/YouTubePlugin.tsx","kind":"import-statement","original":"./YouTubePlugin"}],"format":"esm"},"src/blueprints/youtube.ts":{"bytes":5235,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/index.ts":{"bytes":640,"imports":[{"path":"src/blueprints/youtube.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10111},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5N5SWF3I.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/sync-II7O2LPG.mjs","kind":"dynamic-import"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync","YouTube","YouTubeHandlers","YouTubePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":420},"src/index.ts":{"bytesInOutput":0},"src/operations/index.ts":{"bytesInOutput":192},"src/YouTubePlugin.tsx":{"bytesInOutput":2558},"src/translations.ts":{"bytesInOutput":2065}},"bytes":5692},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2537},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"exports":["YouTubeBlueprint"],"entryPoint":"src/blueprints/index.ts","inputs":{"src/blueprints/youtube.ts":{"bytesInOutput":1623},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1770},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Channel","Video","YouTubeOperation"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":250},"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3106},"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/clear-synced-videos.ts","inputs":{"src/operations/clear-synced-videos.ts":{"bytesInOutput":1557}},"bytes":1857},"dist/lib/browser/sync-II7O2LPG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21312},"dist/lib/browser/sync-II7O2LPG.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5N5SWF3I.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"exports":["default"],"entryPoint":"src/operations/sync.ts","inputs":{"src/operations/sync.ts":{"bytesInOutput":9918},"src/operations/transcript.ts":{"bytesInOutput":1122}},"bytes":11421},"dist/lib/browser/chunk-5N5SWF3I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24537},"dist/lib/browser/chunk-5N5SWF3I.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["GoogleCredentials","youtube_exports"],"inputs":{"src/operations/services/google-credentials.ts":{"bytesInOutput":2077},"src/operations/apis/youtube/index.ts":{"bytesInOutput":911},"src/operations/apis/youtube/api.ts":{"bytesInOutput":3644},"src/operations/apis/youtube/types.ts":{"bytesInOutput":5083},"src/operations/apis/index.ts":{"bytesInOutput":0}},"bytes":12072},"dist/lib/browser/chunk-SWWE4LUJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3625},"dist/lib/browser/chunk-SWWE4LUJ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":1995}},"bytes":2189},"dist/lib/browser/chunk-GTIWG45H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"dist/lib/browser/chunk-GTIWG45H.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["Channel_exports","Video_exports","YouTubeOperation"],"inputs":{"src/types/types.ts":{"bytesInOutput":27},"src/types/index.ts":{"bytesInOutput":0},"src/types/Channel.ts":{"bytesInOutput":2681},"src/types/Video.ts":{"bytesInOutput":2653}},"bytes":5595},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1814,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/operations/services/google-credentials.ts":{"bytes":8737,"imports":[{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/types.ts":{"bytes":23699,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/api.ts":{"bytes":17174,"imports":[{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"../../services/google-credentials"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/youtube/index.ts":{"bytes":554,"imports":[{"path":"src/operations/apis/youtube/api.ts","kind":"import-statement","original":"./api"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/index.ts":{"bytes":532,"imports":[{"path":"src/operations/apis/youtube/index.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"},"src/types/types.ts":{"bytes":806,"imports":[],"format":"esm"},"src/types/Channel.ts":{"bytes":10872,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Video.ts":{"bytes":10281,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":741,"imports":[{"path":"src/types/types.ts","kind":"import-statement","original":"./types"},{"path":"src/types/Channel.ts","kind":"import-statement","original":"./Channel"},{"path":"src/types/Video.ts","kind":"import-statement","original":"./Video"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":7507,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/clear-synced-videos.ts":{"bytes":6161,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/transcript.ts":{"bytes":5119,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"format":"esm"},"src/operations/sync.ts":{"bytes":38134,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"./services/google-credentials"},{"path":"src/operations/transcript.ts","kind":"import-statement","original":"./transcript"}],"format":"esm"},"src/operations/index.ts":{"bytes":1253,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/clear-synced-videos.ts","kind":"dynamic-import","original":"./clear-synced-videos"},{"path":"src/operations/sync.ts","kind":"dynamic-import","original":"./sync"}],"format":"esm"},"src/translations.ts":{"bytes":6853,"imports":[{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/YouTubePlugin.tsx":{"bytes":10814,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":649,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/operations/index.ts","kind":"import-statement","original":"./operations"},{"path":"src/YouTubePlugin.tsx","kind":"import-statement","original":"./YouTubePlugin"}],"format":"esm"},"src/blueprints/youtube.ts":{"bytes":5235,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/index.ts":{"bytes":640,"imports":[{"path":"src/blueprints/youtube.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10111},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FEQD5TPI.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GIRFSTHR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/clear-synced-videos-PMP332H3.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/sync-T34US6NO.mjs","kind":"dynamic-import"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync","YouTube","YouTubeHandlers","YouTubePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":420},"src/index.ts":{"bytesInOutput":0},"src/operations/index.ts":{"bytesInOutput":192},"src/YouTubePlugin.tsx":{"bytesInOutput":2558},"src/translations.ts":{"bytesInOutput":2065}},"bytes":5692},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2537},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"exports":["YouTubeBlueprint"],"entryPoint":"src/blueprints/index.ts","inputs":{"src/blueprints/youtube.ts":{"bytesInOutput":1623},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1770},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Channel","Video","YouTubeOperation"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":250},"dist/lib/browser/clear-synced-videos-PMP332H3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3099},"dist/lib/browser/clear-synced-videos-PMP332H3.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GIRFSTHR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/clear-synced-videos.ts","inputs":{"src/operations/clear-synced-videos.ts":{"bytesInOutput":1560}},"bytes":1860},"dist/lib/browser/sync-T34US6NO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21310},"dist/lib/browser/sync-T34US6NO.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FEQD5TPI.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GIRFSTHR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"exports":["default"],"entryPoint":"src/operations/sync.ts","inputs":{"src/operations/sync.ts":{"bytesInOutput":9918},"src/operations/transcript.ts":{"bytesInOutput":1122}},"bytes":11421},"dist/lib/browser/chunk-FEQD5TPI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24535},"dist/lib/browser/chunk-FEQD5TPI.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["GoogleCredentials","youtube_exports"],"inputs":{"src/operations/services/google-credentials.ts":{"bytesInOutput":2077},"src/operations/apis/youtube/index.ts":{"bytesInOutput":911},"src/operations/apis/youtube/api.ts":{"bytesInOutput":3644},"src/operations/apis/youtube/types.ts":{"bytesInOutput":5083},"src/operations/apis/index.ts":{"bytesInOutput":0}},"bytes":12072},"dist/lib/browser/chunk-GIRFSTHR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3648},"dist/lib/browser/chunk-GIRFSTHR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":2003}},"bytes":2197},"dist/lib/browser/chunk-GTIWG45H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"dist/lib/browser/chunk-GTIWG45H.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["Channel_exports","Video_exports","YouTubeOperation"],"inputs":{"src/types/types.ts":{"bytesInOutput":27},"src/types/index.ts":{"bytesInOutput":0},"src/types/Channel.ts":{"bytesInOutput":2681},"src/types/Video.ts":{"bytesInOutput":2653}},"bytes":5595},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}