sdc-build-wp 5.6.11 → 5.6.12

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.
@@ -75,7 +75,11 @@ export default class ServerComponent extends BaseComponent {
75
75
  rule: {
76
76
  match: thisProject.config.browsersync?.location == 'end' ? /<\/body>/ : /<body[^>]*>/,
77
77
  fn: function (snippet, match) {
78
- const exposeProxyScript = `<script>window.localProxyURL = ${JSON.stringify(thisProject.config.browsersync?.localProxyURL || '')};<\/script>`;
78
+ const proxyURL = new URL(thisProject.config.browsersync?.localProxyURL || '');
79
+ const rawDomain = proxyURL.host || 'localhost';
80
+ const tmpPrefix = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
81
+ const rawDomainWithPreSuf = `${tmpPrefix}${rawDomain}`;
82
+ const exposeProxyScript = `<script>window.localProxyURLWithPreSuf = '${rawDomainWithPreSuf}';window.localProxyURL = window.localProxyURLWithPreSuf.replace('${tmpPrefix}', '');<\/script>`;
79
83
  const customScript = `<script async>${thisProject.pageScript}</script>`;
80
84
  const allScripts = snippet + exposeProxyScript + customScript;
81
85
  return thisProject.config.browsersync?.location == 'end' ? allScripts + match : match + allScripts;
@@ -15,7 +15,7 @@ function redirectAdminFromPort() {
15
15
  }
16
16
  if (window.localProxyURL && window.localProxyURL !== '') {
17
17
  try {
18
- const proxyUrl = new URL(window.localProxyURL, window.location.origin);
18
+ const proxyUrl = new URL(window.localProxyURL);
19
19
  if (proxyUrl.port) {
20
20
  url.port = proxyUrl.port;
21
21
  } else {
@@ -44,7 +44,6 @@ function getScriptsOnPage() {
44
44
  });
45
45
  }
46
46
 
47
-
48
47
  const scriptsOnPageInterval = setInterval(() => {
49
48
  socket = window.___browserSync___?.socket;
50
49
  if (socket) {
package/lib/tui.js CHANGED
@@ -69,9 +69,11 @@ function TUIRoot({ tui }) {
69
69
  TitledBox,
70
70
  {
71
71
  borderStyle: 'round',
72
+ borderLeft: false,
73
+ borderRight: false,
72
74
  titles: ['SDC Build WP'],
73
75
  borderColor: 'blue',
74
- paddingX: 1,
76
+ paddingX: 0,
75
77
  flexDirection: 'column'
76
78
  },
77
79
  header.titleLine || header.urlLine
@@ -102,7 +104,9 @@ function TUIRoot({ tui }) {
102
104
  borderStyle: 'round',
103
105
  borderColor: 'blue',
104
106
  borderTop: false,
105
- paddingX: 1,
107
+ borderLeft: false,
108
+ borderRight: false,
109
+ paddingX: 0,
106
110
  flexDirection: 'column',
107
111
  height: availableLogRows + 1
108
112
  },
@@ -114,7 +118,9 @@ function TUIRoot({ tui }) {
114
118
  {
115
119
  borderStyle: 'round',
116
120
  borderColor: 'cyan',
117
- paddingX: 1,
121
+ borderLeft: false,
122
+ borderRight: false,
123
+ paddingX: 0,
118
124
  marginTop: 1,
119
125
  flexDirection: 'column'
120
126
  },
@@ -245,7 +251,7 @@ class TUI {
245
251
 
246
252
  getHeaderLayout(terminalColumns = 80) {
247
253
  const detailLines = [];
248
- const innerWidth = Math.max(1, terminalColumns - 4);
254
+ const innerWidth = Math.max(1, terminalColumns);
249
255
  const statusMessages = [];
250
256
 
251
257
  let titleLine = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdc-build-wp",
3
- "version": "5.6.11",
3
+ "version": "5.6.12",
4
4
  "description": "Custom WordPress build process.",
5
5
  "engines": {
6
6
  "node": ">=22"