@patch-adams/core 1.5.0 → 1.5.1

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/dist/index.js CHANGED
@@ -4755,8 +4755,8 @@ function generateSkinCssLoader(options) {
4755
4755
  function buildSkinCssOptions(config) {
4756
4756
  if (!config.skin) return null;
4757
4757
  return {
4758
- remoteUrl: `${config.remoteDomain}/skin/${config.skin}.css`,
4759
- localPath: `skin/${config.skin}.css`,
4758
+ remoteUrl: `${config.remoteDomain}/skin/${config.skin}/style.css`,
4759
+ localPath: `skin/${config.skin}/style.css`,
4760
4760
  timeout: config.cssAfter.timeout
4761
4761
  // reuse cssAfter timeout
4762
4762
  };
@@ -4856,8 +4856,8 @@ function generateSkinJsLoader(options) {
4856
4856
  function buildSkinJsOptions(config) {
4857
4857
  if (!config.skin) return null;
4858
4858
  return {
4859
- remoteUrl: `${config.remoteDomain}/skin/${config.skin}.js`,
4860
- localPath: `skin/${config.skin}.js`,
4859
+ remoteUrl: `${config.remoteDomain}/skin/${config.skin}/script.js`,
4860
+ localPath: `skin/${config.skin}/script.js`,
4861
4861
  timeout: config.jsAfter.timeout
4862
4862
  // reuse jsAfter timeout
4863
4863
  };
@@ -6132,13 +6132,13 @@ var Patcher = class {
6132
6132
  );
6133
6133
  }
6134
6134
  if (this.config.skin) {
6135
- const skinCssUrl = `${remoteDomain}/skin/${this.config.skin}.css`;
6135
+ const skinCssUrl = `${remoteDomain}/skin/${this.config.skin}/style.css`;
6136
6136
  fetchPromises.push(
6137
6137
  this.fetchFile(skinCssUrl).then((content) => {
6138
6138
  fetched.skinCss = content;
6139
6139
  })
6140
6140
  );
6141
- const skinJsUrl = `${remoteDomain}/skin/${this.config.skin}.js`;
6141
+ const skinJsUrl = `${remoteDomain}/skin/${this.config.skin}/script.js`;
6142
6142
  fetchPromises.push(
6143
6143
  this.fetchFile(skinJsUrl).then((content) => {
6144
6144
  fetched.skinJs = content;
@@ -6366,9 +6366,9 @@ var Patcher = class {
6366
6366
  buildManifestPaths(addedFiles) {
6367
6367
  const paths = {};
6368
6368
  for (const filePath of addedFiles) {
6369
- if (this.config.skin && filePath.endsWith(`skin/${this.config.skin}.css`)) {
6369
+ if (this.config.skin && filePath.endsWith(`skin/${this.config.skin}/style.css`)) {
6370
6370
  paths.skinCss = filePath;
6371
- } else if (this.config.skin && filePath.endsWith(`skin/${this.config.skin}.js`)) {
6371
+ } else if (this.config.skin && filePath.endsWith(`skin/${this.config.skin}/script.js`)) {
6372
6372
  paths.skinJs = filePath;
6373
6373
  } else if (filePath.endsWith(this.config.cssBefore.filename)) {
6374
6374
  paths.cssBefore = filePath;
@@ -6455,14 +6455,14 @@ var Patcher = class {
6455
6455
  if (fetched.jsAfter) console.log(`[Patcher] Using fetched content for ${path}`);
6456
6456
  }
6457
6457
  if (this.config.skin) {
6458
- const skinCssPath = `${basePath}skin/${this.config.skin}.css`;
6458
+ const skinCssPath = `${basePath}skin/${this.config.skin}/style.css`;
6459
6459
  const skinCssContent = fetched.skinCss ?? `/* PA-Patcher: Skin CSS (${this.config.skin}) */
6460
6460
  `;
6461
6461
  zip.addFile(skinCssPath, Buffer.from(skinCssContent, "utf-8"));
6462
6462
  added.push(skinCssPath);
6463
6463
  if (fetched.skinCss) console.log(`[Patcher] Using fetched skin CSS for ${skinCssPath}`);
6464
6464
  else console.log(`[Patcher] Added placeholder skin CSS: ${skinCssPath}`);
6465
- const skinJsPath = `${basePath}skin/${this.config.skin}.js`;
6465
+ const skinJsPath = `${basePath}skin/${this.config.skin}/script.js`;
6466
6466
  const skinJsContent = fetched.skinJs ?? `// PA-Patcher: Skin JS (${this.config.skin})
6467
6467
  `;
6468
6468
  zip.addFile(skinJsPath, Buffer.from(skinJsContent, "utf-8"));