ultimate-jekyll-manager 0.0.166 → 0.0.168

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.
@@ -0,0 +1,69 @@
1
+ TODO
2
+ * Does signup work with BEM 5.0?? keeps ssying cannot resolve user after i sign up and try to go into accout :(
3
+
4
+
5
+ FIX ATTRIBUTION
6
+ https://claude.ai/share/bae8e516-e74c-4e77-9a85-e58277908b43
7
+
8
+ i want to also add my own "itm" tags which are set by internal things. can we process those too?
9
+
10
+ // attribution.js - load this on every page
11
+ (function() {
12
+ const params = new URLSearchParams(window.location.search);
13
+
14
+ // Check if this pageview has any attribution params
15
+ const hasAttribution = params.get('fbclid') || params.get('gclid') ||
16
+ params.get('ttclid') || params.get('utm_source');
17
+
18
+ if (hasAttribution) {
19
+ const attribution = {
20
+ fbclid: params.get('fbclid'),
21
+ fbc: getCookie('_fbc'),
22
+ gclid: params.get('gclid'),
23
+ ttclid: params.get('ttclid'),
24
+ utm_source: params.get('utm_source'),
25
+ utm_medium: params.get('utm_medium'),
26
+ utm_campaign: params.get('utm_campaign'),
27
+ utm_content: params.get('utm_content'),
28
+ utm_term: params.get('utm_term'),
29
+ landingPage: window.location.pathname,
30
+ capturedAt: new Date().toISOString(),
31
+ };
32
+
33
+ // Only save if we don't already have attribution (first-touch)
34
+ if (!localStorage.getItem('attribution')) {
35
+ localStorage.setItem('attribution', JSON.stringify(attribution));
36
+ }
37
+ }
38
+ })();
39
+
40
+
41
+ TODO
42
+ fix tiktok pixel events (look at this)
43
+
44
+ Test deletion account flow
45
+
46
+
47
+ PROBLEM
48
+ navigatin to https://192.168.86.69:4000/reset?authSignout=true
49
+
50
+ WHILE SIGNED IT signs you out (GOOD) but then it KICKS you back to INDEX (BAD) istead of STAYING O THE PAGE
51
+
52
+ FIX FORM MANAGER
53
+
54
+ FIX TIKTKO PIXELS TRACKING ID NOT CORRECT
55
+
56
+ output: {
57
+ filename: '[name].[contenthash].js',
58
+ sourceMapFilename: '[name].[contenthash].js.map',
59
+ },
60
+ devtool: Manager.isProd() ? 'hidden-source-map' : 'eval-source-map',
61
+
62
+
63
+ signout on homepage
64
+ * sign up / singin button does NOT reappear (there is just no button)
65
+
66
+
67
+ try not to expose Manager??
68
+
69
+
package/TODO.md CHANGED
@@ -6,10 +6,6 @@ NEW TODO
6
6
  - FIx formmanager .getData() it keeps returning an empty object, make it work flawlessyly
7
7
  - It keeps testing whether there is a "." every time it reads or writes. just call the getNested and setNested functions and then check for the DOT inside those functions
8
8
  - form manager should NOT submit if the button that was clicked is disabled (class or attribute)
9
- - script that adds some helpful classes to the body or attributes to html maybe like
10
- * data-device="mobile|tablet|desktop"
11
- * data-browser="chrome|safari|firefox|edge|opera|other"
12
- * data-os="windows|macos|linux|android|ios|other"
13
9
 
14
10
  Make an admin dashboard backend
15
11
 
@@ -1,5 +1,5 @@
1
1
  // Libraries
2
- import fetch from 'wonderful-fetch';
2
+ import authorizedFetch from '__main_assets__/js/libs/authorized-fetch.js';
3
3
  let webManager = null;
4
4
 
5
5
  // Module
@@ -67,10 +67,6 @@ async function handleOAuthCallback() {
67
67
  throw new Error('Missing provider in state');
68
68
  }
69
69
 
70
- if (!stateParsed.authenticationToken) {
71
- throw new Error('Missing authentication token');
72
- }
73
-
74
70
  if (!stateParsed.serverUrl) {
75
71
  throw new Error('Missing server URL');
76
72
  }
@@ -80,7 +76,7 @@ async function handleOAuthCallback() {
80
76
  $provider.textContent = providerName;
81
77
 
82
78
  // Validate redirect URL
83
- if (stateParsed.redirectUrl && !isValidRedirectUrl(stateParsed.redirectUrl)) {
79
+ if (stateParsed.redirectUrl && !webManager.isValidRedirectUrl(stateParsed.redirectUrl)) {
84
80
  throw new Error('Invalid redirect URL');
85
81
  }
86
82
 
@@ -101,13 +97,12 @@ async function handleOAuthCallback() {
101
97
  console.log('Tokenize payload:', payload);
102
98
 
103
99
  // Call server to complete OAuth flow
104
- const response = await fetch(stateParsed.serverUrl, {
100
+ const response = await authorizedFetch(stateParsed.serverUrl, {
105
101
  method: 'POST',
106
102
  timeout: 60000,
107
103
  response: 'json',
108
104
  tries: 2,
109
105
  body: {
110
- authenticationToken: stateParsed.authenticationToken,
111
106
  command: 'user:oauth2',
112
107
  payload: payload
113
108
  }
@@ -177,34 +172,6 @@ function showError(message) {
177
172
  }
178
173
  }
179
174
 
180
- // Validate redirect URL
181
- function isValidRedirectUrl(url) {
182
- try {
183
- const parsed = new URL(url);
184
- const current = new URL(window.location.href);
185
-
186
- // Allow same origin or configured trusted domains
187
- return parsed.origin === current.origin ||
188
- isAllowedDomain(parsed.hostname);
189
- } catch (e) {
190
- return false;
191
- }
192
- }
193
-
194
- // Check if domain is allowed
195
- function isAllowedDomain(hostname) {
196
- // Add any trusted domains here
197
- const allowedDomains = [
198
- 'localhost',
199
- '127.0.0.1',
200
- webManager?.config?.brand?.domain
201
- ].filter(Boolean);
202
-
203
- return allowedDomains.some(domain =>
204
- hostname === domain || hostname.endsWith('.' + domain)
205
- );
206
- }
207
-
208
175
  // Capitalize first letter
209
176
  function capitalizeFirstLetter(string) {
210
177
  if (!string) return '';
@@ -0,0 +1,108 @@
1
+ // This file is required by /token page to generate custom auth tokens for extensions/apps
2
+ import authorizedFetch from '__main_assets__/js/libs/authorized-fetch.js';
3
+
4
+ // Module
5
+ export default function (Manager) {
6
+ // Shortcuts
7
+ const { webManager } = Manager;
8
+
9
+ // DOM elements
10
+ const $status = document.getElementById('token-status');
11
+ const $error = document.getElementById('token-error');
12
+ const $errorMessage = document.getElementById('token-error-message');
13
+
14
+ // Get URL params
15
+ const url = new URL(window.location.href);
16
+ const authReturnUrl = url.searchParams.get('authReturnUrl');
17
+
18
+ // Handle DOM ready
19
+ webManager.dom().ready()
20
+ .then(async () => {
21
+ // Log
22
+ console.log('[Token] Initialized. authReturnUrl:', authReturnUrl);
23
+
24
+ // Validate authReturnUrl if present
25
+ if (authReturnUrl && !webManager.isValidRedirectUrl(authReturnUrl)) {
26
+ showError('Invalid redirect URL');
27
+ return;
28
+ }
29
+
30
+ // Wait for auth to be ready and get user
31
+ webManager.auth().listen({ once: true }, async (state) => {
32
+ const user = state.user;
33
+
34
+ // Should not happen since page requires auth, but just in case
35
+ if (!user) {
36
+ showError('Not authenticated. Please sign in first.');
37
+ return;
38
+ }
39
+
40
+ try {
41
+ // Generate custom token
42
+ updateStatus('Generating secure token...');
43
+ const token = await generateCustomToken(webManager);
44
+
45
+ // Update status
46
+ updateStatus('Token generated successfully!');
47
+
48
+ // Handle redirect or URL update
49
+ if (authReturnUrl) {
50
+ // Redirect to return URL with token (for electron/deep links)
51
+ updateStatus('Redirecting...');
52
+ const returnUrl = new URL(authReturnUrl);
53
+ returnUrl.searchParams.set('authToken', token);
54
+ window.location.href = returnUrl.toString();
55
+ } else {
56
+ // Add token to current URL (for browser extensions)
57
+ // Extension background will detect this and close the tab
58
+ url.searchParams.set('authToken', token);
59
+ window.history.replaceState({}, '', url.toString());
60
+ updateStatus('You can close this tab now.');
61
+ }
62
+ } catch (error) {
63
+ console.error('[Token] Error generating token:', error);
64
+ showError(error.message || 'Failed to generate token. Please try again.');
65
+ }
66
+ });
67
+ });
68
+
69
+ // Generate custom token via backend-manager API
70
+ async function generateCustomToken(webManager) {
71
+ const serverApiURL = `${webManager.getApiUrl()}/backend-manager`;
72
+
73
+ const response = await authorizedFetch(serverApiURL, {
74
+ method: 'POST',
75
+ body: {
76
+ command: 'user:create-custom-token',
77
+ payload: {},
78
+ },
79
+ });
80
+
81
+ // Extract token from response
82
+ const token = response?.data?.token;
83
+
84
+ if (!token) {
85
+ throw new Error('No token received from server');
86
+ }
87
+
88
+ return token;
89
+ }
90
+
91
+ // Update status message
92
+ function updateStatus(message) {
93
+ if ($status) {
94
+ $status.innerHTML = `<p class="text-muted small">${message}</p>`;
95
+ }
96
+ }
97
+
98
+ // Show error message
99
+ function showError(message) {
100
+ if ($error && $errorMessage) {
101
+ $errorMessage.textContent = message;
102
+ $error.classList.remove('d-none');
103
+ }
104
+ if ($status) {
105
+ $status.classList.add('d-none');
106
+ }
107
+ }
108
+ }
@@ -340,7 +340,7 @@ function install(package, ver, location) {
340
340
  // Create CNAME
341
341
  async function createCname() {
342
342
  // Get the CNAME
343
- const url = config.url || 'https://template.itwcreativeworks.com';
343
+ const url = config.url || 'https://ultimate-jekyll.itwcreativeworks.com';
344
344
  const host = new URL(url).host
345
345
 
346
346
  // Write to file
@@ -91,6 +91,7 @@
91
91
  <!-- Configuration -->
92
92
  <script type="text/javascript">
93
93
  var Configuration = {
94
+ runtime: "web",
94
95
  environment: "{{ jekyll.environment }}",
95
96
  buildTime: {{ site.uj.cache_breaker }},
96
97
  brand: {{ page.resolved.brand | jsonify }},
@@ -0,0 +1,20 @@
1
+ ---
2
+ ### ALL PAGES ###
3
+ layout: themes/[ site.theme.id ]/frontend/pages/auth/token
4
+
5
+ ### REGULAR PAGES ###
6
+ meta:
7
+ title: "Authenticating - {{ site.brand.name }}"
8
+ description: "Generating authentication token for {{ site.brand.name }}."
9
+ breadcrumb: "Token"
10
+
11
+ ### WEB MANAGER CONFIG ###
12
+ web_manager:
13
+ auth:
14
+ config:
15
+ policy: "authenticated"
16
+ redirects:
17
+ unauthenticated: "/signup"
18
+ ---
19
+
20
+ {{ content | uj_content_format }}
@@ -0,0 +1,42 @@
1
+ ---
2
+ ### ALL PAGES ###
3
+ layout: themes/[ site.theme.id ]/frontend/core/cover
4
+ ---
5
+
6
+ <section class="col-12 col-md-8 col-lg-6 col-xl-5 mw-sm">
7
+ <div class="card border-0 shadow-lg">
8
+ <div class="card-body p-3 p-md-5">
9
+ <!-- Logo -->
10
+ <div class="text-center mb-3">
11
+ <div class="avatar avatar-xl">
12
+ <img src="{{ site.brand.images.brandmark }}?cb={{ site.uj.cache_breaker }}" alt="{{ site.brand.name }} Logo"/>
13
+ </div>
14
+ </div>
15
+
16
+ <!-- Header -->
17
+ <div class="text-center mb-4">
18
+ <h1 class="h3 mb-2">Authenticating...</h1>
19
+ <p class="text-muted">Please wait while we complete your sign in</p>
20
+ </div>
21
+
22
+ <!-- Spinner -->
23
+ <div class="text-center mb-4">
24
+ <div class="spinner-border text-primary" role="status">
25
+ <span class="visually-hidden">Loading...</span>
26
+ </div>
27
+ </div>
28
+
29
+ <!-- Status message -->
30
+ <div id="token-status" class="text-center">
31
+ <p class="text-muted small">Generating secure token...</p>
32
+ </div>
33
+
34
+ <!-- Error message (hidden by default) -->
35
+ <div id="token-error" class="alert alert-danger d-none" role="alert">
36
+ <strong>Error:</strong> <span id="token-error-message"></span>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </section>
41
+
42
+ {{ content | uj_content_format }}
@@ -0,0 +1,7 @@
1
+ ---
2
+ ### ALL PAGES ###
3
+ layout: blueprint/auth/token
4
+ permalink: /token
5
+
6
+ ### REGULAR PAGES ###
7
+ ---
@@ -3434,3 +3434,31 @@
3434
3434
  [debug] [2025-12-15T04:18:53.455Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3435
3435
  [debug] [2025-12-15T04:18:53.455Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3436
3436
  [debug] [2025-12-15T04:18:53.455Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3437
+ [debug] [2025-12-16T05:17:13.900Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3438
+ [debug] [2025-12-16T05:17:13.902Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3439
+ [debug] [2025-12-16T05:17:13.902Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3440
+ [debug] [2025-12-16T05:17:13.903Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3441
+ [debug] [2025-12-16T05:17:13.903Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3442
+ [debug] [2025-12-16T05:17:13.915Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3443
+ [debug] [2025-12-16T05:17:13.915Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3444
+ [debug] [2025-12-16T05:17:13.904Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3445
+ [debug] [2025-12-16T05:17:13.904Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3446
+ [debug] [2025-12-16T05:17:13.905Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3447
+ [debug] [2025-12-16T05:17:13.920Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3448
+ [debug] [2025-12-16T05:17:13.920Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3449
+ [debug] [2025-12-16T05:17:14.027Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3450
+ [debug] [2025-12-16T05:17:14.027Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3451
+ [debug] [2025-12-16T05:17:14.028Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3452
+ [debug] [2025-12-16T05:17:14.029Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3453
+ [debug] [2025-12-16T05:17:14.036Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3454
+ [debug] [2025-12-16T05:17:14.036Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3455
+ [debug] [2025-12-16T05:17:14.036Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3456
+ [debug] [2025-12-16T05:17:14.037Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3457
+ [debug] [2025-12-16T05:17:14.037Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3458
+ [debug] [2025-12-16T05:17:14.036Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3459
+ [debug] [2025-12-16T05:17:14.037Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3460
+ [debug] [2025-12-16T05:17:14.037Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3461
+ [debug] [2025-12-16T05:17:14.039Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3462
+ [debug] [2025-12-16T05:17:14.040Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
3463
+ [debug] [2025-12-16T05:17:14.040Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
3464
+ [debug] [2025-12-16T05:17:14.040Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.166",
3
+ "version": "0.0.168",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -53,7 +53,7 @@
53
53
  "bugs": {
54
54
  "url": "https://github.com/itw-creative-works/ultimate-jekyll/issues"
55
55
  },
56
- "homepage": "https://template.itwcreativeworks.com",
56
+ "homepage": "https://ultimate-jekyll.itwcreativeworks.com",
57
57
  "noteDeps": {
58
58
  "browser-sync": "2.23.7 (6-22-2023): Hard lock because every version after uses socket.io@4.7.0 which uses engine.io@6.5.0 which is incompatible with node 10.15.1 due to TextDecoder() in build process",
59
59
  "sharp": "0.23.1 (sometime before 2021ish): Hard lock because later versions had issues. Possibly solved in higher node versions",
@@ -84,7 +84,7 @@
84
84
  "gulp-responsive-modern": "^1.0.0",
85
85
  "gulp-sass": "^6.0.1",
86
86
  "html-minifier-terser": "^7.2.0",
87
- "html-validate": "^10.4.0",
87
+ "html-validate": "^10.5.0",
88
88
  "itwcw-package-analytics": "^1.0.6",
89
89
  "js-yaml": "^3.14.2",
90
90
  "json5": "^2.2.3",
@@ -95,10 +95,10 @@
95
95
  "npm-api": "^1.0.1",
96
96
  "postcss": "^8.5.6",
97
97
  "prettier": "^3.7.4",
98
- "sass": "^1.96.0",
98
+ "sass": "^1.97.0",
99
99
  "spellchecker": "^3.7.1",
100
100
  "through2": "^4.0.2",
101
- "web-manager": "^4.0.34",
101
+ "web-manager": "^4.0.38",
102
102
  "webpack": "^5.103.0",
103
103
  "wonderful-fetch": "^1.3.4",
104
104
  "wonderful-version": "^1.3.2",