Skip to content

Commit 1a2e4a8

Browse files
committed
compiled deno binary in Android
1 parent 9ef0c96 commit 1a2e4a8

File tree

18 files changed

+3660
-4919
lines changed

18 files changed

+3660
-4919
lines changed

Cargo.lock

Lines changed: 972 additions & 820 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ resolver = "2"
33
members = ["packages/javascript-runtime-deno", "packages-meta/uniffi-bindgen"]
44

55
[workspace.dependencies]
6-
uniffi = { version = "0.27.1" }
6+
uniffi = { version = "0.27.3" }

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2+
"name": "javascript-runtime",
23
"scripts": {
34
"build": "turbo run build",
4-
"publish:latest": "pnpm -r publish --no-git-checks",
5-
"publish": "turbo run publish:latest"
5+
"publish": "turbo run publish:latest",
6+
"publish:latest": "pnpm -r publish --no-git-checks"
67
},
8+
"packageManager": "[email protected]",
79
"devDependencies": {
810
"tsup": "^8.0.2",
9-
"turbo": "^1.13.3",
11+
"turbo": "^2.1.2",
1012
"typescript": "^5.4.5"
1113
}
1214
}

packages-meta/javascript-runtime-cordova-e2e/package-lock.json

Lines changed: 15 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages-meta/javascript-runtime-cordova-e2e/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6+
"cordova:plugin:add": "JAVASCRIPT_RUNTIME_ENGINE=../../../../packages/javascript-runtime-deno/javascript-runtime-deno-1.0.0.tgz cordova plugin add @javascript-runtime/cordova-plugin@latest",
7+
"cordova:plugin:rm": "cordova plugin rm cordova-plugin-javascript-runtime",
68
"cordova:android:build": "cordova build android",
7-
"cordova:android:prepare": "rm -rf platforms/android && cordova platform add android",
8-
"cordova:android:run": "cordova run android"
9+
"cordova:android:prepare": "rm -rf platforms/android && JAVASCRIPT_RUNTIME_ENGINE=../../../../packages/javascript-runtime-deno/javascript-runtime-deno-1.0.0.tgz cordova platform add android",
10+
"cordova:android:run": "cordova run android",
11+
"cordova:android:logs": "adb logcat --pid=$(adb shell pidof -s invalid.javascript_runtime.cordova_e2e)"
12+
},
13+
"engines": {
14+
"node": ">=16.13.0",
15+
"npm": "^8.1.0"
916
},
1017
"cordova": {
1118
"platforms": [

packages-meta/npm-registry/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"start": "pnpm run start:verdaccio && pnpm run start:config",
77
"start:config": "cd ../.. && npm config set @javascript-runtime:registry http://localhost:4873/ && npm config set //localhost:4873/:_authToken example",
88
"start:verdaccio": "pm2 start --interpreter none $(which verdaccio) -- --config verdaccio.yaml",
9+
"logs": "pm2 logs",
910
"stop": "pnpm run stop:config && pnpm run stop:verdaccio",
1011
"stop:config": "cd ../.. && npm config delete key @javascript-runtime:registry && npm config delete key //localhost:4873/:_authToken",
1112
"stop:verdaccio": "pm2 stop verdaccio && pm2 delete verdaccio"

packages-meta/npm-registry/turbo.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["//"],
3+
"tasks": {
4+
"start": {},
5+
"logs": {},
6+
"stop": {}
7+
}
8+
}

packages/javascript-runtime-cordova-plugin/hooks/install-dependencies.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ const { spawn } = require('child_process')
22
const { once } = require('events')
33
const path = require('path')
44

5-
module.exports = exports = async () => {
5+
module.exports = exports = async (context) => {
6+
if (context.opts.plugin?.id !== 'cordova-plugin-javascript-runtime') return
7+
68
const JAVASCRIPT_RUNTIME_ENGINE =
7-
process.env['JAVASCRIPT_RUNTIME_ENGINE'] || '@javascript-runtime/deno'
9+
process.env['JAVASCRIPT_RUNTIME_ENGINE'] ||
10+
`https://github.com/aidant/javascript-runtime/releases/download/v1.0/javascript-runtime-deno.tgz`
811

9-
const npm = spawn('npm', ['install', '--no-save', JAVASCRIPT_RUNTIME_ENGINE], {
12+
const npm = spawn('npm', ['install', '--no-save', '--install-links', JAVASCRIPT_RUNTIME_ENGINE], {
1013
cwd: path.resolve(__dirname, '..'),
1114
env: process.env,
1215
stdio: ['inherit', 'inherit', 'inherit'],

packages/javascript-runtime-cordova-plugin/hooks/set-preferences.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const fs = require('fs/promises')
22
const path = require('path')
33

4-
module.exports = exports = async () => {
4+
module.exports = exports = async (context) => {
5+
if (context.opts.plugin && context.opts.plugin.id !== 'cordova-plugin-javascript-runtime') return
6+
57
const lib =
68
process.env['JAVASCRIPT_RUNTIME_LIB'] ||
79
path.relative(

packages/javascript-runtime-cordova-plugin/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<license>MIT</license>
1818

1919
<hook type="before_plugin_install" src="hooks/install-dependencies.js" />
20-
<hook type="after_plugin_install" src="hooks/set-preferences.js" />
20+
<hook type="before_plugin_install" src="hooks/set-preferences.js" />
2121
<hook type="before_build" src="hooks/set-preferences.js" />
2222
<hook type="before_run" src="hooks/set-preferences.js" />
2323

0 commit comments

Comments
 (0)