@tuya-sat/sdf-main-sdk 0.0.74 → 0.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.
@@ -0,0 +1,14 @@
1
+ {
2
+ "main.css": "auto/main.css",
3
+ "main.js": "auto/main.bundle.js",
4
+ "131.2801086c.chunk.js": "auto/131.2801086c.chunk.js",
5
+ "static/img/reLogin.png": "auto/static/img/294142da390c5af23324.png",
6
+ "static/img/emptyPage.png": "auto/static/img/daa00e3565343b2c9c18.png",
7
+ "static/img/app-scan-zh.png": "auto/static/img/cd53a77fb81c7c568c93.png",
8
+ "static/img/app-scan-en.png": "auto/static/img/1a627bbd762619cb553e.png",
9
+ "en.json": "auto/en.json",
10
+ "zh.json": "auto/zh.json",
11
+ "main.css.map": "auto/main.css.map",
12
+ "main.bundle.js.map": "auto/main.bundle.js.map",
13
+ "131.2801086c.chunk.js.map": "auto/131.2801086c.chunk.js.map"
14
+ }
@@ -1,6 +1,16 @@
1
1
  import { FC } from 'react';
2
+ export interface ForgetProps {
3
+ extra?: {
4
+ BgSlot?: FC<{
5
+ bg: string;
6
+ }>;
7
+ };
8
+ customStyle?: {
9
+ formStyle?: any;
10
+ };
11
+ }
2
12
  /**
3
13
  * 公版忘记密码页面
4
14
  */
5
- declare const Forget: FC;
15
+ declare const Forget: FC<ForgetProps>;
6
16
  export default Forget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/sdf-main-sdk",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "main": "./dist/main.bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
@@ -40,7 +40,8 @@
40
40
  "typescript-declaration-webpack-plugin": "^0.2.2",
41
41
  "webpack": "^5.75.0",
42
42
  "webpack-bundle-analyzer": "^4.6.1",
43
- "webpack-cli": "^4.10.0"
43
+ "webpack-cli": "^4.10.0",
44
+ "webpack-manifest-plugin": "^5.0.0"
44
45
  },
