@framers/agentos-ext-github 0.1.5 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -1
- package/dist/GitHubRepoIndexer.d.ts +20 -8
- package/dist/GitHubRepoIndexer.d.ts.map +1 -1
- package/dist/GitHubRepoIndexer.js +11 -6
- package/dist/GitHubRepoIndexer.js.map +1 -1
- package/dist/__tests__/app.test.d.ts +7 -0
- package/dist/__tests__/app.test.d.ts.map +1 -0
- package/dist/__tests__/app.test.js +398 -0
- package/dist/__tests__/app.test.js.map +1 -0
- package/dist/__tests__/documents.test.d.ts +7 -0
- package/dist/__tests__/documents.test.d.ts.map +1 -0
- package/dist/__tests__/documents.test.js +235 -0
- package/dist/__tests__/documents.test.js.map +1 -0
- package/dist/__tests__/entry.test.d.ts +6 -0
- package/dist/__tests__/entry.test.d.ts.map +1 -0
- package/dist/__tests__/entry.test.js +17 -0
- package/dist/__tests__/entry.test.js.map +1 -0
- package/dist/__tests__/indexer.test.js +14 -0
- package/dist/__tests__/indexer.test.js.map +1 -1
- package/dist/app/credential.d.ts +44 -0
- package/dist/app/credential.d.ts.map +1 -0
- package/dist/app/credential.js +78 -0
- package/dist/app/credential.js.map +1 -0
- package/dist/app/http.d.ts +61 -0
- package/dist/app/http.d.ts.map +1 -0
- package/dist/app/http.js +128 -0
- package/dist/app/http.js.map +1 -0
- package/dist/app/installations.d.ts +48 -0
- package/dist/app/installations.d.ts.map +1 -0
- package/dist/app/installations.js +61 -0
- package/dist/app/installations.js.map +1 -0
- package/dist/app/reconcile.d.ts +85 -0
- package/dist/app/reconcile.d.ts.map +1 -0
- package/dist/app/reconcile.js +125 -0
- package/dist/app/reconcile.js.map +1 -0
- package/dist/app/userFlow.d.ts +43 -0
- package/dist/app/userFlow.d.ts.map +1 -0
- package/dist/app/userFlow.js +54 -0
- package/dist/app/userFlow.js.map +1 -0
- package/dist/app/webhook.d.ts +18 -0
- package/dist/app/webhook.d.ts.map +1 -0
- package/dist/app/webhook.js +28 -0
- package/dist/app/webhook.js.map +1 -0
- package/dist/documents/GitHubDocumentsConnector.d.ts +80 -0
- package/dist/documents/GitHubDocumentsConnector.d.ts.map +1 -0
- package/dist/documents/GitHubDocumentsConnector.js +158 -0
- package/dist/documents/GitHubDocumentsConnector.js.map +1 -0
- package/dist/documents/index.d.ts +24 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +24 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/tree.d.ts +71 -0
- package/dist/documents/tree.d.ts.map +1 -0
- package/dist/documents/tree.js +115 -0
- package/dist/documents/tree.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/manifest.json +5 -3
- package/package.json +16 -3
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
This pack gives an agent tools for repository search, issues, pull requests, files, branches, commits, releases, workflow dispatch, gists, and repository indexing. It uses the GitHub API through `@octokit/rest`.
|
|
4
4
|
|
|
5
|
+
Its second entry, `@framers/agentos-ext-github/documents`, is for a server that reads people's repositories through a GitHub App: the app's JWT and installation tokens, the user's web flow, the installations and repositories a person can reach, webhook signatures, a daily reconcile, and `GitHubDocumentsConnector`, which reads a repository's documentation as account sources. See [GitHub App installation mode](#github-app-installation-mode).
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
npm install @framers/agentos-ext-github
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
Peer dependency: `@framers/agentos` with range `>=0.
|
|
13
|
+
Peer dependency: `@framers/agentos` with range `>=0.13.40`, the first release whose auth module has `RedirectOAuthFlow`.
|
|
12
14
|
|
|
13
15
|
## Usage
|
|
14
16
|
|
|
@@ -341,6 +343,92 @@ List and search tools fetch a page of results and cap `per_page` as described in
|
|
|
341
343
|
|
|
342
344
|
Top-level pull request comments use the issues API. `github_pr_comment_list` returns inline review comments; `github_comment_list` returns top-level comments.
|
|
343
345
|
|
|
346
|
+
`GitHubRepoIndexer` indexes the repositories its constructor is given, `new GitHubRepoIndexer(service, { repositories: [{ owner, repo }] })`, and the six repositories of `ECOSYSTEM_REPOS` when it is given none. The package's entry exports both, with the types `IndexedRepository` and `GitHubRepoIndexerOptions`.
|
|
347
|
+
|
|
348
|
+
## GitHub App installation mode
|
|
349
|
+
|
|
350
|
+
The `./documents` entry reads repositories through a GitHub App instead of one personal token. Every call goes to GitHub's REST API over the `fetch` you pass (the global `fetch` by default) with `X-GitHub-Api-Version: 2026-03-10`, so tests point it at a stand-in with `{ fetchImpl, apiBase }`.
|
|
351
|
+
|
|
352
|
+
```ts
|
|
353
|
+
import { readFileSync } from 'node:fs';
|
|
354
|
+
import {
|
|
355
|
+
GitHubAppCredential,
|
|
356
|
+
GitHubAppUserFlow,
|
|
357
|
+
GitHubDocumentsConnector,
|
|
358
|
+
installationsOfUser,
|
|
359
|
+
repositoriesOfUser,
|
|
360
|
+
userOfToken,
|
|
361
|
+
} from '@framers/agentos-ext-github/documents';
|
|
362
|
+
|
|
363
|
+
const credential = new GitHubAppCredential({
|
|
364
|
+
clientId: process.env.GITHUB_APP_CLIENT_ID!,
|
|
365
|
+
privateKey: readFileSync('/run/secrets/github_app_key', 'utf8'),
|
|
366
|
+
});
|
|
367
|
+
const flow = new GitHubAppUserFlow({
|
|
368
|
+
clientId: process.env.GITHUB_APP_CLIENT_ID!,
|
|
369
|
+
clientSecret: readFileSync('/run/secrets/github_app_client_secret', 'utf8').trim(),
|
|
370
|
+
});
|
|
371
|
+
const redirectUri = 'https://example.com/github/callback';
|
|
372
|
+
|
|
373
|
+
// Where GitHub sends the installer: keep `state` and `codeVerifier` (in a row keyed by a cookie), then redirect.
|
|
374
|
+
const { url, state, codeVerifier } = flow.begin({ redirectUri });
|
|
375
|
+
|
|
376
|
+
// The callback: check the state, exchange the code, and link only what this person's token reaches.
|
|
377
|
+
const { accessToken } = await flow.complete({ code, state: returnedState, expectedState: state, codeVerifier, redirectUri });
|
|
378
|
+
const person = await userOfToken(accessToken);
|
|
379
|
+
const reachable = (await installationsOfUser(accessToken)).some((installation) => installation.id === installationId);
|
|
380
|
+
const repositories = reachable ? await repositoriesOfUser(accessToken, installationId) : [];
|
|
381
|
+
|
|
382
|
+
// Read the documentation at the default branch's head.
|
|
383
|
+
const connector = new GitHubDocumentsConnector(credential, installationId, repositories);
|
|
384
|
+
for (const repository of repositories) {
|
|
385
|
+
const commit = await connector.head(repository.id);
|
|
386
|
+
for (const blob of await connector.listing(repository.id, commit)) {
|
|
387
|
+
const read = await connector.read({ id: `${repository.id}:${blob.path}`, title: blob.path, size: blob.size, version: `${blob.sha}@${commit}` });
|
|
388
|
+
if ('reason' in read) continue;
|
|
389
|
+
// read.content is { text } or { bytes, mediaType }; read.ref links the file at the commit.
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
A push arrives at the app's webhook. Check its signature on the raw body before parsing it, then compare the tree at the push's `after` commit with the blobs read before:
|
|
395
|
+
|
|
396
|
+
```ts
|
|
397
|
+
import { verifyWebhookSignature } from '@framers/agentos-ext-github/documents';
|
|
398
|
+
|
|
399
|
+
if (!verifyWebhookSignature(rawBody, request.headers.get('x-hub-signature-256'), webhookSecret)) return new Response(null, { status: 401 });
|
|
400
|
+
const push = JSON.parse(new TextDecoder().decode(rawBody));
|
|
401
|
+
const changes = await connector.changesSince(cursor, { ids: [String(push.repository.id)], after: push.after, ref: push.ref });
|
|
402
|
+
// Read changes.changed again, delete changes.gone, keep changes.cursor for the next push.
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
| Export | What it does |
|
|
406
|
+
| --- | --- |
|
|
407
|
+
| `appJwt(identity, nowSeconds?)` | The app's JWT: RS256, `iat` 60 seconds back, `exp` nine minutes ahead, `iss` the client id |
|
|
408
|
+
| `GitHubAppCredential` | Mints installation tokens narrowed to the repositories asked for (`repository_ids`) and holds each until five minutes before its hour ends; an empty list throws a `TypeError`, since GitHub answers it with a token for every repository of the installation |
|
|
409
|
+
| `GitHubAppUserFlow` | The user's web flow on the auth module's `RedirectOAuthFlow`: GitHub's authorize address with `state` and PKCE and no `scope`, and the code exchange; it has no store, so the user token is used once |
|
|
410
|
+
| `userOfToken`, `installationsOfUser`, `repositoriesOfUser` | The person a user token belongs to, the app's installations they can access, and the repositories of an installation they can read, across every page |
|
|
411
|
+
| `listInstallations`, `uninstallInstallation` | The app's installations, and its uninstall, which takes 202 (GitHub removes it in the background), 204 and 404 as done |
|
|
412
|
+
| `verifyWebhookSignature(body, header, secret)` | Checks `X-Hub-Signature-256` against the HMAC SHA-256 of the raw body in constant time; an empty or missing secret throws a `TypeError`, since anyone can sign a delivery under an empty key |
|
|
413
|
+
| `reconcileInstallations(credential, links, { since })` | Answers the linked installations GitHub no longer lists, the repositories whose default branch moved past the head last read, the repositories it could not read, and asks again for each event since `since` that no delivery attempt delivered, reporting GitHub's refusals of that step in `deliveries` |
|
|
414
|
+
| `GitHubDocumentsConnector` | An `AccountSourceConnector` of `@framers/agentos-ext-account-sources` over one installation's linked repositories |
|
|
415
|
+
| `readTree`, `pathFilter`, `TreeTooLarge` | A tree at a commit within a request budget, and the filter that keeps documentation |
|
|
416
|
+
| `GitHubApiError` | An answer outside 2xx; carries the status and nothing of the body |
|
|
417
|
+
|
|
418
|
+
The reconcile leaves failed a delivery whose newest attempt the receiving route answered with a 4xx other than 408 and 429, such as a 413 for a body past the route's size cap: that refusal answers the same on every attempt. A 408, a 429, a 5xx or any other failed attempt is asked for again. When GitHub answers the deliveries listing outside 2xx, `deliveries.listingStatus` holds its status and no delivery is asked for again, since a delivery's other attempts may lie on the pages not read; a redelivery GitHub refuses is listed in `deliveries.refused` with its status, and the others are still asked for. Either way the outcome carries `gone`, `moved` and `unreadable`.
|
|
419
|
+
|
|
420
|
+
The connector's filter, `new GitHubDocumentsConnector(credential, installationId, repositories, filter)`:
|
|
421
|
+
|
|
422
|
+
| Field | Default |
|
|
423
|
+
| --- | --- |
|
|
424
|
+
| `extensions` | `.md`, `.markdown`, `.txt`, `.rst`, `.html`, `.htm`, `.pdf`, `.docx` |
|
|
425
|
+
| `skipFolders` | `node_modules`, `vendor`, `dist`, `build`, `.git`, `third_party`, at any depth |
|
|
426
|
+
| `maxFiles` | `2000`, in path order |
|
|
427
|
+
| `maxFileBytes` | `10485760` (10 MiB): larger files are left out of a listing, and a read past it is answered gone |
|
|
428
|
+
| `maxTreeRequests` | `50` tree requests to list one commit |
|
|
429
|
+
|
|
430
|
+
An item's id is `<repositoryId>:<path>` and its version `<blob>@<commit>`. A tree is asked for recursively; when GitHub answers it truncated (past 100,000 entries or 7 MB), its top level is read and each subtree is asked for the same way, never walking a skipped folder, and `TreeTooLarge` is thrown rather than pass `maxTreeRequests`. Files are read through the contents endpoint's raw media type as a stream cut at `maxFileBytes`: PDF, Word and HTML as bytes with their media type, the rest as UTF-8 text, each with a `github` source reference whose `url` is the file at the commit. `changesSince` takes the cursor it answered last (each documentation path's blob), never reads a push's commit list, so a force push is read like any other, and answers a push to another branch than the default with no change. `listing(repositoryId, commit)` lets a caller keep a commit's listing and pass it to `changesSince` as `listing`, which then reads no tree.
|
|
431
|
+
|
|
344
432
|
## License
|
|
345
433
|
|
|
346
434
|
Apache-2.0
|
|
@@ -27,14 +27,21 @@ export interface IndexResult {
|
|
|
27
27
|
/** Wall-clock duration of the indexing run in milliseconds. */
|
|
28
28
|
durationMs: number;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
* without arguments.
|
|
33
|
-
*/
|
|
34
|
-
export declare const ECOSYSTEM_REPOS: readonly {
|
|
30
|
+
/** One repository to index, by its owner and name. */
|
|
31
|
+
export interface IndexedRepository {
|
|
35
32
|
owner: string;
|
|
36
33
|
repo: string;
|
|
37
|
-
}
|
|
34
|
+
}
|
|
35
|
+
/** What a {@link GitHubRepoIndexer} indexes. */
|
|
36
|
+
export interface GitHubRepoIndexerOptions {
|
|
37
|
+
/** The repositories `indexEcosystem()` indexes, in order; {@link ECOSYSTEM_REPOS} when absent. */
|
|
38
|
+
repositories?: readonly IndexedRepository[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Default ecosystem repos that `indexEcosystem()` indexes when the indexer is
|
|
42
|
+
* constructed without its own list of repositories.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ECOSYSTEM_REPOS: readonly IndexedRepository[];
|
|
38
45
|
/**
|
|
39
46
|
* Directories to skip when walking the repo tree.
|
|
40
47
|
* These are typically build artifacts, caches, or vendored dependencies.
|
|
@@ -58,9 +65,14 @@ export declare const DOC_PATTERN: RegExp;
|
|
|
58
65
|
*/
|
|
59
66
|
export declare class GitHubRepoIndexer {
|
|
60
67
|
private readonly service;
|
|
61
|
-
|
|
68
|
+
private readonly repositories;
|
|
69
|
+
/**
|
|
70
|
+
* @param service The GitHub service whose client reads the repositories.
|
|
71
|
+
* @param options The repositories to index; the six {@link ECOSYSTEM_REPOS} when absent.
|
|
72
|
+
*/
|
|
73
|
+
constructor(service: GitHubService, options?: GitHubRepoIndexerOptions);
|
|
62
74
|
/**
|
|
63
|
-
* Index
|
|
75
|
+
* Index the configured repositories in order (the six ecosystem repos by default).
|
|
64
76
|
* Errors on individual repos are caught so one failure doesn't abort the batch.
|
|
65
77
|
*
|
|
66
78
|
* @returns An IndexResult for every repo (failed repos have zero chunks).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubRepoIndexer.d.ts","sourceRoot":"","sources":["../src/GitHubRepoIndexer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GitHubRepoIndexer.d.ts","sourceRoot":"","sources":["../src/GitHubRepoIndexer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,wEAAwE;AACxE,MAA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AO,CAAC,WAAW,CAAC;IAwInF;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;CAoB3C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
/**
|
|
3
2
|
* @fileoverview Background codebase indexer that produces chunks from GitHub repos
|
|
4
3
|
* for RAG embedding. Walks repo trees, extracts documentation files, splits them
|
|
@@ -9,8 +8,8 @@
|
|
|
9
8
|
/* Constants */
|
|
10
9
|
/* ------------------------------------------------------------------ */
|
|
11
10
|
/**
|
|
12
|
-
* Default ecosystem repos
|
|
13
|
-
* without
|
|
11
|
+
* Default ecosystem repos that `indexEcosystem()` indexes when the indexer is
|
|
12
|
+
* constructed without its own list of repositories.
|
|
14
13
|
*/
|
|
15
14
|
export const ECOSYSTEM_REPOS = [
|
|
16
15
|
{ owner: 'framerslab', repo: 'agentos' },
|
|
@@ -64,21 +63,27 @@ const MAX_CHUNK_CHARS = 6_000;
|
|
|
64
63
|
*/
|
|
65
64
|
export class GitHubRepoIndexer {
|
|
66
65
|
service;
|
|
67
|
-
|
|
66
|
+
repositories;
|
|
67
|
+
/**
|
|
68
|
+
* @param service The GitHub service whose client reads the repositories.
|
|
69
|
+
* @param options The repositories to index; the six {@link ECOSYSTEM_REPOS} when absent.
|
|
70
|
+
*/
|
|
71
|
+
constructor(service, options = {}) {
|
|
68
72
|
this.service = service;
|
|
73
|
+
this.repositories = options.repositories ?? ECOSYSTEM_REPOS;
|
|
69
74
|
}
|
|
70
75
|
/* ---------------------------------------------------------------- */
|
|
71
76
|
/* Public API */
|
|
72
77
|
/* ---------------------------------------------------------------- */
|
|
73
78
|
/**
|
|
74
|
-
* Index
|
|
79
|
+
* Index the configured repositories in order (the six ecosystem repos by default).
|
|
75
80
|
* Errors on individual repos are caught so one failure doesn't abort the batch.
|
|
76
81
|
*
|
|
77
82
|
* @returns An IndexResult for every repo (failed repos have zero chunks).
|
|
78
83
|
*/
|
|
79
84
|
async indexEcosystem() {
|
|
80
85
|
const results = [];
|
|
81
|
-
for (const { owner, repo } of
|
|
86
|
+
for (const { owner, repo } of this.repositories) {
|
|
82
87
|
try {
|
|
83
88
|
const result = await this.indexRepo(owner, repo);
|
|
84
89
|
results.push(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubRepoIndexer.js","sourceRoot":"","sources":["../src/GitHubRepoIndexer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GitHubRepoIndexer.js","sourceRoot":"","sources":["../src/GitHubRepoIndexer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4CH,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC;IAC3D,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;IACxC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE;IACvC,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE;IAClD,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,sBAAsB,EAAE;IACjD,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,yBAAyB,EAAE;IACxD,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,oBAAoB,EAAE;CAC3C,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAwB,IAAI,GAAG,CAAC;IACpD,cAAc;IACd,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,UAAU;IACV,aAAa;IACb,QAAQ;CACT,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,+GAA+G,CAAC;AAElH,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,qDAAqD;AACrD,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,yEAAy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AAI,CAAC,GAAG,EAAE,GAAG,EAAE;SAC5B,CAAC;IACJ,CAAC;IAED,sEAAsE;IACtE,uEAAuE;IACvE,sEAAsE;IAEtE;;;;;;;OAOG;IACH,eAAe,CAAC,OAAe;QAC7B,MAAM,SAAS,GAAG,YAAY,CAAC;QAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,OAAO,GAAa,EAAE,CAAC;QAE3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBAClC,OAAO,GAAG,EAAE,CAAC;YACf,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The GitHub App half of the `./documents` entry, driven over a fetch stand-in that records each
|
|
3
|
+
* request: the app's JWT, installation tokens, the user's web flow, a user's installations and repositories, the
|
|
4
|
+
* webhook signature, the daily reconcile and the uninstall, and the REST calls under them.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=app.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/app.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|