create-crossbind 2.0.0-beta.59 → 2.0.0-beta.61

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 (34) hide show
  1. package/package.json +2 -2
  2. package/src/dotfiles.js +22 -0
  3. package/src/index.js +2 -0
  4. package/templates/backend-nodejs-wasm/_gitignore +3 -0
  5. package/templates/backend-nodejs-wasm/_npmignore +2 -0
  6. package/templates/backend-nodejs-wasm/package.json +2 -2
  7. package/templates/cloud-cloudflare-worker/_gitignore +6 -0
  8. package/templates/cloud-cloudflare-worker/package.json +3 -3
  9. package/templates/lib-cmake/_gitignore +4 -0
  10. package/templates/lib-cmake/package.json +1 -1
  11. package/templates/lib-prebuilt/_gitignore +4 -0
  12. package/templates/lib-prebuilt/_npmignore +7 -0
  13. package/templates/lib-prebuilt/package.json +2 -2
  14. package/templates/lib-source/_gitignore +4 -0
  15. package/templates/lib-source/package.json +1 -1
  16. package/templates/mobile-reactnative-cli/_gitignore +90 -0
  17. package/templates/mobile-reactnative-cli/android/app/build.gradle +1 -1
  18. package/templates/mobile-reactnative-cli/android/build.gradle +4 -4
  19. package/templates/mobile-reactnative-cli/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  20. package/templates/mobile-reactnative-cli/android/gradle.properties +6 -1
  21. package/templates/mobile-reactnative-cli/package.json +21 -21
  22. package/templates/mobile-reactnative-expo/_gitignore +46 -0
  23. package/templates/mobile-reactnative-expo/package-lock.json +156 -703
  24. package/templates/mobile-reactnative-expo/package.json +6 -6
  25. package/templates/web-react-rspack/_gitignore +17 -0
  26. package/templates/web-react-rspack/package.json +12 -12
  27. package/templates/web-react-vite/_gitignore +28 -0
  28. package/templates/web-react-vite/package.json +11 -11
  29. package/templates/web-svelte-vite/_gitignore +28 -0
  30. package/templates/web-svelte-vite/package.json +4 -4
  31. package/templates/web-vanilla/_gitignore +5 -0
  32. package/templates/web-vanilla/package.json +3 -3
  33. package/templates/web-vue-vite/_gitignore +29 -0
  34. package/templates/web-vue-vite/package.json +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-crossbind",
3
- "version": "2.0.0-beta.59",
3
+ "version": "2.0.0-beta.61",
4
4
  "description": "Create crossbind Applications",
5
5
  "homepage": "https://github.com/crossbind/crossbind/tree/main/tooling/create-app#readme",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "templates"
19
19
  ],
20
20
  "dependencies": {
21
- "@clack/prompts": "^1.7.0"
21
+ "@clack/prompts": "^1.8.1"
22
22
  },
