From a3943225f31978075461fb7a16f70b70f98e9607 Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Sun, 25 Aug 2024 12:01:31 +0200 Subject: [PATCH] Windows: Scaffolding reset --- example/metro.config.js | 57 ++++++-- example/package.json | 1 + example/windows/ReactNativeFsExample.sln | 90 ++++++------ .../AutolinkedNativeModules.g.targets | 4 +- .../ReactNativeFsExample/Package.appxmanifest | 4 +- .../ReactNativeFsExample.vcxproj | 4 +- .../ReactNativeFsExample/packages.lock.json | 20 +-- package.json | 1 + windows/ReactNativeFs.sln | 38 ++--- windows/ReactNativeFs/ReactNativeFs.vcxproj | 9 +- .../codegen/NativeReactNativeFsSpec.g.h | 130 +++++++++--------- windows/ReactNativeFs/packages.lock.json | 18 +-- yarn.lock | 2 + 13 files changed, 212 insertions(+), 166 deletions(-) diff --git a/example/metro.config.js b/example/metro.config.js index 78e4f819..690b3f86 100644 --- a/example/metro.config.js +++ b/example/metro.config.js @@ -1,9 +1,19 @@ +const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); + +const fs = require('fs'); const path = require('path'); -const { getDefaultConfig } = require('@react-native/metro-config'); -const { getConfig } = require('react-native-builder-bob/metro-config'); -const pkg = require('../package.json'); +const escape = require('escape-string-regexp'); +const exclusionList = require('metro-config/src/defaults/exclusionList'); +const pak = require('../package.json'); const root = path.resolve(__dirname, '..'); +const modules = Object.keys({ ...pak.peerDependencies }); + +const rnwPath = fs.realpathSync( + path.resolve(require.resolve('react-native-windows/package.json'), '..'), +); + +// /** * Metro configuration @@ -11,8 +21,39 @@ const root = path.resolve(__dirname, '..'); * * @type {import('metro-config').MetroConfig} */ -module.exports = getConfig(getDefaultConfig(__dirname), { - root, - pkg, - project: __dirname, -}); + +const config = { + // + watchFolders: [root], + resolver: { + blockList: exclusionList([ + ...modules.map( + (m) => + new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`), + ), + // This stops "react-native run-windows" from causing the metro server to crash if its already running + new RegExp( + `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, + ), + // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild + new RegExp(`${rnwPath}/build/.*`), + new RegExp(`${rnwPath}/target/.*`), + /.*\.ProjectImports\.zip/, + ]), + extraNodeModules: modules.reduce((acc, name) => { + acc[name] = path.join(__dirname, 'node_modules', name); + return acc; + }, {}), + // + }, + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, +}; + +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/example/package.json b/example/package.json index 77fe74c6..ab7f1294 100644 --- a/example/package.json +++ b/example/package.json @@ -27,6 +27,7 @@ "@react-native/babel-preset": "0.75.2", "@react-native/metro-config": "0.75.2", "@react-native/typescript-config": "0.75.2", + "metro-config": "^0.80.9", "react-native-builder-bob": "^0.30.0" }, "engines": { diff --git a/example/windows/ReactNativeFsExample.sln b/example/windows/ReactNativeFsExample.sln index 1eab0844..e700db9f 100644 --- a/example/windows/ReactNativeFsExample.sln +++ b/example/windows/ReactNativeFsExample.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32929.385 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFsExample", "ReactNativeFsExample\ReactNativeFsExample.vcxproj", "{83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFsExample", "ReactNativeFsExample\ReactNativeFsExample.vcxproj", "{B19AB70E-9CA4-4514-BA08-272048FC1E1A}" ProjectSection(ProjectDependencies) = postProject {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} EndProjectSection @@ -33,9 +33,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\reac EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\node_modules\react-native-windows\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFs", "..\..\windows\ReactNativeFs\ReactNativeFs.vcxproj", "{64DEFCC0-2495-420F-BECB-78D19C734E25}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFs", "..\..\windows\ReactNativeFs\ReactNativeFs.vcxproj", "{8DD80475-5EEE-4C4C-B283-E4ABE56BE884}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeStaticServer", "..\node_modules\@dr.pogodin\react-native-static-server\windows\ReactNativeStaticServer\ReactNativeStaticServer.vcxproj", "{85449ABF-3212-44B4-BE33-D3C6629FD017}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeStaticServer", "..\node_modules\@dr.pogodin\react-native-static-server\windows\ReactNativeStaticServer\ReactNativeStaticServer.vcxproj", "{51EEA8FA-5914-480C-86A9-A0E5700E5EB3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,24 +47,24 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|ARM64.Build.0 = Debug|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x64.ActiveCfg = Debug|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x64.Build.0 = Debug|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x64.Deploy.0 = Debug|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x86.ActiveCfg = Debug|Win32 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x86.Build.0 = Debug|Win32 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Debug|x86.Deploy.0 = Debug|Win32 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|ARM64.ActiveCfg = Release|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|ARM64.Build.0 = Release|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|ARM64.Deploy.0 = Release|ARM64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x64.ActiveCfg = Release|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x64.Build.0 = Release|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x64.Deploy.0 = Release|x64 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x86.ActiveCfg = Release|Win32 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x86.Build.0 = Release|Win32 - {83C5AA44-D8CB-4C78-B8AE-6B1251D57A1D}.Release|x86.Deploy.0 = Release|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|ARM64.Build.0 = Debug|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x64.ActiveCfg = Debug|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x64.Build.0 = Debug|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x64.Deploy.0 = Debug|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x86.ActiveCfg = Debug|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x86.Build.0 = Debug|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Debug|x86.Deploy.0 = Debug|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|ARM64.ActiveCfg = Release|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|ARM64.Build.0 = Release|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|ARM64.Deploy.0 = Release|ARM64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x64.ActiveCfg = Release|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x64.Build.0 = Release|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x64.Deploy.0 = Release|x64 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x86.ActiveCfg = Release|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x86.Build.0 = Release|Win32 + {B19AB70E-9CA4-4514-BA08-272048FC1E1A}.Release|x86.Deploy.0 = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 @@ -127,30 +127,30 @@ Global {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|ARM64.Build.0 = Debug|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x64.ActiveCfg = Debug|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x64.Build.0 = Debug|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x86.ActiveCfg = Debug|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x86.Build.0 = Debug|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|ARM64.ActiveCfg = Release|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|ARM64.Build.0 = Release|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x64.ActiveCfg = Release|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x64.Build.0 = Release|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x86.ActiveCfg = Release|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x86.Build.0 = Release|Win32 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|ARM64.Build.0 = Debug|ARM64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|x64.ActiveCfg = Debug|x64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|x64.Build.0 = Debug|x64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|x86.ActiveCfg = Debug|Win32 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Debug|x86.Build.0 = Debug|Win32 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|ARM64.ActiveCfg = Release|ARM64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|ARM64.Build.0 = Release|ARM64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|x64.ActiveCfg = Release|x64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|x64.Build.0 = Release|x64 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|x86.ActiveCfg = Release|Win32 - {85449ABF-3212-44B4-BE33-D3C6629FD017}.Release|x86.Build.0 = Release|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|ARM64.Build.0 = Debug|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x64.ActiveCfg = Debug|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x64.Build.0 = Debug|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x86.ActiveCfg = Debug|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x86.Build.0 = Debug|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|ARM64.ActiveCfg = Release|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|ARM64.Build.0 = Release|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x64.ActiveCfg = Release|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x64.Build.0 = Release|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x86.ActiveCfg = Release|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x86.Build.0 = Release|Win32 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|ARM64.Build.0 = Debug|ARM64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|x64.ActiveCfg = Debug|x64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|x64.Build.0 = Debug|x64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|x86.ActiveCfg = Debug|Win32 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Debug|x86.Build.0 = Debug|Win32 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|ARM64.ActiveCfg = Release|ARM64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|ARM64.Build.0 = Release|ARM64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|x64.ActiveCfg = Release|x64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|x64.Build.0 = Release|x64 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|x86.ActiveCfg = Release|Win32 + {51EEA8FA-5914-480C-86A9-A0E5700E5EB3}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/example/windows/ReactNativeFsExample/AutolinkedNativeModules.g.targets b/example/windows/ReactNativeFsExample/AutolinkedNativeModules.g.targets index d0540c79..56fd906c 100644 --- a/example/windows/ReactNativeFsExample/AutolinkedNativeModules.g.targets +++ b/example/windows/ReactNativeFsExample/AutolinkedNativeModules.g.targets @@ -4,11 +4,11 @@ - {64defcc0-2495-420f-becb-78d19c734e25} + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884} - {85449ABF-3212-44B4-BE33-D3C6629FD017} + {51eea8fa-5914-480c-86a9-a0e5700e5eb3} diff --git a/example/windows/ReactNativeFsExample/Package.appxmanifest b/example/windows/ReactNativeFsExample/Package.appxmanifest index a41094cb..313149c1 100644 --- a/example/windows/ReactNativeFsExample/Package.appxmanifest +++ b/example/windows/ReactNativeFsExample/Package.appxmanifest @@ -7,11 +7,11 @@ IgnorableNamespaces="uap mp"> - + ReactNativeFsExample diff --git a/example/windows/ReactNativeFsExample/ReactNativeFsExample.vcxproj b/example/windows/ReactNativeFsExample/ReactNativeFsExample.vcxproj index d5287f07..c657a4aa 100644 --- a/example/windows/ReactNativeFsExample/ReactNativeFsExample.vcxproj +++ b/example/windows/ReactNativeFsExample/ReactNativeFsExample.vcxproj @@ -1,12 +1,12 @@ - + true true true - {83c5aa44-d8cb-4c78-b8ae-6b1251d57a1d} + {b19ab70e-9ca4-4514-ba08-272048fc1e1a} ReactNativeFsExample ReactNativeFsExample en-US diff --git a/example/windows/ReactNativeFsExample/packages.lock.json b/example/windows/ReactNativeFsExample/packages.lock.json index 918317dc..b6ef748a 100644 --- a/example/windows/ReactNativeFsExample/packages.lock.json +++ b/example/windows/ReactNativeFsExample/packages.lock.json @@ -4,9 +4,9 @@ "native,Version=v0.0": { "Microsoft.JavaScript.Hermes": { "type": "Direct", - "requested": "[0.1.21, )", - "resolved": "0.1.21", - "contentHash": "5njCh+3eXTLOv7+8nOnp6nJ5C0r6it5ze54c0nuWleeDptuK8t3dEDB79XTU4D5DKNvAPlqJpgXRDOak5nYIug==" + "requested": "[0.1.23, )", + "resolved": "0.1.23", + "contentHash": "cA9t1GjY4Yo0JD1AfA//e1lOwk48hLANfuX6GXrikmEBNZVr2TIX5ONJt5tqCnpZyLz6xGiPDgTfFNKbSfb21g==" }, "Microsoft.UI.Xaml": { "type": "Direct", @@ -25,8 +25,8 @@ }, "boost": { "type": "Transitive", - "resolved": "1.76.0", - "contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA==" + "resolved": "1.83.0", + "contentHash": "cy53VNMzysEMvhBixDe8ujPk67Fcj3v6FPHQnH91NYJNLHpc6jxa2xq9ruCaaJjE4M3YrGSHDi4uUSTGBWw6EQ==" }, "Microsoft.Web.WebView2": { "type": "Transitive", @@ -36,7 +36,7 @@ "common": { "type": "Project", "dependencies": { - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "fmt": { @@ -46,7 +46,7 @@ "type": "Project", "dependencies": { "Fmt": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "microsoft.reactnative": { @@ -54,17 +54,17 @@ "dependencies": { "Common": "[1.0.0, )", "Folly": "[1.0.0, )", - "Microsoft.JavaScript.Hermes": "[0.1.21, )", + "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.UI.Xaml": "[2.8.0, )", "ReactCommon": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "reactcommon": { "type": "Project", "dependencies": { "Folly": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "reactnativefs": { diff --git a/package.json b/package.json index 1e0ba53c..651469f6 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "jest": "^29.7.0", + "metro-config": "^0.80.9", "prettier": "^3.3.3", "react": "18.3.1", "react-native": "0.75.2", diff --git a/windows/ReactNativeFs.sln b/windows/ReactNativeFs.sln index dc46f69d..342fe8a1 100644 --- a/windows/ReactNativeFs.sln +++ b/windows/ReactNativeFs.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32929.385 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFs", "ReactNativeFs\ReactNativeFs.vcxproj", "{64DEFCC0-2495-420F-BECB-78D19C734E25}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeFs", "ReactNativeFs\ReactNativeFs.vcxproj", "{8DD80475-5EEE-4C4C-B283-E4ABE56BE884}" ProjectSection(ProjectDependencies) = postProject {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} EndProjectSection @@ -54,24 +54,24 @@ Global Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|ARM64.Build.0 = Debug|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x64.ActiveCfg = Debug|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x64.Build.0 = Debug|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x64.Deploy.0 = Debug|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x86.ActiveCfg = Debug|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x86.Build.0 = Debug|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Debug|x86.Deploy.0 = Debug|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|ARM64.ActiveCfg = Release|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|ARM64.Build.0 = Release|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|ARM64.Deploy.0 = Release|ARM64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x64.ActiveCfg = Release|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x64.Build.0 = Release|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x64.Deploy.0 = Release|x64 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x86.ActiveCfg = Release|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x86.Build.0 = Release|Win32 - {64DEFCC0-2495-420F-BECB-78D19C734E25}.Release|x86.Deploy.0 = Release|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|ARM64.Build.0 = Debug|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x64.ActiveCfg = Debug|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x64.Build.0 = Debug|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x64.Deploy.0 = Debug|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x86.ActiveCfg = Debug|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x86.Build.0 = Debug|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Debug|x86.Deploy.0 = Debug|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|ARM64.ActiveCfg = Release|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|ARM64.Build.0 = Release|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|ARM64.Deploy.0 = Release|ARM64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x64.ActiveCfg = Release|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x64.Build.0 = Release|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x64.Deploy.0 = Release|x64 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x86.ActiveCfg = Release|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x86.Build.0 = Release|Win32 + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884}.Release|x86.Deploy.0 = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/windows/ReactNativeFs/ReactNativeFs.vcxproj b/windows/ReactNativeFs/ReactNativeFs.vcxproj index c3a61a0f..a5a469eb 100644 --- a/windows/ReactNativeFs/ReactNativeFs.vcxproj +++ b/windows/ReactNativeFs/ReactNativeFs.vcxproj @@ -6,7 +6,7 @@ true true true - {64defcc0-2495-420f-becb-78d19c734e25} + {8DD80475-5EEE-4C4C-B283-E4ABE56BE884} ReactNativeFs ReactNativeFs en-US @@ -20,7 +20,7 @@ - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 @@ -65,7 +65,8 @@ false - + + @@ -146,4 +147,4 @@ - + \ No newline at end of file diff --git a/windows/ReactNativeFs/codegen/NativeReactNativeFsSpec.g.h b/windows/ReactNativeFs/codegen/NativeReactNativeFsSpec.g.h index b95cd9b1..3a613702 100644 --- a/windows/ReactNativeFs/codegen/NativeReactNativeFsSpec.g.h +++ b/windows/ReactNativeFs/codegen/NativeReactNativeFsSpec.g.h @@ -13,10 +13,28 @@ namespace winrt::ReactNativeFs { +struct ReactNativeFsSpec_DownloadResultT { + double jobId; + double statusCode; + double bytesWritten; +}; + +struct ReactNativeFsSpec_FSInfoResultT { + double totalSpace; + double totalSpaceEx; + double freeSpace; + double freeSpaceEx; +}; + struct ReactNativeFsSpec_FileOptionsT { std::optional NSFileProtectionKey; }; +struct ReactNativeFsSpec_MkdirOptionsT { + std::optional NSURLIsExcludedFromBackupKey; + std::optional NSFileProtectionKey; +}; + struct ReactNativeFsSpec_NativeDownloadFileOptionsT { double jobId; std::string fromUrl; @@ -35,28 +53,6 @@ struct ReactNativeFsSpec_NativeDownloadFileOptionsT { bool hasResumableCallback; }; -struct ReactNativeFsSpec_DownloadResultT { - double jobId; - double statusCode; - double bytesWritten; -}; - -struct ReactNativeFsSpec_FSInfoResultT { - double totalSpace; - double totalSpaceEx; - double freeSpace; - double freeSpaceEx; -}; - -struct ReactNativeFsSpec_MkdirOptionsT { - std::optional NSURLIsExcludedFromBackupKey; - std::optional NSFileProtectionKey; -}; - -struct ReactNativeFsSpec_PickFileOptionsT { - std::vector mimeTypes; -}; - struct ReactNativeFsSpec_NativeReadDirResItemT { double ctime; double mtime; @@ -75,11 +71,6 @@ struct ReactNativeFsSpec_NativeStatResultT { std::string originalFilepath; }; -struct ReactNativeFsSpec_TouchOptions { - std::optional ctime; - std::optional mtime; -}; - struct ReactNativeFsSpec_NativeUploadFileOptionsT { double jobId; std::string toUrl; @@ -92,6 +83,15 @@ struct ReactNativeFsSpec_NativeUploadFileOptionsT { bool hasProgressCallback; }; +struct ReactNativeFsSpec_PickFileOptionsT { + std::vector mimeTypes; +}; + +struct ReactNativeFsSpec_TouchOptions { + std::optional ctime; + std::optional mtime; +}; + struct ReactNativeFsSpec_UploadResultT { double jobId; double statusCode; @@ -118,34 +118,6 @@ struct ReactNativeFsSpec_Constants { }; -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_FileOptionsT*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"NSFileProtectionKey", &ReactNativeFsSpec_FileOptionsT::NSFileProtectionKey}, - }; - return fieldMap; -} - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_NativeDownloadFileOptionsT*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"jobId", &ReactNativeFsSpec_NativeDownloadFileOptionsT::jobId}, - {L"fromUrl", &ReactNativeFsSpec_NativeDownloadFileOptionsT::fromUrl}, - {L"toFile", &ReactNativeFsSpec_NativeDownloadFileOptionsT::toFile}, - {L"background", &ReactNativeFsSpec_NativeDownloadFileOptionsT::background}, - {L"backgroundTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::backgroundTimeout}, - {L"cacheable", &ReactNativeFsSpec_NativeDownloadFileOptionsT::cacheable}, - {L"connectionTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::connectionTimeout}, - {L"discretionary", &ReactNativeFsSpec_NativeDownloadFileOptionsT::discretionary}, - {L"headers", &ReactNativeFsSpec_NativeDownloadFileOptionsT::headers}, - {L"progressDivider", &ReactNativeFsSpec_NativeDownloadFileOptionsT::progressDivider}, - {L"progressInterval", &ReactNativeFsSpec_NativeDownloadFileOptionsT::progressInterval}, - {L"readTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::readTimeout}, - {L"hasBeginCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasBeginCallback}, - {L"hasProgressCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasProgressCallback}, - {L"hasResumableCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasResumableCallback}, - }; - return fieldMap; -} - inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_DownloadResultT*) noexcept { winrt::Microsoft::ReactNative::FieldMap fieldMap { {L"jobId", &ReactNativeFsSpec_DownloadResultT::jobId}, @@ -165,6 +137,13 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_F return fieldMap; } +inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_FileOptionsT*) noexcept { + winrt::Microsoft::ReactNative::FieldMap fieldMap { + {L"NSFileProtectionKey", &ReactNativeFsSpec_FileOptionsT::NSFileProtectionKey}, + }; + return fieldMap; +} + inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_MkdirOptionsT*) noexcept { winrt::Microsoft::ReactNative::FieldMap fieldMap { {L"NSURLIsExcludedFromBackupKey", &ReactNativeFsSpec_MkdirOptionsT::NSURLIsExcludedFromBackupKey}, @@ -173,9 +152,23 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_M return fieldMap; } -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_PickFileOptionsT*) noexcept { +inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_NativeDownloadFileOptionsT*) noexcept { winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"mimeTypes", &ReactNativeFsSpec_PickFileOptionsT::mimeTypes}, + {L"jobId", &ReactNativeFsSpec_NativeDownloadFileOptionsT::jobId}, + {L"fromUrl", &ReactNativeFsSpec_NativeDownloadFileOptionsT::fromUrl}, + {L"toFile", &ReactNativeFsSpec_NativeDownloadFileOptionsT::toFile}, + {L"background", &ReactNativeFsSpec_NativeDownloadFileOptionsT::background}, + {L"backgroundTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::backgroundTimeout}, + {L"cacheable", &ReactNativeFsSpec_NativeDownloadFileOptionsT::cacheable}, + {L"connectionTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::connectionTimeout}, + {L"discretionary", &ReactNativeFsSpec_NativeDownloadFileOptionsT::discretionary}, + {L"headers", &ReactNativeFsSpec_NativeDownloadFileOptionsT::headers}, + {L"progressDivider", &ReactNativeFsSpec_NativeDownloadFileOptionsT::progressDivider}, + {L"progressInterval", &ReactNativeFsSpec_NativeDownloadFileOptionsT::progressInterval}, + {L"readTimeout", &ReactNativeFsSpec_NativeDownloadFileOptionsT::readTimeout}, + {L"hasBeginCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasBeginCallback}, + {L"hasProgressCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasProgressCallback}, + {L"hasResumableCallback", &ReactNativeFsSpec_NativeDownloadFileOptionsT::hasResumableCallback}, }; return fieldMap; } @@ -204,14 +197,6 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_N return fieldMap; } -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_TouchOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"ctime", &ReactNativeFsSpec_TouchOptions::ctime}, - {L"mtime", &ReactNativeFsSpec_TouchOptions::mtime}, - }; - return fieldMap; -} - inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_NativeUploadFileOptionsT*) noexcept { winrt::Microsoft::ReactNative::FieldMap fieldMap { {L"jobId", &ReactNativeFsSpec_NativeUploadFileOptionsT::jobId}, @@ -227,6 +212,21 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_N return fieldMap; } +inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_PickFileOptionsT*) noexcept { + winrt::Microsoft::ReactNative::FieldMap fieldMap { + {L"mimeTypes", &ReactNativeFsSpec_PickFileOptionsT::mimeTypes}, + }; + return fieldMap; +} + +inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_TouchOptions*) noexcept { + winrt::Microsoft::ReactNative::FieldMap fieldMap { + {L"ctime", &ReactNativeFsSpec_TouchOptions::ctime}, + {L"mtime", &ReactNativeFsSpec_TouchOptions::mtime}, + }; + return fieldMap; +} + inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(ReactNativeFsSpec_UploadResultT*) noexcept { winrt::Microsoft::ReactNative::FieldMap fieldMap { {L"jobId", &ReactNativeFsSpec_UploadResultT::jobId}, diff --git a/windows/ReactNativeFs/packages.lock.json b/windows/ReactNativeFs/packages.lock.json index 72f7054d..0c3b2eab 100644 --- a/windows/ReactNativeFs/packages.lock.json +++ b/windows/ReactNativeFs/packages.lock.json @@ -19,13 +19,13 @@ }, "boost": { "type": "Transitive", - "resolved": "1.76.0", - "contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA==" + "resolved": "1.83.0", + "contentHash": "cy53VNMzysEMvhBixDe8ujPk67Fcj3v6FPHQnH91NYJNLHpc6jxa2xq9ruCaaJjE4M3YrGSHDi4uUSTGBWw6EQ==" }, "Microsoft.JavaScript.Hermes": { "type": "Transitive", - "resolved": "0.1.21", - "contentHash": "5njCh+3eXTLOv7+8nOnp6nJ5C0r6it5ze54c0nuWleeDptuK8t3dEDB79XTU4D5DKNvAPlqJpgXRDOak5nYIug==" + "resolved": "0.1.23", + "contentHash": "cA9t1GjY4Yo0JD1AfA//e1lOwk48hLANfuX6GXrikmEBNZVr2TIX5ONJt5tqCnpZyLz6xGiPDgTfFNKbSfb21g==" }, "Microsoft.Web.WebView2": { "type": "Transitive", @@ -35,7 +35,7 @@ "common": { "type": "Project", "dependencies": { - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "fmt": { @@ -45,7 +45,7 @@ "type": "Project", "dependencies": { "Fmt": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "microsoft.reactnative": { @@ -53,17 +53,17 @@ "dependencies": { "Common": "[1.0.0, )", "Folly": "[1.0.0, )", - "Microsoft.JavaScript.Hermes": "[0.1.21, )", + "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.UI.Xaml": "[2.8.0, )", "ReactCommon": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } }, "reactcommon": { "type": "Project", "dependencies": { "Folly": "[1.0.0, )", - "boost": "[1.76.0, )" + "boost": "[1.83.0, )" } } }, diff --git a/yarn.lock b/yarn.lock index 9076d2c9..e249dbfc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1776,6 +1776,7 @@ __metadata: "@react-native/typescript-config": 0.75.2 "@types/lodash": ^4.17.7 lodash: ^4.17.21 + metro-config: ^0.80.9 react: 18.3.1 react-native: 0.75.2 react-native-builder-bob: ^0.30.0 @@ -1798,6 +1799,7 @@ __metadata: eslint-plugin-prettier: ^5.2.1 http-status-codes: ^2.3.0 jest: ^29.7.0 + metro-config: ^0.80.9 prettier: ^3.3.3 react: 18.3.1 react-native: 0.75.2