@base44-preview/cli 0.1.14-pr.619.5a268b0 → 0.1.14-pr.620.72ead3e
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/cli/index.js +6 -40
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -239710,8 +239710,9 @@ async function pMap(iterable, mapper, {
|
|
|
239710
239710
|
var pMapSkip = Symbol("skip");
|
|
239711
239711
|
|
|
239712
239712
|
// src/core/site/upload.ts
|
|
239713
|
-
var DEFAULT_UPLOAD_CONCURRENCY =
|
|
239713
|
+
var DEFAULT_UPLOAD_CONCURRENCY = 8;
|
|
239714
239714
|
var MAX_UPLOAD_CONCURRENCY = 50;
|
|
239715
|
+
var MAX_BUCKET_CONCURRENCY = 3;
|
|
239715
239716
|
var MAX_UPLOAD_ATTEMPTS = 3;
|
|
239716
239717
|
var RETRY_BASE_DELAY_MS = 500;
|
|
239717
239718
|
var UPLOAD_RETRY = {
|
|
@@ -239743,6 +239744,7 @@ function countOwedAssets(assetUploads) {
|
|
|
239743
239744
|
}
|
|
239744
239745
|
async function uploadAssetBuckets(target, filesByHash, options = {}) {
|
|
239745
239746
|
const { concurrency = DEFAULT_UPLOAD_CONCURRENCY, onProgress } = options;
|
|
239747
|
+
const bucketConcurrency = Math.min(concurrency, MAX_BUCKET_CONCURRENCY);
|
|
239746
239748
|
const { buckets } = target;
|
|
239747
239749
|
const totalFiles = buckets.reduce((sum, bucket) => sum + bucket.length, 0);
|
|
239748
239750
|
let uploadedFiles = 0;
|
|
@@ -239754,7 +239756,7 @@ async function uploadAssetBuckets(target, filesByHash, options = {}) {
|
|
|
239754
239756
|
}
|
|
239755
239757
|
uploadedFiles += bucket.length;
|
|
239756
239758
|
onProgress?.({ uploadedFiles, totalFiles });
|
|
239757
|
-
}, { concurrency });
|
|
239759
|
+
}, { concurrency: bucketConcurrency });
|
|
239758
239760
|
if (!completionJwt) {
|
|
239759
239761
|
throw new ApiError("Asset upload finished but the server did not return a completion token.");
|
|
239760
239762
|
}
|
|
@@ -239945,46 +239947,10 @@ async function resolveWorkerBuild(projectRoot, progress) {
|
|
|
239945
239947
|
}
|
|
239946
239948
|
async function readIndexHtml(assetsDir, assets) {
|
|
239947
239949
|
if (!assetsDir || !assets.manifest["/index.html"]) {
|
|
239948
|
-
throw
|
|
239950
|
+
throw new InvalidInputError(`No index.html found in "${assetsDir ?? "the site output directory"}" — a static site needs one at the output directory root.`);
|
|
239949
239951
|
}
|
|
239950
239952
|
return new Uint8Array(await readFile3(join17(assetsDir, "index.html")));
|
|
239951
239953
|
}
|
|
239952
|
-
var BUILD_FIRST_HINT = {
|
|
239953
|
-
message: "Run 'base44 build' first (it injects your app id; a bare 'npm run build' does not)"
|
|
239954
|
-
};
|
|
239955
|
-
var REDIRECT_FILE_IN_COPY = ".wrangler/deploy/config.json";
|
|
239956
|
-
var NO_ARTIFACT_HINT = {
|
|
239957
|
-
message: `A build that emits ${REDIRECT_FILE_IN_COPY} deploys its server too; without one, only the files in the output directory are deployed.`
|
|
239958
|
-
};
|
|
239959
|
-
async function missingIndexHtmlError(assetsDir, assets) {
|
|
239960
|
-
if (!assetsDir) {
|
|
239961
|
-
return new InvalidInputError(`No site output to deploy: this build emitted no ${REDIRECT_FILE_IN_COPY}, and the project config sets no 'site.outputDirectory' to fall back to.`, {
|
|
239962
|
-
hints: [
|
|
239963
|
-
{
|
|
239964
|
-
message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
|
|
239965
|
-
}
|
|
239966
|
-
]
|
|
239967
|
-
});
|
|
239968
|
-
}
|
|
239969
|
-
if (!await pathExists(assetsDir)) {
|
|
239970
|
-
return new InvalidInputError(`Output directory does not exist: ${assetsDir}. Make sure to build your project first.`, { hints: [BUILD_FIRST_HINT] });
|
|
239971
|
-
}
|
|
239972
|
-
const paths = Object.keys(assets.manifest);
|
|
239973
|
-
if (paths.length === 0) {
|
|
239974
|
-
return new InvalidInputError(`No files found in output directory: ${assetsDir}. Make sure to build your project first.`, { hints: [BUILD_FIRST_HINT] });
|
|
239975
|
-
}
|
|
239976
|
-
const nested = paths.filter((path) => path.endsWith("/index.html")).sort();
|
|
239977
|
-
return new InvalidInputError(`No index.html at the root of "${assetsDir}" — the build emitted ${paths.length} ${paths.length === 1 ? "file" : "files"} there, none of them an entry point.`, {
|
|
239978
|
-
hints: [
|
|
239979
|
-
...nested.length > 0 ? [
|
|
239980
|
-
{
|
|
239981
|
-
message: `Found an index.html deeper in the output: ${nested.join(", ")} — point 'site.outputDirectory' at that directory, or have the build emit an entry point at the root.`
|
|
239982
|
-
}
|
|
239983
|
-
] : [],
|
|
239984
|
-
NO_ARTIFACT_HINT
|
|
239985
|
-
]
|
|
239986
|
-
});
|
|
239987
|
-
}
|
|
239988
239954
|
function buildAssetsConfig(assetsConfig, progress) {
|
|
239989
239955
|
if (!assetsConfig)
|
|
239990
239956
|
return null;
|
|
@@ -259525,4 +259491,4 @@ export {
|
|
|
259525
259491
|
runCLI
|
|
259526
259492
|
};
|
|
259527
259493
|
|
|
259528
|
-
//# debugId=
|
|
259494
|
+
//# debugId=DD305A799B6CCBD964756E2164756E21
|