23
23
  "keywords": [
24
24
  "crossbind",
@@ -0,0 +1,22 @@
1
+ import fs from 'node:fs';
2
+ import fsp from 'node:fs/promises';
3
+ import path from 'node:path';
4
+
5
+ // npm leaves every .gitignore and .npmignore out of a published tarball, so a template also
6
+ // carries a copy under these names, which the scaffolder restores. The originals must stay:
7
+ // npm applies their rules while packing, which keeps a sample's untracked build output out.
8
+ const PACKED_NAMES = [
9
+ ['.gitignore', '_gitignore'],
10
+ ['.npmignore', '_npmignore'],
11
+ ];
12
+
13
+ async function forEachPresent(dir, pairs, operation) {
14
+ for (const [from, to] of pairs) {
15
+ const file = path.join(dir, from);
16
+ if (fs.existsSync(file)) await operation(file, path.join(dir, to));
17
+ }
18
+ }
19
+
20
+ export const packDotfiles = (dir) => forEachPresent(dir, PACKED_NAMES, fsp.copyFile);
21
+
22
+ export const unpackDotfiles = (dir) => forEachPresent(dir, PACKED_NAMES.map(([name, packed]) => [packed, name]), fsp.rename);
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ import path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { styleText } from 'node:util';
7
7
  import * as p from '@clack/prompts';
8
+ import { unpackDotfiles } from './dotfiles.js';
8
9
  import { pkgManager } from './utils.js';
9
10
 
10
11
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -150,6 +151,7 @@ async function main() {
150
151
  spin.start(`Scaffolding ${entry.key}`);
151
152
  await fsp.mkdir(cwd, { recursive: true });
152
153
  await fsp.cp(src, cwd, { recursive: true });
154
+ await unpackDotfiles(cwd);
153
155
 
154
156
  const pjPath = path.join(cwd, 'package.json');
155
157
  let scripts = {};
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ .crossbind
3
+ dist
@@ -0,0 +1,2 @@
1
+ dist
2
+ .crossbind
@@ -10,10 +10,10 @@
10
10
  "build": "crossbind build -p wasm -a wasm32 -r st -e node -b release"
11
11
  },
12
12
  "dependencies": {
13
- "@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.58"
13
+ "@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.60"
14
14
  },
15
15
  "devDependencies": {
16
- "crossbind": "^2.0.0-beta.58"
16
+ "crossbind": "^2.0.0-beta.60"
17
17
  },
18
18
  "keywords": [
19
19
  "crossbind-sample",
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ .crossbind
3
+ dist
4
+ test-results
5
+ playwright-report
6
+ .wrangler
@@ -23,9 +23,9 @@
23
23
  ],
24
24
  "dependencies": {},
25
25
  "devDependencies": {
26
- "crossbind": "^2.0.0-beta.58",
27
- "wrangler": "^4.120.0",
28
- "@playwright/test": "^1.62.1"
26
+ "crossbind": "^2.0.0-beta.60",
27
+ "wrangler": "^4.136.3",
28
+ "@playwright/test": "^1.63.0"
29
29
  },
30
30
  "keywords": [
31
31
  "crossbind-sample",
@@ -0,0 +1,4 @@
1
+ node_modules
2
+
3
+ # crossbind
4
+ .crossbind
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossbind/example-lib-cmake",
3
- "version": "2.0.0-beta.58",
3
+ "version": "2.0.0-beta.60",
4
4
  "description": "crossbind sample library: simple cmake library",
5
5
  "homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-cmake#readme",
6
6
  "repository": "https://github.com/crossbind/crossbind.git",
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .crossbind
3
+ dist
4
+ *.xcframework
@@ -0,0 +1,7 @@
1
+ *.xcframework.zip
2
+ *.tgz
3
+ .crossbind
4
+ *.dylib
5
+ dist/prebuilt/Android-arm64-v8a/lib/*.a
6
+ dist/prebuilt/Android-x86_64/lib/*.a
7
+ dist/prebuilt/**/bin
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossbind/example-lib-prebuilt-matrix",
3
- "version": "2.0.0-beta.58",
3
+ "version": "2.0.0-beta.60",
4
4
  "description": "crossbind sample prebuilt library: matrix multiplier",
5
5
  "homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-prebuilt-matrix#readme",
6
6
  "repository": "https://github.com/crossbind/crossbind.git",
@@ -16,7 +16,7 @@
16
16
  "prepublishOnly": "crossbind build"
17
17
  },
18
18
  "devDependencies": {
19
- "crossbind": "^2.0.0-beta.58"
19
+ "crossbind": "^2.0.0-beta.60"
20
20
  },
21
21
  "keywords": [
22
22
  "crossbind-sample",
@@ -0,0 +1,4 @@
1
+ node_modules
2
+
3
+ # crossbind
4
+ .crossbind
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossbind/example-lib-source",
3
- "version": "2.0.0-beta.58",
3
+ "version": "2.0.0-beta.60",
4
4
  "description": "crossbind sample library: simple source library",
5
5
  "homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-source#readme",
6
6
  "repository": "https://github.com/crossbind/crossbind.git",
@@ -0,0 +1,90 @@
1
+ .crossbind
2
+ .yarn
3
+ ios/build
4
+ android/build
5
+ android/app/build
6
+ android/app/.cxx
7
+
8
+ # OSX
9
+ #
10
+ .DS_Store
11
+
12
+ # Xcode
13
+ #
14
+ build/
15
+ *.pbxuser
16
+ !default.pbxuser
17
+ *.mode1v3
18
+ !default.mode1v3
19
+ *.mode2v3
20
+ !default.mode2v3
21
+ *.perspectivev3
22
+ !default.perspectivev3
23
+ xcuserdata
24
+ *.xccheckout
25
+ *.moved-aside
26
+ DerivedData
27
+ *.hmap
28
+ *.ipa
29
+ *.xcuserstate
30
+ **/.xcode.env.local
31
+
32
+ # Android/IntelliJ
33
+ #
34
+ build/
35
+ .idea
36
+ .gradle
37
+ local.properties
38
+ *.iml
39
+ *.hprof
40
+ .cxx/
41
+ *.keystore
42
+ !debug.keystore
43
+ android/app/build
44
+
45
+ # node.js
46
+ #
47
+ node_modules/
48
+ npm-debug.log
49
+ yarn-error.log
50
+
51
+ # fastlane
52
+ #
53
+ # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
54
+ # screenshots whenever they are needed.
55
+ # For more information about the recommended setup visit:
56
+ # https://docs.fastlane.tools/best-practices/source-control/
57
+
58
+ **/fastlane/report.xml
59
+ **/fastlane/Preview.html
60
+ **/fastlane/screenshots
61
+ **/fastlane/test_output
62
+
63
+ # Bundle artifact
64
+ *.jsbundle
65
+
66
+ # Ruby / CocoaPods
67
+ **/Pods/
68
+ /vendor/bundle/
69
+
70
+ # Temporary files created by Metro to check the health of the file watcher
71
+ .metro-health-check*
72
+
73
+ # testing
74
+ /coverage
75
+
76
+ # Yarn
77
+ .yarn/*
78
+ !.yarn/patches
79
+ !.yarn/plugins
80
+ !.yarn/releases
81
+ !.yarn/sdks
82
+ !.yarn/versions
83
+
84
+ # crossbind: generated runtime assets (copied dependency data + stamp)
85
+ android/app/src/main/assets/crossbind/
86
+
87
+ # CI bridge snapshot: committed on purpose (the iOS workflow restores it before pod install to
88
+ # skip SWIG generation), so re-include it past the generic build/ rule above.
89
+ !ci/crossbind-snapshot
90
+ !ci/crossbind-snapshot/build
@@ -102,7 +102,7 @@ android {
102
102
  // see https://reactnative.dev/docs/signed-apk-android.
103
103
  signingConfig signingConfigs.debug
104
104
  minifyEnabled enableProguardInReleaseBuilds
105
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
105
+ proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
106
106
  }
107
107
  }
108
108
  }
@@ -1,11 +1,11 @@
1
1
  buildscript {
2
2
  ext {
3
- buildToolsVersion = "36.0.0"
3
+ buildToolsVersion = "37.0.0"
4
4
  minSdkVersion = 24
5
- compileSdkVersion = 36
5
+ compileSdkVersion = 37
6
6
  targetSdkVersion = 36
7
- ndkVersion = "27.1.12297006"
8
- kotlinVersion = "2.1.20"
7
+ ndkVersion = "30.0.16248370"
8
+ kotlinVersion = "2.2.0"
9
9
  }
10
10
  repositories {
11
11
  google()
@@ -1,6 +1,6 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
4
4
  networkTimeout=10000
5
5
  validateDistributionUrl=true
6
6
  zipStoreBase=GRADLE_USER_HOME
@@ -41,4 +41,9 @@ hermesEnabled=true
41
41
  # Use this property to enable edge-to-edge display support.
42
42
  # This allows your app to draw behind system bars for an immersive UI.
43
43
  # Note: Only works with ReactActivity and should not be used with custom Activity.
44
- edgeToEdgeEnabled=false
44
+ edgeToEdgeEnabled=true
45
+
46
+ # Opt out of built-in kotlin and new DSL behavior that ships with AGP 9.
47
+ # Starting from AGP 10.x these opt outs will be removed.
48
+ android.builtInKotlin=false
49
+ android.newDsl=false
@@ -20,12 +20,12 @@
20
20
  "e2e:android": "pnpm run run:android && pnpm run maestro:android"
21
21
  },
22
22
  "dependencies": {
23
- "@crossbind/core-embind-jsi": "^2.0.0-beta.58",
24
- "@crossbind/plugin-react-native": "^2.0.0-beta.59",
25
- "@crossbind/plugin-react-native-ios-helper": "^2.0.0-beta.58",
26
- "@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.58",
27
- "react": "19.2.3",
28
- "react-native": "0.85.3",
23
+ "@crossbind/core-embind-jsi": "^2.0.0-beta.60",
24
+ "@crossbind/plugin-react-native": "^2.0.0-beta.60",
25
+ "@crossbind/plugin-react-native-ios-helper": "^2.0.0-beta.60",
26
+ "@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.60",
27
+ "react": "19.3.0",
28
+ "react-native": "0.87.1",
29
29
  "react-native-safe-area-context": "^5.8.0",
30
30
  "hermes-compiler": "*"
31
31
  },
@@ -33,25 +33,25 @@
33
33
  "@babel/core": "^7.29.7",
34
34
  "@babel/preset-env": "^7.29.7",
35
35
  "@babel/runtime": "^7.29.7",
36
- "@react-native-community/cli": "20.1.3",
37
- "@react-native-community/cli-platform-android": "20.1.3",
38
- "@react-native-community/cli-platform-ios": "20.1.3",
39
- "@react-native/babel-preset": "0.85.3",
40
- "@react-native/codegen": "0.85.3",
41
- "@react-native/eslint-config": "0.85.3",
42
- "@react-native/jest-preset": "0.85.3",
43
- "@react-native/gradle-plugin": "0.85.3",
44
- "@react-native/metro-config": "0.85.3",
45
- "@react-native/typescript-config": "0.85.3",
36
+ "@react-native-community/cli": "20.2.0",
37
+ "@react-native-community/cli-platform-android": "20.2.0",
38
+ "@react-native-community/cli-platform-ios": "20.2.0",
39
+ "@react-native/babel-preset": "0.87.1",
40
+ "@react-native/codegen": "0.87.1",
41
+ "@react-native/eslint-config": "0.87.1",
42
+ "@react-native/jest-preset": "0.87.1",
43
+ "@react-native/gradle-plugin": "0.87.1",
44
+ "@react-native/metro-config": "0.87.1",
45
+ "@react-native/typescript-config": "0.87.1",
46
46
  "@types/jest": "^29.5.13",
47
- "@types/react": "^19.2.18",
48
- "@types/react-test-renderer": "^19.1.0",
47
+ "@types/react": "^19.3.0",
48
+ "@types/react-test-renderer": "^19.3.0",
49
49
  "eslint": "^8.19.0",
50
50
  "jest": "^29.6.3",
51
- "prettier": "3.9.6",
52
- "react-test-renderer": "19.2.3",
51
+ "prettier": "3.9.8",
52
+ "react-test-renderer": "19.3.0",
53
53
  "typescript": "^5.8.3",
54
- "@crossbind/plugin-metro": "^2.0.0-beta.58"
54
+ "@crossbind/plugin-metro": "^2.0.0-beta.60"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=24"
@@ -0,0 +1,46 @@
1
+ .crossbind
2
+ .yarn
3
+ ios/build
4
+ android/build
5
+
6
+ # dependencies
7
+ node_modules/
8
+
9
+ # Expo
10
+ .expo/
11
+ dist/
12
+ web-build/
13
+ expo-env.d.ts
14
+
15
+ # Native
16
+ .kotlin/
17
+ *.orig.*
18
+ *.jks
19
+ *.p8
20
+ *.p12
21
+ *.key
22
+ *.mobileprovision
23
+
24
+ # Metro
25
+ .metro-health-check*
26
+
27
+ # debug
28
+ npm-debug.*
29
+ yarn-debug.*
30
+ yarn-error.*
31
+
32
+ # macOS
33
+ .DS_Store
34
+ *.pem
35
+
36
+ # local env files
37
+ .env*.local
38
+
39
+ # typescript
40
+ *.tsbuildinfo
41
+
42
+ app-example
43
+
44
+ # generated native folders
45
+ /ios
46
+ /android