@cloudflare/autoconfig 0.4.7 → 0.5.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/index.d.ts +2 -0
- package/dist/index.js +7 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -133,6 +133,8 @@ declare abstract class Framework {
|
|
|
133
133
|
readonly id: FrameworkInfo["id"];
|
|
134
134
|
readonly name: FrameworkInfo["name"];
|
|
135
135
|
readonly env?: Readonly<Record<string, string>>;
|
|
136
|
+
/** Whether this framework's build and development commands accept `--mode`. */
|
|
137
|
+
readonly supportsMode: boolean;
|
|
136
138
|
get frameworkVersion(): string;
|
|
137
139
|
constructor(frameworkInfo: Pick<FrameworkInfo, "id" | "name">);
|
|
138
140
|
isConfigured(_projectPath: string, { target: _target, }?: {
|
package/dist/index.js
CHANGED
|
@@ -43776,6 +43776,8 @@ var Framework = class {
|
|
|
43776
43776
|
}
|
|
43777
43777
|
id;
|
|
43778
43778
|
name;
|
|
43779
|
+
/** Whether this framework's build and development commands accept `--mode`. */
|
|
43780
|
+
supportsMode = false;
|
|
43779
43781
|
#frameworkVersion;
|
|
43780
43782
|
get frameworkVersion() {
|
|
43781
43783
|
assert3(
|
|
@@ -44057,6 +44059,7 @@ var Astro = class extends Framework {
|
|
|
44057
44059
|
static {
|
|
44058
44060
|
__name(this, "Astro");
|
|
44059
44061
|
}
|
|
44062
|
+
supportsMode = true;
|
|
44060
44063
|
async configure({
|
|
44061
44064
|
outputDir,
|
|
44062
44065
|
dryRun,
|
|
@@ -45443,6 +45446,7 @@ var Vite = class extends Framework {
|
|
|
45443
45446
|
static {
|
|
45444
45447
|
__name(this, "Vite");
|
|
45445
45448
|
}
|
|
45449
|
+
supportsMode = true;
|
|
45446
45450
|
env = {
|
|
45447
45451
|
CLOUDFLARE_VITE_FORCE_BUILD_OUTPUT: "true"
|
|
45448
45452
|
};
|
|
@@ -52199,7 +52203,9 @@ async function detectFramework(projectPath, context, {
|
|
|
52199
52203
|
context
|
|
52200
52204
|
);
|
|
52201
52205
|
if (maybeDetectedFramework && target === "cf") {
|
|
52202
|
-
const
|
|
52206
|
+
const frameworkId = maybeDetectedFramework.framework.id;
|
|
52207
|
+
const frameworkIsSupported = isKnownFramework(frameworkId) && isFrameworkSupported(frameworkId);
|
|
52208
|
+
const detectedFrameworkSettings = frameworkIsSupported ? project.frameworks.get(maybeDetectedFramework.baseDirectory ?? "")?.find(({ id }) => id === frameworkId) : void 0;
|
|
52203
52209
|
maybeDetectedFramework.devCommand = detectedFrameworkSettings?.dev?.command;
|
|
52204
52210
|
maybeDetectedFramework.buildCommand = detectedFrameworkSettings?.build?.command;
|
|
52205
52211
|
}
|