sfc-utils 1.4.202 → 1.4.204

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 (93) hide show
  1. package/.playwright-mcp/console-2026-04-02T20-52-32-578Z.log +994 -0
  2. package/.playwright-mcp/page-2026-04-02T20-52-43-138Z.yml +13584 -0
  3. package/.playwright-mcp/page-2026-04-02T20-52-52-183Z.png +0 -0
  4. package/components/geocoder.mjs +1 -0
  5. package/components/helpers/utilfunctions.mjs +17 -24
  6. package/components/layout/layouthelmet.mjs +4 -0
  7. package/footer.js +54 -0
  8. package/index.js +4 -0
  9. package/package.json +1 -1
  10. package/settings.js +2 -2
  11. package/example/.prettierrc +0 -5
  12. package/example/README.md +0 -8
  13. package/example/gatsby-config.js +0 -137
  14. package/example/gatsby-node.js +0 -66
  15. package/example/package-lock.json +0 -31884
  16. package/example/package.json +0 -71
  17. package/example/project-config.json +0 -38
  18. package/example/src/components/layout.js +0 -96
  19. package/example/src/components/sfc/ad.js +0 -47
  20. package/example/src/components/sfc/ai2html/ai2html_template.ai +5 -1368
  21. package/example/src/components/sfc/button.js +0 -40
  22. package/example/src/components/sfc/byline.js +0 -42
  23. package/example/src/components/sfc/component-helpers/customhooks.js +0 -17
  24. package/example/src/components/sfc/component-helpers/datehelpers.js +0 -55
  25. package/example/src/components/sfc/component-helpers/newsletterhelpers.js +0 -89
  26. package/example/src/components/sfc/component-helpers/requesthelpers.js +0 -7
  27. package/example/src/components/sfc/component-helpers/scrolldownhelpers.js +0 -11
  28. package/example/src/components/sfc/component-helpers/utilfunctions.js +0 -68
  29. package/example/src/components/sfc/creditline.js +0 -35
  30. package/example/src/components/sfc/credits.js +0 -17
  31. package/example/src/components/sfc/creditssection.js +0 -49
  32. package/example/src/components/sfc/dropcap.js +0 -15
  33. package/example/src/components/sfc/footer.js +0 -36
  34. package/example/src/components/sfc/geocoder.js +0 -148
  35. package/example/src/components/sfc/misccredit.js +0 -17
  36. package/example/src/components/sfc/navtop.js +0 -121
  37. package/example/src/components/sfc/newsletter.js +0 -157
  38. package/example/src/components/sfc/relatedlink.js +0 -23
  39. package/example/src/components/sfc/relatedrow.js +0 -23
  40. package/example/src/components/sfc/relatedsection.js +0 -27
  41. package/example/src/components/sfc/safelink.js +0 -86
  42. package/example/src/components/sfc/scrolldown.js +0 -22
  43. package/example/src/components/sfc/sharebuttons.js +0 -93
  44. package/example/src/components/sfc/topper.js +0 -88
  45. package/example/src/components/sfc/video.js +0 -74
  46. package/example/src/components/sfc/wcmimage.js +0 -131
  47. package/example/src/data/sfc/images/react.gif +0 -0
  48. package/example/src/data/sfc/related_links.json +0 -17
  49. package/example/src/html.js +0 -41
  50. package/example/src/pages/index.js +0 -166
  51. package/example/src/styles/credittooltip.less +0 -55
  52. package/example/src/styles/footer.less +0 -378
  53. package/example/src/styles/modules/ad.module.less +0 -21
  54. package/example/src/styles/modules/ai2html.module.less +0 -19
  55. package/example/src/styles/modules/button.module.less +0 -94
  56. package/example/src/styles/modules/byline.module.less +0 -11
  57. package/example/src/styles/modules/creditline.module.less +0 -12
  58. package/example/src/styles/modules/credits.module.less +0 -7
  59. package/example/src/styles/modules/creditssection.module.less +0 -17
  60. package/example/src/styles/modules/dropcap.module.less +0 -18
  61. package/example/src/styles/modules/geocoder.module.less +0 -79
  62. package/example/src/styles/modules/newsletter.module.less +0 -147
  63. package/example/src/styles/modules/relatedlink.module.less +0 -28
  64. package/example/src/styles/modules/relatedrow.module.less +0 -8
  65. package/example/src/styles/modules/relatedsection.module.less +0 -19
  66. package/example/src/styles/modules/scrolldown.module.less +0 -31
  67. package/example/src/styles/modules/share.module.less +0 -22
  68. package/example/src/styles/modules/topper.module.less +0 -63
  69. package/example/src/styles/modules/video.module.less +0 -27
  70. package/example/src/styles/modules/wcmimage.module.less +0 -20
  71. package/example/src/styles/nav.less +0 -187
  72. package/example/src/styles/old css/defaults.less +0 -99
  73. package/example/src/styles/old css/footer.less +0 -345
  74. package/example/src/styles/old css/nav.less +0 -187
  75. package/example/src/styles/old css/project.less +0 -1
  76. package/example/src/styles/old css/reset.css +0 -95
  77. package/example/src/styles/old css/seed.less +0 -7
  78. package/example/src/styles/old css/typography.css +0 -168
  79. package/example/src/styles/old css/values.less +0 -74
  80. package/example/src/styles/project.less +0 -1
  81. package/example/src/styles/reset.css +0 -97
  82. package/example/src/styles/seed.less +0 -6
  83. package/example/src/styles/values.less +0 -203
  84. package/example/src/styles/variables.less +0 -142
  85. package/example/static/manifest.webmanifest +0 -1
  86. package/example/tasks/create-c2p-sheet.js +0 -6
  87. package/example/tasks/deploy-addon.py +0 -14
  88. package/example/tasks/google-docs.js +0 -16
  89. package/example/tasks/google-sheets.js +0 -17
  90. package/example/tasks/node-helpers.js +0 -81
  91. package/example/tasks/post-build.sh +0 -7
  92. package/example/tasks/pre-build.sh +0 -18
  93. package/example/tempsettings.js +0 -28
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # I know this is crazy (and/or a security peril), but you can put code in this file that will run on the deploy engine when this gets deployed. This lets you do cool stuff like:
4
- # - Add recent data to the project so clients don't have to make extra calls
5
- # - Perform data manipulations so the downloaded file is small/clean
6
- # - Run sanity checks prior to deployment -- if this file throws an error, the deploy will be halted
7
-
8
- # NOTE: You can just straight up use varibles that are available the deploy engine's poll_s3.py script, even if we haven't declared anything here. Check out an example call to Slack:
9
-
10
- app_sc.api_call(
11
- "chat.postMessage",
12
- channel=deploy_feed,
13
- text="*DEPLOY-ADDON.PY:* Hi! :sparkles:"
14
- )
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { googleAuth } = require('../../copy/docs')
4
- const project = require('../project-config.json')
5
-
6
- /*
7
-
8
- * The docs googleAuth function uses the Google Drive API to parse Google Doc with ArchieML generate JSON file
9
- * Docs must be shared with the service account email before they can be accessed with this task
10
- * @param {object} config standard object from project-config.json or project.json
11
- * @param {string} directory optional alternate path to directory in which to save the output
12
- * @param {array} filenames optional array of objects with name and id key/values used to specify a filename for a specific doc
13
-
14
- */
15
-
16
- googleAuth(project)
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { googleAuth } = require('../../copy/sheets')
4
- const project = require('../project-config.json')
5
-
6
- /*
7
- * The sheets googleAuth function uses the Google Sheets API to pull data from Sheets and load it onto shared
8
- * state. Writes the data out to JSON for later reference. Does not currently
9
- * check for existing data to merge--it does a fresh pull every time.
10
- * Sheets must be shared with the service account email before they can be accessed with this task
11
- * @param {object} project standard object from project-config.json or project.json
12
- * @param {string} directory optional alternate path to directory in which to save the output
13
- * @param {bool} forces all values to strings if true
14
-
15
- */
16
-
17
- googleAuth(project, null, true)
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const url = require('url');
4
- const https = require('https');
5
- const request = require('request');
6
- const probe = require('probe-image-size');
7
-
8
- function requestImage(wcmid, index) {
9
- return new Promise((resolve, reject) => {
10
- console.log("📷 grabbing image aspect", wcmid);
11
-
12
- // Generate the full path
13
- let hash = parseInt(wcmid).toString(8); // Convert to base 8
14
- // Make sure to zero pad if it's an odd number
15
- if (hash.length % 2) {
16
- hash = `0${hash}`;
17
- }
18
- let hashArray = hash.match(/.{1,2}/g);
19
- hashArray = hashArray.slice(0, 4);
20
- hash = hashArray.join("/");
21
-
22
- // Create the image path
23
- let imgPath = `https://s.hdnux.com/photos/${hash}/${wcmid}/1/`;
24
- // Buffer a small version of this file to get the aspect:
25
- // Do not try to optimize the var below by using ${hash} or ${imgPath}, it will not work
26
- // It opens up some kind of rift in the javascript spacetime continuum
27
- let reqUrl = `https://s.hdnux.com/photos/0/0/0/0/${wcmid}/1/100x0.jpg`;
28
-
29
- // First we need the live URL from the redirect
30
- let makeReq = (reqUrl, num) => {
31
- if (!num){
32
- num = 1;
33
- } else {
34
- num += 1;
35
- }
36
- // Bail out if we've asked too many times
37
- if (num > 5){
38
- resolve({ratio: 0.75, wcmid: wcmid, full_path: imgPath});
39
- } else {
40
- request({ url: reqUrl, followRedirect: false }, function (err, res, body) {
41
- // res.headers.location is the final redirect URL
42
- // if res doesn't exists, throw
43
- if (res){
44
- // If we didn't get a location, we can just use the placeholder ratio
45
- if (!res.headers.location) {
46
- resolve({ratio: 0.75, wcmid: wcmid, full_path: imgPath});
47
- return false;
48
- }
49
- let options = url.parse(res.headers.location);
50
- https.get(options, function (response) {
51
- let chunks = [];
52
- response.on('data', function (chunk) {
53
- chunks.push(chunk);
54
- }).on('end', function() {
55
- let buffer = Buffer.concat(chunks);
56
- let sizeData = probe.sync(buffer);
57
- if (!sizeData){
58
- console.log("FATAL GATSBY IMAGE ERROR! NO SIZE DATA FOR " + wcmid, buffer.toString());
59
- // If it failed, make it again
60
- makeReq(reqUrl, num)
61
- } else {
62
- resolve({ratio: sizeData.height/sizeData.width, wcmid: wcmid, full_path: imgPath});
63
- }
64
- });
65
- });
66
- } else {
67
- console.log("FATAL GATSBY IMAGE ERROR! NO RES FROM HDNUX");
68
- // If it failed, make it again
69
- makeReq(reqUrl, num)
70
- }
71
- });
72
- }
73
- }
74
-
75
- // Use request library to get the actual redirected location
76
- makeReq(reqUrl)
77
- })
78
- }
79
-
80
-
81
- module.exports = { requestImage };
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Run with ./deploy-git.sh
4
- # Super simple script to prep for git deploy
5
-
6
- echo "Copying build to export..."
7
- cp -a public/. "./public_export"
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Get ready to build this project!
4
-
5
- echo "Checking if remote data needs to be pulled..."
6
- sheets=$(node -pe 'JSON.parse(process.argv[1]).GOOGLE_SHEETS' "$(cat project-config.json)")
7
- docs=$(node -pe 'JSON.parse(process.argv[1]).GOOGLE_DOCS' "$(cat project-config.json)")
8
-
9
- # If length of the string is greater than 2, needs running
10
- if [ ${#sheets} -gt 2 ]; then
11
- npm run sheets
12
- fi
13
-
14
- if [ ${#docs} -gt 2 ]; then
15
- npm run docs
16
- fi
17
-
18
- # Special pre-build code follows if needed:
@@ -1,28 +0,0 @@
1
-
2
- /* A MODIFIED VERSION OF UTILS SETTINGS (BECAUSE THE PATHS ARE WRONG OTHERWISE) */
3
- let projectConfig;
4
- try {
5
- projectConfig = require("./project-config.json")
6
- } catch (err){
7
- // It's ok
8
- }
9
- let projectSettings = projectConfig.PROJECT
10
-
11
- // Get settings off story_settings if it exists, otherwise fall back to projectConfig
12
- let getSettings = function(){
13
- let settings = projectConfig
14
- // This needs to be set even if the "try" below fails
15
- settings.PROJECT['ANALYTICS_CREDIT'] = ''
16
-
17
- // Check if we need a slash
18
- let slash = "";
19
- if (settings.PROJECT.SUBFOLDER){
20
- slash = "/"
21
- }
22
- settings.PROJECT['OPT_SLASH'] = slash
23
- // Set the canonical (either from the sheet override or constructed)
24
- settings.PROJECT['CANONICAL_URL'] = projectConfig.MAIN_DOMAIN + "/" + settings.PROJECT.SUBFOLDER + slash + settings.PROJECT.SLUG
25
- return settings
26
- }
27
-
28
- module.exports = { getSettings }