ultimate-jekyll-manager 0.0.118 → 0.0.120
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/CLAUDE.md +409 -23
- package/README.md +171 -2
- package/TODO.md +10 -2
- package/_backup/form-manager.backup.js +1020 -0
- package/dist/assets/js/core/auth.js +5 -4
- package/dist/assets/js/core/cookieconsent.js +24 -17
- package/dist/assets/js/core/exit-popup.js +15 -12
- package/dist/assets/js/core/social-sharing.js +8 -4
- package/dist/assets/js/libs/auth/pages.js +78 -149
- package/dist/assets/js/libs/dev.js +192 -129
- package/dist/assets/js/libs/form-manager.js +643 -775
- package/dist/assets/js/pages/account/index.js +3 -2
- package/dist/assets/js/pages/account/sections/api-keys.js +37 -52
- package/dist/assets/js/pages/account/sections/connections.js +37 -46
- package/dist/assets/js/pages/account/sections/delete.js +57 -78
- package/dist/assets/js/pages/account/sections/profile.js +37 -56
- package/dist/assets/js/pages/account/sections/security.js +102 -125
- package/dist/assets/js/pages/admin/notifications/new/index.js +73 -151
- package/dist/assets/js/pages/blog/index.js +33 -53
- package/dist/assets/js/pages/contact/index.js +112 -173
- package/dist/assets/js/pages/download/index.js +39 -86
- package/dist/assets/js/pages/oauth2/index.js +17 -17
- package/dist/assets/js/pages/payment/checkout/index.js +23 -36
- package/dist/assets/js/pages/pricing/index.js +5 -2
- package/dist/assets/js/pages/test/libraries/form-manager/index.js +194 -0
- package/dist/assets/themes/classy/css/components/_cards.scss +2 -2
- package/dist/defaults/_.env +6 -0
- package/dist/defaults/_.gitignore +7 -1
- package/dist/defaults/dist/_includes/core/body.html +5 -13
- package/dist/defaults/dist/_includes/core/foot.html +1 -0
- package/dist/defaults/dist/_includes/themes/classy/frontend/sections/nav.html +51 -36
- package/dist/defaults/dist/_layouts/blueprint/admin/notifications/new.html +13 -2
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/about.html +84 -42
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/account/index.html +26 -21
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/auth/signin.html +2 -2
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/auth/signup.html +2 -2
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/blog/index.html +72 -58
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/blog/post.html +46 -29
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/contact.html +46 -53
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/download.html +111 -73
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/index.html +111 -56
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/pricing.html +127 -81
- package/dist/defaults/dist/pages/test/libraries/form-manager.html +181 -0
- package/dist/defaults/dist/pages/test/libraries/lazy-loading.html +1 -1
- package/dist/gulp/tasks/defaults.js +210 -1
- package/dist/gulp/tasks/serve.js +18 -0
- package/dist/lib/logger.js +1 -1
- package/firebase-debug.log +770 -0
- package/package.json +6 -6
- package/.playwright-mcp/page-2025-10-22T19-11-27-666Z.png +0 -0
- package/.playwright-mcp/page-2025-10-22T19-11-57-357Z.png +0 -0
|
@@ -60,8 +60,14 @@ const FILE_MAP = {
|
|
|
60
60
|
// 'dist/pages/**/*': {
|
|
61
61
|
// path: (file) => file.source.replace('dist/pages', 'dist'),
|
|
62
62
|
// },
|
|
63
|
+
// Files to rename and merge
|
|
63
64
|
'_.gitignore': {
|
|
64
65
|
name: (file) => file.name.replace('_.gitignore', '.gitignore'),
|
|
66
|
+
mergeLines: true, // Merge line-by-line instead of overwriting
|
|
67
|
+
},
|
|
68
|
+
'_.env': {
|
|
69
|
+
name: (file) => file.name.replace('_.env', '.env'),
|
|
70
|
+
mergeLines: true, // Merge line-by-line instead of overwriting
|
|
65
71
|
},
|
|
66
72
|
|
|
67
73
|
// Config file with smart merging
|
|
@@ -110,6 +116,188 @@ const delay = 250;
|
|
|
110
116
|
// Index
|
|
111
117
|
let index = -1;
|
|
112
118
|
|
|
119
|
+
// Helper function to merge line-based files (.gitignore, .env)
|
|
120
|
+
function mergeLineBasedFiles(existingContent, newContent, fileName) {
|
|
121
|
+
// Parse existing content into lines
|
|
122
|
+
const existingLines = existingContent.split('\n');
|
|
123
|
+
const newLines = newContent.split('\n');
|
|
124
|
+
|
|
125
|
+
// For .env files, we track keys; for .gitignore, we track the full line
|
|
126
|
+
const isEnvFile = fileName === '.env';
|
|
127
|
+
|
|
128
|
+
// Markers for separating default values from user custom values
|
|
129
|
+
const DEFAULT_SECTION_MARKER = '# ========== Default Values ==========';
|
|
130
|
+
const CUSTOM_SECTION_MARKER = '# ========== Custom Values ==========';
|
|
131
|
+
|
|
132
|
+
// Parse existing file into default section and custom section
|
|
133
|
+
let defaultSection = [];
|
|
134
|
+
let customSection = [];
|
|
135
|
+
let inCustomSection = false;
|
|
136
|
+
let inDefaultSection = false;
|
|
137
|
+
|
|
138
|
+
const existingDefaultKeys = new Set();
|
|
139
|
+
const existingCustomKeys = new Set();
|
|
140
|
+
|
|
141
|
+
for (const line of existingLines) {
|
|
142
|
+
const trimmed = line.trim();
|
|
143
|
+
|
|
144
|
+
// Check for section markers
|
|
145
|
+
if (trimmed === DEFAULT_SECTION_MARKER) {
|
|
146
|
+
inDefaultSection = true;
|
|
147
|
+
inCustomSection = false;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (trimmed === CUSTOM_SECTION_MARKER) {
|
|
151
|
+
inCustomSection = true;
|
|
152
|
+
inDefaultSection = false;
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Add to appropriate section
|
|
157
|
+
if (inCustomSection) {
|
|
158
|
+
customSection.push(line);
|
|
159
|
+
// Track custom keys
|
|
160
|
+
if (isEnvFile && trimmed && !trimmed.startsWith('#')) {
|
|
161
|
+
const key = trimmed.split('=')[0].trim();
|
|
162
|
+
if (key) {
|
|
163
|
+
existingCustomKeys.add(key);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
} else if (inDefaultSection) {
|
|
167
|
+
defaultSection.push(line);
|
|
168
|
+
// Track default keys
|
|
169
|
+
if (isEnvFile && trimmed && !trimmed.startsWith('#')) {
|
|
170
|
+
const key = trimmed.split('=')[0].trim();
|
|
171
|
+
if (key) {
|
|
172
|
+
existingDefaultKeys.add(key);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Parse new content to build complete default section in order
|
|
179
|
+
const newDefaultSection = [];
|
|
180
|
+
const newDefaultKeys = new Set();
|
|
181
|
+
|
|
182
|
+
let inNewDefaultSection = false;
|
|
183
|
+
let inNewCustomSection = false;
|
|
184
|
+
|
|
185
|
+
for (const line of newLines) {
|
|
186
|
+
const trimmed = line.trim();
|
|
187
|
+
|
|
188
|
+
// Check for section markers
|
|
189
|
+
if (trimmed === DEFAULT_SECTION_MARKER) {
|
|
190
|
+
inNewDefaultSection = true;
|
|
191
|
+
inNewCustomSection = false;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (trimmed === CUSTOM_SECTION_MARKER) {
|
|
195
|
+
inNewCustomSection = true;
|
|
196
|
+
inNewDefaultSection = false;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Only process default section from new file
|
|
201
|
+
if (inNewDefaultSection) {
|
|
202
|
+
// For env files, check if key exists
|
|
203
|
+
if (isEnvFile && trimmed && !trimmed.startsWith('#')) {
|
|
204
|
+
const key = trimmed.split('=')[0].trim();
|
|
205
|
+
if (key) {
|
|
206
|
+
newDefaultKeys.add(key);
|
|
207
|
+
// If key exists in user's file (either section), skip the default value
|
|
208
|
+
if (!existingDefaultKeys.has(key) && !existingCustomKeys.has(key)) {
|
|
209
|
+
// New key - add it
|
|
210
|
+
newDefaultSection.push(line);
|
|
211
|
+
} else {
|
|
212
|
+
// Key exists - we'll add user's value later in order
|
|
213
|
+
newDefaultSection.push(null); // Placeholder to maintain order
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
newDefaultSection.push(line);
|
|
217
|
+
}
|
|
218
|
+
} else {
|
|
219
|
+
// Comments and empty lines
|
|
220
|
+
newDefaultSection.push(line);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Now merge user's existing default values in the correct order
|
|
226
|
+
const mergedDefaultSection = [];
|
|
227
|
+
let defaultSectionIndex = 0;
|
|
228
|
+
|
|
229
|
+
for (const line of newDefaultSection) {
|
|
230
|
+
if (line === null) {
|
|
231
|
+
// Placeholder - insert corresponding user value
|
|
232
|
+
// Find the next user value
|
|
233
|
+
while (defaultSectionIndex < defaultSection.length) {
|
|
234
|
+
const userLine = defaultSection[defaultSectionIndex++];
|
|
235
|
+
const trimmed = userLine.trim();
|
|
236
|
+
if (trimmed && !trimmed.startsWith('#')) {
|
|
237
|
+
mergedDefaultSection.push(userLine);
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
} else {
|
|
242
|
+
mergedDefaultSection.push(line);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Find any user-added lines in default section that aren't in new defaults
|
|
247
|
+
// These should be moved to custom section
|
|
248
|
+
const userAddedToDefaults = [];
|
|
249
|
+
|
|
250
|
+
for (const line of defaultSection) {
|
|
251
|
+
const trimmed = line.trim();
|
|
252
|
+
|
|
253
|
+
// Skip empty lines and comments
|
|
254
|
+
if (!trimmed || trimmed.startsWith('#')) {
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (isEnvFile) {
|
|
259
|
+
// For .env, check if key exists in new defaults
|
|
260
|
+
const key = trimmed.split('=')[0].trim();
|
|
261
|
+
if (key && !newDefaultKeys.has(key) && !existingCustomKeys.has(key)) {
|
|
262
|
+
// User added this key to defaults section - move to custom
|
|
263
|
+
userAddedToDefaults.push(line);
|
|
264
|
+
}
|
|
265
|
+
} else {
|
|
266
|
+
// For .gitignore, check if line exists in new defaults
|
|
267
|
+
// We need to check if this exact line appears in the new default section
|
|
268
|
+
const lineExistsInNewDefaults = newLines.some(newLine => {
|
|
269
|
+
return newLine.trim() === trimmed;
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
if (!lineExistsInNewDefaults) {
|
|
273
|
+
// User added this line to defaults section - move to custom
|
|
274
|
+
userAddedToDefaults.push(line);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Build final result
|
|
280
|
+
const result = [];
|
|
281
|
+
|
|
282
|
+
// Add default section
|
|
283
|
+
result.push(DEFAULT_SECTION_MARKER);
|
|
284
|
+
result.push(...mergedDefaultSection);
|
|
285
|
+
|
|
286
|
+
// Add custom section
|
|
287
|
+
result.push('');
|
|
288
|
+
result.push(CUSTOM_SECTION_MARKER);
|
|
289
|
+
|
|
290
|
+
// First add any user lines that were in default section (moved to custom)
|
|
291
|
+
if (userAddedToDefaults.length > 0) {
|
|
292
|
+
result.push(...userAddedToDefaults);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Then add existing custom section
|
|
296
|
+
result.push(...customSection);
|
|
297
|
+
|
|
298
|
+
return result.join('\n');
|
|
299
|
+
}
|
|
300
|
+
|
|
113
301
|
// Helper function to merge configs intelligently
|
|
114
302
|
function mergeConfigs(existingConfig, newConfig) {
|
|
115
303
|
const merged = { ...newConfig };
|
|
@@ -256,8 +444,27 @@ function customTransform() {
|
|
|
256
444
|
}
|
|
257
445
|
}
|
|
258
446
|
|
|
447
|
+
// Handle line-based merging (.gitignore, .env)
|
|
448
|
+
if (options.mergeLines && exists && !isBinaryFile) {
|
|
449
|
+
try {
|
|
450
|
+
const existingContent = jetpack.read(fullOutputPath);
|
|
451
|
+
const newContent = file.contents.toString();
|
|
452
|
+
|
|
453
|
+
// Merge line-by-line, passing the filename to handle .env differently
|
|
454
|
+
const mergedContent = mergeLineBasedFiles(existingContent, newContent, item.name);
|
|
455
|
+
|
|
456
|
+
// Update file contents
|
|
457
|
+
file.contents = Buffer.from(mergedContent);
|
|
458
|
+
|
|
459
|
+
logger.log(`Merged line-based file: ${relativePath}`);
|
|
460
|
+
} catch (error) {
|
|
461
|
+
logger.error(`Error merging line-based file ${relativePath}:`, error);
|
|
462
|
+
// Fall through to normal processing if merge fails
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
259
466
|
// Skip if instructed
|
|
260
|
-
if (options.skip || (!options.overwrite && exists && !options.merge)) {
|
|
467
|
+
if (options.skip || (!options.overwrite && exists && !options.merge && !options.mergeLines)) {
|
|
261
468
|
logger.log(`Skipping file: ${relativePath}`);
|
|
262
469
|
return callback();
|
|
263
470
|
}
|
|
@@ -325,6 +532,8 @@ function getFileOptions(filePath) {
|
|
|
325
532
|
path: null,
|
|
326
533
|
template: null,
|
|
327
534
|
skip: false,
|
|
535
|
+
merge: false,
|
|
536
|
+
mergeLines: false,
|
|
328
537
|
rule: null,
|
|
329
538
|
};
|
|
330
539
|
|
package/dist/gulp/tasks/serve.js
CHANGED
|
@@ -63,6 +63,24 @@ module.exports = async function serve(complete) {
|
|
|
63
63
|
|
|
64
64
|
// Write the config file
|
|
65
65
|
jetpack.write('.temp/_config_browsersync.yml', `url: ${externalUrl}`);
|
|
66
|
+
// jetpack.write('.temp/_config_browsersync.yml', `
|
|
67
|
+
// url: ${externalUrl}
|
|
68
|
+
|
|
69
|
+
// web_manager:
|
|
70
|
+
// firebase:
|
|
71
|
+
// app:
|
|
72
|
+
// config:
|
|
73
|
+
// authDomain: "${new URL(externalUrl).host}"
|
|
74
|
+
// `);
|
|
75
|
+
// jetpack.write('.temp/_config_browsersync.yml', `
|
|
76
|
+
// url: ${externalUrl}
|
|
77
|
+
|
|
78
|
+
// web_manager:
|
|
79
|
+
// firebase:
|
|
80
|
+
// app:
|
|
81
|
+
// config:
|
|
82
|
+
// authDomain: "${new URL(localUrl).host}"
|
|
83
|
+
// `);
|
|
66
84
|
|
|
67
85
|
// Set global variable to access browserSync in other files
|
|
68
86
|
global.browserSync = browserSync;
|
package/dist/lib/logger.js
CHANGED