@tuya-sat/sdf-main-sdk 0.0.79 → 0.0.81

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