@bakery-framework/core 2.0.2 → 2.0.4
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/package.json
CHANGED
|
@@ -73,14 +73,22 @@ const PROJECT_DIR = fs.resolve(APP_DIR, '.cache/tsconfig')
|
|
|
73
73
|
* every `.tsx` page, which is server-rendered. `api` is its own project only
|
|
74
74
|
* because a glob cannot say "`src/**` except `api/`" in either direction.
|
|
75
75
|
*
|
|
76
|
-
* Naming an `exclude` drops TypeScript's default one, so `node_modules`
|
|
77
|
-
*
|
|
76
|
+
* Naming an `exclude` drops TypeScript's default one, so `node_modules` is
|
|
77
|
+
* named again, and so are both runtime directories, taken from their one
|
|
78
|
+
* writer (`Bakery.cacheDir`, `Bakery.dataDir`). Neither holds source and both
|
|
79
|
+
* hold `.ts` files: the cache holds compiled server modules, and the data
|
|
80
|
+
* directory holds the ORM's `schema.pre-migrate.*.ts` backups, each of which
|
|
81
|
+
* redeclares the schema registry. Claimed, three of those failed a real
|
|
82
|
+
* app's `tsc -b` with TS2717.
|
|
78
83
|
*
|
|
79
84
|
* Globs are app-relative here and rewritten to be relative to the generated
|
|
80
85
|
* file, which sits two levels down.
|
|
81
86
|
*/
|
|
82
87
|
export function coreProjects(): PluginTsProject[] {
|
|
83
88
|
const root = Bakery.config.root ?? 'src'
|
|
89
|
+
const runtime = [Bakery.cacheDir, Bakery.dataDir].map(dir =>
|
|
90
|
+
fs.relative(APP_DIR, dir).replace(/\\/g, '/'),
|
|
91
|
+
)
|
|
84
92
|
|
|
85
93
|
return [
|
|
86
94
|
{
|
|
@@ -95,7 +103,7 @@ export function coreProjects(): PluginTsProject[] {
|
|
|
95
103
|
jsxFragmentFactory: 'Fragment',
|
|
96
104
|
},
|
|
97
105
|
include: ['**/*.ts', '**/*.tsx'],
|
|
98
|
-
exclude: [`${root}/**/*.ts`, 'node_modules',
|
|
106
|
+
exclude: [`${root}/**/*.ts`, 'node_modules', ...runtime],
|
|
99
107
|
},
|
|
100
108
|
{
|
|
101
109
|
name: 'api',
|