@react-native/community-cli-plugin 0.73.0-nightly-20230922-52104c6ee

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +91 -0
  2. package/dist/commands/bundle/assetCatalogIOS.js +74 -0
  3. package/dist/commands/bundle/assetCatalogIOS.js.flow +29 -0
  4. package/dist/commands/bundle/assetPathUtils.js +79 -0
  5. package/dist/commands/bundle/assetPathUtils.js.flow +39 -0
  6. package/dist/commands/bundle/buildBundle.js +121 -0
  7. package/dist/commands/bundle/buildBundle.js.flow +64 -0
  8. package/dist/commands/bundle/filterPlatformAssetScales.js +47 -0
  9. package/dist/commands/bundle/filterPlatformAssetScales.js.flow +17 -0
  10. package/dist/commands/bundle/getAssetDestPathAndroid.js +32 -0
  11. package/dist/commands/bundle/getAssetDestPathAndroid.js.flow +19 -0
  12. package/dist/commands/bundle/getAssetDestPathIOS.js +34 -0
  13. package/dist/commands/bundle/getAssetDestPathIOS.js.flow +19 -0
  14. package/dist/commands/bundle/index.js +124 -0
  15. package/dist/commands/bundle/index.js.flow +18 -0
  16. package/dist/commands/bundle/saveAssets.js +138 -0
  17. package/dist/commands/bundle/saveAssets.js.flow +21 -0
  18. package/dist/commands/ram-bundle/index.js +45 -0
  19. package/dist/commands/ram-bundle/index.js.flow +15 -0
  20. package/dist/commands/start/attachKeyHandlers.js +109 -0
  21. package/dist/commands/start/attachKeyHandlers.js.flow +22 -0
  22. package/dist/commands/start/index.js +105 -0
  23. package/dist/commands/start/index.js.flow +18 -0
  24. package/dist/commands/start/runServer.js +173 -0
  25. package/dist/commands/start/runServer.js.flow +38 -0
  26. package/dist/index.flow.js +36 -0
  27. package/dist/index.flow.js.flow +16 -0
  28. package/dist/index.js +3 -0
  29. package/dist/index.js.flow +12 -0
  30. package/dist/utils/KeyPressHandler.js +91 -0
  31. package/dist/utils/KeyPressHandler.js.flow +22 -0
  32. package/dist/utils/isDevServerRunning.js +74 -0
  33. package/dist/utils/isDevServerRunning.js.flow +27 -0
  34. package/dist/utils/loadMetroConfig.js +107 -0
  35. package/dist/utils/loadMetroConfig.js.flow +33 -0
  36. package/dist/utils/metroPlatformResolver.js +46 -0
  37. package/dist/utils/metroPlatformResolver.js.flow +30 -0
  38. package/package.json +43 -0
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ * @oncall react_native
10
+ */
11
+
12
+ import type { CustomResolver } from "metro-resolver";
13
+
14
+ /**
15
+ * This is an implementation of a metro resolveRequest option which will remap react-native imports
16
+ * to different npm packages based on the platform requested. This allows a single metro instance/config
17
+ * to produce bundles for multiple out of tree platforms at a time.
18
+ *
19
+ * @param platformImplementations
20
+ * A map of platform to npm package that implements that platform
21
+ *
22
+ * Ex:
23
+ * {
24
+ * windows: 'react-native-windows'
25
+ * macos: 'react-native-macos'
26
+ * }
27
+ */
28
+ declare export function reactNativePlatformResolver(platformImplementations: {
29
+ [platform: string]: string,
30
+ }): CustomResolver;
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@react-native/community-cli-plugin",
3
+ "version": "0.73.0-nightly-20230922-52104c6ee",
4
+ "description": "Core CLI commands for React Native",
5
+ "keywords": [
6
+ "react-native",
7
+ "tools"
8
+ ],
9
+ "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/buid-scripts#readme",
10
+ "bugs": "https://github.com/facebook/react-native/issues",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/facebook/react-native.git",
14
+ "directory": "packages/community-cli-plugin"
15
+ },
16
+ "license": "MIT",
17
+ "exports": {
18
+ ".": "./dist/index.js",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "dependencies": {
25
+ "@react-native/dev-middleware": "0.73.0-nightly-20230922-52104c6ee",
26
+ "@react-native-community/cli-server-api": "12.0.0-alpha.15",
27
+ "@react-native-community/cli-tools": "12.0.0-alpha.15",
28
+ "@react-native/metro-babel-transformer": "0.73.0-nightly-20230922-52104c6ee",
29
+ "chalk": "^4.0.0",
30
+ "execa": "^5.1.1",
31
+ "metro": "0.79.1",
32
+ "metro-config": "0.79.1",
33
+ "metro-core": "0.79.1",
34
+ "node-fetch": "^2.2.0",
35
+ "readline": "^1.3.0"
36
+ },
37
+ "devDependencies": {
38
+ "metro-resolver": "0.79.1"
39
+ },
40
+ "engines": {
41
+ "node": ">=18"
42
+ }
43
+ }