45
46
  "dependencies": {
46
47
  "@ant-design/colors": "^6.0.0",
package/webpack.config.js CHANGED
@@ -5,70 +5,72 @@ const BundleAnalyzerPlugin =
5
5
  require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
6
6
 
7
7
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
8
- const CopyPlugin = require('copy-webpack-plugin');
8
+ const CopyPlugin = require("copy-webpack-plugin");
9
9
  const REACT_APP_THEME_CSS_JS = fs.readFileSync(
10
- 'src/micro-script/theme/theme-css/static.js',
11
- 'utf-8'
10
+ "src/micro-script/theme/theme-css/static.js",
11
+ "utf-8"
12
12
  );
13
+ const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
13
14
 
14
15
  module.exports = {
15
- mode: 'production',
16
- devtool: 'source-map',
17
- entry: path.join(__dirname, '/src/index.tsx'),
18
- target: ['web', 'es5'],
16
+ mode: "production",
17
+ devtool: "source-map",
18
+ entry: path.join(__dirname, "/src/index.tsx"),
19
+ target: ["web", "es5"],
19
20
  output: {
20
- filename: '[name].bundle.js',
21
- chunkFilename: '[name].[hash:8].chunk.js',
22
- path: path.join(__dirname, '/dist'),
21
+ filename: "[name].bundle.js",
22
+ chunkFilename: "[name].[hash:8].chunk.js",
23
+ path: path.join(__dirname, "/dist"),
23
24
  library: {
24
- name: '_SDF',
25
- type: 'umd',
25
+ name: "_SDF",
26
+ type: "umd",
26
27
  },
27
28
  clean: true,
28
- assetModuleFilename: 'static/img/[hash][ext]',
29
+ assetModuleFilename: "static/img/[hash][ext]",
29
30
  },
30
31
  externals: {
31
- react: 'react',
32
- antd: 'antd',
33
- moment: 'moment',
34
- '@tuya-sat/galaxy': '@tuya-sat/galaxy',
35
- axios: 'axios',
32
+ react: "react",
33
+ antd: "antd",
34
+ moment: "moment",
35
+ "@tuya-sat/galaxy": "@tuya-sat/galaxy",
36
+ axios: "axios",
36
37
  },
37
38
  resolve: {
38
- extensions: ['.js', '.tsx', '.ts'],
39
+ extensions: [".js", ".tsx", ".ts"],
39
40
  fallback: {
40
- url: require.resolve('url/'),
41
+ url: require.resolve("url/"),
41
42
  },
42
43
  },
43
44
  plugins: [
44
45
  // new BundleAnalyzerPlugin(),
45
46
  new webpack.ProvidePlugin({
46
- process: 'process/browser',
47
- Buffer: ['buffer', 'Buffer'],
47
+ process: "process/browser",
48
+ Buffer: ["buffer", "Buffer"],
48
49
  }),
49
50
  new webpack.DefinePlugin({
50
- 'process.env': {
51
+ "process.env": {
51
52
  REACT_APP_THEME_CSS_JS: JSON.stringify(REACT_APP_THEME_CSS_JS),
52
53
  },
53
54
  }),
54
55
  new CopyPlugin({
55
56
  patterns: [
56
57
  {
57
- from: path.join(process.cwd(), 'src/lang/zh.json'),
58
- to: path.join(process.cwd(), 'dist/zh.json'),
58
+ from: path.join(process.cwd(), "src/lang/zh.json"),
59
+ to: path.join(process.cwd(), "dist/zh.json"),
59
60
  },
60
61
  {
61
- from: path.join(process.cwd(), 'src/lang/en.json'),
62
- to: path.join(process.cwd(), 'dist/en.json'),
62
+ from: path.join(process.cwd(), "src/lang/en.json"),
63
+ to: path.join(process.cwd(), "dist/en.json"),
63
64
  },
64
65
  ],
65
66
  }),
66
67
  new MiniCssExtractPlugin(),
68
+ new WebpackManifestPlugin(),
67
69
  ],
68
70
  resolve: {
69
- extensions: ['.ts', '.tsx', '.js', 'jsx'],
71
+ extensions: [".ts", ".tsx", ".js", "jsx"],
70
72
  alias: {
71
- '@': path.resolve(__dirname, 'src'),
73
+ "@": path.resolve(__dirname, "src"),
72
74
  },
73
75
  },
74
76
  module: {
@@ -76,47 +78,47 @@ module.exports = {
76
78
  {
77
79
  test: /.(ts|tsx)$/,
78
80
  use: {
79
- loader: 'babel-loader',
81
+ loader: "babel-loader",
80
82
  options: {
81
83
  presets: [
82
84
  [
83
- '@babel/preset-env',
85
+ "@babel/preset-env",
84
86
  {
85
- useBuiltIns: 'usage',
87
+ useBuiltIns: "usage",
86
88
  corejs: 3,
87
89
  },
88
90
  ],
89
- ['@babel/preset-react', { runtime: 'automatic' }],
90
- '@babel/preset-typescript',
91
+ ["@babel/preset-react", { runtime: "automatic" }],
92
+ "@babel/preset-typescript",
91
93
  ],
92
94
  },
93
95
  },
94
96
  },
95
97
  {
96
98
  test: /\.(png|jpe?g|gif|svg)?$/,
97
- type: 'asset/resource',
99
+ type: "asset/resource",
98
100
  },
99
101
  {
100
102
  test: /.(css|less)$/,
101
103
  use: [
102
104
  MiniCssExtractPlugin.loader,
103
- 'css-loader',
105
+ "css-loader",
104
106
  {
105
- loader: 'postcss-loader',
107
+ loader: "postcss-loader",
106
108
  options: {
107
109
  postcssOptions: {
108
- plugins: ['autoprefixer'],
110
+ plugins: ["autoprefixer"],
109
111
  },
110
112
  },
111
113
  },
112
114
  {
113
- loader: 'less-loader',
115
+ loader: "less-loader",
114
116
  options: {
115
117
  lessOptions: {
116
118
  modifyVars: {
117
- 'ant-prefix': 'main',
118
- 'macro-entry-name': 'custom-light',
119
- 'macro-variable-location': 'antd/lib/style/variable',
119
+ "ant-prefix": "main",
120
+ "macro-entry-name": "custom-light",
121
+ "macro-variable-location": "antd/lib/style/variable",
120
122
  },
121
123
  javascriptEnabled: true,
122
124
  },