@jetshop/core 5.17.0-alpha.a95a5f55 → 5.17.0-alpha.aa534f7a

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,12 +13,12 @@ import http from 'http';
13
13
  const server = http.createServer(app);
14
14
  let currentApp = app;
15
15
  server.listen(process.env.PORT || 3000, () => {
16
- console.log('🚀 started');
16
+ console.log('🚀 Started');
17
17
  });
18
18
  if (module.hot) {
19
- console.log('Server-side HMR Enabled!');
19
+ console.log('🟢 HMR Server-side enabled!');
20
20
  const reload = () => __awaiter(void 0, void 0, void 0, function* () {
21
- console.log('📦 Server-side HMR Reloaded');
21
+ console.log('📦 HMR Server-side reloaded');
22
22
  try {
23
23
  app = yield require('src/server').default;
24
24
  server.removeListener('request', currentApp);
@@ -26,12 +26,13 @@ import http from 'http';
26
26
  currentApp = app;
27
27
  }
28
28
  catch (error) {
29
+ console.log('🔥 HMR Error: ', (error === null || error === void 0 ? void 0 : error.stack) || error);
29
30
  console.error(error);
30
31
  }
31
32
  });
32
33
  // Reload on HMR
33
34
  module.hot.accept('src/server', reload, (err) => {
34
- console.log('HMR err ', err);
35
+ console.log('🔥 HMR Error: ', err);
35
36
  });
36
37
  }
