@blinkk/root 3.2.2 → 3.4.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/dist/build-worker.js +2 -2
- package/dist/{chunk-KW7KTYGC.js → chunk-6QWKKJOB.js} +40 -9
- package/dist/chunk-6QWKKJOB.js.map +7 -0
- package/dist/{chunk-45M5ANS7.js → chunk-BZOYNXPF.js} +9 -2
- package/dist/{chunk-45M5ANS7.js.map → chunk-BZOYNXPF.js.map} +2 -2
- package/dist/{chunk-M3E4RKS7.js → chunk-DLPHCMFV.js} +43 -5
- package/dist/chunk-DLPHCMFV.js.map +7 -0
- package/dist/{chunk-YU22SAIG.js → chunk-QJ4F45DC.js} +2 -2
- package/dist/{chunk-WGQNQPWG.js → chunk-WRZLI2L2.js} +25 -12
- package/dist/chunk-WRZLI2L2.js.map +7 -0
- package/dist/{chunk-KHO3HMX6.js → chunk-Y4H75NIO.js} +8 -5
- package/dist/chunk-Y4H75NIO.js.map +7 -0
- package/dist/cli.js +4 -4
- package/dist/core/config.d.ts +16 -0
- package/dist/core/core.d.ts +1 -0
- package/dist/core/hooks/useAssetMap.d.ts +22 -0
- package/dist/core.js +7 -1
- package/dist/core.js.map +2 -2
- package/dist/functions/server.d.ts +1 -1
- package/dist/functions.js +4 -4
- package/dist/jsx.js +1 -1
- package/dist/node.js +2 -2
- package/dist/render/asset-map/asset-map.d.ts +8 -1
- package/dist/render/asset-map/build-asset-map.d.ts +8 -1
- package/dist/render/asset-map/dev-asset-map.d.ts +7 -1
- package/dist/render/render.d.ts +3 -1
- package/dist/render.js +22 -6
- package/dist/render.js.map +2 -2
- package/package.json +31 -32
- package/dist/chunk-KHO3HMX6.js.map +0 -7
- package/dist/chunk-KW7KTYGC.js.map +0 -7
- package/dist/chunk-M3E4RKS7.js.map +0 -7
- package/dist/chunk-WGQNQPWG.js.map +0 -7
- /package/dist/{chunk-YU22SAIG.js.map → chunk-QJ4F45DC.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createViteServer,
|
|
4
4
|
preactToRootJsxPlugin,
|
|
5
5
|
rootPodsVitePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QJ4F45DC.js";
|
|
7
7
|
import {
|
|
8
8
|
RouteTrie
|
|
9
9
|
} from "./chunk-I3RCAIW7.js";
|
|
@@ -13,13 +13,12 @@ import {
|
|
|
13
13
|
buildPage,
|
|
14
14
|
getElements,
|
|
15
15
|
getElementsDirs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DLPHCMFV.js";
|
|
17
17
|
import {
|
|
18
18
|
bundleRootConfig,
|
|
19
19
|
copyDir,
|
|
20
20
|
copyGlob,
|
|
21
21
|
dirExists,
|
|
22
|
-
directoryContains,
|
|
23
22
|
fileExists,
|
|
24
23
|
flattenPackageDepsFromMonorepo,
|
|
25
24
|
isDirectory,
|
|
@@ -32,7 +31,7 @@ import {
|
|
|
32
31
|
rmDir,
|
|
33
32
|
writeFile,
|
|
34
33
|
writeJson
|
|
35
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Y4H75NIO.js";
|
|
36
35
|
import {
|
|
37
36
|
configureServerPlugins,
|
|
38
37
|
getVitePlugins
|
|
@@ -1423,7 +1422,7 @@ var DevServerAssetMap = class {
|
|
|
1423
1422
|
this.rootConfig = rootConfig;
|
|
1424
1423
|
this.moduleGraph = moduleGraph;
|
|
1425
1424
|
}
|
|
1426
|
-
|
|
1425
|
+
get(src) {
|
|
1427
1426
|
const file = path5.resolve(this.rootConfig.rootDir, src);
|
|
1428
1427
|
const viteModules = this.moduleGraph.getModulesByFile(file);
|
|
1429
1428
|
if (viteModules && viteModules.size > 0) {
|
|
@@ -1433,23 +1432,25 @@ var DevServerAssetMap = class {
|
|
|
1433
1432
|
viteModule
|
|
1434
1433
|
});
|
|
1435
1434
|
}
|
|
1436
|
-
if (
|
|
1435
|
+
if (directoryContains(this.rootConfig.rootDir, file)) {
|
|
1437
1436
|
const assetUrl = file.slice(this.rootConfig.rootDir.length);
|
|
1438
1437
|
return {
|
|
1439
1438
|
src,
|
|
1440
1439
|
assetUrl,
|
|
1441
1440
|
getCssDeps: async () => [],
|
|
1442
|
-
getJsDeps: async () => [assetUrl]
|
|
1441
|
+
getJsDeps: async () => [assetUrl],
|
|
1442
|
+
getModulePreloadDeps: async () => []
|
|
1443
1443
|
};
|
|
1444
1444
|
}
|
|
1445
1445
|
const workspaceRoot = searchForWorkspaceRoot(this.rootConfig.rootDir);
|
|
1446
|
-
if (
|
|
1446
|
+
if (directoryContains(workspaceRoot, file)) {
|
|
1447
1447
|
const assetUrl = `/@fs/${file}`;
|
|
1448
1448
|
return {
|
|
1449
1449
|
src,
|
|
1450
1450
|
assetUrl,
|
|
1451
1451
|
getCssDeps: async () => [],
|
|
1452
|
-
getJsDeps: async () => [assetUrl]
|
|
1452
|
+
getJsDeps: async () => [assetUrl],
|
|
1453
|
+
getModulePreloadDeps: async () => []
|
|
1453
1454
|
};
|
|
1454
1455
|
}
|
|
1455
1456
|
console.log(`could not find asset in asset map: ${src}`);
|
|
@@ -1459,6 +1460,10 @@ var DevServerAssetMap = class {
|
|
|
1459
1460
|
return path5.relative(this.rootConfig.rootDir, file);
|
|
1460
1461
|
}
|
|
1461
1462
|
};
|
|
1463
|
+
function directoryContains(dir, file) {
|
|
1464
|
+
const relativePath = path5.relative(dir, file);
|
|
1465
|
+
return relativePath !== ".." && !relativePath.startsWith(`..${path5.sep}`);
|
|
1466
|
+
}
|
|
1462
1467
|
var DevServerAsset = class _DevServerAsset {
|
|
1463
1468
|
src;
|
|
1464
1469
|
moduleId;
|
|
@@ -1484,6 +1489,14 @@ var DevServerAsset = class _DevServerAsset {
|
|
|
1484
1489
|
this.collectJs(this, deps, visited);
|
|
1485
1490
|
return Array.from(deps);
|
|
1486
1491
|
}
|
|
1492
|
+
/**
|
|
1493
|
+
* The dev server serves modules unbundled and unhashed, so there are no
|
|
1494
|
+
* shared chunks to preload. Returning an empty list keeps
|
|
1495
|
+
* `<link rel="modulepreload">` tags out of the dev server's HTML.
|
|
1496
|
+
*/
|
|
1497
|
+
async getModulePreloadDeps() {
|
|
1498
|
+
return [];
|
|
1499
|
+
}
|
|
1487
1500
|
getImportedModules() {
|
|
1488
1501
|
return this.viteModule.importedModules;
|
|
1489
1502
|
}
|
|
@@ -3213,7 +3226,7 @@ function debounce(fn, timeout) {
|
|
|
3213
3226
|
// src/cli/gae-deploy.ts
|
|
3214
3227
|
import { execSync } from "node:child_process";
|
|
3215
3228
|
import fs7 from "node:fs";
|
|
3216
|
-
import
|
|
3229
|
+
import { load as loadYaml } from "js-yaml";
|
|
3217
3230
|
async function gaeDeploy(appDir, options) {
|
|
3218
3231
|
if (!appDir) {
|
|
3219
3232
|
throw new Error(
|
|
@@ -3229,7 +3242,7 @@ async function gaeDeploy(appDir, options) {
|
|
|
3229
3242
|
if (!fs7.existsSync(appYamlPath)) {
|
|
3230
3243
|
throw new Error(`[gae-deplopy] Missing: ${appYamlPath}`);
|
|
3231
3244
|
}
|
|
3232
|
-
const appYaml =
|
|
3245
|
+
const appYaml = loadYaml(fs7.readFileSync(appYamlPath, "utf8"));
|
|
3233
3246
|
const service = appYaml.service;
|
|
3234
3247
|
if (!service) {
|
|
3235
3248
|
throw new Error(
|
|
@@ -3775,4 +3788,4 @@ export {
|
|
|
3775
3788
|
createProdServer,
|
|
3776
3789
|
CliRunner
|
|
3777
3790
|
};
|
|
3778
|
-
//# sourceMappingURL=chunk-
|
|
3791
|
+
//# sourceMappingURL=chunk-WRZLI2L2.js.map
|