@prosopo/procaptcha-bundle 0.1.13 → 0.1.15

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,61 @@
1
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2
+
3
+ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4
+
5
+ /**
6
+ * @license React
7
+ * react-dom.production.min.js
8
+ *
9
+ * Copyright (c) Facebook, Inc. and its affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+
15
+ /**
16
+ * @license React
17
+ * react-is.production.min.js
18
+ *
19
+ * Copyright (c) Facebook, Inc. and its affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */
24
+
25
+ /**
26
+ * @license React
27
+ * react-jsx-runtime.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */
34
+
35
+ /**
36
+ * @license React
37
+ * react.production.min.js
38
+ *
39
+ * Copyright (c) Facebook, Inc. and its affiliates.
40
+ *
41
+ * This source code is licensed under the MIT license found in the
42
+ * LICENSE file in the root directory of this source tree.
43
+ */
44
+
45
+ /**
46
+ * @license React
47
+ * scheduler.production.min.js
48
+ *
49
+ * Copyright (c) Facebook, Inc. and its affiliates.
50
+ *
51
+ * This source code is licensed under the MIT license found in the
52
+ * LICENSE file in the root directory of this source tree.
53
+ */
54
+
55
+ /**
56
+ * @mui/styled-engine v5.13.2
57
+ *
58
+ * @license MIT
59
+ * This source code is licensed under the MIT license found in the
60
+ * LICENSE file in the root directory of this source tree.
61
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-bundle",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -21,8 +21,8 @@
21
21
  "> 0.5%, last 2 versions, not dead"
22
22
  ],
23
23
  "dependencies": {
24
- "@prosopo/common": "^0.1.13",
25
- "@prosopo/procaptcha-react": "^0.1.13"
24
+ "@prosopo/common": "^0.1.15",
25
+ "@prosopo/procaptcha-react": "^0.1.15"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
package/.env.development DELETED
@@ -1,21 +0,0 @@
1
- CAPTCHA_WASM_PATH=./src/contract/sources/captcha/ade7e8ecada8f2c71d896efdc1e11fcfabbe4c19/captcha.wasm
2
- CAPTCHA_ABI_PATH=./src/contract/sources/captcha/ade7e8ecada8f2c71d896efdc1e11fcfabbe4c19/captcha.json
3
- DAPP_WASM_PATH=./src/contract/sources/dapp/411053b7ec79cc77f5ec9f5eb18610b24daaaaf0/dapp.wasm
4
- DAPP_ABI_PATH=./src/contract/sources/dapp/411053b7ec79cc77f5ec9f5eb18610b24daaaaf0/dapp.json
5
- DAPP_SITE_KEY=5Ea1uv1VkQRe2UUu7V8QffpricjfJZ7QvEfRJDPazkjdLyZE
6
- PROSOPO_SITE_KEY=5Ea1uv1VkQRe2UUu7V8QffpricjfJZ7QvEfRJDPazkjdLyZE
7
- PROTOCOL_CONTRACT_ADDRESS=5FtYnuNSYwTBqnC3jcrP6TSEhjeczyrSHXCPRWZgazkTUVHS
8
- DATABASE_PASSWORD=root
9
- DATABASE_USERNAME=root
10
- DATABASE_NAME=prosopo
11
- DATABASE_HOST=127.0.0.1
12
- DATABASE_PORT=27017
13
- SUBSTRATE_NODE_URL=ws://192.168.1.28:9944
14
- API_BASE_URL=http://192.168.1.28:9229
15
- API_PORT=9229
16
- PAIR_TYPE=sr25519
17
- SS58_FORMAT=42
18
- PROVIDER_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV
19
- PROVIDER_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant
20
- NODE_ENV=development
21
- LOG_LEVEL=Debug
package/.env.rococo DELETED
@@ -1,25 +0,0 @@
1
- CAPTCHA_WASM_PATH=./src/contract/sources/captcha/48321f627ee7320c69287dcc94e4071f474a5983/captcha.wasm
2
- CAPTCHA_ABI_PATH=./src/contract/sources/captcha//48321f627ee7320c69287dcc94e4071f474a5983/captcha.json
3
- DAPP_WASM_PATH=./src/contract/sources/dapp/411053b7ec79cc77f5ec9f5eb18610b24daaaaf0/dapp.wasm
4
- DAPP_ABI_PATH=./src/contract/sources/dapp/411053b7ec79cc77f5ec9f5eb18610b24daaaaf0/dapp.json
5
- DAPP_SITE_KEY=5Fa9fTPbYzp3SBNbcdhDY5ikAnBf7JcpbFv2J7uPBAixsLku
6
- PROSOPO_SITE_KEY=5FemVKhpS5oCU6isHofNM8oSCGHM8Kd9JEYDbVZKaRbpJtmW
7
- PROSOPO_SITE_MNEMONIC=peasant entry humble tilt marble heart reopen boy spoon smile gaze bonus
8
- DAPP_SITE_KEY=5FemVKhpS5oCU6isHofNM8oSCGHM8Kd9JEYDbVZKaRbpJtmW
9
- PROTOCOL_CONTRACT_ADDRESS=5HiVWQhJrysNcFNEWf2crArKht16zrhro3FcekVWocyQjx5u
10
- DATABASE_PASSWORD=root
11
- DATABASE_USERNAME=root
12
- DATABASE_NAME=prosopo
13
- DATABASE_HOST=127.0.0.1
14
- DATABASE_PORT=27017
15
- SUBSTRATE_NODE_URL=wss://rococo-contracts-rpc.polkadot.io:443
16
- API_BASE_URL=http://localhost:8282
17
- API_PORT=8282
18
- PAIR_TYPE=sr25519
19
- SS58_FORMAT=42
20
- PROVIDER_ADDRESS=5HRPt4cxQ8q41RdSfzkZKyMEfyHWiGJpaGrcyrxw5bU2ARws
21
- PROVIDER_JSON={"encoded":"BR7sGFI4P+Sn9wimXXXtjd+mmJXvfxLtbHQSmXVxgesAgAAAAQAAAAgAAAAtDbsYobLj7pDH68Q/kaGIlOloyUbhQ9iZBwHshiYYJPBgmBkQkG4D0L//TsNrVVrLzMLerZL2f0kDNx/VO0zoSeYHUUD95Zy+VibydeoLrcQS5vi74J2+aNGwyhx03oANjBssdfRzuZ2zm+cMFOT+2iwR5M5aKPcw5j6WGElJmO4PDkHP0wKAb2u8gI78gSl9+3CI6byf3+QoD+b+","encoding":{"content":["pkcs8","sr25519"],"type":["scrypt","xsalsa20-poly1305"],"version":"3"},"address":"5HRPt4cxQ8q41RdSfzkZKyMEfyHWiGJpaGrcyrxw5bU2ARws","meta":{"genesisHash":"","isHidden":false,"name":"test4","whenCreated":1655722026003}}
22
- NODE_ENV=rococo
23
- LOG_LEVEL=Debug
24
-
25
-
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "esModuleInterop": true,
4
- "importHelpers": true,
5
- "jsx": "react-jsx",
6
- "module": "commonjs",
7
- "skipLibCheck": true,
8
- "target": "esnext",
9
- "lib": [
10
- "es6",
11
- "dom"
12
- ]
13
- }
14
- }
package/webpack.config.js DELETED
@@ -1,230 +0,0 @@
1
- const HtmlWebpackPlugin = require('html-webpack-plugin')
2
- const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
3
- const CompressionPlugin = require('compression-webpack-plugin')
4
- const MiniCssExtractPlugin = require('mini-css-extract-plugin')
5
- const webpack = require('webpack')
6
- const TerserPlugin = require('terser-webpack-plugin')
7
- const path = require('path')
8
- const { JsonAccessOptimizer } = require('webpack-json-access-optimizer')
9
- const { ProvidePlugin } = require('webpack')
10
- const { loadEnv } = require('@prosopo/cli')
11
- const { logger } = require('@prosopo/common')
12
- const log = logger(`Info`, `webpack.config.js`)
13
- const moduleDirs = [
14
- path.resolve(__dirname, 'node_modules'),
15
- path.resolve(__dirname, '../../node_modules'),
16
- path.resolve(__dirname, '../api/node_modules'),
17
- path.resolve(__dirname, '../common/node_modules'),
18
- path.resolve(__dirname, '../procaptcha/node_modules'),
19
- path.resolve(__dirname, '../procaptcha-react/node_modules'),
20
- ]
21
-
22
- const allowList = [
23
- '@emotion/cache',
24
- '@emotion/react',
25
- '@emotion/serialize',
26
- '@emotion/styled',
27
- '@emotion/styled-engine',
28
- '@mui/base',
29
- '@mui/material',
30
- '@mui/private-theming',
31
- '@mui/react-transition-group',
32
- '@mui/styled-engine',
33
- '@mui/styles',
34
- '@mui/system',
35
- '@mui/types',
36
- '@mui/utils',
37
- '@polkadot/api',
38
- '@polkadot/api-augment',
39
- '@polkadot/api-base',
40
- '@polkadot/api-contract',
41
- '@polkadot/api-derive',
42
- '@polkadot/bn.js',
43
- '@polkadot/connect',
44
- '@polkadot/dist',
45
- '@polkadot/icons-material',
46
- '@polkadot/keyring',
47
- '@polkadot/lib',
48
- '@polkadot/rpc-augment',
49
- '@polkadot/rpc-core',
50
- '@polkadot/rpc-provider',
51
- '@polkadot/ss58-registry',
52
- '@polkadot/types',
53
- '@polkadot/types-augment',
54
- '@polkadot/types-codec',
55
- '@polkadot/types-create',
56
- '@polkadot/util',
57
- '@polkadot/util-crypto',
58
- '@polkadot/wasm-bridge',
59
- '@polkadot/wasm-crypto',
60
- '@polkadot/wasm-crypto-init',
61
- '@polkadot/x-bigint',
62
- '@popperjs/base',
63
- '@popperjs/core',
64
- '@substrate/connect',
65
- '@substrate/networks',
66
- '@substrate/rpc-provider',
67
- '@types/express-serve-static-core',
68
- '@types/material',
69
- '@types/qs',
70
- '@types/range-parser',
71
- '@types/react',
72
- '@types/react-dom',
73
- '@types/scheduler',
74
- '@types/send',
75
- '@types/types',
76
- '@types/util',
77
- 'axios',
78
- 'clsx',
79
- 'consola/extension-inject',
80
- 'csstype',
81
- 'i18next',
82
- 'i18next-http-middleware',
83
- 'react',
84
- 'react-dom',
85
- 'react-i18next/mime',
86
- 'rxjs/dist',
87
- 'rxjs/types',
88
- 'tslib',
89
- 'zod',
90
- ]
91
- // Create a regex that captures packages that are NOT in the allow list
92
- const externalsRegex = `(?!${allowList.map((item) => item.replace('/', '\\/')).join('|')})`
93
- log.info('externalsRegex', externalsRegex)
94
-
95
- loadEnv()
96
-
97
- module.exports = (env, argv) => {
98
- const isProduction = argv.mode === 'production'
99
- const libraryName = 'procaptcha_bundle'
100
- return {
101
- resolve: {
102
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
103
- modules: moduleDirs,
104
- fullySpecified: false,
105
- },
106
- entry: './src/index.tsx',
107
- output: {
108
- filename: `${libraryName}.[name].bundle.js`,
109
- path: path.resolve(__dirname, 'dist'),
110
- library: libraryName,
111
- chunkFilename: `${libraryName}.[name].bundle.js`,
112
- },
113
- module: {
114
- rules: [
115
- {
116
- include: /node_modules/,
117
- test: /\.css$/,
118
- resolve: {
119
- fullySpecified: false,
120
- },
121
- sideEffects: true,
122
- use: [
123
- MiniCssExtractPlugin.loader,
124
- {
125
- loader: require.resolve('css-loader'),
126
- options: {
127
- url: false,
128
- },
129
- },
130
- ],
131
- },
132
- {
133
- //exclude: /(node_modules)/,
134
- test: /\.(ts|tsx)$/,
135
- resolve: {
136
- fullySpecified: false,
137
- },
138
- use: [
139
- {
140
- loader: require.resolve('ts-loader'),
141
- options: {
142
- configFile: 'tsconfig.webpack.json',
143
- transpileOnly: true,
144
- },
145
- },
146
- ],
147
- },
148
- {
149
- test: /locale\.json$/, // match JSON files to optimize
150
- loader: 'webpack-json-access-optimizer',
151
- },
152
- ],
153
- },
154
-
155
- plugins: [
156
- new HtmlWebpackPlugin({
157
- template: './src/index.html',
158
- }),
159
- //new BundleAnalyzerPlugin(),
160
- new webpack.DefinePlugin({
161
- 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'),
162
- 'process.env.PROTOCOL_CONTRACT_ADDRESS': JSON.stringify(process.env.PROTOCOL_CONTRACT_ADDRESS),
163
- 'process.env.SUBSTRATE_NODE_URL': JSON.stringify(process.env.SUBSTRATE_NODE_URL),
164
- 'process.env.DEFAULT_ENVIRONMENT': JSON.stringify(process.env.DEFAULT_ENVIRONMENT),
165
- 'process.env.PROSOPO_SITE_KEY': JSON.stringify(process.env.PROSOPO_SITE_KEY),
166
- }),
167
- // new webpack.optimize.SplitChunksPlugin(),
168
- new CompressionPlugin(),
169
- new MiniCssExtractPlugin({
170
- filename: 'extr.[contenthash].css',
171
- }),
172
- new ProvidePlugin({
173
- $t: './$tProvider',
174
- }),
175
- new JsonAccessOptimizer({
176
- accessorFunctionName: '$t', // i18n function name
177
- }),
178
- {
179
- apply: (compiler) => {
180
- compiler.hooks.done.tap('DonePlugin', (stats) => {
181
- log.info('Compile is done !')
182
- setTimeout(() => {
183
- process.exit(0)
184
- })
185
- })
186
- },
187
- },
188
- ],
189
- optimization: {
190
- // chunkIds: 'deterministic',
191
- // runtimeChunk: 'single',
192
- // splitChunks: {
193
- // cacheGroups: [
194
- // // all other modules
195
- // ['modu', /[\\/]node_modules[\\/]/],
196
- // ].reduce(
197
- // (result, [name, test], index) => ({
198
- // ...result,
199
- // [`cacheGroup${index}`]: {
200
- // chunks: 'initial',
201
- // enforce: true,
202
- // maxSize: 1_500_000,
203
- // minSize: 0,
204
- // name,
205
- // priority: -1 * index,
206
- // test,
207
- // },
208
- // }),
209
- // {}
210
- // ),
211
- // },
212
- noEmitOnErrors: true,
213
- minimize: isProduction,
214
- minimizer: isProduction
215
- ? [
216
- new TerserPlugin({
217
- terserOptions: {
218
- compress: {
219
- drop_console: true,
220
- },
221
- },
222
- }),
223
- ]
224
- : undefined,
225
- usedExports: true,
226
- },
227
- externalsPresets: { node: false }, // do not set this to true, it will break the build
228
- externals: isProduction ? [externalsRegex] : undefined,
229
- }
230
- }