-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathknip.jsonc
More file actions
117 lines (117 loc) · 5.54 KB
/
Copy pathknip.jsonc
File metadata and controls
117 lines (117 loc) · 5.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
"$schema": "https://unpkg.com/knip@6/schema.json",
// Plain `knip` (check:dead-code) gates reachability and dependency ownership.
// Unused exports, types, and duplicates are ratcheted by check:unused-exports,
// which reuses this config in the same knip pass.
"include": ["files", "dependencies", "unlisted", "unresolved"],
// On by default: every workspace's `exports` map serves only this monorepo, so an entry export
// no workspace imports is dead. The workspaces below turn it off because their entries are
// public or standalone: the apps (framework entries such as Next routes and Trigger tasks), the
// published packages (cli, sim-cli, sim-setup, ts-sdk), db (standalone scripts), and the root
// (scripts). A new private package is checked without opting in.
"includeEntryExports": true,
"workspaces": {
".": {
"includeEntryExports": false,
"entry": ["scripts/**/*.{ts,tsx}", "vitest.shared.ts"],
"paths": { "@/*": ["./apps/sim/*"] },
// This alias selects the native tsc binary; see check-native-typecheck.ts.
"ignoreDependencies": ["@typescript/native"]
},
"apps/sim": {
"includeEntryExports": false,
"entry": [
// Container bootstrap and Trigger's directory-discovered task graph.
"bootstrap.ts",
"trigger.config.ts",
"background/**/*.ts",
"scripts/**/*.{ts,tsx}",
"**/*.integration.ts",
"vitest.integration.setup.ts",
// Spawned worker and assets bundled/loaded by filename.
"lib/execution/isolated-vm-worker.cjs",
"lib/execution/sandbox/bundles/*.{ts,cjs}",
// Compile-time fixture compatibility assertion, included by tsconfig.
"lib/table/fixture-contract.ts",
// scripts/generate-docs.ts imports this through pathToFileURL.
"app/(landing)/integrations/data/landing-content.ts",
// Mirrored from the sibling worker's contracts:sync, not app-owned.
"lib/mothership/generated/account.ts",
"lib/mothership/generated/local-files.ts"
],
// Required/discoverable barrels whose children have direct live imports.
// Ignore only the barrel file finding, so it cannot keep dead children alive.
"ignoreIssues": {
// Generated contracts mirror their source of truth; regenerating them must not
// trip the unused-export ratchet, and hand edits would be overwritten.
"lib/mothership/generated/**": ["exports", "types", "duplicates"],
"sandbox-tasks/index.ts": ["files"],
"components/mcp/index.ts": ["files"],
"triggers/quickbooks/index.ts": ["files"],
"lib/api/contracts/selectors/index.ts": ["files"],
"lib/api/contracts/tools/index.ts": ["files"],
"lib/api/contracts/tools/communication/index.ts": ["files"],
"lib/api/contracts/tools/databases/index.ts": ["files"],
"lib/api/contracts/tools/media/index.ts": ["files"],
"lib/api/contracts/v1/index.ts": ["files"],
"app/(landing)/components/shared/two-block-workflow-preview/index.ts": ["files"],
"app/(landing)/customers/components/customer-story-card/index.ts": ["files"],
"app/(landing)/customers/components/customer-story-media/index.ts": ["files"],
"app/(landing)/customers/components/customer-story-page/index.ts": ["files"]
},
"ignoreDependencies": [
// docker/app.Dockerfile invokes this binary to rebuild isolated-vm.
"node-gyp",
// Imported inside the generated source string in sandbox/bundles/build.ts.
"pptxgenjs",
// Next aliases this marker to its bundled server-only module.
"server-only",
// Knip's email CLI plugin infers this transitive preview implementation.
"@react-email/ui"
],
// Live test spawns this path with cwd=MSHIP_WORKER_ROOT (a sibling repo).
"ignoreUnresolved": ["tools/probes/src/controller-run-read.ts"]
},
"apps/realtime": { "includeEntryExports": false, "entry": ["src/bootstrap.ts"] },
"apps/desktop": {
"includeEntryExports": false,
// scripts/build.ts and e2e/updater.spec.ts supply these to esbuild by path.
"entry": [
"src/main/index.ts",
"src/preload/*.ts",
"src/preload/browser/index.ts",
"src/renderer/*/index.tsx",
"scripts/*.ts",
"e2e/fixtures/updater.ts"
],
// ensure-pty-prebuilds.ts assembles these package names for universal builds.
"ignoreDependencies": ["@lydell/node-pty-darwin-arm64", "@lydell/node-pty-darwin-x64"]
},
"apps/docs": { "includeEntryExports": false },
"apps/pii": { "includeEntryExports": false },
"packages/cli": { "includeEntryExports": false },
"packages/db": {
"includeEntryExports": false,
"entry": [
"scripts/*.ts",
"script-migrations/*.ts",
"**/*.integration.ts",
"vitest.integration.setup.ts"
]
},
// The contract audit reads this snapshot by filename.
// Generated, so its export surface is not ratcheted either.
"packages/desktop-bridge": {
"entry": ["contract-snapshot.ts"],
"ignoreIssues": { "contract-snapshot.ts": ["exports", "types", "duplicates"] }
},
"packages/sim-cli": {
"includeEntryExports": false,
"entry": ["src/index.ts", "src/runtime.ts", "scripts/*.ts"]
},
"packages/sim-setup": { "includeEntryExports": false },
"packages/ts-sdk": { "includeEntryExports": false, "entry": ["examples/*.ts"] },
// This shared config is consumed by apps that own the Next dependency.
"packages/tsconfig": { "ignoreUnresolved": ["next"] }
}
}