Repository navigation
Expand file tree
/
Copy pathknip.jsonc
More file actions
159 lines (159 loc) · 7.79 KB
/
Copy pathknip.jsonc
File metadata and controls
159 lines (159 loc) · 7.79 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{
"$schema": "https://unpkg.com/knip@6/schema.json",
// Plain `knip` reports reachability and dependency ownership. check:unused-exports runs
// knip with this config, gates these at zero, and ratchets unused exports, types, and
// duplicates in the same 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",
// Oracle's client spawns this standalone Node worker by filename.
"lib/internal/oracledb/oracle-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",
"lib/mothership/generated/computer-use.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"],
// Client aliases consumed only by the stacked Project file PR #9034. Remove each entry once
// its consumer merges.
"lib/api/contracts/projects.ts": ["types"],
"lib/api/contracts/project-files.ts": ["types"],
"lib/api/contracts/project-file-folders.ts": ["types"],
"lib/api/contracts/project-file-lifecycle.ts": ["types"],
"sandboxes/index.ts": ["files"],
"lib/api/contracts/file-copy.ts": ["exports", "types"],
"lib/api/contracts/file-copy-input.ts": ["exports", "types"],
// API contract conventions require named boundary schemas and wire aliases before client adoption.
"lib/api/contracts/project-file-downloads.ts": ["exports", "types"],
"lib/api/contracts/project-file-shares.ts": ["exports", "types"],
"lib/api/contracts/v2/project-file-shares.ts": ["exports", "types"],
"lib/api/contracts/project-file-extraction.ts": ["exports", "types"],
"lib/api/contracts/v2/project-file-downloads.ts": ["exports", "types"],
"lib/api/contracts/v2/project-file-extraction.ts": ["exports", "types"],
"lib/api/contracts/v2/project-file-search.ts": ["exports", "types"],
"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",
"@vitest/expect",
"@vitest/spy",
// 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",
// Integration mode discovers these suites and setup by filename.
"src/**/*.integration.ts",
"vitest.integration.setup.ts"
]
},
"apps/desktop": {
"includeEntryExports": false,
// scripts/build.ts and e2e/updater.spec.ts supply these to esbuild by path; the nested
// Playwright run in e2e/check-report.spec.ts loads worker-restart.ts through its config.
"entry": [
"src/main/index.ts",
"src/preload/*.ts",
"src/preload/browser/index.ts",
"src/renderer/*/index.tsx",
"scripts/*.ts",
"e2e/fixtures/updater.ts",
"e2e/fixtures/worker-restart.ts",
// The native permission test launches this Electron fixture by filename.
"native/computer-use/tests/electron-fixture/*.cjs"
],
// 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,
// scripts/generate-docs.ts copies this verbatim from apps/sim/components/icons.tsx, whose
// export surface is already ratcheted there; docs consumes only the icons it maps.
"ignoreIssues": { "components/icons.tsx": ["exports", "types", "duplicates"] }
},
"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"],
// Mirrored from Mothership; hand edits are overwritten by contracts:sync.
"src/computer-use.generated.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"] }
}
}