@base44-preview/cli 0.1.16-pr.626.b09d9ce → 0.1.16-pr.626.cb8fa0d
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 +15 -29
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -247316,19 +247316,9 @@ async function post(path, json, doing) {
|
|
|
247316
247316
|
throw await ApiError.fromHttpError(error, doing);
|
|
247317
247317
|
}
|
|
247318
247318
|
}
|
|
247319
|
-
|
|
247320
|
-
limit: 3,
|
|
247321
|
-
methods: ["patch"],
|
|
247322
|
-
statusCodes: [408, 500, 502, 503, 504],
|
|
247323
|
-
retryOnTimeout: true
|
|
247324
|
-
};
|
|
247325
|
-
async function patch(path, json, doing, retry) {
|
|
247319
|
+
async function patch(path, json, doing) {
|
|
247326
247320
|
try {
|
|
247327
|
-
return await getAppClient().patch(path, {
|
|
247328
|
-
json,
|
|
247329
|
-
timeout: 180000,
|
|
247330
|
-
...retry ? { retry } : {}
|
|
247331
|
-
});
|
|
247321
|
+
return await getAppClient().patch(path, { json, timeout: 180000 });
|
|
247332
247322
|
} catch (error) {
|
|
247333
247323
|
throw await ApiError.fromHttpError(error, doing);
|
|
247334
247324
|
}
|
|
@@ -247385,7 +247375,7 @@ async function setEnvironmentVersion(environment, versionId, options = {}) {
|
|
|
247385
247375
|
return parse10(EnvironmentResponseSchema, await (await patch(`environments/${encodeURIComponent(environment)}`, {
|
|
247386
247376
|
version_id: versionId,
|
|
247387
247377
|
...options.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}
|
|
247388
|
-
}, "setting the environment's version"
|
|
247378
|
+
}, "setting the environment's version")).json(), "environment");
|
|
247389
247379
|
}
|
|
247390
247380
|
|
|
247391
247381
|
// src/core/version/publish.ts
|
|
@@ -249842,20 +249832,18 @@ async function digestFile(absolutePath) {
|
|
|
249842
249832
|
}
|
|
249843
249833
|
async function collectBuildOutput(outputDir, options = {}) {
|
|
249844
249834
|
const found = await describeBuildOutput(outputDir);
|
|
249835
|
+
if (found.length === 0) {
|
|
249836
|
+
throw new InvalidInputError(`No files found in ${outputDir}. Build the site before creating a version.`, {
|
|
249837
|
+
hints: [
|
|
249838
|
+
{ message: "Run 'base44 build' first", command: "base44 build" }
|
|
249839
|
+
]
|
|
249840
|
+
});
|
|
249841
|
+
}
|
|
249845
249842
|
if (found.length > MAX_FILE_COUNT) {
|
|
249846
249843
|
throw new InvalidInputError(`Too many files: found ${found.length}, the limit is ${MAX_FILE_COUNT}.`);
|
|
249847
249844
|
}
|
|
249848
|
-
if (options.
|
|
249849
|
-
|
|
249850
|
-
throw new InvalidInputError(`No files found in ${outputDir}. Build the site before creating a version.`, {
|
|
249851
|
-
hints: [
|
|
249852
|
-
{ message: "Run 'base44 build' first", command: "base44 build" }
|
|
249853
|
-
]
|
|
249854
|
-
});
|
|
249855
|
-
}
|
|
249856
|
-
if (!found.some((f) => f.path === options.entryFile)) {
|
|
249857
|
-
throw new InvalidInputError(`${outputDir} has no ${options.entryFile}, so nothing could enter the site.`);
|
|
249858
|
-
}
|
|
249845
|
+
if (options.requireEntry !== false && !found.some((f) => f.path === ENTRY2)) {
|
|
249846
|
+
throw new InvalidInputError(`${outputDir} has no ${ENTRY2}, so nothing could enter the site.`);
|
|
249859
249847
|
}
|
|
249860
249848
|
return await pMap(found, async (file) => ({ ...file, digest: await digestFile(file.absolutePath) }), { concurrency: HASH_CONCURRENCY });
|
|
249861
249849
|
}
|
|
@@ -249879,7 +249867,7 @@ async function collectSiteWorker(projectRoot) {
|
|
|
249879
249867
|
digest: await digestFile(absolutePath),
|
|
249880
249868
|
type
|
|
249881
249869
|
}), { concurrency: HASH_CONCURRENCY }),
|
|
249882
|
-
assets: assetsDir ? await collectBuildOutput(assetsDir) : [],
|
|
249870
|
+
assets: assetsDir ? await collectBuildOutput(assetsDir, { requireEntry: false }) : [],
|
|
249883
249871
|
compatibilityDate: config.compatibilityDate,
|
|
249884
249872
|
compatibilityFlags: config.compatibilityFlags,
|
|
249885
249873
|
assetsConfig: config.assetsConfig
|
|
@@ -249911,9 +249899,7 @@ async function collectResources(configDir, dirs) {
|
|
|
249911
249899
|
async function collectArtifacts(target) {
|
|
249912
249900
|
const siteWorker = await collectSiteWorker(target.root);
|
|
249913
249901
|
return {
|
|
249914
|
-
files: siteWorker ? [] : await collectBuildOutput(requireOutputDir(target),
|
|
249915
|
-
entryFile: ENTRY2
|
|
249916
|
-
}),
|
|
249902
|
+
files: siteWorker ? [] : await collectBuildOutput(requireOutputDir(target)),
|
|
249917
249903
|
...siteWorker ? { siteWorker } : {},
|
|
249918
249904
|
...await collectResources(target.configDir, target)
|
|
249919
249905
|
};
|
|
@@ -260406,4 +260392,4 @@ export {
|
|
|
260406
260392
|
runCLI
|
|
260407
260393
|
};
|
|
260408
260394
|
|
|
260409
|
-
//# debugId=
|
|
260395
|
+
//# debugId=45EEED102FF0084464756E2164756E21
|