sproutkit-code 1.2.0 → 1.2.2
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.js +31 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -80742,7 +80742,22 @@ export default defineConfig({ plugins: [react()] });`;
|
|
|
80742
80742
|
encoding: "utf-8"
|
|
80743
80743
|
};
|
|
80744
80744
|
onProgress("Deploying booking site\u2026");
|
|
80745
|
-
const res = await postVercelDeployment({
|
|
80745
|
+
const res = await postVercelDeployment({
|
|
80746
|
+
name: projectName,
|
|
80747
|
+
files,
|
|
80748
|
+
// REQUIRED for a new Vercel project — omitting it fails every first
|
|
80749
|
+
// deploy with "The `projectSettings` object is required for new
|
|
80750
|
+
// projects". Unlike the site builds this is NOT a Vite app: it's static
|
|
80751
|
+
// HTML plus serverless functions under api/, so declare no framework and
|
|
80752
|
+
// no build step rather than copying framework:"vite" from the others.
|
|
80753
|
+
projectSettings: {
|
|
80754
|
+
framework: null,
|
|
80755
|
+
buildCommand: null,
|
|
80756
|
+
installCommand: null,
|
|
80757
|
+
outputDirectory: null
|
|
80758
|
+
},
|
|
80759
|
+
target: "production"
|
|
80760
|
+
}, vercelToken, onProgress);
|
|
80746
80761
|
await axios_1.default.patch(`https://api.vercel.com/v9/projects/${res.data.name}`, { ssoProtection: null }, { headers: { Authorization: `Bearer ${vercelToken}` } }).catch(() => null);
|
|
80747
80762
|
const publicUrl = await stableProjectUrl({
|
|
80748
80763
|
projectName,
|
|
@@ -93679,12 +93694,19 @@ Interested?`;
|
|
|
93679
93694
|
}
|
|
93680
93695
|
case "prepare_outreach": {
|
|
93681
93696
|
const explicit = input.ids;
|
|
93682
|
-
const rows = explicit && explicit.length > 0 ? db2.all(`SELECT id, name, phone, email, address, city, site_url, lead_kind, booking_platform, booking_url FROM leads WHERE id IN (${explicit.map(() => "?").join(",")})`, explicit) : db2.all(
|
|
93683
|
-
|
|
93697
|
+
const rows = explicit && explicit.length > 0 ? db2.all(`SELECT id, name, phone, email, address, city, site_url, lead_kind, booking_platform, booking_url FROM leads WHERE id IN (${explicit.map(() => "?").join(",")})`, explicit) : db2.all(
|
|
93698
|
+
// Eligible = we have something to show them: either a demo site
|
|
93699
|
+
// we built (site_url) OR a booking page we built (booking_url).
|
|
93700
|
+
// Booking leads never get a site_url, so requiring it silently
|
|
93701
|
+
// excluded every one-shot booking customer.
|
|
93702
|
+
"SELECT id, name, phone, email, address, city, site_url, lead_kind, booking_platform, booking_url FROM leads WHERE status IN ('site_built','discovered') AND ((site_url IS NOT NULL AND site_url != '') OR (booking_url IS NOT NULL AND booking_url != '')) ORDER BY score DESC NULLS LAST, id DESC",
|
|
93703
|
+
[]
|
|
93704
|
+
);
|
|
93705
|
+
const eligible = rows.filter((r) => r.site_url || r.booking_url);
|
|
93684
93706
|
if (eligible.length === 0) {
|
|
93685
93707
|
return {
|
|
93686
93708
|
ok: false,
|
|
93687
|
-
error: "
|
|
93709
|
+
error: "Nothing built to contact anyone about yet. Build a demo site (sproutkit build <id>) or a booking page (sproutkit book <id>) first, or check whether these leads have already moved past 'ready'."
|
|
93688
93710
|
};
|
|
93689
93711
|
}
|
|
93690
93712
|
const channelRow = db2.get("SELECT value FROM settings WHERE key = ?", ["outreach_channel"]);
|
|
@@ -93895,7 +93917,10 @@ Interested?`;
|
|
|
93895
93917
|
archetypeOverride: input.archetype,
|
|
93896
93918
|
ownerEmail: input.ownerEmail
|
|
93897
93919
|
});
|
|
93898
|
-
db2.run("UPDATE leads SET booking_url =
|
|
93920
|
+
db2.run("UPDATE leads SET booking_url = ?, status = 'site_built' WHERE id = ?", [
|
|
93921
|
+
result.bookingUrl,
|
|
93922
|
+
leadId
|
|
93923
|
+
]);
|
|
93899
93924
|
return {
|
|
93900
93925
|
ok: true,
|
|
93901
93926
|
id: leadId,
|
|
@@ -94949,7 +94974,7 @@ var require_package2 = __commonJS({
|
|
|
94949
94974
|
"package.json"(exports2, module2) {
|
|
94950
94975
|
module2.exports = {
|
|
94951
94976
|
name: "sproutkit-code",
|
|
94952
|
-
version: "1.2.
|
|
94977
|
+
version: "1.2.2",
|
|
94953
94978
|
description: "Sproutkit in your terminal \u2014 find leads, build sites, run outreach, all via chat.",
|
|
94954
94979
|
bin: {
|
|
94955
94980
|
sproutkit: "./dist/index.js"
|