@knowcode/doc-builder 1.8.1 → 1.8.3
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/CHANGELOG.md +37 -0
- package/README.md +4 -4
- package/cli.js +9 -40
- package/html/README.html +3 -3
- package/html/auth.js +2 -2
- package/html/documentation-index.html +3 -3
- package/html/guides/authentication-default-change.html +3 -3
- package/html/guides/authentication-guide.html +41 -49
- package/html/guides/claude-workflow-guide.html +3 -3
- package/html/guides/documentation-standards.html +3 -3
- package/html/guides/phosphor-icons-guide.html +3 -3
- package/html/guides/private-directory-authentication.html +51 -26
- package/html/guides/public-site-deployment.html +8 -9
- package/html/guides/search-engine-verification-guide.html +3 -3
- package/html/guides/seo-guide.html +3 -3
- package/html/guides/seo-optimization-guide.html +3 -3
- package/html/guides/troubleshooting-guide.html +3 -3
- package/html/guides/windows-setup-guide.html +3 -3
- package/html/index.html +3 -3
- package/html/js/auth.js +2 -2
- package/html/login.html +2 -2
- package/html/private/cache-control-anti-pattern.html +5 -4
- package/html/private/launch/README.html +5 -4
- package/html/private/launch/auth-cleanup-summary.html +5 -4
- package/html/private/launch/bubble-plugin-specification.html +5 -4
- package/html/private/launch/go-to-market-strategy.html +5 -4
- package/html/private/launch/launch-announcements.html +5 -4
- package/html/private/launch/vercel-deployment-auth-setup.html +27 -20
- package/html/private/next-steps-walkthrough.html +18 -44
- package/html/private/supabase-auth-implementation-completed.html +8 -7
- package/html/private/supabase-auth-implementation-plan.html +16 -32
- package/html/private/supabase-auth-integration-plan.html +34 -68
- package/html/private/supabase-auth-setup-guide.html +73 -83
- package/html/private/test-private-doc.html +5 -4
- package/html/private/user-management-tooling.html +581 -0
- package/html/sitemap.xml +49 -43
- package/html/vercel-cli-setup-guide.html +3 -3
- package/html/vercel-first-time-setup-guide.html +3 -3
- package/lib/config.js +6 -15
- package/lib/core-builder.js +3 -4
- package/lib/shared-auth-config.js +13 -0
- package/lib/supabase-auth.js +5 -11
- package/package.json +1 -1
- package/setup-database-v2.sql +53 -0
- package/user-management/README.md +16 -21
- package/user-management/add-users.sh +37 -11
|
@@ -200,26 +200,52 @@ setup_project() {
|
|
|
200
200
|
fi
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
# Execute SQL
|
|
203
|
+
# Execute SQL - try different methods based on what's available
|
|
204
204
|
execute_sql() {
|
|
205
205
|
local sql="$1"
|
|
206
206
|
local temp_file=$(mktemp)
|
|
207
207
|
|
|
208
208
|
echo "$sql" > "$temp_file"
|
|
209
209
|
|
|
210
|
-
#
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
# Method 1: Try using psql if DATABASE_URL is available
|
|
211
|
+
if [ ! -z "$DATABASE_URL" ]; then
|
|
212
|
+
local output=$(psql "$DATABASE_URL" -f "$temp_file" 2>&1)
|
|
213
|
+
local status=$?
|
|
214
|
+
rm "$temp_file"
|
|
215
|
+
|
|
216
|
+
if [ $status -eq 0 ]; then
|
|
217
|
+
echo "$output"
|
|
218
|
+
return 0
|
|
219
|
+
fi
|
|
220
|
+
fi
|
|
213
221
|
|
|
222
|
+
# Method 2: Try newer supabase db execute (for newer CLI versions)
|
|
223
|
+
if command -v supabase &> /dev/null && supabase db execute --help &> /dev/null 2>&1; then
|
|
224
|
+
local output=$(cat "$temp_file" | supabase db execute 2>&1)
|
|
225
|
+
local status=$?
|
|
226
|
+
rm "$temp_file"
|
|
227
|
+
|
|
228
|
+
if [ $status -eq 0 ]; then
|
|
229
|
+
echo "$output"
|
|
230
|
+
return 0
|
|
231
|
+
fi
|
|
232
|
+
fi
|
|
233
|
+
|
|
234
|
+
# Method 3: Manual instructions as fallback
|
|
214
235
|
rm "$temp_file"
|
|
236
|
+
echo -e "${YELLOW}⚠️ Cannot execute SQL automatically${NC}"
|
|
237
|
+
echo -e "${CYAN}Your Supabase CLI version doesn't support direct SQL execution.${NC}"
|
|
238
|
+
echo -e "${CYAN}Please run this SQL manually in Supabase SQL Editor:${NC}"
|
|
239
|
+
echo -e "${CYAN}https://supabase.com/dashboard/project/$PROJECT_ID/sql${NC}"
|
|
240
|
+
echo
|
|
241
|
+
echo -e "${BLUE}--- SQL TO RUN ---${NC}"
|
|
242
|
+
echo "$sql"
|
|
243
|
+
echo -e "${BLUE}--- END SQL ---${NC}"
|
|
244
|
+
echo
|
|
245
|
+
echo -e "${YELLOW}Press Enter after running the SQL...${NC}"
|
|
246
|
+
read -p ""
|
|
215
247
|
|
|
216
|
-
|
|
217
|
-
echo "$output"
|
|
218
|
-
return 0
|
|
219
|
-
else
|
|
220
|
-
echo -e "${RED}SQL Error: $output${NC}" >&2
|
|
221
|
-
return 1
|
|
222
|
-
fi
|
|
248
|
+
return 0
|
|
223
249
|
}
|
|
224
250
|
|
|
225
251
|
# Create a user using SQL (Supabase doesn't have CLI user creation)
|