@purescraps/purehtml 0.2.0 → 0.3.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.
@@ -12,7 +12,7 @@ declare abstract class Config<T = unknown> {
12
12
  }
13
13
 
14
14
  declare class ConfigFactory {
15
- static fromYAML(yaml: string): Config;
15
+ static fromYAML<T>(yaml: string): Config<T>;
16
16
  private static generate;
17
17
  private static generateSelector;
18
18
  private static generateTransform;
@@ -21,4 +21,4 @@ declare class ConfigFactory {
21
21
 
22
22
  declare function extract<T = unknown>($: cheerio.Root | string, config: Config<T>, url: string): T;
23
23
 
24
- export { ConfigFactory, extract };
24
+ export { Config, ConfigFactory, extract };
package/dist/src/index.js CHANGED
@@ -6785,6 +6785,7 @@ var require_ajv = __commonJS({
6785
6785
  // src/index.ts
6786
6786
  var src_exports = {};
6787
6787
  __export(src_exports, {
6788
+ Config: () => Config,
6788
6789
  ConfigFactory: () => ConfigFactory,
6789
6790
  extract: () => extract
6790
6791
  });
@@ -7508,7 +7509,9 @@ var ConfigFactory = class _ConfigFactory {
7508
7509
  transform
7509
7510
  );
7510
7511
  case "union":
7511
- return UnionConfig.generate(union.map((cfg) => this.generate(cfg)));
7512
+ return UnionConfig.generate(
7513
+ union.map((cfg) => this.generate(cfg))
7514
+ );
7512
7515
  default:
7513
7516
  return PrimitiveValueConfig.generate(selector, transform);
7514
7517
  }
@@ -7574,6 +7577,7 @@ function extract($, config, url) {
7574
7577
  }
7575
7578
  // Annotate the CommonJS export names for ESM import in node:
7576
7579
  0 && (module.exports = {
7580
+ Config,
7577
7581
  ConfigFactory,
7578
7582
  extract
7579
7583
  });