37
38
  }))();
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["entrypoint.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,CAAC,GAAS,EAAE;IACV,IAAI,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,UAAU,GAAG,GAAG,CAAC;IAErB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,GAAG,EAAE;QAC3C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,IAAK,MAA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AC,GAAG,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAE3C,MAAM,MAAM,GAAG,GAAS,EAAE;YACxB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAE3C,IAAI;gBACF,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;gBAC1C,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAC7C,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC1B,UAAU,GAAG,GAAG,CAAC;aAClB;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,KAAI,KAAK,CAAC,CAAC;gBACrD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACtB;QACH,CAAC,CAAA,CAAC;QAEF,gBAAgB;QACf,MAAc,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;YACvD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC,EAAE,CAAC"}
@@ -70,7 +70,7 @@ export declare function useAddToCart({ product, variant, submit, commentValidato
70
70
  dirty: boolean;
71
71
  unregisterField: (name: string) => void;
72
72
  registerField: (name: string, { validate }: any) => void;
73
- getFieldProps: (nameOrOptions: any) => import("formik").FieldInputProps<any>;
73
+ getFieldProps: (nameOrOptions: string | import("formik").FieldConfig<any>) => import("formik").FieldInputProps<any>;
74
74
  getFieldMeta: (name: string) => import("formik").FieldMetaProps<any>;
75
75
  getFieldHelpers: (name: string) => import("formik").FieldHelperProps<any>;
76
76
  validateOnBlur: boolean;
@@ -26,7 +26,7 @@ export declare function useForgotPasswordData(): {
26
26
  setSubmitting: (isSubmitting: boolean) => void;
27
27
  setTouched: (touched: import("formik").FormikTouched<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
28
28
  setValues: (values: React.SetStateAction<MutationRequestPasswordResetArgs>, shouldValidate?: boolean) => void;
29
- setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
29
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
30
30
  setFieldError: (field: string, message: string) => void;
31
31
  setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
32
32
  validateForm: (values?: any) => Promise<import("formik").FormikErrors<MutationRequestPasswordResetArgs>>;
@@ -44,7 +44,7 @@ export declare function useForgotPasswordData(): {
44
44
  (e: React.ChangeEvent<any>): void;
45
45
  <T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
46
46
  };
47
- getFieldProps: <Value = any>(props: any) => import("formik").FieldInputProps<Value>;
47
+ getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
48
48
  getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
49
49
  getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
50
50
  dirty: boolean;
@@ -38,7 +38,9 @@ export declare function useResetPasswordForm(): {
38
38
  setValues: (values: React.SetStateAction<{
39
39
  newPassword: string;
40
40
  }>, shouldValidate?: boolean) => void;
41
- setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
41
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | import("formik").FormikErrors<{
42
+ newPassword: string;
43
+ }>>;
42
44
  setFieldError: (field: string, message: string) => void;
43
45
  setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
44
46
  validateForm: (values?: any) => Promise<import("formik").FormikErrors<{
@@ -66,7 +68,7 @@ export declare function useResetPasswordForm(): {
66
68
  (e: React.ChangeEvent<any>): void;
67
69
  <T_1 = string | React.ChangeEvent<any>>(field: T_1): T_1 extends React.ChangeEvent<any> ? void : (e: string | React.ChangeEvent<any>) => void;
68
70
  };
69
- getFieldProps: <Value = any>(props: any) => import("formik").FieldInputProps<Value>;
71
+ getFieldProps: <Value = any>(props: string | import("formik").FieldConfig<Value>) => import("formik").FieldInputProps<Value>;
70
72
  getFieldMeta: <Value_1>(name: string) => import("formik").FieldMetaProps<Value_1>;
71
73
  getFieldHelpers: <Value_2 = any>(name: string) => import("formik").FieldHelperProps<Value_2>;
72
74
  dirty: boolean;
@@ -13,6 +13,6 @@ declare class ErrorBoundary extends React.Component<BoundaryErrorProps, Boundary
13
13
  state: BoundaryErrorState;
14
14
  static defaultProps: Partial<BoundaryErrorProps>;
15
15
  componentDidCatch(error: Error, info: React.ErrorInfo): void;
16
- render(): string | number | boolean | React.JSX.Element | React.ReactFragment;
16
+ render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode>;
17
17
  }
18
18
  export default ErrorBoundary;
package/data/cache.js CHANGED
@@ -21,31 +21,14 @@ const createCache = () => new InMemoryCache({
21
21
  }
22
22
  },
23
23
  Product: {
24
- fields: {
25
- stockStatus: {
26
- merge(existing, incoming, { mergeObjects }) {
27
- // custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects
28
- // we do this to fix hydration mismatch on signup page
29
- // where we query for more settings in the already queried settings (tracking)
30
- return mergeObjects(existing, incoming);
31
- }
32
- }
33
- }
24
+ // https://www.apollographql.com/docs/react/caching/cache-configuration#disabling-normalization
25
+ keyFields: false
26
+ },
27
+ Category: {
28
+ // https://www.apollographql.com/docs/react/caching/cache-configuration#disabling-normalization
29
+ keyFields: false
34
30
  }
35
31
  }
36
- // fragmentMatcher: new IntrospectionFragmentMatcher({
37
- // introspectionQueryResultData: {
38
- // __schema: {
39
- // types: fragmentTypes
40
- // }
41
- // }
42
- // }),
43
- // cacheRedirects: {
44
- // Query: {
45
- // product: (_, args) => toIdValue(`Product:${args.id}`),
46
- // category: (_, args) => toIdValue(`Category:${args.id}`)
47
- // }
48
- // }
49
32
  });
50
33
  export default createCache;
51
34
  //# sourceMappingURL=cache.js.map
package/data/cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,IAAI,aAAa,CAAC;IAChB,aAAa,oBACR,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACnB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACxD;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CACP;IACD,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,QAAQ,EAAE;oBACR,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE;wBACxC,iFAAiF;wBACjF,sDAAsD;wBACtD,8EAA8E;wBAC9E,OAAO,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAC1C,CAAC;iBACF;aACF;SACF;QACD,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,WAAW,EAAE;oBACX,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE;wBACxC,iFAAiF;wBACjF,sDAAsD;wBACtD,8EAA8E;wBAC9E,OAAO,YAAY,CAAC,QAAQ,EAAE,QAAQ,CA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AEL,eAAe,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/core",
3
- "version": "5.17.0-alpha.a95a5f55",
3
+ "version": "5.17.0-alpha.aa534f7a",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -42,7 +42,7 @@
42
42
  "@sentry/browser": "^6.15.0",
43
43
  "@sentry/core": "^6.15.0",
44
44
  "@sentry/node": "^6.15.0",
45
- "@tanem/react-nprogress": "^1.1.0",
45
+ "@tanem/react-nprogress": "^5.0.43",
46
46
  "@types/accept-language-parser": "^1.5.1",
47
47
  "@types/gtag.js": "^0.0.10",
48
48
  "@types/loadable__component": "^5.10.0",
@@ -79,7 +79,6 @@
79
79
  "request-ip": "^2.1.3",
80
80
  "schema-dts": "^0.8.2",
81
81
  "store-css": "^0.3.0",
82
- "svg-react-loader": "^0.4.5",
83
82
  "ts-node": "^7.0.1",
84
83
  "typed-emitter": "^0.1.0",
85
84
  "typescript": "^4.8.3",
package/types.d.ts CHANGED
@@ -1958,7 +1958,7 @@ export type Mutation = {
1958
1958
  * No match on customer with access code
1959
1959
  */
1960
1960
  updateCustomerGroup?: Maybe<UpdateCustomerGroupResult>;
1961
- /** This mutation's purpose is to update a existing customer's information. An authorization token is needed in the request, in order to be able to update the customer. */
1961
+ /** This mutation's purpose is to update an existing customer's information. An authorization token is needed in the request, in order to be able to update the customer. */
1962
1962
  updateCustomer?: Maybe<CustomerUpdateResponse>;
1963
1963
  /** This mutation's purpose is to update a existing customer's price list using an access code. An authorization token is needed in the request, in order to be able to update the customer. */
1964
1964
  updateCustomerPriceList?: Maybe<UpdateCustomerPriceListResult>;
@@ -2396,6 +2396,7 @@ export type CustomerUpdateResponse = {
2396
2396
 
2397
2397
  export type CustomerUpdateInput = {
2398
2398
  pid?: Maybe<Scalars['String']>;
2399
+ emailAddress?: Maybe<Scalars['String']>;
2399
2400
  organizationNumber?: Maybe<Scalars['String']>;
2400
2401
  billingAddress: CustomerUpdateBillingAddressInput;
2401
2402
  deliveryAddresses?: Maybe<Array<Maybe<CustomerUpdateDeliveryAddressInput>>>;