@knowcode/doc-builder 1.9.30 → 1.9.31
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/package.json +12 -2
- package/.claude/settings.local.json +0 -56
- package/CACHE-BUSTING-GUIDE.md +0 -82
- package/CLAUDE.md +0 -86
- package/CONTRIBUTING.md +0 -148
- package/GITHUB_SETUP.md +0 -203
- package/RELEASE-NOTES-1.7.5.md +0 -64
- package/Screenshot 2025-07-22 at 19.51.21.png +0 -0
- package/Screenshot 2025-07-26 at 17.06.49.png +0 -0
- package/add-user-clive.sql +0 -35
- package/add-user-lindsay-fixed.sql +0 -85
- package/add-user-lindsay.sql +0 -68
- package/add-user-pmorgan.sql +0 -35
- package/add-user-robbie.sql +0 -35
- package/add-wru-users.sql +0 -105
- package/debug-login.sql +0 -30
- package/doc-builder.config.js +0 -126
- package/doc-builder.config.js.backup.1753793768283 +0 -47
- package/doc-builder.config.js.backup.1753803964423 +0 -114
- package/doc-builder.config.js.backup.1753945707032 +0 -115
- package/doc-builder.config.js.backup.1754059241330 +0 -115
- package/doc-builder.config.js.backup.1754119567787 +0 -123
- package/doc-builder.config.js.backup.1754120048862 +0 -124
- package/doc-builder.config.js.backup.1754120529913 +0 -124
- package/doc-builder.config.js.backup.1754218469785 +0 -124
- package/doc-builder.config.js.backup.1754384764054 +0 -124
- package/doc-builder.config.js.backup.1754567425847 +0 -124
- package/doc-builder.config.js.backup.1754568137859 +0 -126
- package/doc-builder.config.js.backup.1754569388252 +0 -126
- package/doc-builder.config.js.backup.1754576694123 +0 -126
- package/doc-builder.config.js.backup.1755031374829 +0 -126
- package/doc-builder.config.js.backup.1755034500990 +0 -126
- package/doc-builder.config.js.backup.1755034809236 +0 -126
- package/grant-access.sql +0 -15
- package/html/11.png +0 -0
- package/html/404.html +0 -115
- package/html/README.html +0 -522
- package/html/Screenshot 2025-08-12 at 21.35.07.png +0 -0
- package/html/about-doc-builder.html +0 -491
- package/html/auth.js +0 -157
- package/html/claude-workflow-guide.html +0 -525
- package/html/css/notion-style.css +0 -2502
- package/html/documentation-index.html +0 -471
- package/html/guides/authentication-default-change.html +0 -370
- package/html/guides/authentication-guide.html +0 -509
- package/html/guides/cache-control-anti-pattern.html +0 -361
- package/html/guides/claude-workflow-guide.html +0 -1074
- package/html/guides/configuration-guide.html +0 -472
- package/html/guides/document-standards.html +0 -518
- package/html/guides/documentation-standards.html +0 -694
- package/html/guides/html-embedding-guide.html +0 -461
- package/html/guides/image-modal-guide.html +0 -515
- package/html/guides/next-steps-walkthrough.html +0 -638
- package/html/guides/phosphor-icons-guide.html +0 -584
- package/html/guides/private-directory-authentication-troubleshooting.html +0 -555
- package/html/guides/private-directory-authentication.html +0 -541
- package/html/guides/public-site-deployment.html +0 -431
- package/html/guides/search-engine-verification-guide.html +0 -542
- package/html/guides/seo-guide.html +0 -661
- package/html/guides/seo-optimization-guide.html +0 -887
- package/html/guides/supabase-auth-implementation-plan.html +0 -543
- package/html/guides/supabase-auth-integration-plan.html +0 -671
- package/html/guides/supabase-auth-setup-guide.html +0 -498
- package/html/guides/supabase-authentication-complete-guide.html +0 -866
- package/html/guides/troubleshooting-guide.html +0 -633
- package/html/guides/vercel-deployment-auth-setup.html +0 -337
- package/html/guides/windows-setup-guide.html +0 -859
- package/html/image-modal-test.html +0 -318
- package/html/index.html +0 -522
- package/html/js/auth.js +0 -157
- package/html/js/main.js +0 -1754
- package/html/launch/README.html +0 -297
- package/html/launch/bubble-plugin-specification.html +0 -933
- package/html/launch/go-to-market-strategy.html +0 -663
- package/html/launch/launch-announcements.html +0 -593
- package/html/login.html +0 -102
- package/html/logout.html +0 -18
- package/html/private/cache-control-anti-pattern.html +0 -429
- package/html/private/launch/README.html +0 -371
- package/html/private/launch/auth-cleanup-summary.html +0 -361
- package/html/private/launch/bubble-plugin-specification.html +0 -1007
- package/html/private/launch/go-to-market-strategy.html +0 -737
- package/html/private/launch/launch-announcements.html +0 -667
- package/html/private/launch/vercel-deployment-auth-setup.html +0 -417
- package/html/private/next-steps-walkthrough.html +0 -679
- package/html/private/supabase-auth-implementation-completed.html +0 -454
- package/html/private/supabase-auth-implementation-plan.html +0 -594
- package/html/private/supabase-auth-integration-plan.html +0 -704
- package/html/private/supabase-auth-setup-guide.html +0 -555
- package/html/private/test-private-doc.html +0 -302
- package/html/private/user-management-tooling.html +0 -601
- package/html/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
- package/html/prompts/beautiful-documentation-design.html +0 -784
- package/html/prompts/markdown-document-standards.html +0 -422
- package/html/prompts/project-rename-strategy-sasha-publish.html +0 -530
- package/html/robots.txt +0 -9
- package/html/sitemap.xml +0 -357
- package/html/test-questions/how-does-it-work%3F.html +0 -294
- package/html/test-questions/step-1%3A%20getting-started.html +0 -289
- package/html/test-questions/what-is-the-purpose.html +0 -293
- package/html/test-status.html +0 -281
- package/html/vercel-cli-setup-guide.html +0 -495
- package/html/vercel-first-time-setup-guide.html +0 -454
- package/html/vercel.json +0 -29
- package/html-static/11.png +0 -0
- package/html-static/404.html +0 -115
- package/html-static/README.html +0 -609
- package/html-static/Screenshot 2025-08-12 at 21.35.07.png +0 -0
- package/html-static/about-doc-builder.html +0 -578
- package/html-static/css/notion-style.css +0 -2502
- package/html-static/documentation-index.html +0 -558
- package/html-static/guides/authentication-default-change.html +0 -457
- package/html-static/guides/authentication-guide.html +0 -596
- package/html-static/guides/claude-workflow-guide.html +0 -1161
- package/html-static/guides/configuration-guide.html +0 -559
- package/html-static/guides/documentation-standards.html +0 -781
- package/html-static/guides/html-embedding-guide.html +0 -548
- package/html-static/guides/image-modal-guide.html +0 -602
- package/html-static/guides/phosphor-icons-guide.html +0 -671
- package/html-static/guides/private-directory-authentication-troubleshooting.html +0 -642
- package/html-static/guides/private-directory-authentication.html +0 -628
- package/html-static/guides/public-site-deployment.html +0 -518
- package/html-static/guides/search-engine-verification-guide.html +0 -629
- package/html-static/guides/seo-guide.html +0 -748
- package/html-static/guides/seo-optimization-guide.html +0 -974
- package/html-static/guides/supabase-authentication-complete-guide.html +0 -953
- package/html-static/guides/troubleshooting-guide.html +0 -720
- package/html-static/guides/windows-setup-guide.html +0 -946
- package/html-static/image-modal-test.html +0 -405
- package/html-static/index.html +0 -609
- package/html-static/js/main.js +0 -1754
- package/html-static/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
- package/html-static/prompts/beautiful-documentation-design.html +0 -871
- package/html-static/prompts/markdown-document-standards.html +0 -509
- package/html-static/prompts/project-rename-strategy-sasha-publish.html +0 -617
- package/html-static/robots.txt +0 -5
- package/html-static/sitemap.xml +0 -195
- package/html-static/test-questions/how-does-it-work%3F.html +0 -381
- package/html-static/test-questions/step-1%3A%20getting-started.html +0 -376
- package/html-static/test-questions/what-is-the-purpose.html +0 -380
- package/html-static/vercel-cli-setup-guide.html +0 -582
- package/html-static/vercel-first-time-setup-guide.html +0 -541
- package/manage-users.sql +0 -191
- package/migrate-to-domain-auth.sql +0 -47
- package/package/CACHE-BUSTING-GUIDE.md +0 -82
- package/package/CHANGELOG.md +0 -902
- package/package/README.md +0 -248
- package/package/assets/css/notion-style.css +0 -2211
- package/package/assets/js/auth.js +0 -67
- package/package/assets/js/main.js +0 -1565
- package/package/cli.js +0 -764
- package/package/index.js +0 -38
- package/package/knowcode-doc-builder-1.3.15.tgz +0 -0
- package/package/lib/builder.js +0 -32
- package/package/lib/config.js +0 -278
- package/package/lib/core-builder.js +0 -957
- package/package/lib/deploy.js +0 -497
- package/package/lib/dev-server.js +0 -96
- package/package/package.json +0 -34
- package/package/scripts/npx-runner.js +0 -27
- package/package/scripts/setup.js +0 -56
- package/package/test-cache-bust.sh +0 -43
- package/public-config.js +0 -22
- package/public-html/404.html +0 -115
- package/public-html/README.html +0 -149
- package/public-html/css/notion-style.css +0 -2036
- package/public-html/index.html +0 -149
- package/public-html/js/auth.js +0 -67
- package/public-html/js/main.js +0 -1485
- package/quick-test-commands.md +0 -40
- package/recordings/Screenshot 2025-07-24 at 18.22.01.png +0 -0
- package/recordings/mh-ls-22jul.txt +0 -2305
- package/screenshot.png +0 -0
- package/scripts/Screenshot 2025-07-23 at 15.39.41.png +0 -0
- package/setup-database-v2.sql +0 -53
- package/setup-database.sql +0 -41
- package/test-auth-config.js +0 -17
- package/test-cache-bust.sh +0 -43
- package/test-docs/README.md +0 -39
- package/test-html/404.html +0 -115
- package/test-html/README.html +0 -172
- package/test-html/auth.js +0 -97
- package/test-html/css/notion-style.css +0 -2036
- package/test-html/index.html +0 -172
- package/test-html/js/auth.js +0 -97
- package/test-html/js/main.js +0 -1485
- package/test-html/login.html +0 -102
- package/test-html/logout.html +0 -18
- package/update-domain.sql +0 -9
- package/user-access-view.sql +0 -49
- package/user-management/README.md +0 -301
- package/user-management/add-users.sh +0 -776
- package/user-management/create-user.js +0 -65
- package/user-management/users.txt +0 -15
- package/view-all-users.sql +0 -40
- package/wru-auth-config.js +0 -17
package/manage-users.sql
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
-- =====================================================
|
|
2
|
-
-- USER MANAGEMENT SQL COMMANDS FOR DOC-BUILDER
|
|
3
|
-
-- =====================================================
|
|
4
|
-
-- Run these in your Supabase SQL Editor
|
|
5
|
-
|
|
6
|
-
-- =====================================================
|
|
7
|
-
-- 1. VIEW YOUR SITES
|
|
8
|
-
-- =====================================================
|
|
9
|
-
-- See all your documentation sites
|
|
10
|
-
SELECT id, domain, name, created_at
|
|
11
|
-
FROM docbuilder_sites
|
|
12
|
-
ORDER BY created_at DESC;
|
|
13
|
-
|
|
14
|
-
-- =====================================================
|
|
15
|
-
-- 2. VIEW EXISTING USERS
|
|
16
|
-
-- =====================================================
|
|
17
|
-
-- See all users in your Supabase project
|
|
18
|
-
SELECT id, email, created_at, last_sign_in_at
|
|
19
|
-
FROM auth.users
|
|
20
|
-
ORDER BY created_at DESC;
|
|
21
|
-
|
|
22
|
-
-- =====================================================
|
|
23
|
-
-- 3. VIEW WHO HAS ACCESS TO A SPECIFIC SITE
|
|
24
|
-
-- =====================================================
|
|
25
|
-
-- Replace 'your-site-id' with actual site ID
|
|
26
|
-
SELECT
|
|
27
|
-
u.email,
|
|
28
|
-
u.id as user_id,
|
|
29
|
-
u.created_at as user_since,
|
|
30
|
-
da.created_at as access_granted,
|
|
31
|
-
ds.name as site_name,
|
|
32
|
-
ds.domain
|
|
33
|
-
FROM docbuilder_access da
|
|
34
|
-
JOIN auth.users u ON u.id = da.user_id
|
|
35
|
-
JOIN docbuilder_sites ds ON ds.id = da.site_id
|
|
36
|
-
WHERE da.site_id = 'your-site-id'
|
|
37
|
-
ORDER BY da.created_at DESC;
|
|
38
|
-
|
|
39
|
-
-- =====================================================
|
|
40
|
-
-- 4. ADD A SINGLE USER TO A SITE
|
|
41
|
-
-- =====================================================
|
|
42
|
-
-- First, create user in Supabase Dashboard (Authentication > Users > Invite)
|
|
43
|
-
-- Then grant access:
|
|
44
|
-
INSERT INTO docbuilder_access (user_id, site_id)
|
|
45
|
-
VALUES (
|
|
46
|
-
(SELECT id FROM auth.users WHERE email = 'user@example.com'),
|
|
47
|
-
'your-site-id'
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
-- =====================================================
|
|
51
|
-
-- 5. ADD MULTIPLE USERS TO A SITE
|
|
52
|
-
-- =====================================================
|
|
53
|
-
-- Add a list of users all at once
|
|
54
|
-
WITH users_to_add AS (
|
|
55
|
-
SELECT email FROM (VALUES
|
|
56
|
-
('user1@example.com'),
|
|
57
|
-
('user2@example.com'),
|
|
58
|
-
('user3@example.com'),
|
|
59
|
-
('user4@example.com')
|
|
60
|
-
) AS t(email)
|
|
61
|
-
)
|
|
62
|
-
INSERT INTO docbuilder_access (user_id, site_id)
|
|
63
|
-
SELECT u.id, 'your-site-id'
|
|
64
|
-
FROM auth.users u
|
|
65
|
-
JOIN users_to_add ua ON u.email = ua.email
|
|
66
|
-
WHERE NOT EXISTS (
|
|
67
|
-
-- Prevent duplicate entries
|
|
68
|
-
SELECT 1 FROM docbuilder_access
|
|
69
|
-
WHERE user_id = u.id AND site_id = 'your-site-id'
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
-- =====================================================
|
|
73
|
-
-- 6. GRANT USER ACCESS TO MULTIPLE SITES
|
|
74
|
-
-- =====================================================
|
|
75
|
-
-- Give one user access to several sites
|
|
76
|
-
WITH sites_to_grant AS (
|
|
77
|
-
SELECT id FROM docbuilder_sites
|
|
78
|
-
WHERE domain IN ('site1.com', 'site2.com', 'site3.com')
|
|
79
|
-
)
|
|
80
|
-
INSERT INTO docbuilder_access (user_id, site_id)
|
|
81
|
-
SELECT
|
|
82
|
-
(SELECT id FROM auth.users WHERE email = 'user@example.com'),
|
|
83
|
-
s.id
|
|
84
|
-
FROM sites_to_grant s
|
|
85
|
-
WHERE NOT EXISTS (
|
|
86
|
-
SELECT 1 FROM docbuilder_access
|
|
87
|
-
WHERE user_id = (SELECT id FROM auth.users WHERE email = 'user@example.com')
|
|
88
|
-
AND site_id = s.id
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
-- =====================================================
|
|
92
|
-
-- 7. REMOVE USER ACCESS FROM A SITE
|
|
93
|
-
-- =====================================================
|
|
94
|
-
-- Remove specific user from specific site
|
|
95
|
-
DELETE FROM docbuilder_access
|
|
96
|
-
WHERE user_id = (SELECT id FROM auth.users WHERE email = 'user@example.com')
|
|
97
|
-
AND site_id = 'your-site-id';
|
|
98
|
-
|
|
99
|
-
-- =====================================================
|
|
100
|
-
-- 8. REMOVE USER FROM ALL SITES
|
|
101
|
-
-- =====================================================
|
|
102
|
-
-- Completely remove user's access to all documentation
|
|
103
|
-
DELETE FROM docbuilder_access
|
|
104
|
-
WHERE user_id = (SELECT id FROM auth.users WHERE email = 'user@example.com');
|
|
105
|
-
|
|
106
|
-
-- =====================================================
|
|
107
|
-
-- 9. BULK REMOVE USERS
|
|
108
|
-
-- =====================================================
|
|
109
|
-
-- Remove multiple users from a site
|
|
110
|
-
WITH users_to_remove AS (
|
|
111
|
-
SELECT email FROM (VALUES
|
|
112
|
-
('olduser1@example.com'),
|
|
113
|
-
('olduser2@example.com')
|
|
114
|
-
) AS t(email)
|
|
115
|
-
)
|
|
116
|
-
DELETE FROM docbuilder_access
|
|
117
|
-
WHERE site_id = 'your-site-id'
|
|
118
|
-
AND user_id IN (
|
|
119
|
-
SELECT u.id FROM auth.users u
|
|
120
|
-
JOIN users_to_remove ur ON u.email = ur.email
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
-- =====================================================
|
|
124
|
-
-- 10. VIEW ACCESS SUMMARY
|
|
125
|
-
-- =====================================================
|
|
126
|
-
-- See how many users each site has
|
|
127
|
-
SELECT
|
|
128
|
-
ds.name as site_name,
|
|
129
|
-
ds.domain,
|
|
130
|
-
ds.id as site_id,
|
|
131
|
-
COUNT(da.user_id) as user_count,
|
|
132
|
-
MAX(da.created_at) as last_access_granted
|
|
133
|
-
FROM docbuilder_sites ds
|
|
134
|
-
LEFT JOIN docbuilder_access da ON ds.id = da.site_id
|
|
135
|
-
GROUP BY ds.id, ds.name, ds.domain
|
|
136
|
-
ORDER BY user_count DESC;
|
|
137
|
-
|
|
138
|
-
-- =====================================================
|
|
139
|
-
-- 11. FIND USERS WITHOUT ACCESS TO ANY SITE
|
|
140
|
-
-- =====================================================
|
|
141
|
-
-- Useful for cleanup
|
|
142
|
-
SELECT u.email, u.created_at, u.last_sign_in_at
|
|
143
|
-
FROM auth.users u
|
|
144
|
-
WHERE NOT EXISTS (
|
|
145
|
-
SELECT 1 FROM docbuilder_access da
|
|
146
|
-
WHERE da.user_id = u.id
|
|
147
|
-
)
|
|
148
|
-
ORDER BY u.created_at DESC;
|
|
149
|
-
|
|
150
|
-
-- =====================================================
|
|
151
|
-
-- 12. AUDIT LOG - RECENT ACCESS GRANTS
|
|
152
|
-
-- =====================================================
|
|
153
|
-
-- See who was granted access recently
|
|
154
|
-
SELECT
|
|
155
|
-
u.email,
|
|
156
|
-
ds.name as site_name,
|
|
157
|
-
ds.domain,
|
|
158
|
-
da.created_at as access_granted
|
|
159
|
-
FROM docbuilder_access da
|
|
160
|
-
JOIN auth.users u ON u.id = da.user_id
|
|
161
|
-
JOIN docbuilder_sites ds ON ds.id = da.site_id
|
|
162
|
-
WHERE da.created_at > NOW() - INTERVAL '30 days'
|
|
163
|
-
ORDER BY da.created_at DESC;
|
|
164
|
-
|
|
165
|
-
-- =====================================================
|
|
166
|
-
-- 13. COPY ACCESS FROM ONE USER TO ANOTHER
|
|
167
|
-
-- =====================================================
|
|
168
|
-
-- Useful when replacing team members
|
|
169
|
-
INSERT INTO docbuilder_access (user_id, site_id)
|
|
170
|
-
SELECT
|
|
171
|
-
(SELECT id FROM auth.users WHERE email = 'newuser@example.com'),
|
|
172
|
-
da.site_id
|
|
173
|
-
FROM docbuilder_access da
|
|
174
|
-
WHERE da.user_id = (SELECT id FROM auth.users WHERE email = 'olduser@example.com');
|
|
175
|
-
|
|
176
|
-
-- =====================================================
|
|
177
|
-
-- COMMON SITE IDs FOR REFERENCE
|
|
178
|
-
-- =====================================================
|
|
179
|
-
-- Your test site: 4d8a53bf-dcdd-48c0-98e0-cd1451518735
|
|
180
|
-
-- Add more site IDs here as you create them:
|
|
181
|
-
-- Production site: xxx
|
|
182
|
-
-- Staging site: xxx
|
|
183
|
-
|
|
184
|
-
-- =====================================================
|
|
185
|
-
-- TIPS
|
|
186
|
-
-- =====================================================
|
|
187
|
-
-- 1. Always check if users exist before granting access
|
|
188
|
-
-- 2. Use the Supabase Dashboard to invite new users first
|
|
189
|
-
-- 3. Run SELECT queries before DELETE to verify
|
|
190
|
-
-- 4. Keep this file updated with your site IDs
|
|
191
|
-
-- 5. Consider creating views for common queries
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
-- Migration Script: From Site IDs to Domain-based Authentication
|
|
2
|
-
-- IMPORTANT: Backup your database before running this!
|
|
3
|
-
|
|
4
|
-
-- Step 1: Create new table structure
|
|
5
|
-
CREATE TABLE IF NOT EXISTS docbuilder_access_new (
|
|
6
|
-
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
|
|
7
|
-
domain TEXT NOT NULL,
|
|
8
|
-
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
9
|
-
PRIMARY KEY (user_id, domain)
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
-- Step 2: Migrate existing data (join access with sites to get domains)
|
|
13
|
-
INSERT INTO docbuilder_access_new (user_id, domain, created_at)
|
|
14
|
-
SELECT
|
|
15
|
-
da.user_id,
|
|
16
|
-
ds.domain,
|
|
17
|
-
da.created_at
|
|
18
|
-
FROM docbuilder_access da
|
|
19
|
-
JOIN docbuilder_sites ds ON da.site_id = ds.id
|
|
20
|
-
ON CONFLICT (user_id, domain) DO NOTHING;
|
|
21
|
-
|
|
22
|
-
-- Step 3: Create index
|
|
23
|
-
CREATE INDEX IF NOT EXISTS idx_docbuilder_access_new_domain ON docbuilder_access_new(domain);
|
|
24
|
-
|
|
25
|
-
-- Step 4: Enable RLS
|
|
26
|
-
ALTER TABLE docbuilder_access_new ENABLE ROW LEVEL SECURITY;
|
|
27
|
-
|
|
28
|
-
-- Step 5: Create RLS Policy
|
|
29
|
-
CREATE POLICY "Users see own access" ON docbuilder_access_new
|
|
30
|
-
FOR SELECT USING (user_id = auth.uid());
|
|
31
|
-
|
|
32
|
-
-- Step 6: Verify migration (check counts)
|
|
33
|
-
SELECT 'Old access records:' as info, COUNT(*) as count FROM docbuilder_access
|
|
34
|
-
UNION ALL
|
|
35
|
-
SELECT 'New access records:' as info, COUNT(*) as count FROM docbuilder_access_new
|
|
36
|
-
UNION ALL
|
|
37
|
-
SELECT 'Sites migrated:' as info, COUNT(DISTINCT domain) as count FROM docbuilder_access_new;
|
|
38
|
-
|
|
39
|
-
-- Step 7: Once verified, swap tables (CAREFUL - This is the point of no return!)
|
|
40
|
-
-- DROP TABLE IF EXISTS docbuilder_access;
|
|
41
|
-
-- ALTER TABLE docbuilder_access_new RENAME TO docbuilder_access;
|
|
42
|
-
-- DROP TABLE IF EXISTS docbuilder_sites;
|
|
43
|
-
|
|
44
|
-
-- Step 8: Update index name
|
|
45
|
-
-- ALTER INDEX idx_docbuilder_access_new_domain RENAME TO idx_docbuilder_access_domain;
|
|
46
|
-
|
|
47
|
-
-- Note: Uncomment steps 7 and 8 only after verifying the migration worked correctly!
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Cache Busting Guide for @knowcode/doc-builder
|
|
2
|
-
|
|
3
|
-
If you're not seeing updates after upgrading to a new version, it's likely due to caching. Follow these steps:
|
|
4
|
-
|
|
5
|
-
## 1. Clean Everything Locally
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Remove old build artifacts
|
|
9
|
-
rm -rf html/
|
|
10
|
-
|
|
11
|
-
# Clear npm cache
|
|
12
|
-
npm cache clean --force
|
|
13
|
-
|
|
14
|
-
# Remove node_modules and reinstall
|
|
15
|
-
rm -rf node_modules
|
|
16
|
-
npm install
|
|
17
|
-
|
|
18
|
-
# Make sure you have the latest version
|
|
19
|
-
npm install @knowcode/doc-builder@latest
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. Rebuild with Fresh Files
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
# Build fresh documentation
|
|
26
|
-
npx @knowcode/doc-builder build
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 3. Deploy with Force Flag
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# Force Vercel to ignore cache
|
|
33
|
-
vercel --prod --force
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 4. Clear Browser Cache
|
|
37
|
-
|
|
38
|
-
- **Chrome/Edge**: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
|
|
39
|
-
- **Firefox**: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
|
|
40
|
-
- **Safari**: Cmd+Option+R
|
|
41
|
-
- Or use Incognito/Private browsing mode
|
|
42
|
-
|
|
43
|
-
## 5. Clear Vercel/CDN Cache (if applicable)
|
|
44
|
-
|
|
45
|
-
If using Vercel:
|
|
46
|
-
1. Go to your project dashboard
|
|
47
|
-
2. Settings → Functions → Purge Cache
|
|
48
|
-
3. Or redeploy with a different domain temporarily
|
|
49
|
-
|
|
50
|
-
## 6. Add Cache Busting to Your Build
|
|
51
|
-
|
|
52
|
-
Edit your `doc-builder.config.js` to add version query strings:
|
|
53
|
-
|
|
54
|
-
```javascript
|
|
55
|
-
module.exports = {
|
|
56
|
-
// ... other config
|
|
57
|
-
cacheBust: true, // This will add ?v=timestamp to CSS/JS files
|
|
58
|
-
};
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Common Issues
|
|
62
|
-
|
|
63
|
-
- **"I updated but nothing changed"** - It's cache. Follow all steps above.
|
|
64
|
-
- **"Tooltips still don't work"** - Clear browser cache and check console for errors
|
|
65
|
-
- **"Spacing is still wrong"** - The CSS is cached. Hard refresh the page.
|
|
66
|
-
|
|
67
|
-
## Verify You Have The Right Version
|
|
68
|
-
|
|
69
|
-
Check the version in your package.json:
|
|
70
|
-
```bash
|
|
71
|
-
npm list @knowcode/doc-builder
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Should show: `@knowcode/doc-builder@1.3.13` or higher.
|
|
75
|
-
|
|
76
|
-
## Still Not Working?
|
|
77
|
-
|
|
78
|
-
1. Open browser DevTools
|
|
79
|
-
2. Go to Network tab
|
|
80
|
-
3. Check "Disable cache" checkbox
|
|
81
|
-
4. Refresh the page
|
|
82
|
-
5. Look at the CSS/JS files being loaded - they should not show "(from cache)"
|