@knowcode/doc-builder 1.7.6 → 1.8.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.
Files changed (50) hide show
  1. package/.claude/settings.local.json +6 -1
  2. package/CHANGELOG.md +29 -0
  3. package/assets/css/notion-style.css +9 -1
  4. package/assets/js/main.js +10 -6
  5. package/html/README.html +44 -20
  6. package/html/auth.js +62 -13
  7. package/html/css/notion-style.css +9 -1
  8. package/html/documentation-index.html +44 -20
  9. package/html/guides/authentication-default-change.html +44 -20
  10. package/html/guides/authentication-guide.html +228 -263
  11. package/html/guides/claude-workflow-guide.html +44 -20
  12. package/html/guides/documentation-standards.html +44 -20
  13. package/html/guides/phosphor-icons-guide.html +44 -20
  14. package/html/guides/private-directory-authentication.html +472 -0
  15. package/html/guides/public-site-deployment.html +50 -25
  16. package/html/guides/search-engine-verification-guide.html +44 -20
  17. package/html/guides/seo-guide.html +44 -20
  18. package/html/guides/seo-optimization-guide.html +44 -20
  19. package/html/guides/troubleshooting-guide.html +44 -20
  20. package/html/guides/windows-setup-guide.html +44 -20
  21. package/html/index.html +44 -20
  22. package/html/js/auth.js +118 -39
  23. package/html/js/main.js +10 -6
  24. package/html/login.html +4 -4
  25. package/html/logout.html +2 -2
  26. package/html/private/cache-control-anti-pattern.html +408 -0
  27. package/html/private/launch/README.html +350 -0
  28. package/html/private/launch/auth-cleanup-summary.html +340 -0
  29. package/html/private/launch/bubble-plugin-specification.html +986 -0
  30. package/html/private/launch/go-to-market-strategy.html +716 -0
  31. package/html/private/launch/launch-announcements.html +646 -0
  32. package/html/private/launch/vercel-deployment-auth-setup.html +390 -0
  33. package/html/private/next-steps-walkthrough.html +685 -0
  34. package/html/private/supabase-auth-implementation-completed.html +433 -0
  35. package/html/private/supabase-auth-implementation-plan.html +590 -0
  36. package/html/private/supabase-auth-integration-plan.html +718 -0
  37. package/html/private/supabase-auth-setup-guide.html +545 -0
  38. package/html/private/test-private-doc.html +281 -0
  39. package/html/robots.txt +4 -0
  40. package/html/sitemap.xml +113 -29
  41. package/html/vercel-cli-setup-guide.html +44 -20
  42. package/html/vercel-first-time-setup-guide.html +44 -20
  43. package/lib/config.js +21 -3
  44. package/lib/core-builder.js +49 -7
  45. package/lib/supabase-auth.js +80 -25
  46. package/package.json +1 -1
  47. package/user-management/README.md +306 -0
  48. package/user-management/add-users.sh +730 -0
  49. package/user-management/create-user.js +65 -0
  50. package/user-management/users.txt +15 -0
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Helper script to create users using Supabase Admin API
4
+ // This requires the service_role key which has admin privileges
5
+
6
+ const https = require('https');
7
+ const { createClient } = require('@supabase/supabase-js');
8
+
9
+ // Get arguments
10
+ const [,, email, projectUrl, serviceKey] = process.argv;
11
+
12
+ if (!email || !projectUrl || !serviceKey) {
13
+ console.error('Usage: node create-user.js <email> <project-url> <service-role-key>');
14
+ console.error('Example: node create-user.js user@example.com https://xxx.supabase.co YOUR_SERVICE_KEY');
15
+ process.exit(1);
16
+ }
17
+
18
+ // Create Supabase client with service role key
19
+ const supabase = createClient(projectUrl, serviceKey, {
20
+ auth: {
21
+ autoRefreshToken: false,
22
+ persistSession: false
23
+ }
24
+ });
25
+
26
+ async function createUser(email) {
27
+ try {
28
+ // Create user with Admin API
29
+ const { data, error } = await supabase.auth.admin.createUser({
30
+ email: email,
31
+ email_confirm: true,
32
+ // Generate a random password (user will reset it)
33
+ password: Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2).toUpperCase()
34
+ });
35
+
36
+ if (error) {
37
+ if (error.message.includes('already been registered')) {
38
+ console.log('User already exists');
39
+ return true;
40
+ }
41
+ throw error;
42
+ }
43
+
44
+ console.log('User created successfully');
45
+
46
+ // Send password reset email
47
+ const { error: resetError } = await supabase.auth.resetPasswordForEmail(email);
48
+
49
+ if (resetError) {
50
+ console.error('Warning: Could not send password reset email:', resetError.message);
51
+ } else {
52
+ console.log('Password reset email sent');
53
+ }
54
+
55
+ return true;
56
+ } catch (error) {
57
+ console.error('Error creating user:', error.message);
58
+ return false;
59
+ }
60
+ }
61
+
62
+ // Run the function
63
+ createUser(email).then(success => {
64
+ process.exit(success ? 0 : 1);
65
+ });
@@ -0,0 +1,15 @@
1
+ # Example users file for bulk user additions
2
+ # One email per line
3
+ # Lines starting with # are ignored
4
+ # Empty lines are ignored
5
+
6
+ # Example users:
7
+ john@example.com
8
+ jane@example.com
9
+ admin@mycompany.com
10
+
11
+ # Real users for WRU project:
12
+ # pmorgan@wru.cymru
13
+ # clive@hyperforma.co.uk
14
+ # robbie.macintosh@marbledropper.com
15
+ # lindsay@knowcode.tech