@wix/cli-app 1.0.74 → 1.0.76

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,27 +1,27 @@
1
1
  /* eslint-disable no-param-reassign */
2
2
  /// <reference types="vite/client" />
3
3
  import type { ComponentType } from 'react';
4
- import { useState, useRef, useEffect } from 'react';
4
+ import React, { useState, useRef, useEffect } from 'react';
5
5
 
6
- export function createHotPageWrapper(
7
- OriginalPage: ComponentType<unknown>,
6
+ export function createHotPageWrapper<P extends Record<string, unknown>>(
7
+ OriginalPage: ComponentType<P>,
8
8
  hotData: {
9
- page?: ComponentType<unknown>;
10
- setPage?: (NewPage: ComponentType<unknown>) => void;
9
+ Page?: ComponentType<P>;
10
+ setPage?: (NewPage: ComponentType<P>) => void;
11
11
  }
12
- ) {
13
- const Wrapper = import.meta.hot
14
- ? () => {
15
- const [WrappedPage, setPage] = useState<ComponentType<unknown>>(
16
- hotData.page ?? OriginalPage
12
+ ): ComponentType<P> {
13
+ return import.meta.hot
14
+ ? (props) => {
15
+ const [WrappedPage, setPage] = useState(
16
+ () => hotData.Page ?? OriginalPage
17
17
  );
18
18
  const isMountedRef = useRef(false);
19
19
 
20
20
  useEffect(() => {
21
21
  hotData.setPage = (NewPage) => {
22
- hotData.page = NewPage;
22
+ hotData.Page = NewPage;
23
23
  if (isMountedRef.current) {
24
- setPage(NewPage);
24
+ setPage(() => NewPage);
25
25
  }
26
26
  };
27
27
  }, [setPage]);
@@ -33,9 +33,7 @@ export function createHotPageWrapper(
33
33
  isMountedRef.current = false;
34
34
  };
35
35
  }, []);
36
- return WrappedPage;
36
+ return <WrappedPage {...props} />;
37
37
  }
38
38
  : OriginalPage;
39
-
40
- return Wrapper;
41
39
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wix/cli-app",
3
3
  "description": "CLI tool for Wix apps",
4
- "version": "1.0.74",
4
+ "version": "1.0.76",
5
5
  "author": "Amit Dahan",
6
6
  "dependencies": {
7
7
  "@vitejs/plugin-react-swc": "3.3.1",
@@ -9,17 +9,17 @@
9
9
  },
10
10
  "devDependencies": {
11
11
  "@types/lodash": "^4.14.194",
12
- "@types/verror": "^1.10.6",
13
12
  "@vitejs/plugin-basic-ssl": "^1.0.1",
14
- "@wix/ambassador-ctp-app-cloud-deployer-service-v1-app-cloud-deployer": "^1.0.10",
15
- "@wix/ambassador-ctp-gradual-rollout-v1-app-config": "^1.0.29",
16
- "@wix/ambassador-devcenter-components-v1-component": "^1.0.227",
13
+ "@wix/ambassador-ctp-app-cloud-deployer-service-v1-app-cloud-deployer": "^1.0.11",
14
+ "@wix/ambassador-ctp-gradual-rollout-v1-app-config": "^1.0.32",
15
+ "@wix/ambassador-devcenter-components-v1-component": "^1.0.244",
17
16
  "@wix/arm-client": "0.0.0",
18
- "@wix/bi-logger-wix-cli": "^1.15.0",
17
+ "@wix/bi-logger-wix-cli": "^1.16.0",
19
18
  "@wix/cli-app-definitions": "0.0.0",
20
19
  "@wix/cli-app-manifest": "1.0.0",
21
20
  "@wix/cli-auth": "0.0.0",
22
21
  "@wix/cli-core-definitions": "0.0.0",
22
+ "@wix/cli-debug-log": "0.0.0",
23
23
  "@wix/cli-error-reporter": "0.0.0",
24
24
  "@wix/cli-errors": "0.0.0",
25
25
  "@wix/cli-fs": "0.0.0",
@@ -28,6 +28,7 @@
28
28
  "@wix/cli-logger": "0.0.0",
29
29
  "@wix/cli-site-selector": "0.0.0",
30
30
  "@wix/cli-telemetry": "0.0.0",
31
+ "@wix/cli-telemetry-react": "0.0.0",
31
32
  "@wix/cli-test-overrides": "0.0.0",
32
33
  "@wix/cli-ui-kit": "0.0.0",
33
34
  "@wix/dev-center-client": "0.0.0",
@@ -49,7 +50,6 @@
49
50
  "terminal-link": "^3.0.0",
50
51
  "typed-emitter": "^2.1.0",
51
52
  "variant": "^3.0.0-dev.25",
52
- "verror": "^1.10.1",
53
53
  "vite-plugin-externals": "^0.6.2",
54
54
  "zod": "^3.21.4"
55
55
  },
@@ -61,7 +61,7 @@
61
61
  "./client": {
62
62
  "types": "./client.d.ts"
63
63
  },
64
- "./internal/hot-page": "./internal/hot-page.ts",
64
+ "./internal/hot-page": "./internal/hot-page.tsx",
65
65
  "./tsconfig.app.json": "./tsconfig.app.json",
66
66
  "./package.json": "./package.json"
67
67
  },
@@ -98,6 +98,7 @@
98
98
  "scripts": {
99
99
  "build": "run -T tsup",
100
100
  "build:watch": "run build --watch",
101
+ "lint": "run -T lint-package",
101
102
  "test": "yarn workspace @wix/cli-app-spec run test",
102
103
  "test:build": "yarn workspace @wix/cli-app-spec run test:build",
103
104
  "typecheck": "run -T tsc --noEmit"
@@ -110,9 +111,10 @@
110
111
  },
111
112
  "validations": {
112
113
  "postBuild": [
113
- "typecheck"
114
+ "typecheck",
115
+ "lint"
114
116
  ]
115
117
  }
116
118
  },
117
- "falconPackageHash": "90defda01223193e8ee1cd9b7243f067064e1cbe325b997dbd298a96"
119
+ "falconPackageHash": "02b120c71e4d852ed393c833b32ffe6228309f86234a6f74cbb32d03"
118
120
  }