@wix/zero-config-implementation 1.84.0 → 1.85.0

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.
@@ -1,4 +1,4 @@
1
- import { g as x } from "./index-Byvq-358.js";
1
+ import { g as x } from "./index-DBSnnglR.js";
2
2
  function h(r, a) {
3
3
  for (var i = 0; i < a.length; i++) {
4
4
  const o = a[i];
@@ -6979,7 +6979,7 @@ const One = ({ isSSR: t, animatedScrollTo: e }) => {
6979
6979
  return Promise.resolve();
6980
6980
  if (!l)
6981
6981
  return Promise.reject({ error: "unable to copy null value" });
6982
- (await import("./index-BHTXuyLh.js").then((f) => f.i)).default(l);
6982
+ (await import("./index-CQq7GOf9.js").then((f) => f.i)).default(l);
6983
6983
  };
6984
6984
  function i(l, h, f) {
6985
6985
  if (typeof l !== f)
@@ -100250,7 +100250,7 @@ async function BWe(t, e, n, r, i, s, a) {
100250
100250
  );
100251
100251
  if (!u.ok)
100252
100252
  throw u.error;
100253
- return { component: IMe(u.component) };
100253
+ return { component: IMe(u.component), errors: [] };
100254
100254
  } finally {
100255
100255
  await a();
100256
100256
  }
package/dist/index.d.ts CHANGED
@@ -863,6 +863,7 @@ export declare function extractComponentManifest(componentPath: string, compiled
863
863
  * - {@link IoError} — Module failed to load, export access threw, render failed, or CSS selector matching failed
864
864
  */
865
865
  export declare interface ExtractComponentManifestOptions extends RunExtractorsOptions {
866
+ onError?: (error: ExtractionError) => void;
866
867
  }
867
868
 
868
869
  export declare function extractComponentManifestResult(componentPath: string, compiledEntryPath: string, options?: ExtractComponentManifestOptions): ResultAsync<ManifestResult, InstanceType<typeof NotFoundError> | InstanceType<typeof ParseError> | InstanceType<typeof IoError>>;
@@ -907,6 +908,12 @@ declare type ExtractErrTypes<T extends readonly Result<unknown, unknown>[]> = {
907
908
  [idx in keyof T]: T[idx] extends Result<unknown, infer E> ? E : never;
908
909
  };
909
910
 
911
+ export declare interface ExtractionError {
912
+ componentName: string;
913
+ phase: 'render' | 'coupling' | 'css' | 'loader' | 'conversion';
914
+ error: InstanceType<typeof BaseError>;
915
+ }
916
+
910
917
  export declare interface ExtractionResult {
911
918
  html: string;
912
919
  store: ExtractorStore;
@@ -1581,6 +1588,7 @@ CauseArg extends Cause,
1581
1588
 
1582
1589
  export declare interface ManifestResult {
1583
1590
  component: EditorReactComponent;
1591
+ errors: ExtractionError[];
1584
1592
  }
1585
1593
 
1586
1594
  declare type MemberListOf<T> = ((T extends unknown ? (t: T) => T : never) extends infer U ? (U extends unknown ? (u: U) => unknown : never) extends (v: infer V) => unknown ? V : never : never) extends (_: unknown) => infer W ? [...MemberListOf<Exclude<T, W>>, W] : [];
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as t, D as e, E as o, I as n, N as c, P as l, R as i, a as p, V as E, b as m, c as x, d as f, e as d, f as u, h as C, i as I, j as k, k as y, l as A, m as D, n as P, o as R, p as h, q as B, r as M, s as T, t as b, w } from "./index-Byvq-358.js";
1
+ import { B as t, D as e, E as o, I as n, N as c, P as l, R as i, a as p, V as E, b as m, c as x, d as f, e as d, f as u, h as C, i as I, j as k, k as y, l as A, m as D, n as P, o as R, p as h, q as B, r as M, s as T, t as b, w } from "./index-DBSnnglR.js";
2
2
  import "react";
3
3
  export {
4
4
  t as BaseError,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "registry": "https://registry.npmjs.org/",
5
5
  "access": "public"
6
6
  },
7
- "version": "1.84.0",
7
+ "version": "1.85.0",
8
8
  "description": "Core library for extracting component manifests from JS and CSS files",
9
9
  "type": "module",
10
10
  "main": "dist/index.js",
@@ -82,5 +82,5 @@
82
82
  ]
83
83
  }
84
84
  },
85
- "falconPackageHash": "69093241c1274c1e1c73c1f04a0b7b1d9f478ab11a8829b00f8c8cc8"
85
+ "falconPackageHash": "57c46654a2a7b434be3282e37ce2fff52e061ef822797e00a88ba528"
86
86
  }
@@ -0,0 +1,7 @@
1
+ import type { BaseError } from './errors'
2
+
3
+ export interface ExtractionError {
4
+ componentName: string
5
+ phase: 'render' | 'coupling' | 'css' | 'loader' | 'conversion'
6
+ error: InstanceType<typeof BaseError>
7
+ }
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ import { buildContextProviderModules } from './extensions/context-providers/cont
9
9
  import { buildContextAwareWrapper, loadMockProviders } from './extensions/context-providers/mock-provider'
10
10
  import { buildRefElementContext } from './extensions/ref-elements/context'
11
11
  import type { RefElementContext } from './extensions/ref-elements/types'
12
+ import type { ExtractionError } from './extraction-types'
12
13
  import type { RunExtractorsOptions } from './information-extractors/react'
13
14
  import { extractCssImports, extractDefaultComponentInfo } from './information-extractors/ts'
14
15
  import type { ComponentInfo } from './information-extractors/ts/types'
@@ -28,6 +29,7 @@ const defaultWrapper = (Component: ComponentType<unknown>): ComponentType<unknow
28
29
 
29
30
  export interface ManifestResult {
30
31
  component: EditorReactComponent
32
+ errors: ExtractionError[]
31
33
  }
32
34
 
33
35
  // ─────────────────────────────────────────────────────────────────────────────
@@ -44,7 +46,9 @@ export interface ManifestResult {
44
46
  * - {@link ParseError} — TypeScript config or component types could not be parsed (phase: `compile` | `css` | `extract`)
45
47
  * - {@link IoError} — Module failed to load, export access threw, render failed, or CSS selector matching failed
46
48
  */
47
- export interface ExtractComponentManifestOptions extends RunExtractorsOptions {}
49
+ export interface ExtractComponentManifestOptions extends RunExtractorsOptions {
50
+ onError?: (error: ExtractionError) => void
51
+ }
48
52
 
49
53
  export function extractComponentManifestResult(
50
54
  componentPath: string,
@@ -206,7 +210,7 @@ async function processComponentWithCleanup(
206
210
  throw processResult.error
207
211
  }
208
212
 
209
- return { component: toEditorReactComponent(processResult.component) }
213
+ return { component: toEditorReactComponent(processResult.component), errors: [] }
210
214
  } finally {
211
215
  await cleanup()
212
216
  }
@@ -248,6 +252,7 @@ export async function extractComponentManifest(
248
252
  // ── Tier 1: High-Level API ──────────────────────────────────────────────────
249
253
  // extractComponentManifest() is exported above as a named function declaration.
250
254
  export type { EditorReactComponent } from '@wix/react-component-schema'
255
+ export type { ExtractionError } from './extraction-types'
251
256
  export type { ComponentInfoWithCss, ExtractedCssInfo, ProcessComponentResult } from './manifest-pipeline'
252
257
 
253
258
  // ── Tier 2: Pipeline Building Blocks ────────────────────────────────────────