chore(graphify): add queryable backend source graph #34

Merged
mihir merged 1 commits from chore/graphify-integration into main 2026-10-04 00:22:09 +05:30
12 changed files with 99201 additions and 0 deletions
Showing only changes of commit 2cfa6cc98c - Show all commits

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ coverage/
src/generated/
*.log
.tmp/
graphify-out/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "tools/graphify"]
path = tools/graphify
url = https://github.com/Graphify-Labs/graphify.git

10
.graphifyignore Normal file
View File

@ -0,0 +1,10 @@
tools/
.archify/
.tmp/
graphify-out/
test/
prisma/migrations/
src/generated/
node_modules/
dist/
coverage/

View File

@ -6,3 +6,4 @@ node_modules
.tmp
.archify
tools
graphify-out

View File

@ -1,5 +1,7 @@
# Mani Candles backend
Explore the [Graphify code graph](docs/graphify.md) to trace source-level dependencies and open the interactive backend map.
Phase 1A provides the service foundation. Phase 1B adds staff account provisioning, authentication, sessions, recovery, configurable RBAC, and audit records. Phase 1C implements core commerce APIs.
## Setup

42
docs/graphify.md Normal file
View File

@ -0,0 +1,42 @@
# Graphify code graph
The [interactive graph](../graphify-out/graph.html) maps the backend's source symbols and relationships. Search for a class or file, select a node, and follow its connections. The [graph report](../graphify-out/GRAPH_REPORT.md) and [queryable graph](../graphify-out/graph.json) are committed alongside it. This snapshot was extracted from source commit `131aef79` on 2026-10-04. Regenerate it after meaningful source changes.
Graphify is pinned as a Git submodule at `tools/graphify` (commit `0b60d47e6cd9338c51143f39f35b6c45c8453385`, version `0.9.74`). Its repository includes Apache-2.0 and MIT license files. Initialize it after cloning:
```sh
git submodule update --init --depth 1 tools/graphify
```
On Windows, run the command through Git Bash if PowerShell's Git submodule wrapper cannot find its shell utilities:
```powershell
& "C:\Program Files\Git\bin\bash.exe" -lc "git submodule update --init --depth 1 tools/graphify"
```
Use Python 3.10 or newer and an isolated environment. From the backend root:
```sh
python -m venv .tmp/graphify-venv
# Activate the environment, then:
python -m pip install -e "tools/graphify[sql]"
python -m graphify extract . --code-only --max-workers 4
python -m graphify cluster-only . --no-label
python -m graphify explain PartnerPaymentWriteStore --graph graphify-out/graph.json
```
In PowerShell, you can run the virtual environment directly without activating it:
```powershell
python -m venv .tmp\graphify-venv
& .\.tmp\graphify-venv\Scripts\python.exe -m pip install -e "tools/graphify[sql]"
& .\.tmp\graphify-venv\Scripts\python.exe -m graphify extract . --code-only --max-workers 4
& .\.tmp\graphify-venv\Scripts\python.exe -m graphify cluster-only . --no-label
Invoke-Item graphify-out\graph.html
```
Open `graphify-out/graph.html` in a desktop browser. The page loads `vis-network` from a pinned CDN URL with a Subresource Integrity hash, so it needs network access for its viewer script. Graph data is embedded in the HTML; do not publish it outside the development team. The committed graph and report can be queried without regenerating, but local extraction is needed to reflect later code changes.
`.graphifyignore` excludes local tooling, tests, migrations, generated code, and caches. `--code-only` uses local AST parsing and does not send source to an LLM. The ignored `graphify-out` cache, analysis, and machine-specific root files stay local; only the graph, report, viewer, and portable manifest are tracked. No application runtime dependency, database migration, or API route is added.
This graph is an automatic source map, not a live service dashboard. It complements the manually curated Archify experiment on its separate branch and the running API's Swagger UI.

View File

