2023-04-25 11:01:25 +00:00
|
|
|
import { LazyConfig } from 'lazyrepo'
|
|
|
|
|
2024-01-16 14:38:05 +00:00
|
|
|
const config = {
|
|
|
|
baseCacheConfig: {
|
|
|
|
include: [
|
|
|
|
'<rootDir>/package.json',
|
|
|
|
'<rootDir>/yarn.lock',
|
|
|
|
'<rootDir>/lazy.config.ts',
|
|
|
|
'<rootDir>/config/**/*',
|
|
|
|
'<rootDir>/scripts/**/*',
|
|
|
|
],
|
|
|
|
exclude: [
|
|
|
|
'<allWorkspaceDirs>/coverage/**/*',
|
|
|
|
'<allWorkspaceDirs>/dist*/**/*',
|
2024-01-28 14:19:19 +00:00
|
|
|
'<allWorkspaceDirs>/.next*/**/*',
|
2024-01-16 14:38:05 +00:00
|
|
|
'**/*.tsbuildinfo',
|
|
|
|
'<rootDir>/docs/gen/**/*',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
scripts: {
|
2023-04-25 11:01:25 +00:00
|
|
|
build: {
|
2023-05-12 15:41:40 +00:00
|
|
|
baseCommand: 'exit 0',
|
|
|
|
runsAfter: { prebuild: {}, 'refresh-assets': {} },
|
|
|
|
workspaceOverrides: {
|
2024-01-16 14:38:05 +00:00
|
|
|
'apps/vscode/*': { runsAfter: { 'refresh-assets': {} } },
|
|
|
|
'packages/*': {
|
2023-05-12 15:41:40 +00:00
|
|
|
runsAfter: { 'build-api': { in: 'self-only' }, prebuild: { in: 'self-only' } },
|
|
|
|
cache: {
|
|
|
|
inputs: ['api/**/*', 'src/**/*'],
|
|
|
|
},
|
|
|
|
},
|
2024-01-28 14:19:19 +00:00
|
|
|
'apps/docs': {
|
2024-04-24 15:58:26 +00:00
|
|
|
runsAfter: { 'build-api': { in: 'all-packages' } },
|
2024-01-28 14:19:19 +00:00
|
|
|
cache: {
|
|
|
|
inputs: [
|
|
|
|
'app/**/*',
|
|
|
|
'api/**/*',
|
|
|
|
'components/**/*',
|
|
|
|
'public/**/*',
|
|
|
|
'scrips/**/*',
|
|
|
|
'styles/**/*',
|
|
|
|
'types/**/*',
|
|
|
|
'utils/**/*',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2023-05-12 15:41:40 +00:00
|
|
|
},
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
dev: {
|
|
|
|
execution: 'independent',
|
2024-01-17 10:59:04 +00:00
|
|
|
runsAfter: { predev: {}, 'refresh-assets': {} },
|
2023-04-25 11:01:25 +00:00
|
|
|
cache: 'none',
|
2023-05-12 15:41:40 +00:00
|
|
|
workspaceOverrides: {
|
2024-01-16 14:38:05 +00:00
|
|
|
'apps/vscode/*': { runsAfter: { build: { in: 'self-only' } } },
|
2023-05-12 15:41:40 +00:00
|
|
|
},
|
2023-05-09 20:21:45 +00:00
|
|
|
},
|
2024-02-14 16:05:59 +00:00
|
|
|
'test-ci': {
|
2023-04-25 11:01:25 +00:00
|
|
|
baseCommand: 'yarn run -T jest',
|
|
|
|
runsAfter: { 'refresh-assets': {} },
|
2023-05-17 10:45:43 +00:00
|
|
|
cache: {
|
|
|
|
inputs: {
|
|
|
|
exclude: ['*.tsbuildinfo'],
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
2023-05-02 12:25:26 +00:00
|
|
|
'test-coverage': {
|
2023-04-25 11:01:25 +00:00
|
|
|
baseCommand: 'yarn run -T jest --coverage',
|
2023-05-12 15:41:40 +00:00
|
|
|
runsAfter: { 'refresh-assets': {} },
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
lint: {
|
|
|
|
execution: 'independent',
|
2023-05-02 12:25:26 +00:00
|
|
|
runsAfter: { 'build-types': {} },
|
2023-05-12 13:19:39 +00:00
|
|
|
cache: {
|
|
|
|
inputs: {
|
2023-05-17 10:45:43 +00:00
|
|
|
exclude: ['*.tsbuildinfo'],
|
2023-05-12 13:19:39 +00:00
|
|
|
},
|
|
|
|
},
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
'pack-tarball': {
|
|
|
|
parallel: false,
|
|
|
|
},
|
|
|
|
'refresh-assets': {
|
|
|
|
execution: 'top-level',
|
2024-01-16 14:38:05 +00:00
|
|
|
baseCommand: `tsx <rootDir>/scripts/refresh-assets.ts`,
|
2023-04-25 11:01:25 +00:00
|
|
|
cache: {
|
2024-02-29 18:02:22 +00:00
|
|
|
inputs: [
|
|
|
|
'package.json',
|
|
|
|
`<rootDir>/scripts/refresh-assets.ts`,
|
|
|
|
`<rootDir>/assets/**/*`,
|
|
|
|
`<rootDir>/packages/*/package.json`,
|
|
|
|
],
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
},
|
2023-05-02 12:25:26 +00:00
|
|
|
'build-types': {
|
2023-04-25 11:01:25 +00:00
|
|
|
execution: 'top-level',
|
2024-01-16 14:38:05 +00:00
|
|
|
baseCommand: `tsx <rootDir>/scripts/typecheck.ts`,
|
2023-04-25 11:01:25 +00:00
|
|
|
cache: {
|
|
|
|
inputs: {
|
2023-05-02 12:25:26 +00:00
|
|
|
include: ['<allWorkspaceDirs>/**/*.{ts,tsx}', '<allWorkspaceDirs>/tsconfig.json'],
|
|
|
|
exclude: ['<allWorkspaceDirs>/dist*/**/*', '<allWorkspaceDirs>/api/**/*'],
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
2023-05-02 12:25:26 +00:00
|
|
|
outputs: ['<allWorkspaceDirs>/*.tsbuildinfo', '<allWorkspaceDirs>/.tsbuild/**/*'],
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
runsAfter: {
|
|
|
|
'refresh-assets': {},
|
|
|
|
'maybe-clean-tsbuildinfo': {},
|
|
|
|
},
|
|
|
|
},
|
2023-05-02 12:25:26 +00:00
|
|
|
'build-api': {
|
2023-04-25 11:01:25 +00:00
|
|
|
execution: 'independent',
|
|
|
|
cache: {
|
|
|
|
inputs: ['.tsbuild/**/*.d.ts', 'tsconfig.json'],
|
2023-05-02 12:25:26 +00:00
|
|
|
outputs: ['api/**/*'],
|
|
|
|
},
|
|
|
|
runsAfter: {
|
|
|
|
'build-types': {
|
|
|
|
// Because build-types is top level, if usesOutput were set to true every
|
|
|
|
// build-api task would depend on all the .tsbuild files in the whole
|
|
|
|
// repo. So we set this to false and configure it to use only the
|
|
|
|
// local .tsbuild files
|
|
|
|
usesOutput: false,
|
|
|
|
},
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
},
|
2023-05-02 12:25:26 +00:00
|
|
|
'api-check': {
|
2023-04-25 11:01:25 +00:00
|
|
|
execution: 'top-level',
|
2024-01-16 14:38:05 +00:00
|
|
|
baseCommand: `tsx <rootDir>/scripts/api-check.ts`,
|
2023-05-02 12:25:26 +00:00
|
|
|
runsAfter: { 'build-api': {} },
|
2023-04-25 11:01:25 +00:00
|
|
|
cache: {
|
2024-01-16 14:38:05 +00:00
|
|
|
inputs: [`<rootDir>/packages/*/api/public.d.ts`],
|
2023-04-25 11:01:25 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} satisfies LazyConfig
|
|
|
|
|
|
|
|
export default config
|