fix imports, make emulator run on system architecture
This commit is contained in:
@@ -21,6 +21,10 @@ jobs:
|
|||||||
node-version: 24
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
|
# Stage-only tokens require `npm stage publish` (npm >= 11.15.0).
|
||||||
|
- name: Update npm
|
||||||
|
run: npm install -g npm@^11.15.0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
@@ -33,7 +37,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
- name: Publish
|
- name: Stage publish
|
||||||
run: npm publish --access public
|
run: npm stage publish --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
@@ -10,3 +10,6 @@ devenv.local.yaml
|
|||||||
.pre-commit-config.yaml
|
.pre-commit-config.yaml
|
||||||
node_modules
|
node_modules
|
||||||
scripts/node_modules
|
scripts/node_modules
|
||||||
|
|
||||||
|
# Android emulator state
|
||||||
|
.android
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createRouter, type Todo } from "@glstack-test/rpc"
|
import { createRouter, type Todo } from "@<@var(context.project.name)>/rpc"
|
||||||
import type { ChangeEventHandler } from "svelte/elements";
|
import type { ChangeEventHandler } from "svelte/elements";
|
||||||
const router = createRouter("http://127.0.0.1:8080");
|
const router = createRouter("http://127.0.0.1:8080");
|
||||||
let todos = $state<Todo[]>([])
|
let todos = $state<Todo[]>([])
|
||||||
|
|||||||
+5
-4
@@ -30,13 +30,14 @@
|
|||||||
version = [ "27.1.12297006" ];
|
version = [ "27.1.12297006" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
enterShell = ''
|
# The emulator's bundled libs are only needed on Linux; macOS uses DYLD paths.
|
||||||
|
enterShell = lib.optionalString pkgs.stdenv.isLinux ''
|
||||||
export LD_LIBRARY_PATH=$ANDROID_HOME/emulator/lib64:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$ANDROID_HOME/emulator/lib64:$LD_LIBRARY_PATH
|
||||||
'';
|
'';
|
||||||
|
# Use a system image matching the host CPU (arm64 on Apple Silicon, x86_64 elsewhere).
|
||||||
scripts.create-avd.exec = ''
|
scripts.create-avd.exec = ''
|
||||||
if [ ! -f .avd-created ]; then
|
if ! avdmanager list avd -c | grep -qx "Pixel_5_API34"; then
|
||||||
avdmanager create avd -n "Pixel_5_API34" -k "system-images;android-34;google_apis_playstore;x86_64" -d "pixel_5";
|
echo no | avdmanager create avd -n "Pixel_5_API34" -k "system-images;android-34;google_apis_playstore;${if pkgs.stdenv.hostPlatform.isAarch64 then "arm64-v8a" else "x86_64"}" -d "pixel_5"
|
||||||
touch .avd-created;
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
<@endif>
|
<@endif>
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"connectrpc.com/connect"
|
"connectrpc.com/connect"
|
||||||
"connectrpc.com/validate"
|
"connectrpc.com/validate"
|
||||||
"github.com/<@var(context.project.name)>/<@var(context.project.name)>/db"
|
"<@var(context.project.goprefix)>/<@var(context.project.name)>/db"
|
||||||
todov1 "<@var(context.project.goprefix)>/<@var(context.project.name)>/gen/todo/v1"
|
todov1 "<@var(context.project.goprefix)>/<@var(context.project.name)>/gen/todo/v1"
|
||||||
"<@var(context.project.goprefix)>/<@var(context.project.name)>/gen/todo/v1/todov1connect"
|
"<@var(context.project.goprefix)>/<@var(context.project.name)>/gen/todo/v1/todov1connect"
|
||||||
. "<@var(context.project.goprefix)>/glstack-test/utils"
|
. "<@var(context.project.goprefix)>/<@var(context.project.name)>/utils"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user