@ -0,0 +1,408 @@
# Graph Report - backend (2026-10-04)
## Corpus Check
- cluster-only mode — file stats not available
## Summary
- 1832 nodes · 6368 edges · 81 communities (65 shown, 16 thin omitted)
- Extraction: 95% EXTRACTED · 5% INFERRED · 0% AMBIGUOUS · INFERRED: 293 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `131aef79`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
## Community Hubs (Navigation)
- Community 0
- Community 1
- Community 2
- Community 3
- Community 4
- Community 5
- Community 6
- Community 7
- Community 8
- Community 9
- Community 10
- Community 11
- Community 12
- Community 13
- Community 14
- Community 15
- Community 16
- Community 17
- Community 18
- Community 19
- Community 20
- Community 21
- Community 22
- Community 23
- Community 24
- Community 25
- Community 26
- Community 27
- Community 28
- Community 29
- Community 30
- Community 31
- Community 32
- Community 33
- Community 34
- Community 35
- Community 36
- Community 37
- Community 38
- Community 39
- Community 40
- Community 41
- Community 42
- Community 43
- Community 44
- Community 45
- Community 46
- Community 47
- Community 48
- Community 49
- Community 50
- Community 51
- Community 52
- Community 53
- Community 54
- Community 55
- Community 56
- Community 57
- Community 58
- Community 59
- Community 60
- Community 61
- Community 62
- Community 63
- Community 64
- Community 65
- Community 66
- Community 67
- Community 68
- Community 69
- Community 70
- Community 71
- Community 72
- Community 73
- Community 74
- Community 75
- Community 76
- Community 77
- Community 78
- Community 79
## God Nodes (most connected - your core abstractions)
1. `Principal` - 434 edges
2. `AppError` - 267 edges
3. `CurrentPrincipal` - 219 edges
4. `RequirePermission()` - 198 edges
5. `@nestjs/common` - 141 edges
6. `recordAudit()` - 134 edges
7. `DatabaseService` - 115 edges
8. `AccessStore` - 103 edges
9. `PageInput` - 55 edges
10. `SchemaPipe` - 51 edges
## Surprising Connections (you probably didn't know these)
- `assertReturn()` --calls--> `AppError` [EXTRACTED]
src/fulfillment/fulfillment.policy.ts → src/common/errors/app-error.ts
- `assertShipment()` --calls--> `AppError` [EXTRACTED]
src/fulfillment/fulfillment.policy.ts → src/common/errors/app-error.ts
- `captureDecision()` --calls--> `AppError` [EXTRACTED]
src/payments/payment.policy.ts → src/common/errors/app-error.ts
- `refundAmount()` --calls--> `AppError` [EXTRACTED]
src/payments/payment.policy.ts → src/common/errors/app-error.ts
- `RecoveryController` --references--> `Public()` [EXTRACTED]
src/identity/recovery.controller.ts → src/identity/access.decorator.ts
## Import Cycles
- None detected.
## Communities (81 total, 16 thin omitted)
### Community 0 - "Community 0"
Cohesion: 0.05
Nodes (27): PartnerOrderCancelStore, CancelPartnerOrderInput, cancelPartnerOrderSchema, CreatePartnerOrderInput, createPartnerOrderSchema, PartnerOrderQuery, partnerOrderQuerySchema, PartnerOrderStore (+19 more)
### Community 1 - "Community 1"
Cohesion: 0.07
Nodes (29): BomLine, calculateBatchCost(), Decimal, PackagingLine, quantity(), Rate, Usage, estimateLineCost() (+21 more)
### Community 2 - "Community 2"
Cohesion: 0.12
Nodes (17): latest, Db, Db, Db, requireSample(), sampleInclude, Snapshot, snapshotView (+9 more)
### Community 3 - "Community 3"
Cohesion: 0.11
Nodes (16): ensureDefault(), artworkInclude, artworkVersionSelect, Db, requireArtwork(), requireArtworkVersion(), isVerifiedBusinessAccount(), editableProduct() (+8 more)
### Community 4 - "Community 4"
Cohesion: 0.07
Nodes (10): catalogWhere(), CatalogQuery, ProductInput, VariantInput, ProductStore, ProductsController, StorefrontController, StorefrontStore (+2 more)
### Community 5 - "Community 5"
Cohesion: 0.09
Nodes (11): BomListQuery, CreateBomInput, createBomSchema, quantity, auditFor(), BomStore, permissionFor(), BomsController (+3 more)
### Community 6 - "Community 6"
Cohesion: 0.10
Nodes (16): BusinessController, businessStatus(), presentBusiness(), businessProfileSchema, BusinessQuery, businessQuerySchema, CreateBusinessInput, createBusinessSchema (+8 more)
### Community 7 - "Community 7"
Cohesion: 0.07
Nodes (15): CheckoutInput, checkoutSnapshot(), CheckoutStore, decimal(), discountFor(), minor(), OrderAdminController, OrderStore (+7 more)
### Community 8 - "Community 8"
Cohesion: 0.08
Nodes (4): BatchCostStore, DatabaseService, AccessStore, RoleStore
### Community 9 - "Community 9"
Cohesion: 0.20
Nodes (12): @nestjs/common, @nestjs/core, SchemaPipe, Argument, CurrentPrincipal, Public(), PUBLIC_ROUTE, REQUIRED_PERMISSION (+4 more)
### Community 10 - "Community 10"
Cohesion: 0.12
Nodes (15): orderStatus(), orderView(), holdOrderStock(), assertReplay(), commandHash(), enqueueEvent(), adjustedBalance(), Adjustment (+7 more)
### Community 11 - "Community 11"
Cohesion: 0.08
Nodes (11): MAX_ARTWORK_BYTES, ArtworkReviewStore, ArtworkDecisionInput, artworkDecisionSchema, ArtworkQuery, artworkQuerySchema, CreateArtworkInput, createArtworkSchema (+3 more)
### Community 12 - "Community 12"
Cohesion: 0.09
Nodes (18): profileSnapshot(), calculatePriceCheck(), PriceTerms, assertEligiblePriceVariants(), Db, requireBusinessAccount(), requirePriceList(), PriceListItemStore (+10 more)
### Community 13 - "Community 13"
Cohesion: 0.09
Nodes (13): BatchCostController, MaterialCostRatesController, PackagingCostController, ProductionCostController, CostingModule, CostHistoryQuery, costHistoryQuerySchema, CostQuery (+5 more)
### Community 14 - "Community 14"
Cohesion: 0.10
Nodes (24): zod, addressSchema, optionalText(), createPriceListSchema, priceCheckSchema, priceListItemSchema, priceListQuerySchema, groupSchema (+16 more)
### Community 15 - "Community 15"
Cohesion: 0.12
Nodes (10): ProcurementController, code, MaterialInput, materialSchema, ProcurementQuery, SupplierInput, SupplierMaterialInput, supplierMaterialSchema (+2 more)
### Community 16 - "Community 16"
Cohesion: 0.13
Nodes (11): BatchListQuery, CancelBatchInput, cancelBatchSchema, CompleteBatchInput, completeBatchSchema, CreateBatchInput, createBatchSchema, BatchStore (+3 more)
### Community 17 - "Community 17"
Cohesion: 0.08
Nodes (17): assignmentsSchema, createUserSchema, email, name, password, recoveryRequestSchema, recoveryResetSchema, RoleInput (+9 more)
### Community 18 - "Community 18"
Cohesion: 0.12
Nodes (21): ErrorCode, formatMaterialQuantity(), parseMaterialQuantity(), plannedMaterialQuantity(), requireAvailableMaterials(), stockPostingHash(), requestHash(), usageSelect (+13 more)
### Community 19 - "Community 19"
Cohesion: 0.12
Nodes (11): AddressesModule, AppModule, B2bModule, CatalogModule, CheckoutModule, DatabaseModule, HealthModule, IdentityModule (+3 more)
### Community 20 - "Community 20"
Cohesion: 0.12
Nodes (11): SampleActionStore, SampleDecisionInput, sampleDecisionSchema, SampleDispatchInput, sampleDispatchSchema, SampleQuery, sampleQuerySchema, SampleRequestInput (+3 more)
### Community 21 - "Community 21"
Cohesion: 0.13
Nodes (3): RequirePermission(), PageInput, StockController
### Community 22 - "Community 22"
Cohesion: 0.14
Nodes (18): helmet, @nestjs/platform-express, @nestjs/swagger, @nestjs/testing, reflect-metadata, supertest, ApiExceptionFilter, ERRORS (+10 more)
### Community 23 - "Community 23"
Cohesion: 0.08
Nodes (25): engines, node, name, packageManager, private, version, dotenv, @electric-sql/pglite (+17 more)
### Community 24 - "Community 24"
Cohesion: 0.13
Nodes (7): StorefrontGuard, AuditController, AuthRateGuard, AuthService, LoginInput, loginSchema, RateLimitService
### Community 25 - "Community 25"
Cohesion: 0.12
Nodes (9): amount, SupplierPaymentInput, SupplierPaymentReversalInput, supplierPaymentReversalSchema, supplierPaymentSchema, activePayments(), SupplierPaymentStore, InvoicePaymentsController (+1 more)
### Community 26 - "Community 26"
Cohesion: 0.12
Nodes (12): B2B_ARTWORK_ERRORS, B2B_CREDIT_ERRORS, B2B_ERRORS, B2B_ORDER_ERRORS, B2B_PAYMENT_ERRORS, B2B_PRICE_ERRORS, B2B_QUOTE_ERRORS, B2B_SAMPLE_ERRORS (+4 more)
### Community 27 - "Community 27"
Cohesion: 0.14
Nodes (6): DeliveryMessage, DeliveryPort, DeliveryService, DeliveryStore, DisabledDelivery, OperationsModule
### Community 28 - "Community 28"
Cohesion: 0.12
Nodes (5): RecoveryInput, RecoveryController, RecoveryMailer, RecoveryService, RecoveryStore
### Community 29 - "Community 29"
Cohesion: 0.14
Nodes (8): MaterialTransferController, MaterialTransferInput, MaterialTransferQuery, materialTransferSchema, MaterialTransferStore, present(), Transfer, transferView
### Community 30 - "Community 30"
Cohesion: 0.14
Nodes (8): QuoteResponseStore, IssueQuoteInput, issueQuoteSchema, QuoteQuery, quoteQuerySchema, QuoteResponseInput, quoteResponseSchema, QuotesController
### Community 31 - "Community 31"
Cohesion: 0.17
Nodes (9): CreditPoliciesController, CreditDecisionInput, creditDecisionSchema, CreditQuery, creditQuerySchema, ProposeCreditInput, proposeCreditSchema, SuspendCreditInput (+1 more)
### Community 32 - "Community 32"
Cohesion: 0.09
Nodes (22): scripts, admin:prepare-local, admin:seed-local, bootstrap:owner, build, check, db:deploy, db:generate (+14 more)
### Community 33 - "Community 33"
Cohesion: 0.11
Nodes (7): amount, common, CouponInput, couponSchema, couponStatusSchema, CouponStore, CouponsController
### Community 34 - "Community 34"
Cohesion: 0.14
Nodes (5): PurchaseOrderInput, PurchaseOrderQuery, PurchaseOrderStore, reference(), PurchaseOrdersController
### Community 35 - "Community 35"
Cohesion: 0.14
Nodes (4): SupplierDocumentStore, SupplierDocumentController, SupplierDocumentsController, SupplierDocumentVersionsController
### Community 37 - "Community 37"
Cohesion: 0.16
Nodes (6): MaterialStockController, MaterialStockQuery, receiptStockPostingSchema, itemView, MaterialStockStore, present()
### Community 38 - "Community 38"
Cohesion: 0.14
Nodes (6): MaterialAdjustmentController, MaterialAdjustmentInput, MaterialAdjustmentQuery, MaterialAdjustmentStore, present(), scaledDelta()
### Community 39 - "Community 39"
Cohesion: 0.13
Nodes (11): folder, hashes, manifest, names, root, stamps, commands, credentialFile (+3 more)
### Community 40 - "Community 40"
Cohesion: 0.15
Nodes (3): AddressInput, AddressStore, AddressesController
### Community 41 - "Community 41"
Cohesion: 0.18
Nodes (9): inspectArtwork(), TYPES, verifiedArtwork(), fileDigest(), inspectPdf(), UploadedDocument, verifiedContent(), documentView (+1 more)
### Community 42 - "Community 42"
Cohesion: 0.17
Nodes (6): creditInclude, Db, presentCreditPolicy(), requireCreditPolicy(), CreditReviewStore, CreditStore
### Community 43 - "Community 43"
Cohesion: 0.16
Nodes (3): CreateUserInput, UserStore, UsersController
### Community 44 - "Community 44"
Cohesion: 0.12
Nodes (17): devDependencies, @electric-sql/pglite, @electric-sql/pglite-socket, jest, @nestjs/testing, pg, prettier, prisma (+9 more)
### Community 45 - "Community 45"
Cohesion: 0.18
Nodes (3): CreatePriceListInput, PriceListQuery, PriceListsController
### Community 46 - "Community 46"
Cohesion: 0.16
Nodes (3): GroupInput, GroupStore, GroupsController
### Community 47 - "Community 47"
Cohesion: 0.15
Nodes (3): PricingController, PricingInput, PricingStore
### Community 49 - "Community 49"
Cohesion: 0.17
Nodes (3): ReservationInput, ReservationTransitionStore, ReservationsController
### Community 50 - "Community 50"
Cohesion: 0.12
Nodes (15): compilerOptions, emitDecoratorMetadata, esModuleInterop, experimentalDecorators, isolatedModules, module, moduleResolution, noUnusedLocals (+7 more)
### Community 51 - "Community 51"
Cohesion: 0.20
Nodes (3): Principal, OperationsController, OperationsStore
### Community 52 - "Community 52"
Cohesion: 0.18
Nodes (4): MaterialReceiptPostingController, MaterialReceiptPostingStore, present(), ReceiptStockPostingInput
### Community 53 - "Community 53"
Cohesion: 0.22
Nodes (3): GoodsReceiptStore, GoodsReceiptsController, ReceiptInspectionController
### Community 54 - "Community 54"
Cohesion: 0.15
Nodes (13): dependencies, dotenv, helmet, @nestjs/common, @nestjs/core, @nestjs/platform-express, @nestjs/swagger, nodemailer (+5 more)
### Community 55 - "Community 55"
Cohesion: 0.22
Nodes (6): InspectionInput, inspectionSchema, quantity, ReceiptInput, receiptSchema, quantity()
### Community 56 - "Community 56"
Cohesion: 0.27
Nodes (5): MAX_DOCUMENT_BYTES, DocumentDecisionInput, documentDecisionSchema, SupplierDocumentInput, supplierDocumentSchema
### Community 58 - "Community 58"
Cohesion: 0.18
Nodes (3): PackagingStockPostingController, PackagingStockPostingStore, present()
### Community 61 - "Community 61"
Cohesion: 0.18
Nodes (7): CapturedPayment, GatewayPort, PaymentRequest, RefundRequest, captureDecision(), ExpectedPayment, refundAmount()
### Community 63 - "Community 63"
Cohesion: 0.25
Nodes (3): BootstrapService, derive(), PasswordService
### Community 67 - "Community 67"
Cohesion: 0.46
Nodes (4): nodemailer, ENVIRONMENT, hashToken(), issueToken()
### Community 70 - "Community 70"
Cohesion: 0.29
Nodes (6): ./tsconfig.json, compilerOptions, rootDir, exclude, extends, include
### Community 72 - "Community 72"
Cohesion: 0.38
Nodes (4): BomKind, bomView, isPackagingMaterial(), PACKAGING_MATERIAL_KINDS
### Community 73 - "Community 73"
Cohesion: 0.33
Nodes (4): assertReturn(), assertShipment(), rank, TrackingStatus
### Community 75 - "Community 75"
Cohesion: 0.40
Nodes (4): cartLineSchema, cartVersionSchema, checkoutSchema, couponCode
### Community 76 - "Community 76"
Cohesion: 0.70
Nodes (3): MaterialUsageInput, MaterialUsageQuery, materialUsageSchema
### Community 77 - "Community 77"
Cohesion: 0.60
Nodes (3): PackagingRunInput, packagingRunSchema, quantity
## Knowledge Gaps
- **175 isolated node(s):** `Db`, `BomLine`, `Decimal`, `PackagingLine`, `Rate` (+170 more)
These have ≤1 connection - possible missing edges. (Counts symbols only; 457 node(s) total have ≤1 connection when file, concept and rationale nodes are included.)
- **16 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `Principal` connect `Community 51` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 24`, `Community 25`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 43`, `Community 45`, `Community 46`, `Community 47`, `Community 48`, `Community 49`, `Community 52`, `Community 53`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 62`, `Community 65`, `Community 66`, `Community 68`, `Community 69`, `Community 72`, `Community 74`, `Community 76`, `Community 77`?**
_High betweenness centrality (0.314) - this node is a cross-community bridge._
- **Why does `@nestjs/common` connect `Community 9` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 22`, `Community 23`, `Community 24`, `Community 27`, `Community 29`, `Community 30`, `Community 31`, `Community 37`, `Community 41`, `Community 42`, `Community 53`, `Community 56`, `Community 63`, `Community 67`, `Community 72`, `Community 76`, `Community 77`?**
_High betweenness centrality (0.145) - this node is a cross-community bridge._
- **Why does `AppError` connect `Community 3` to `Community 0`, `Community 1`, `Community 2`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 21`, `Community 24`, `Community 25`, `Community 27`, `Community 28`, `Community 29`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 46`, `Community 48`, `Community 52`, `Community 53`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 67`, `Community 68`, `Community 69`, `Community 72`, `Community 73`, `Community 74`?**
_High betweenness centrality (0.112) - this node is a cross-community bridge._
- **What connects `Db`, `BomLine`, `Decimal` to the rest of the system?**
_175 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
_Cohesion score 0.05485232067510549 - nodes in this community are weakly interconnected._
- **Should `Community 1` be split into smaller, more focused modules?**
_Cohesion score 0.07197763801537387 - nodes in this community are weakly interconnected._
- **Should `Community 2` be split into smaller, more focused modules?**
_Cohesion score 0.11901306240928883 - nodes in this community are weakly interconnected._

360
graphify-out/graph.html Normal file

File diff suppressed because one or more lines are too long

96840
graphify-out/graph.json Normal file

File diff suppressed because it is too large Load Diff

1502
graphify-out/manifest.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
type GraphNode = { source_file?: string };
const output = join(process.cwd(), 'graphify-out');
describe('committed Graphify snapshot', () => {
it('contains backend code without machine-local or excluded source paths', () => {
const graph = JSON.parse(
readFileSync(join(output, 'graph.json'), 'utf8'),
) as {
nodes: GraphNode[];
};
const sources = graph.nodes
.map((node) => node.source_file)
.filter(Boolean) as string[];
expect(sources).toContain('src/b2b/partner-payment-write.store.ts');
for (const source of sources) {
expect(source).not.toMatch(/^(?:[A-Za-z]:|\/|\.\.)/);
expect(source).not.toMatch(
/(?:^|\/)(?:tools|test|node_modules|dist|coverage|\.tmp|\.archify|graphify-out)(?:\/|$)/,
);
}
});
it('pins the interactive viewer dependency with an integrity hash', () => {
const html = readFileSync(join(output, 'graph.html'), 'utf8');
expect(html).toContain('vis-network@9.1.6');
expect(html).toMatch(/integrity="sha384-[A-Za-z0-9+/=]+"/);
});
});

1
tools/graphify Submodule

@ -0,0 +1 @@
Subproject commit 0b60d47e6cd9338c51143f39f35b6c45c8453385