@dtwo/schema 3.1.2 → 3.2.1
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/LICENSE +21 -21
- package/dist/index.d.ts +280 -38
- package/dist/index.mjs +44 -24
- package/package.json +12 -11
- package/schema/config.d.ts +27 -16
- package/schema/config.defaults.json +7 -5
- package/schema/config.md +27 -12
- package/schema/config.schema.json +72 -54
- package/README.md +0 -7
|
@@ -271,10 +271,10 @@
|
|
|
271
271
|
"title": "The builder to use for bundling the Kdu part of your application.",
|
|
272
272
|
"description": "",
|
|
273
273
|
"tags": [],
|
|
274
|
-
"tsType": "'
|
|
275
|
-
"markdownType": "'
|
|
274
|
+
"tsType": "'lahm' | 'webpack' | { bundle: (dtwo: typeof import('../src/types/dtwo').Dtwo) => Promise<void> }",
|
|
275
|
+
"markdownType": "'lahm' | 'webpack' | { bundle: (dtwo: SrcTypesDtwoDtwo) => Promise<void> }",
|
|
276
276
|
"id": "#builder",
|
|
277
|
-
"default": "@dtwo/
|
|
277
|
+
"default": "@dtwo/lahm-builder",
|
|
278
278
|
"type": "string"
|
|
279
279
|
},
|
|
280
280
|
"sourcemap": {
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
},
|
|
325
325
|
"analyze": {
|
|
326
326
|
"title": "Dtwo uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.",
|
|
327
|
-
"description": "Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for
|
|
327
|
+
"description": "Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for lahm](https://github.com/btd/rollup-plugin-visualizer#options).",
|
|
328
328
|
"tags": [
|
|
329
329
|
"@example\n```js\nanalyze: {\n analyzerMode: 'static'\n}\n```"
|
|
330
330
|
],
|
|
@@ -445,7 +445,7 @@
|
|
|
445
445
|
"type": "boolean"
|
|
446
446
|
},
|
|
447
447
|
"ssr": {
|
|
448
|
-
"title": "Whether to enable rendering of HTML - either dynamically (in server mode) or at generate time. If set to `false`
|
|
448
|
+
"title": "Whether to enable rendering of HTML - either dynamically (in server mode) or at generate time. If set to `false` generated pages will have no content.",
|
|
449
449
|
"description": "",
|
|
450
450
|
"tags": [],
|
|
451
451
|
"id": "#ssr",
|
|
@@ -747,12 +747,12 @@
|
|
|
747
747
|
"description": "",
|
|
748
748
|
"tags": [],
|
|
749
749
|
"id": "#devServer/host",
|
|
750
|
-
"default": "
|
|
750
|
+
"default": "",
|
|
751
751
|
"type": "string"
|
|
752
752
|
},
|
|
753
753
|
"url": {
|
|
754
|
-
"title": "Listening dev server
|
|
755
|
-
"description": "",
|
|
754
|
+
"title": "Listening dev server URL.",
|
|
755
|
+
"description": "This should not be set directly as it will always be overridden by the dev server with the full URL (for module and internal use).",
|
|
756
756
|
"tags": [],
|
|
757
757
|
"id": "#devServer/url",
|
|
758
758
|
"default": "http://localhost:3000",
|
|
@@ -762,7 +762,7 @@
|
|
|
762
762
|
"default": {
|
|
763
763
|
"https": false,
|
|
764
764
|
"port": 3000,
|
|
765
|
-
"host": "
|
|
765
|
+
"host": "",
|
|
766
766
|
"url": "http://localhost:3000"
|
|
767
767
|
},
|
|
768
768
|
"type": "object"
|
|
@@ -804,26 +804,35 @@
|
|
|
804
804
|
"default": true,
|
|
805
805
|
"type": "boolean"
|
|
806
806
|
},
|
|
807
|
-
"
|
|
808
|
-
"title": "
|
|
807
|
+
"emitRouteChunkError": {
|
|
808
|
+
"title": "Emit `app:chunkError` hook when there is an error loading lahm/webpack chunks.",
|
|
809
|
+
"description": "You can set this to `reload` to perform a hard reload of the new route when a chunk fails to load when navigating to a new route.",
|
|
810
|
+
"tags": [],
|
|
811
|
+
"tsType": "boolean | 'reload'",
|
|
812
|
+
"id": "#experimental/emitRouteChunkError",
|
|
813
|
+
"default": false,
|
|
814
|
+
"type": "boolean"
|
|
815
|
+
},
|
|
816
|
+
"lahmNode": {
|
|
817
|
+
"title": "Use lahm-node for on-demand server chunk loading",
|
|
809
818
|
"description": "",
|
|
810
819
|
"tags": [
|
|
811
|
-
"@deprecated use `
|
|
820
|
+
"@deprecated use `lahm.devBundler: 'lahm-node'`"
|
|
812
821
|
],
|
|
813
|
-
"id": "#experimental/
|
|
822
|
+
"id": "#experimental/lahmNode",
|
|
814
823
|
"default": true,
|
|
815
824
|
"type": "boolean"
|
|
816
825
|
},
|
|
817
|
-
"
|
|
826
|
+
"lahmServerDynamicImports": {
|
|
818
827
|
"title": "Split server bundle into multiple chunks and dynamically import them.",
|
|
819
828
|
"description": "",
|
|
820
829
|
"tags": [],
|
|
821
|
-
"id": "#experimental/
|
|
830
|
+
"id": "#experimental/lahmServerDynamicImports",
|
|
822
831
|
"default": true,
|
|
823
832
|
"type": "boolean"
|
|
824
833
|
},
|
|
825
834
|
"inlineSSRStyles": {
|
|
826
|
-
"title": "Inline styles when rendering HTML (currently
|
|
835
|
+
"title": "Inline styles when rendering HTML (currently lahm only).",
|
|
827
836
|
"description": "You can also pass a function that receives the path of a Kdu component and returns a boolean indicating whether to inline the styles for that component.",
|
|
828
837
|
"tags": [],
|
|
829
838
|
"tsType": "boolean | ((id?: string) => boolean)",
|
|
@@ -887,8 +896,9 @@
|
|
|
887
896
|
"reactivityTransform": false,
|
|
888
897
|
"externalKdu": true,
|
|
889
898
|
"treeshakeClientOnly": true,
|
|
890
|
-
"
|
|
891
|
-
"
|
|
899
|
+
"emitRouteChunkError": false,
|
|
900
|
+
"lahmNode": true,
|
|
901
|
+
"lahmServerDynamicImports": true,
|
|
892
902
|
"inlineSSRStyles": true,
|
|
893
903
|
"noScripts": false,
|
|
894
904
|
"payloadExtraction": false,
|
|
@@ -1279,42 +1289,42 @@
|
|
|
1279
1289
|
},
|
|
1280
1290
|
"type": "object"
|
|
1281
1291
|
},
|
|
1282
|
-
"
|
|
1283
|
-
"title": "Configuration that will be passed directly to
|
|
1284
|
-
"description": "See https://
|
|
1292
|
+
"lahm": {
|
|
1293
|
+
"title": "Configuration that will be passed directly to Lahm.",
|
|
1294
|
+
"description": "See https://lahmjs.web.app/config for more information. Please note that not all lahm options are supported in Dtwo.",
|
|
1285
1295
|
"tags": [],
|
|
1286
|
-
"tsType": "typeof import('../src/types/config').
|
|
1287
|
-
"markdownType": "
|
|
1288
|
-
"id": "#
|
|
1296
|
+
"tsType": "typeof import('../src/types/config').LahmConfig",
|
|
1297
|
+
"markdownType": "SrcTypesConfigLahmConfig",
|
|
1298
|
+
"id": "#lahm",
|
|
1289
1299
|
"properties": {
|
|
1290
1300
|
"root": {
|
|
1291
|
-
"id": "#
|
|
1301
|
+
"id": "#lahm/root",
|
|
1292
1302
|
"default": "/<rootDir>",
|
|
1293
1303
|
"type": "string"
|
|
1294
1304
|
},
|
|
1295
1305
|
"mode": {
|
|
1296
|
-
"id": "#
|
|
1306
|
+
"id": "#lahm/mode",
|
|
1297
1307
|
"default": "production",
|
|
1298
1308
|
"type": "string"
|
|
1299
1309
|
},
|
|
1300
1310
|
"logLevel": {
|
|
1301
|
-
"id": "#
|
|
1311
|
+
"id": "#lahm/logLevel",
|
|
1302
1312
|
"default": "info",
|
|
1303
1313
|
"type": "string"
|
|
1304
1314
|
},
|
|
1305
1315
|
"define": {
|
|
1306
|
-
"id": "#
|
|
1316
|
+
"id": "#lahm/define",
|
|
1307
1317
|
"default": {
|
|
1308
1318
|
"process.dev": false
|
|
1309
1319
|
},
|
|
1310
1320
|
"type": "object"
|
|
1311
1321
|
},
|
|
1312
1322
|
"resolve": {
|
|
1313
|
-
"id": "#
|
|
1323
|
+
"id": "#lahm/resolve",
|
|
1314
1324
|
"properties": {
|
|
1315
1325
|
"extensions": {
|
|
1316
1326
|
"type": "array",
|
|
1317
|
-
"id": "#
|
|
1327
|
+
"id": "#lahm/resolve/extensions",
|
|
1318
1328
|
"default": [
|
|
1319
1329
|
".mjs",
|
|
1320
1330
|
".js",
|
|
@@ -1343,23 +1353,23 @@
|
|
|
1343
1353
|
"type": "object"
|
|
1344
1354
|
},
|
|
1345
1355
|
"publicDir": {
|
|
1346
|
-
"id": "#
|
|
1356
|
+
"id": "#lahm/publicDir",
|
|
1347
1357
|
"default": "/<rootDir>/public",
|
|
1348
1358
|
"type": "string"
|
|
1349
1359
|
},
|
|
1350
1360
|
"kdu": {
|
|
1351
|
-
"id": "#
|
|
1361
|
+
"id": "#lahm/kdu",
|
|
1352
1362
|
"properties": {
|
|
1353
1363
|
"isProduction": {
|
|
1354
|
-
"id": "#
|
|
1364
|
+
"id": "#lahm/kdu/isProduction",
|
|
1355
1365
|
"default": true,
|
|
1356
1366
|
"type": "boolean"
|
|
1357
1367
|
},
|
|
1358
1368
|
"template": {
|
|
1359
|
-
"id": "#
|
|
1369
|
+
"id": "#lahm/kdu/template",
|
|
1360
1370
|
"properties": {
|
|
1361
1371
|
"compilerOptions": {
|
|
1362
|
-
"id": "#
|
|
1372
|
+
"id": "#lahm/kdu/template/compilerOptions",
|
|
1363
1373
|
"default": {},
|
|
1364
1374
|
"type": "object"
|
|
1365
1375
|
}
|
|
@@ -1378,11 +1388,16 @@
|
|
|
1378
1388
|
},
|
|
1379
1389
|
"type": "object"
|
|
1380
1390
|
},
|
|
1391
|
+
"kduJsx": {
|
|
1392
|
+
"id": "#lahm/kduJsx",
|
|
1393
|
+
"default": {},
|
|
1394
|
+
"type": "object"
|
|
1395
|
+
},
|
|
1381
1396
|
"optimizeDeps": {
|
|
1382
|
-
"id": "#
|
|
1397
|
+
"id": "#lahm/optimizeDeps",
|
|
1383
1398
|
"properties": {
|
|
1384
1399
|
"exclude": {
|
|
1385
|
-
"id": "#
|
|
1400
|
+
"id": "#lahm/optimizeDeps/exclude",
|
|
1386
1401
|
"default": [
|
|
1387
1402
|
"kdu-demi"
|
|
1388
1403
|
],
|
|
@@ -1400,21 +1415,21 @@
|
|
|
1400
1415
|
"type": "object"
|
|
1401
1416
|
},
|
|
1402
1417
|
"esbuild": {
|
|
1403
|
-
"id": "#
|
|
1418
|
+
"id": "#lahm/esbuild",
|
|
1404
1419
|
"properties": {
|
|
1405
1420
|
"jsxFactory": {
|
|
1406
1421
|
"type": "string",
|
|
1407
|
-
"id": "#
|
|
1422
|
+
"id": "#lahm/esbuild/jsxFactory",
|
|
1408
1423
|
"default": "h"
|
|
1409
1424
|
},
|
|
1410
1425
|
"jsxFragment": {
|
|
1411
1426
|
"type": "string",
|
|
1412
|
-
"id": "#
|
|
1427
|
+
"id": "#lahm/esbuild/jsxFragment",
|
|
1413
1428
|
"default": "Fragment"
|
|
1414
1429
|
},
|
|
1415
1430
|
"tsconfigRaw": {
|
|
1416
1431
|
"type": "string",
|
|
1417
|
-
"id": "#
|
|
1432
|
+
"id": "#lahm/esbuild/tsconfigRaw",
|
|
1418
1433
|
"default": "{}"
|
|
1419
1434
|
}
|
|
1420
1435
|
},
|
|
@@ -1427,20 +1442,20 @@
|
|
|
1427
1442
|
},
|
|
1428
1443
|
"clearScreen": {
|
|
1429
1444
|
"type": "boolean",
|
|
1430
|
-
"id": "#
|
|
1445
|
+
"id": "#lahm/clearScreen",
|
|
1431
1446
|
"default": false
|
|
1432
1447
|
},
|
|
1433
1448
|
"build": {
|
|
1434
|
-
"id": "#
|
|
1449
|
+
"id": "#lahm/build",
|
|
1435
1450
|
"properties": {
|
|
1436
1451
|
"assetsDir": {
|
|
1437
|
-
"id": "#
|
|
1452
|
+
"id": "#lahm/build/assetsDir",
|
|
1438
1453
|
"default": "_dtwo/",
|
|
1439
1454
|
"type": "string"
|
|
1440
1455
|
},
|
|
1441
1456
|
"emptyOutDir": {
|
|
1442
1457
|
"type": "boolean",
|
|
1443
|
-
"id": "#
|
|
1458
|
+
"id": "#lahm/build/emptyOutDir",
|
|
1444
1459
|
"default": false
|
|
1445
1460
|
}
|
|
1446
1461
|
},
|
|
@@ -1451,13 +1466,13 @@
|
|
|
1451
1466
|
"type": "object"
|
|
1452
1467
|
},
|
|
1453
1468
|
"server": {
|
|
1454
|
-
"id": "#
|
|
1469
|
+
"id": "#lahm/server",
|
|
1455
1470
|
"properties": {
|
|
1456
1471
|
"fs": {
|
|
1457
|
-
"id": "#
|
|
1472
|
+
"id": "#lahm/server/fs",
|
|
1458
1473
|
"properties": {
|
|
1459
1474
|
"allow": {
|
|
1460
|
-
"id": "#
|
|
1475
|
+
"id": "#lahm/server/fs/allow",
|
|
1461
1476
|
"default": [
|
|
1462
1477
|
"/<rootDir>/.dtwo",
|
|
1463
1478
|
"/<rootDir>",
|
|
@@ -1526,6 +1541,7 @@
|
|
|
1526
1541
|
"compilerOptions": {}
|
|
1527
1542
|
}
|
|
1528
1543
|
},
|
|
1544
|
+
"kduJsx": {},
|
|
1529
1545
|
"optimizeDeps": {
|
|
1530
1546
|
"exclude": [
|
|
1531
1547
|
"kdu-demi"
|
|
@@ -1561,7 +1577,7 @@
|
|
|
1561
1577
|
"properties": {
|
|
1562
1578
|
"analyze": {
|
|
1563
1579
|
"title": "Dtwo uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.",
|
|
1564
|
-
"description": "Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for
|
|
1580
|
+
"description": "Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for lahm](https://github.com/btd/rollup-plugin-visualizer#options).",
|
|
1565
1581
|
"tags": [
|
|
1566
1582
|
"@example\n```js\nanalyze: {\n analyzerMode: 'static'\n}\n```"
|
|
1567
1583
|
],
|
|
@@ -2343,7 +2359,7 @@
|
|
|
2343
2359
|
},
|
|
2344
2360
|
"plugins": [],
|
|
2345
2361
|
"css": [],
|
|
2346
|
-
"builder": "@dtwo/
|
|
2362
|
+
"builder": "@dtwo/lahm-builder",
|
|
2347
2363
|
"sourcemap": {
|
|
2348
2364
|
"server": true,
|
|
2349
2365
|
"client": false
|
|
@@ -2425,7 +2441,7 @@
|
|
|
2425
2441
|
"devServer": {
|
|
2426
2442
|
"https": false,
|
|
2427
2443
|
"port": 3000,
|
|
2428
|
-
"host": "
|
|
2444
|
+
"host": "",
|
|
2429
2445
|
"url": "http://localhost:3000"
|
|
2430
2446
|
},
|
|
2431
2447
|
"experimental": {
|
|
@@ -2433,8 +2449,9 @@
|
|
|
2433
2449
|
"reactivityTransform": false,
|
|
2434
2450
|
"externalKdu": true,
|
|
2435
2451
|
"treeshakeClientOnly": true,
|
|
2436
|
-
"
|
|
2437
|
-
"
|
|
2452
|
+
"emitRouteChunkError": false,
|
|
2453
|
+
"lahmNode": true,
|
|
2454
|
+
"lahmServerDynamicImports": true,
|
|
2438
2455
|
"inlineSSRStyles": true,
|
|
2439
2456
|
"noScripts": false,
|
|
2440
2457
|
"payloadExtraction": false,
|
|
@@ -2484,7 +2501,7 @@
|
|
|
2484
2501
|
"tsConfig": {},
|
|
2485
2502
|
"shim": true
|
|
2486
2503
|
},
|
|
2487
|
-
"
|
|
2504
|
+
"lahm": {
|
|
2488
2505
|
"base": "/",
|
|
2489
2506
|
"root": "/<rootDir>",
|
|
2490
2507
|
"mode": "production",
|
|
@@ -2510,6 +2527,7 @@
|
|
|
2510
2527
|
"compilerOptions": {}
|
|
2511
2528
|
}
|
|
2512
2529
|
},
|
|
2530
|
+
"kduJsx": {},
|
|
2513
2531
|
"optimizeDeps": {
|
|
2514
2532
|
"exclude": [
|
|
2515
2533
|
"kdu-demi"
|