From 601fc87810b6d72c1b4232e1c9a95523b6234fec Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 02:55:20 -0600 Subject: [PATCH 01/13] fix: audio quality --- ios/RecordScreen.mm | 6 +- package.json | 6 +- yarn.lock | 356 +++++++++++++++++++++++--------------------- 3 files changed, 192 insertions(+), 176 deletions(-) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index 67ac51f..b557c5d 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -90,9 +90,9 @@ - (int) adjustMultipleOf2:(int)value; } AudioChannelLayout acl = { 0 }; - acl.mChannelLayoutTag = kAudioChannelLayoutTag_Mono; - self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(64000)}]; - self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(64000)}]; + acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; + self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000)}]; + self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000)}]; self.audioInput.preferredVolume = 0.0; self.micInput.preferredVolume = 0.0; diff --git a/package.json b/package.json index 9b76629..eed7903 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react-native-record-screen", + "name": "@pastel/react-native-record-screen", "version": "0.6.1", "description": "react-native-record-screen", "main": "lib/commonjs/index", @@ -54,8 +54,8 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { - "@evilmartians/lefthook": "^1.2.2", "@commitlint/config-conventional": "^17.0.2", + "@evilmartians/lefthook": "^1.2.2", "@react-native-community/eslint-config": "^3.0.2", "@release-it/conventional-changelog": "^5.0.0", "@types/jest": "^28.1.2", @@ -72,7 +72,7 @@ "react": "18.2.0", "react-native": "0.72.0", "react-native-builder-bob": "^0.20.0", - "release-it": "^15.0.0", + "release-it": "^16.1.5", "typescript": "^5.0.2" }, "resolutions": { diff --git a/yarn.lock b/yarn.lock index b387d20..1b4c75d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1779,6 +1779,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@ljharb/through@^2.3.9": + version "2.3.9" + resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.9.tgz#85f221eb82f9d555e180e87d6e50fb154af85408" + integrity sha512-yN599ZBuMPPK4tdoToLlvgJB4CLK8fGl7ntfy0Wn7U6ttNvHYurd81bfUiK/6sMkiIwm65R6ck4L6+Y3DfVbNQ== + "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": version "5.1.1-v1" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" @@ -1889,10 +1894,10 @@ node-fetch "^2.6.7" universal-user-agent "^6.0.0" -"@octokit/rest@19.0.11": - version "19.0.11" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.11.tgz#2ae01634fed4bd1fca5b642767205ed3fd36177c" - integrity sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw== +"@octokit/rest@19.0.13": + version "19.0.13" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.13.tgz#e799393264edc6d3c67eeda9e5bd7832dcf974e4" + integrity sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA== dependencies: "@octokit/core" "^4.2.1" "@octokit/plugin-paginate-rest" "^6.1.2" @@ -2247,6 +2252,11 @@ dependencies: defer-to-connect "^2.0.1" +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -2552,12 +2562,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1, acorn-walk@^8.2.0: +acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.7.0, acorn@^8.8.0, acorn@^8.8.2: +acorn@^8.4.1, acorn@^8.8.0, acorn@^8.8.2: version "8.9.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.9.0.tgz#78a16e3b2bcc198c10822786fa6679e245db5b59" integrity sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ== @@ -2795,7 +2805,7 @@ ast-types@0.15.2: dependencies: tslib "^2.0.1" -ast-types@^0.13.2: +ast-types@^0.13.4: version "0.13.4" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== @@ -3188,10 +3198,10 @@ caniuse-lite@^1.0.30001503: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz#2b7ad5265392d6d2de25cd8776d1ab3899570d14" integrity sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA== -chalk@5.2.0, chalk@^5.0.0, chalk@^5.0.1, chalk@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== +chalk@5.3.0, chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== chalk@^2.0.0: version "2.4.2" @@ -3210,6 +3220,11 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.0.0, chalk@^5.0.1, chalk@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -3266,15 +3281,15 @@ cli-cursor@^4.0.0: dependencies: restore-cursor "^4.0.0" -cli-spinners@^2.5.0, cli-spinners@^2.6.1: +cli-spinners@^2.5.0, cli-spinners@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== -cli-width@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.0.0.tgz#a5622f6a3b0a9e3e711a25f099bf2399f608caf6" - integrity sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw== +cli-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== cliui@^6.0.0: version "6.0.0" @@ -3650,10 +3665,10 @@ cosmiconfig-typescript-loader@^4.0.0: resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz#c4259ce474c9df0f32274ed162c0447c951ef073" integrity sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q== -cosmiconfig@8.1.3: - version "8.1.3" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" - integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== +cosmiconfig@8.2.0, cosmiconfig@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== dependencies: import-fresh "^3.2.1" js-yaml "^4.1.0" @@ -3681,16 +3696,6 @@ cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" - integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -3791,7 +3796,7 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@^0.1.3, deep-is@~0.1.3: +deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== @@ -3844,15 +3849,14 @@ define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -degenerator@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-4.0.3.tgz#5fa3e42206797ca78e0ee265f968aafc3bc84f49" - integrity sha512-2wY8vmCfxrQpe2PKGYdiWRre5HQRwsAXbAAWRbC+z2b80MEpnWc8A3a9k4TwqwN3Z/Fm3uhNm5vYUZIbMhyRxQ== +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== dependencies: - ast-types "^0.13.2" - escodegen "^1.8.1" - esprima "^4.0.0" - vm2 "^3.9.19" + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" del-cli@^5.0.0: version "5.0.0" @@ -3989,6 +3993,11 @@ emittery@^0.10.2: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== +emoji-regex@^10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f" + integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -4158,15 +4167,14 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@^1.8.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" - integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== dependencies: esprima "^4.0.1" - estraverse "^4.2.0" + estraverse "^5.2.0" esutils "^2.0.2" - optionator "^0.8.1" optionalDependencies: source-map "~0.6.1" @@ -4343,7 +4351,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -4368,10 +4376,10 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@7.1.1, execa@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" - integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== +execa@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.1" @@ -4413,6 +4421,21 @@ execa@^5.0.0, execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" + integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -4429,7 +4452,7 @@ expect@^28.0.0, expect@^28.1.3: jest-message-util "^28.1.3" jest-util "^28.1.3" -external-editor@^3.0.3: +external-editor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== @@ -4459,12 +4482,23 @@ fast-glob@^3.2.11, fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== @@ -4865,14 +4899,14 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@13.1.4: - version "13.1.4" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" - integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g== +globby@13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" + integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== dependencies: dir-glob "^3.0.1" - fast-glob "^3.2.11" - ignore "^5.2.0" + fast-glob "^3.3.0" + ignore "^5.2.4" merge2 "^1.4.1" slash "^4.0.0" @@ -4906,7 +4940,24 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@12.6.1, got@^12.1.0: +got@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/got/-/got-13.0.0.tgz#a2402862cef27a5d0d1b07c0fb25d12b58175422" + integrity sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA== + dependencies: + "@sindresorhus/is" "^5.2.0" + "@szmarczak/http-timer" "^5.0.1" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.8" + decompress-response "^6.0.0" + form-data-encoder "^2.1.2" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^3.0.0" + +got@^12.1.0: version "12.6.1" resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== @@ -5114,7 +5165,7 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.0.5, ignore@^5.2.0: +ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -5193,16 +5244,17 @@ ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@9.2.6: - version "9.2.6" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.6.tgz#802a61ee3eefbf1cb82a7fb6c2ae95a106050e01" - integrity sha512-y71l237eJJKS4rl7sQcEUiMhrR0pB/ZnRMMTxLpjJhWL4hdWCT03a6jJnC1w6qIPSRZWEozuieGt3v7XaEJYFw== +inquirer@9.2.10: + version "9.2.10" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.10.tgz#495a846fd6722ffadba896bd9d93e1e5a7add5c7" + integrity sha512-tVVNFIXU8qNHoULiazz612GFl+yqNfjMTbLuViNJE/d860Qxrd3NMrse8dm40VUQLOQeULvaQF8lpAhvysjeyA== dependencies: + "@ljharb/through" "^2.3.9" ansi-escapes "^4.3.2" - chalk "^5.2.0" + chalk "^5.3.0" cli-cursor "^3.1.0" - cli-width "^4.0.0" - external-editor "^3.0.3" + cli-width "^4.1.0" + external-editor "^3.1.0" figures "^5.0.0" lodash "^4.17.21" mute-stream "1.0.0" @@ -5211,8 +5263,7 @@ inquirer@9.2.6: rxjs "^7.8.1" string-width "^4.2.3" strip-ansi "^6.0.1" - through "^2.3.6" - wrap-ansi "^6.0.1" + wrap-ansi "^6.2.0" internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: version "1.0.5" @@ -5235,7 +5286,7 @@ invariant@*, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -ip@^1.1.5: +ip@^1.1.5, ip@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== @@ -5561,7 +5612,7 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0: +is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0, is-unicode-supported@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== @@ -6324,14 +6375,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -7052,10 +7095,10 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.1.tgz#b3eea7b54b3a48020e46f4f88b9c5a7430d20b2e" - integrity sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow== +node-fetch@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== dependencies: data-uri-to-buffer "^4.0.0" fetch-blob "^3.1.4" @@ -7254,18 +7297,6 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - optionator@^0.9.1: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -7278,20 +7309,20 @@ optionator@^0.9.1: prelude-ls "^1.2.1" type-check "^0.4.0" -ora@6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-6.3.1.tgz#a4e9e5c2cf5ee73c259e8b410273e706a2ad3ed6" - integrity sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ== +ora@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-7.0.1.tgz#cdd530ecd865fe39e451a0e7697865669cb11930" + integrity sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw== dependencies: - chalk "^5.0.0" + chalk "^5.3.0" cli-cursor "^4.0.0" - cli-spinners "^2.6.1" + cli-spinners "^2.9.0" is-interactive "^2.0.0" - is-unicode-supported "^1.1.0" + is-unicode-supported "^1.3.0" log-symbols "^5.1.0" stdin-discarder "^0.1.0" - strip-ansi "^7.0.1" - wcwidth "^1.0.1" + string-width "^6.1.0" + strip-ansi "^7.1.0" ora@^5.4.1: version "5.4.1" @@ -7399,26 +7430,27 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -pac-proxy-agent@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-6.0.3.tgz#61042187093b67aa7dd05b41e4ec7c241a27c428" - integrity sha512-5Hr1KgPDoc21Vn3rsXBirwwDnF/iac1jN/zkpsOYruyT+ZgsUhUOgVwq3v9+ukjZd/yGm/0nzO1fDfl7rkGoHQ== +pac-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.0.tgz#db42120c64292685dafaf2bd921e223c56bfb13b" + integrity sha512-t4tRAMx0uphnZrio0S0Jw9zg3oDbz1zVhQ/Vy18FjLfP1XOLNUEjaVxYCYRI6NS+BsMBXKIzV6cTLOkO9AtywA== dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" agent-base "^7.0.2" debug "^4.3.4" get-uri "^6.0.1" http-proxy-agent "^7.0.0" https-proxy-agent "^7.0.0" - pac-resolver "^6.0.1" + pac-resolver "^7.0.0" socks-proxy-agent "^8.0.1" -pac-resolver@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-6.0.1.tgz#319c182d3db4e6782e79519cb4dd1dda46579292" - integrity sha512-dg497MhVT7jZegPRuOScQ/z0aV/5WR0gTdRu1md+Irs9J9o+ls5jIuxjo1WfaTG+eQQkxyn5HMGvWK+w7EIBkQ== +pac-resolver@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.0.tgz#79376f1ca26baf245b96b34c339d79bff25e900c" + integrity sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg== dependencies: - degenerator "^4.0.1" - ip "^1.1.5" + degenerator "^5.0.0" + ip "^1.1.8" netmask "^2.0.2" package-json@^8.1.0: @@ -7571,11 +7603,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - prettier-linter-helpers@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" @@ -7668,17 +7695,17 @@ protocols@^2.0.0, protocols@^2.0.1: resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== -proxy-agent@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.2.1.tgz#062df6609a4012fd1c108974865599b61e77abde" - integrity sha512-OIbBKlRAT+ycCm6wAYIzMwPejzRtjy8F3QiDX0eKOA3e4pe3U9F/IvzcHP42bmgQxVv97juG+J8/gx+JIeCX/Q== +proxy-agent@6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.3.0.tgz#72f7bb20eb06049db79f7f86c49342c34f9ba08d" + integrity sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og== dependencies: agent-base "^7.0.2" debug "^4.3.4" http-proxy-agent "^7.0.0" https-proxy-agent "^7.0.0" lru-cache "^7.14.1" - pac-proxy-agent "^6.0.3" + pac-proxy-agent "^7.0.0" proxy-from-env "^1.1.0" socks-proxy-agent "^8.0.1" @@ -8042,33 +8069,33 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -release-it@^15.0.0: - version "15.11.0" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-15.11.0.tgz#389cf1e8f367b51f3f3bc4dc3e01046b6bdb166c" - integrity sha512-lZwoGEnKYKwGnfxxlA7vtR7vvozPrOSsIgQaHO4bgQ5ARbG3IA6Dmo0IVusv6nR1KmnjH70QIeNAgsWs6Ji/tw== +release-it@^16.1.5: + version "16.1.5" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-16.1.5.tgz#a846c2728994ff4b9aa630e2581868eda3b73978" + integrity sha512-w/zCljPZBSYcCwR9fjDB1zaYwie1CAQganUrwNqjtXacXhrrsS5E6dDUNLcxm2ypu8GWAgZNMJfuBJqIO2E7fA== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "19.0.11" + "@octokit/rest" "19.0.13" async-retry "1.3.3" - chalk "5.2.0" - cosmiconfig "8.1.3" - execa "7.1.1" + chalk "5.3.0" + cosmiconfig "8.2.0" + execa "7.2.0" git-url-parse "13.1.0" - globby "13.1.4" - got "12.6.1" - inquirer "9.2.6" + globby "13.2.2" + got "13.0.0" + inquirer "9.2.10" is-ci "3.0.1" issue-parser "6.0.0" lodash "4.17.21" mime-types "2.1.35" new-github-release-url "2.0.0" - node-fetch "3.3.1" + node-fetch "3.3.2" open "9.1.0" - ora "6.3.1" + ora "7.0.1" os-name "5.1.0" promise.allsettled "1.0.6" - proxy-agent "6.2.1" - semver "7.5.1" + proxy-agent "6.3.0" + semver "7.5.4" shelljs "0.8.5" update-notifier "6.0.2" url-join "5.0.0" @@ -8270,13 +8297,6 @@ semver@7.3.8: dependencies: lru-cache "^6.0.0" -semver@7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" - integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== - dependencies: - lru-cache "^6.0.0" - semver@7.5.2: version "7.5.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" @@ -8284,6 +8304,13 @@ semver@7.5.2: dependencies: lru-cache "^6.0.0" +semver@7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -8583,6 +8610,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-6.1.0.tgz#96488d6ed23f9ad5d82d13522af9e4c4c3fd7518" + integrity sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^10.2.1" + strip-ansi "^7.0.1" + string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -8652,7 +8688,7 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^7.0.1: +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -8811,7 +8847,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.6: +through@2, "through@>=2.2.7 <3": version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -8908,13 +8944,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -9156,14 +9185,6 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -vm2@^3.9.19: - version "3.9.19" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.19.tgz#be1e1d7a106122c6c492b4d51c2e8b93d3ed6a4a" - integrity sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg== - dependencies: - acorn "^8.7.0" - acorn-walk "^8.2.0" - walker@^1.0.7, walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -9255,17 +9276,12 @@ windows-release@^5.0.1: dependencies: execa "^5.1.1" -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: +wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== From 7b7f8d4630ee64e44ed9a1195e79521b0158cb5f Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 02:59:04 -0600 Subject: [PATCH 02/13] fix: deployment --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index eed7903..0caec93 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,8 @@ }, "homepage": "https://github.com/yutasuzuki/react-native-record-screen#readme", "publishConfig": { - "registry": "https://registry.npmjs.org/" + "registry": "https://registry.npmjs.org/", + "access": "public" }, "devDependencies": { "@commitlint/config-conventional": "^17.0.2", From 4b86091af358c9e2ae3ab1ce38e2448a4e4da4a7 Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 03:01:34 -0600 Subject: [PATCH 03/13] chore: config --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0caec93..30a32f2 100644 --- a/package.json +++ b/package.json @@ -43,13 +43,13 @@ "ios", "android" ], - "repository": "https://github.com/yutasuzuki/react-native-record-screen", - "author": "Yuta Suzuki (https://github.com/yutasuzuki)", + "repository": "https://github.com/closettothe/react-native-record-screen", + "author": "Jamiel Rahi (https://github.com/closetothe)", "license": "MIT", "bugs": { - "url": "https://github.com/yutasuzuki/react-native-record-screen/issues" + "url": "https://github.com/closetothe/react-native-record-screen/issues" }, - "homepage": "https://github.com/yutasuzuki/react-native-record-screen#readme", + "homepage": "https://github.com/closetothe/react-native-record-screen#readme", "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public" From 11c35430b2c7d1d6e82e3183c39bcc16b1ac5b2e Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 03:02:17 -0600 Subject: [PATCH 04/13] chore: release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30a32f2..670339d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pastel/react-native-record-screen", - "version": "0.6.1", + "version": "0.0.1", "description": "react-native-record-screen", "main": "lib/commonjs/index", "module": "lib/module/index", From f707866c618bd2f783413cfce0685689184f38fa Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 03:21:04 -0600 Subject: [PATCH 05/13] fix: audio quality wip1 --- ios/RecordScreen.mm | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index b557c5d..abe3cbb 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -91,8 +91,8 @@ - (int) adjustMultipleOf2:(int)value; AudioChannelLayout acl = { 0 }; acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; - self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000)}]; - self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000)}]; + self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(128000), AVEncoderAudioQualityKey: @(max)}]; + self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(1280000), AVEncoderAudioQualityKey: @(max)}]; self.audioInput.preferredVolume = 0.0; self.micInput.preferredVolume = 0.0; diff --git a/package.json b/package.json index 670339d..5315982 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@pastel/react-native-record-screen", + "name": "@closetothe/react-native-record-screen", "version": "0.0.1", "description": "react-native-record-screen", "main": "lib/commonjs/index", From 9f2c467e0c705ffe6f514035abf1b3fb4a96c307 Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Sun, 27 Aug 2023 03:23:24 -0600 Subject: [PATCH 06/13] fix: build error --- ios/RecordScreen.mm | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index abe3cbb..9e9663c 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -91,8 +91,8 @@ - (int) adjustMultipleOf2:(int)value; AudioChannelLayout acl = { 0 }; acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; - self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(128000), AVEncoderAudioQualityKey: @(max)}]; - self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(1280000), AVEncoderAudioQualityKey: @(max)}]; + self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(128000), AVEncoderAudioQualityKey: @(127)}]; + self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(1280000), AVEncoderAudioQualityKey: @(127)}]; self.audioInput.preferredVolume = 0.0; self.micInput.preferredVolume = 0.0; diff --git a/package.json b/package.json index 5315982..40b019f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@closetothe/react-native-record-screen", - "version": "0.0.1", + "version": "0.0.2", "description": "react-native-record-screen", "main": "lib/commonjs/index", "module": "lib/module/index", From df83ebf1d4fec67a7a5eb9b7fd8fb113bc0bce03 Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Mon, 28 Aug 2023 03:50:27 -0600 Subject: [PATCH 07/13] fix: app audio not being recorded when mic is disabled --- ios/RecordScreen.mm | 10 +++------- package.json | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index 9e9663c..361362e 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -91,8 +91,8 @@ - (int) adjustMultipleOf2:(int)value; AudioChannelLayout acl = { 0 }; acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; - self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(128000), AVEncoderAudioQualityKey: @(127)}]; - self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(1280000), AVEncoderAudioQualityKey: @(127)}]; + self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000), AVEncoderAudioQualityKey: @(127)}]; + self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000), AVEncoderAudioQualityKey: @(127)}]; self.audioInput.preferredVolume = 0.0; self.micInput.preferredVolume = 0.0; @@ -200,11 +200,7 @@ - (int) adjustMultipleOf2:(int)value; break; case RPSampleBufferTypeAudioApp: if (self.audioInput.isReadyForMoreMediaData) { - if(self.enableMic){ - [self.audioInput appendSampleBuffer:sampleBuffer]; - } else { - [self muteAudioInBuffer:sampleBuffer]; - } + [self.audioInput appendSampleBuffer:sampleBuffer]; } break; case RPSampleBufferTypeAudioMic: diff --git a/package.json b/package.json index 40b019f..ee272d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@closetothe/react-native-record-screen", - "version": "0.0.2", + "version": "0.0.4", "description": "react-native-record-screen", "main": "lib/commonjs/index", "module": "lib/module/index", From 2f65610d5c725a987ca36d02dcc090e9aadfdebd Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Fri, 1 Sep 2023 10:26:23 -0700 Subject: [PATCH 08/13] docs: add expo config plugin to readme --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5509fd6..6f77811 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,14 @@ A screen record module for React Native. - Support iOS >= 11.0 (Simulator is not work) - Support Android + - minSdkVersion = 26 - compileSdkVersion = 33 - targetSdkVersion = 31 - use [HBRecorder](https://github.com/HBiSoft/HBRecorder) +- Support Expo by using [expo-record-screen-config-plugin](https://github.com/closetothe/expo-record-screen-config-plugin) + ## Installation ```sh @@ -57,10 +60,14 @@ npx pod-install ### Recording full screen ```js -import RecordScreen, { RecordingStartResponse } from 'react-native-record-screen'; +import RecordScreen, { + RecordingStartResponse, +} from 'react-native-record-screen'; // recording start -const res = RecordScreen.startRecording().catch((error) => console.error(error)); +const res = RecordScreen.startRecording().catch((error) => + console.error(error) +); if (res === RecordingStartResponse.PermissionError) { // user denies access } @@ -99,7 +106,7 @@ if (res) { RecordScreen.startRecording({ bitrate: 1024000, // default 236390400 fps: 24, // default 60 -}) +}); ``` ### Clean Sandbox From 68f5329873cdf26922a9147d71334718e87f233f Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Fri, 13 Oct 2023 12:19:15 -0700 Subject: [PATCH 09/13] feat(experimental): separate requestPermission function --- ios/RecordScreen.mm | 75 +++++++++++++++++++++++++++++++++++++++++++++ src/index.tsx | 5 +++ 2 files changed, 80 insertions(+) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index 361362e..4f606bf 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -62,6 +62,81 @@ - (int) adjustMultipleOf2:(int)value; self.fps = [RCTConvert int: config[@"fps"]]; } + +RCT_REMAP_METHOD(requestPermissions, resolve:(RCTPromiseResolveBlock)resolve rejecte:(RCTPromiseRejectBlock)reject) +{ + UIApplication *app = [UIApplication sharedApplication]; + _backgroundRenderingID = [app beginBackgroundTaskWithExpirationHandler:^{ + [app endBackgroundTask:_backgroundRenderingID]; + _backgroundRenderingID = UIBackgroundTaskInvalid; + }]; + + self.screenRecorder = [RPScreenRecorder sharedRecorder]; + if (self.screenRecorder.isRecording) { + return; + } + + self.encounteredFirstBuffer = NO; + + NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *outputURL = pathDocuments[0]; + + NSString *videoOutPath = [[outputURL stringByAppendingPathComponent:[NSString stringWithFormat:@"%u", arc4random() % 1000]] stringByAppendingPathExtension:@"mp4"]; + + NSError *error; + self.writer = [AVAssetWriter assetWriterWithURL:[NSURL fileURLWithPath:videoOutPath] fileType:AVFileTypeMPEG4 error:&error]; + if (!self.writer) { + NSLog(@"writer: %@", error); + abort(); + } + + AudioChannelLayout acl = { 0 }; + acl.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; + self.audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000), AVEncoderAudioQualityKey: @(127)}]; + self.micInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:@{ AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVChannelLayoutKey: [NSData dataWithBytes: &acl length: sizeof( acl ) ], AVEncoderBitRateKey: @(320000), AVEncoderAudioQualityKey: @(127)}]; + + self.audioInput.preferredVolume = 0.0; + self.micInput.preferredVolume = 0.0; + + NSDictionary *compressionProperties = @{AVVideoProfileLevelKey : AVVideoProfileLevelH264HighAutoLevel, + AVVideoH264EntropyModeKey : AVVideoH264EntropyModeCABAC, + AVVideoAverageBitRateKey : @(self.bitrate), + AVVideoMaxKeyFrameIntervalKey : @(self.fps), + AVVideoAllowFrameReorderingKey : @NO}; + + NSLog(@"width: %d", [self adjustMultipleOf2:self.screenWidth]); + NSLog(@"height: %d", [self adjustMultipleOf2:self.screenHeight]); + if (@available(iOS 11.0, *)) { + NSDictionary *videoSettings = @{AVVideoCompressionPropertiesKey : compressionProperties, + AVVideoCodecKey : AVVideoCodecTypeH264, + AVVideoWidthKey : @([self adjustMultipleOf2:self.screenWidth]), + AVVideoHeightKey : @([self adjustMultipleOf2:self.screenHeight])}; + + self.videoInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings]; + } else { + // Fallback on earlier versions + } + + [self.writer addInput:self.audioInput]; + [self.writer addInput:self.micInput]; + [self.writer addInput:self.videoInput]; + [self.videoInput setMediaTimeScale:60]; + [self.writer setMovieTimeScale:60]; + [self.videoInput setExpectsMediaDataInRealTime:YES]; + + if (self.enableMic) { + self.screenRecorder.microphoneEnabled = YES; + } + + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { + if (granted) { + resolve(@"granted") + } else { + resolve(@"denied") + } + }]; +} + RCT_REMAP_METHOD(startRecording, resolve:(RCTPromiseResolveBlock)resolve rejecte:(RCTPromiseRejectBlock)reject) { UIApplication *app = [UIApplication sharedApplication]; diff --git a/src/index.tsx b/src/index.tsx index 1098c94..fb6f991 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -34,6 +34,7 @@ type RecordScreenNativeModule = { setup( config: RecordScreenConfigType & { width: number; height: number } ): void; + requestPermission(): Promise<'denied' | 'granted'>; startRecording(): Promise; stopRecording(): Promise; clean(): Promise; @@ -56,6 +57,10 @@ class ReactNativeRecordScreenClass { }); } + requestPermission() { + return RS.requestPermission(); + } + startRecording(config: RecordScreenConfigType = {}) { this.setup(config); return RS.startRecording(); From fd5584b02a99e5259e9c0a541722796bd733fa7c Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Fri, 13 Oct 2023 12:58:25 -0700 Subject: [PATCH 10/13] fix: build erros --- example/ios/Podfile.lock | 6 +++--- example/ios/RecordScreenExample.xcodeproj/project.pbxproj | 6 ++++-- ios/RecordScreen.mm | 6 +++--- package.json | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1c7e1b9..043dfc0 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -374,7 +374,7 @@ PODS: - React-jsinspector (0.72.0) - React-logger (0.72.0): - glog - - react-native-record-screen (0.6.0): + - react-native-record-screen (0.0.5): - RCT-Folly (= 2021.07.22.00) - React-Core - react-native-video (5.2.1): @@ -700,7 +700,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 990287d74aedc4fdd08ebd80736b1a5c71b54da2 React-jsinspector: 8d754fc957255a29d93e52fc67a895045cdc8703 React-logger: 454ffb01980778a43b0153ee98721d0275b56616 - react-native-record-screen: abc1c23577598fa2d576ade433706d6a8f7e4654 + react-native-record-screen: 2fdf2c4d11a54363bced92ff124c206062577611 react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253 React-NativeModulesApple: 038cd625999ff352fc13d11fd335ea7509794599 React-perflogger: 684a11499a0589cc42135d6d5cc04d0e4e0e261a @@ -725,4 +725,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: ecc2815bd41817eeabc4f10f1f2a34740ceaac89 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/example/ios/RecordScreenExample.xcodeproj/project.pbxproj b/example/ios/RecordScreenExample.xcodeproj/project.pbxproj index 973d240..4dd6a63 100644 --- a/example/ios/RecordScreenExample.xcodeproj/project.pbxproj +++ b/example/ios/RecordScreenExample.xcodeproj/project.pbxproj @@ -437,6 +437,7 @@ baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-RecordScreenExample-RecordScreenExampleTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 2YU2NGKRBH; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -465,6 +466,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 2YU2NGKRBH; INFOPLIST_FILE = RecordScreenExampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -490,7 +492,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6HP9M88DJ2; + DEVELOPMENT_TEAM = 2YU2NGKRBH; ENABLE_BITCODE = NO; INFOPLIST_FILE = RecordScreenExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -518,7 +520,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6HP9M88DJ2; + DEVELOPMENT_TEAM = 2YU2NGKRBH; INFOPLIST_FILE = RecordScreenExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index 4f606bf..3fe0aed 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -63,7 +63,7 @@ - (int) adjustMultipleOf2:(int)value; } -RCT_REMAP_METHOD(requestPermissions, resolve:(RCTPromiseResolveBlock)resolve rejecte:(RCTPromiseRejectBlock)reject) +RCT_REMAP_METHOD(requestPermissions, requestResolve:(RCTPromiseResolveBlock)resolve requestReject:(RCTPromiseRejectBlock)reject) { UIApplication *app = [UIApplication sharedApplication]; _backgroundRenderingID = [app beginBackgroundTaskWithExpirationHandler:^{ @@ -130,9 +130,9 @@ - (int) adjustMultipleOf2:(int)value; [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { if (granted) { - resolve(@"granted") + resolve(@"granted"); } else { - resolve(@"denied") + resolve(@"denied"); } }]; } diff --git a/package.json b/package.json index ee272d4..588cf41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@closetothe/react-native-record-screen", - "version": "0.0.4", + "version": "0.0.6", "description": "react-native-record-screen", "main": "lib/commonjs/index", "module": "lib/module/index", From 588dbb5b3d9bd562cfb81f38c10e46afb6b89915 Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Thu, 9 Nov 2023 12:58:07 -0500 Subject: [PATCH 11/13] fix: width and height --- src/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index fb6f991..7922e81 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -12,6 +12,8 @@ export type RecordScreenConfigType = { fps?: number; bitrate?: number; mic?: boolean; + width?: number; + height?: number; }; export type RecordingSuccessResponse = { @@ -46,11 +48,11 @@ const RS = RecordScreen as RecordScreenNativeModule; class ReactNativeRecordScreenClass { private setup(config: RecordScreenConfigType = {}): void { - const { width, height } = Dimensions.get('window'); + const window = Dimensions.get('window'); RS.setup({ mic: true, - width, - height, + width: config.width ?? window.width * 2, + height: config.height ?? window.height * 2, fps: 60, bitrate: 1920 * 1080 * 144, ...config, From f2dffa42dba575f5154fc3be8d6e48079a31601e Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Thu, 9 Nov 2023 12:58:31 -0500 Subject: [PATCH 12/13] chore: publish --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 588cf41..b10db72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@closetothe/react-native-record-screen", - "version": "0.0.6", + "version": "0.0.7", "description": "react-native-record-screen", "main": "lib/commonjs/index", "module": "lib/module/index", From 5879f19b311de3a85885d1ad65ce5994b4ab529a Mon Sep 17 00:00:00 2001 From: Jamiel Rahi Date: Fri, 10 Nov 2023 17:55:22 -0500 Subject: [PATCH 13/13] fix: use cache directory and avoid filename collisions --- ios/RecordScreen.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/RecordScreen.mm b/ios/RecordScreen.mm index 3fe0aed..0759feb 100644 --- a/ios/RecordScreen.mm +++ b/ios/RecordScreen.mm @@ -78,10 +78,10 @@ - (int) adjustMultipleOf2:(int)value; self.encounteredFirstBuffer = NO; - NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *outputURL = pathDocuments[0]; - NSString *videoOutPath = [[outputURL stringByAppendingPathComponent:[NSString stringWithFormat:@"%u", arc4random() % 1000]] stringByAppendingPathExtension:@"mp4"]; + NSString *videoOutPath = [[outputURL stringByAppendingPathComponent:[NSString stringWithFormat:@"%u", arc4random_uniform(1000000)]] stringByAppendingPathExtension:@"mp4"]; NSError *error; self.writer = [AVAssetWriter assetWriterWithURL:[NSURL fileURLWithPath:videoOutPath] fileType:AVFileTypeMPEG4 error:&error]; @@ -152,10 +152,10 @@ - (int) adjustMultipleOf2:(int)value; self.encounteredFirstBuffer = NO; - NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *outputURL = pathDocuments[0]; - NSString *videoOutPath = [[outputURL stringByAppendingPathComponent:[NSString stringWithFormat:@"%u", arc4random() % 1000]] stringByAppendingPathExtension:@"mp4"]; + NSString *videoOutPath = [[outputURL stringByAppendingPathComponent:[NSString stringWithFormat:@"%u", arc4random_uniform(1000000)]] stringByAppendingPathExtension:@"mp4"]; NSError *error; self.writer = [AVAssetWriter assetWriterWithURL:[NSURL fileURLWithPath:videoOutPath] fileType:AVFileTypeMPEG4 error:&error]; @@ -353,7 +353,7 @@ - (int) adjustMultipleOf2:(int)value; cleanRejecte:(RCTPromiseRejectBlock)reject) { - NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSArray *pathDocuments = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *path = pathDocuments[0]; NSLog(@"startCapture: %@", path); [[NSFileManager defaultManager] removeItemAtPath:path error:nil];