clawfire 0.6.7 → 0.6.8
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.js +1 -1
- package/dist/{dev-server-5SXODXYN.js → dev-server-ESMIOA6C.js} +14 -1
- package/dist/dev.cjs +14 -1
- package/dist/dev.cjs.map +1 -1
- package/dist/dev.js +14 -1
- package/dist/dev.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -269,7 +269,7 @@ async function runDevServer() {
|
|
|
269
269
|
const port = portArg ? parseInt(portArg.split("=")[1], 10) : 3e3;
|
|
270
270
|
const apiPort = apiPortArg ? parseInt(apiPortArg.split("=")[1], 10) : 3456;
|
|
271
271
|
const noHotReload = args.includes("--no-hot-reload");
|
|
272
|
-
const { startDevServer } = await import("./dev-server-
|
|
272
|
+
const { startDevServer } = await import("./dev-server-ESMIOA6C.js");
|
|
273
273
|
await startDevServer({
|
|
274
274
|
projectDir,
|
|
275
275
|
port,
|
|
@@ -4417,9 +4417,22 @@ ${liveReloadScript}
|
|
|
4417
4417
|
(async () => {
|
|
4418
4418
|
try {
|
|
4419
4419
|
if (this.pageCompiler.isActive()) {
|
|
4420
|
+
const projectConfig = this.readProjectConfig();
|
|
4421
|
+
const firebaseConfig = {};
|
|
4422
|
+
for (const field of projectConfig.fields) {
|
|
4423
|
+
if (!field.isPlaceholder) {
|
|
4424
|
+
firebaseConfig[field.key] = field.value;
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
const configScript = Object.keys(firebaseConfig).length > 0 ? `
|
|
4428
|
+
<script>window.__CLAWFIRE_CONFIG__=${JSON.stringify(firebaseConfig)};</script>` : "";
|
|
4420
4429
|
const routerScript = generateProductionRouterScript();
|
|
4421
|
-
const
|
|
4430
|
+
const scriptToInject = configScript + routerScript;
|
|
4431
|
+
const buildResult = this.pageCompiler.buildForProduction(this.publicDir, scriptToInject);
|
|
4422
4432
|
console.log(` \x1B[32m\u2713\x1B[0m Built ${buildResult.pages.length} pages for production`);
|
|
4433
|
+
if (configScript) {
|
|
4434
|
+
console.log(` \x1B[32m\u2713\x1B[0m Firebase config injected (projectId: ${firebaseConfig.projectId || "?"})`);
|
|
4435
|
+
}
|
|
4423
4436
|
if (buildResult.errors.length > 0) {
|
|
4424
4437
|
for (const err of buildResult.errors) {
|
|
4425
4438
|
console.log(` \x1B[31m\u2717\x1B[0m ${err}`);
|
package/dist/dev.cjs
CHANGED
|
@@ -4829,9 +4829,22 @@ ${liveReloadScript}
|
|
|
4829
4829
|
(async () => {
|
|
4830
4830
|
try {
|
|
4831
4831
|
if (this.pageCompiler.isActive()) {
|
|
4832
|
+
const projectConfig = this.readProjectConfig();
|
|
4833
|
+
const firebaseConfig = {};
|
|
4834
|
+
for (const field of projectConfig.fields) {
|
|
4835
|
+
if (!field.isPlaceholder) {
|
|
4836
|
+
firebaseConfig[field.key] = field.value;
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
const configScript = Object.keys(firebaseConfig).length > 0 ? `
|
|
4840
|
+
<script>window.__CLAWFIRE_CONFIG__=${JSON.stringify(firebaseConfig)};</script>` : "";
|
|
4832
4841
|
const routerScript = generateProductionRouterScript();
|
|
4833
|
-
const
|
|
4842
|
+
const scriptToInject = configScript + routerScript;
|
|
4843
|
+
const buildResult = this.pageCompiler.buildForProduction(this.publicDir, scriptToInject);
|
|
4834
4844
|
console.log(` \x1B[32m\u2713\x1B[0m Built ${buildResult.pages.length} pages for production`);
|
|
4845
|
+
if (configScript) {
|
|
4846
|
+
console.log(` \x1B[32m\u2713\x1B[0m Firebase config injected (projectId: ${firebaseConfig.projectId || "?"})`);
|
|
4847
|
+
}
|
|
4835
4848
|
if (buildResult.errors.length > 0) {
|
|
4836
4849
|
for (const err of buildResult.errors) {
|
|
4837
4850
|
console.log(` \x1B[31m\u2717\x1B[0m ${err}`);
|