Compare commits
1 Commits
reuse-exam
...
url-scheme
Author | SHA1 | Date | |
---|---|---|---|
a21c2c50b3 |
2
.github/workflows/build-and-store-wasm.yml
vendored
2
.github/workflows/build-and-store-wasm.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
# Upload the WASM bundle as an artifact
|
# Upload the WASM bundle as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: wasm-bundle
|
name: wasm-bundle
|
||||||
path: src/wasm-lib/pkg
|
path: src/wasm-lib/pkg
|
||||||
|
79
.github/workflows/ci.yml
vendored
79
.github/workflows/ci.yml
vendored
@ -13,7 +13,7 @@ on:
|
|||||||
# Will checkout the last commit from the default branch (main as of 2023-10-04)
|
# Will checkout the last commit from the default branch (main as of 2023-10-04)
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_RELEASE: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'Cut release v')) }}
|
BUILD_RELEASE: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'Cut release v') }}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@ -237,83 +237,6 @@ jobs:
|
|||||||
includeDebug: true
|
includeDebug: true
|
||||||
args: "${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}"
|
args: "${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Mac App Store
|
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' && matrix.os == 'macos-14' }}
|
|
||||||
run: |
|
|
||||||
unset APPLE_SIGNING_IDENTITY
|
|
||||||
unset APPLE_CERTIFICATE
|
|
||||||
sign_app="3rd Party Mac Developer Application: KittyCAD Inc (${APPLE_TEAM_ID})"
|
|
||||||
sign_install="3rd Party Mac Developer Installer: KittyCAD Inc (${APPLE_TEAM_ID})"
|
|
||||||
profile="src-tauri/entitlements/Mac_App_Distribution.provisionprofile"
|
|
||||||
|
|
||||||
mkdir -p src-tauri/entitlements
|
|
||||||
echo "${APPLE_STORE_PROVISIONING_PROFILE}" | base64 --decode > "${profile}"
|
|
||||||
|
|
||||||
echo "${APPLE_STORE_DISTRIBUTION_CERT}" | base64 --decode > "dist.cer"
|
|
||||||
echo "${APPLE_STORE_INSTALLER_CERT}" | base64 --decode > "installer.cer"
|
|
||||||
|
|
||||||
# load the certificates into the keychain
|
|
||||||
# Create a custom keychain
|
|
||||||
security create-keychain -p gh_actions refine-build.keychain
|
|
||||||
|
|
||||||
# Make the custom keychain default, so xcodebuild will use it for signing
|
|
||||||
security default-keychain -s refine-build.keychain
|
|
||||||
|
|
||||||
# Unlock the keychain
|
|
||||||
security unlock-keychain -p gh_actions refine-build.keychain
|
|
||||||
|
|
||||||
# Set keychain timeout to 1 hour for long builds
|
|
||||||
security set-keychain-settings -t 3600 -l ~/Library/Keychains/refine-build.keychain
|
|
||||||
|
|
||||||
# Add certificates to keychain and allow codesign to access them
|
|
||||||
security import "dist.cer" -k ~/Library/Keychains/refine-build.keychain -T /usr/bin/codesign
|
|
||||||
security import "installer.cer" -k ~/Library/Keychains/refine-build.keychain -T /usr/bin/codesign
|
|
||||||
|
|
||||||
security set-key-partition-list -S apple-tool:,apple: -s -k gh_actions refine-build.keychain
|
|
||||||
|
|
||||||
target="universal-apple-darwin"
|
|
||||||
|
|
||||||
# Turn off the default target
|
|
||||||
sed -i "s/default =/# default =/" src-tauri/Cargo.toml
|
|
||||||
yarn tauri build --target "${target}" --verbose
|
|
||||||
|
|
||||||
ls -l src-tauri/target/${target}
|
|
||||||
ls -l src-tauri/target
|
|
||||||
ls -l src-tauri/target/${target}/release/bundle/macos
|
|
||||||
ls -l src-tauri/entitlements
|
|
||||||
|
|
||||||
app_path="src-tauri/target/${target}/release/bundle/macos/Zoo Modeling App.app"
|
|
||||||
build_name="src-tauri/target/${target}/release/bundle/macos/Zoo Modeling App.pkg"
|
|
||||||
cp_dir="src-tauri/target/${target}/release/bundle/macos/Zoo Modeling App.app/Contents/embedded.provisionprofile"
|
|
||||||
entitlements="src-tauri/entitlements/Zoo Modeling App.entitlements"
|
|
||||||
|
|
||||||
cp "${profile}" "${cp_dir}"
|
|
||||||
|
|
||||||
codesign --deep --force -s "${sign_app}" --entitlements "${entitlements}" "${app_path}"
|
|
||||||
|
|
||||||
productbuild --component "${app_path}" /Applications/ --sign "${sign_install}" "${build_name}"
|
|
||||||
|
|
||||||
# Undo the changes to the Cargo.toml
|
|
||||||
git checkout src-tauri/Cargo.toml
|
|
||||||
env:
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_STORE_PROVISIONING_PROFILE: ${{ secrets.APPLE_STORE_PROVISIONING_PROFILE }}
|
|
||||||
APPLE_STORE_DISTRIBUTION_CERT: ${{ secrets.APPLE_STORE_DISTRIBUTION_CERT }}
|
|
||||||
APPLE_STORE_INSTALLER_CERT: ${{ secrets.APPLE_STORE_INSTALLER_CERT }}
|
|
||||||
|
|
||||||
- name: 'Upload app to TestFlight'
|
|
||||||
uses: apple-actions/upload-testflight-build@v1
|
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' && matrix.os == 'macos-14' }}
|
|
||||||
with:
|
|
||||||
app-path: 'src-tauri/target/universal-apple-darwin/release/bundle/macos/Zoo Modeling App.pkg'
|
|
||||||
issuer-id: ${{ secrets.APPLE_STORE_ISSUER_ID }}
|
|
||||||
api-key-id: ${{ secrets.APPLE_STORE_API_KEY_ID }}
|
|
||||||
api-private-key: ${{ secrets.APPLE_STORE_API_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
# We do this after the apple store because the apple store build is
|
|
||||||
# specific and we want to overwrite it with the this new build after and
|
|
||||||
# not upload the apple store build to the public bucket
|
|
||||||
- name: Build the app (release) and sign
|
- name: Build the app (release) and sign
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' }}
|
if: ${{ env.BUILD_RELEASE == 'true' }}
|
||||||
|
37
.github/workflows/create-release.yml
vendored
37
.github/workflows/create-release.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: Create Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
if: contains(github.event.head_commit.message, 'Cut release v')
|
|
||||||
steps:
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
name: Read Cut release PR info and create release
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const { owner, repo, sha } = context.repo
|
|
||||||
const pulls = await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
commit_sha: sha,
|
|
||||||
})
|
|
||||||
const { title, body } = pulls.data[0]
|
|
||||||
const version = title.split('Cut release ')[1]
|
|
||||||
|
|
||||||
const result = await github.rest.repos.createRelease({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
body,
|
|
||||||
tag_name: version,
|
|
||||||
name: version,
|
|
||||||
draft: true,
|
|
||||||
})
|
|
||||||
console.log(result)
|
|
52
.github/workflows/playwright.yml
vendored
52
.github/workflows/playwright.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
- id: filter
|
- id: filter
|
||||||
name: Check for Rust changes
|
name: Check for Rust changes
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@v2
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
rust:
|
rust:
|
||||||
@ -48,37 +48,38 @@ jobs:
|
|||||||
run: yarn
|
run: yarn
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
- name: Download Wasm Cache
|
- name: download wasm
|
||||||
id: download-wasm
|
id: download-wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
uses: dawidd6/action-download-artifact@v3
|
uses: actions/download-artifact@v2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
name: wasm-bundle
|
name: wasm-bundle
|
||||||
workflow: build-and-store-wasm.yml
|
|
||||||
branch: main
|
|
||||||
path: src/wasm-lib/pkg
|
path: src/wasm-lib/pkg
|
||||||
- name: copy wasm blob
|
- name: copy wasm blob
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Cache Wasm (because rust diff)
|
- name: Setup Rust
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Cache wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: OR Cache Wasm (because wasm cache failed)
|
- name: Cache wasm
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: Build Wasm (because rust diff)
|
- name: build wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: OR Build Wasm (because wasm cache failed)
|
- name: build wasm
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build web
|
- name: build web
|
||||||
@ -130,6 +131,11 @@ jobs:
|
|||||||
name: playwright-report
|
name: playwright-report
|
||||||
path: playwright-report/
|
path: playwright-report/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
with:
|
||||||
|
name: wasm-bundle
|
||||||
|
path: src/wasm-lib/pkg
|
||||||
|
|
||||||
playwright-macos:
|
playwright-macos:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
@ -145,37 +151,38 @@ jobs:
|
|||||||
run: yarn
|
run: yarn
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
- name: Download Wasm Cache
|
- name: download wasm
|
||||||
id: download-wasm
|
id: download-wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
uses: dawidd6/action-download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
continue-on-error: true
|
|
||||||
with:
|
with:
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
name: wasm-bundle
|
name: wasm-bundle
|
||||||
workflow: build-and-store-wasm.yml
|
|
||||||
branch: main
|
|
||||||
path: src/wasm-lib/pkg
|
path: src/wasm-lib/pkg
|
||||||
|
continue-on-error: true
|
||||||
- name: copy wasm blob
|
- name: copy wasm blob
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Cache Wasm (because rust diff)
|
- name: Setup Rust
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Cache wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: OR Cache Wasm (because wasm cache failed)
|
- name: Cache wasm
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: Build Wasm (because rust diff)
|
- name: build wasm
|
||||||
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: OR Build Wasm (because wasm cache failed)
|
- name: build wasm
|
||||||
if: steps.download-wasm.outcome == 'failure'
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build web
|
- name: build web
|
||||||
@ -193,3 +200,8 @@ jobs:
|
|||||||
name: playwright-report
|
name: playwright-report
|
||||||
path: playwright-report/
|
path: playwright-report/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
with:
|
||||||
|
name: wasm-bundle
|
||||||
|
path: src/wasm-lib/pkg
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -54,4 +54,3 @@ src/**/*.typegen.ts
|
|||||||
src-tauri/gen
|
src-tauri/gen
|
||||||
|
|
||||||
src/wasm-lib/grackle/stdlib_cube_partial.json
|
src/wasm-lib/grackle/stdlib_cube_partial.json
|
||||||
Mac_App_Distribution.provisionprofile
|
|
||||||
|
@ -59,10 +59,6 @@ followed by:
|
|||||||
```
|
```
|
||||||
yarn build:wasm-dev
|
yarn build:wasm-dev
|
||||||
```
|
```
|
||||||
or if you have the gh cli installed
|
|
||||||
```
|
|
||||||
./get-latest-wasm-bundle.sh # this will download the latest main wasm bundle
|
|
||||||
```
|
|
||||||
|
|
||||||
That will build the WASM binary and put in the `public` dir (though gitignored)
|
That will build the WASM binary and put in the `public` dir (though gitignored)
|
||||||
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the repository owner and name
|
|
||||||
REPO_OWNER="KittyCAD"
|
|
||||||
REPO_NAME="modeling-app"
|
|
||||||
WORKFLOW_NAME="build-and-store-wasm.yml"
|
|
||||||
ARTIFACT_NAME="wasm-bundle"
|
|
||||||
|
|
||||||
# Fetch the latest completed workflow run ID for the specified workflow
|
|
||||||
# RUN_ID=$(gh api repos/$REPO_OWNER/$REPO_NAME/actions/workflows/$WORKFLOW_NAME/runs --paginate --jq '.workflow_runs[] | select(.status=="completed") | .id' | head -n 1)
|
|
||||||
RUN_ID=$(gh api repos/$REPO_OWNER/$REPO_NAME/actions/workflows/$WORKFLOW_NAME/runs --paginate --jq '.workflow_runs[] | select(.status=="completed" and .conclusion=="success") | .id' | head -n 1)
|
|
||||||
|
|
||||||
echo $RUN_ID
|
|
||||||
|
|
||||||
# Check if a valid RUN_ID was found
|
|
||||||
if [ -z "$RUN_ID" ]; then
|
|
||||||
echo "Failed to find a workflow run for $WORKFLOW_NAME."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
gh run download $RUN_ID --repo $REPO_OWNER/$REPO_NAME --name $ARTIFACT_NAME --dir ./src/wasm-lib/pkg
|
|
||||||
|
|
||||||
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
|
||||||
echo "latest wasm copied to public folder"
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "untitled-app",
|
"name": "untitled-app",
|
||||||
"version": "0.19.4",
|
"version": "0.19.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/autocomplete": "^6.16.0",
|
"@codemirror/autocomplete": "^6.16.0",
|
||||||
@ -86,7 +86,6 @@
|
|||||||
"simpleserver": "yarn pretest && http-server ./public --cors -p 3000",
|
"simpleserver": "yarn pretest && http-server ./public --cors -p 3000",
|
||||||
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e",
|
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e",
|
||||||
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e",
|
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e",
|
||||||
"fetch:wasm": "./get-latest-wasm-bundle.sh",
|
|
||||||
"build:wasm-dev": "(cd src/wasm-lib && wasm-pack build --dev --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
"build:wasm-dev": "(cd src/wasm-lib && wasm-pack build --dev --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
||||||
"build:wasm": "(cd src/wasm-lib && wasm-pack build --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
"build:wasm": "(cd src/wasm-lib && wasm-pack build --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
||||||
"build:wasm-clean": "yarn wasm-prep && yarn build:wasm",
|
"build:wasm-clean": "yarn wasm-prep && yarn build:wasm",
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"applinks": {
|
|
||||||
"details": [
|
|
||||||
{
|
|
||||||
"appIDs": ["92H8YB3B95.dev.zoo.modeling-app"],
|
|
||||||
"components": [
|
|
||||||
{
|
|
||||||
"/": "/file/*",
|
|
||||||
"comment": "Matches any URL whose path starts with /file/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
16
src-tauri/Cargo.lock
generated
16
src-tauri/Cargo.lock
generated
@ -159,7 +159,6 @@ dependencies = [
|
|||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-cli",
|
"tauri-plugin-cli",
|
||||||
"tauri-plugin-deep-link",
|
|
||||||
"tauri-plugin-dialog",
|
"tauri-plugin-dialog",
|
||||||
"tauri-plugin-fs",
|
"tauri-plugin-fs",
|
||||||
"tauri-plugin-http",
|
"tauri-plugin-http",
|
||||||
@ -5079,21 +5078,6 @@ dependencies = [
|
|||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tauri-plugin-deep-link"
|
|
||||||
version = "2.0.0-beta.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6a1aee2af6aec05ace816d46da0b0c0bdb4fcd0c985c0f14634a50c860824435"
|
|
||||||
dependencies = [
|
|
||||||
"log",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tauri",
|
|
||||||
"tauri-plugin",
|
|
||||||
"thiserror",
|
|
||||||
"url",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.0.0-beta.6"
|
version = "2.0.0-beta.6"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "app"
|
name = "app"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "The Zoo Modeling App"
|
description = "A Tauri App"
|
||||||
authors = ["Zoo Engineers <eng@zoo.dev>"]
|
authors = ["you"]
|
||||||
license = ""
|
license = ""
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
default-run = "app"
|
default-run = "app"
|
||||||
@ -21,7 +21,6 @@ oauth2 = "4.4.2"
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tauri = { version = "2.0.0-beta.15", features = [ "devtools", "unstable"] }
|
tauri = { version = "2.0.0-beta.15", features = [ "devtools", "unstable"] }
|
||||||
tauri-plugin-cli = { version = "2.0.0-beta.3" }
|
tauri-plugin-cli = { version = "2.0.0-beta.3" }
|
||||||
tauri-plugin-deep-link = { version = "2.0.0-beta.3" }
|
|
||||||
tauri-plugin-dialog = { version = "2.0.0-beta.6" }
|
tauri-plugin-dialog = { version = "2.0.0-beta.6" }
|
||||||
tauri-plugin-fs = { version = "2.0.0-beta.6" }
|
tauri-plugin-fs = { version = "2.0.0-beta.6" }
|
||||||
tauri-plugin-http = { version = "2.0.0-beta.6" }
|
tauri-plugin-http = { version = "2.0.0-beta.6" }
|
||||||
@ -29,13 +28,11 @@ tauri-plugin-os = { version = "2.0.0-beta.2" }
|
|||||||
tauri-plugin-process = { version = "2.0.0-beta.2" }
|
tauri-plugin-process = { version = "2.0.0-beta.2" }
|
||||||
tauri-plugin-shell = { version = "2.0.0-beta.2" }
|
tauri-plugin-shell = { version = "2.0.0-beta.2" }
|
||||||
tauri-plugin-updater = { version = "2.0.0-beta.4" }
|
tauri-plugin-updater = { version = "2.0.0-beta.4" }
|
||||||
tokio = { version = "1.37.0", features = ["time", "fs", "process"] }
|
tokio = { version = "1.37.0", features = ["time", "fs"] }
|
||||||
toml = "0.8.2"
|
toml = "0.8.2"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["updater"]
|
|
||||||
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
||||||
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
|
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
|
||||||
# DO NOT REMOVE!!
|
# DO NOT REMOVE!!
|
||||||
custom-protocol = ["tauri/custom-protocol"]
|
custom-protocol = ["tauri/custom-protocol"]
|
||||||
updater = []
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>dev.zoo.modeling-app</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>zoo-modeling-app</string>
|
|
||||||
<string>zoo</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>UTExportedTypeDeclarations</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UTTypeIdentifier</key>
|
|
||||||
<string>dev.zoo.kcl</string>
|
|
||||||
<key>UTTypeConformsTo</key>
|
|
||||||
<array>
|
|
||||||
<string>public.source-code</string>
|
|
||||||
</array>
|
|
||||||
<key>UTTypeDescription</key>
|
|
||||||
<string>KCL (KittyCAD Language) document</string>
|
|
||||||
<key>UTTypeTagSpecification</key>
|
|
||||||
<dict>
|
|
||||||
<key>public.filename-extension</key>
|
|
||||||
<array>
|
|
||||||
<string>kcl</string>
|
|
||||||
</array>
|
|
||||||
<key>public.mime-type</key>
|
|
||||||
<array>
|
|
||||||
<string>text/vnd.zoo.kcl</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -8,7 +8,6 @@
|
|||||||
],
|
],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"cli:default",
|
"cli:default",
|
||||||
"deep-link:default",
|
|
||||||
"path:default",
|
"path:default",
|
||||||
"event:default",
|
"event:default",
|
||||||
"window:default",
|
"window:default",
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>com.apple.security.app-sandbox</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.client</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.server</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.files.downloads.read-write</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.application-identifier</key>
|
|
||||||
<string>92H8YB3B95.dev.zoo.modeling-app</string>
|
|
||||||
<key>com.apple.developer.team-identifier</key>
|
|
||||||
<string>92H8YB3B95</string>
|
|
||||||
<key>com.apple.developer.associated-domains</key>
|
|
||||||
<array>
|
|
||||||
<string>applinks:app.zoo.dev</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -6,6 +6,7 @@ pub(crate) mod state;
|
|||||||
use std::{
|
use std::{
|
||||||
env,
|
env,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
|
process::Command,
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
@ -18,7 +19,6 @@ use oauth2::TokenResponse;
|
|||||||
use tauri::{ipc::InvokeError, Manager};
|
use tauri::{ipc::InvokeError, Manager};
|
||||||
use tauri_plugin_cli::CliExt;
|
use tauri_plugin_cli::CliExt;
|
||||||
use tauri_plugin_shell::ShellExt;
|
use tauri_plugin_shell::ShellExt;
|
||||||
use tokio::process::Command;
|
|
||||||
|
|
||||||
const DEFAULT_HOST: &str = "https://api.zoo.dev";
|
const DEFAULT_HOST: &str = "https://api.zoo.dev";
|
||||||
const SETTINGS_FILE_NAME: &str = "settings.toml";
|
const SETTINGS_FILE_NAME: &str = "settings.toml";
|
||||||
@ -371,13 +371,6 @@ fn main() -> Result<()> {
|
|||||||
write_project_settings_file,
|
write_project_settings_file,
|
||||||
])
|
])
|
||||||
.plugin(tauri_plugin_cli::init())
|
.plugin(tauri_plugin_cli::init())
|
||||||
.plugin(tauri_plugin_deep_link::init())
|
|
||||||
.plugin(tauri_plugin_dialog::init())
|
|
||||||
.plugin(tauri_plugin_fs::init())
|
|
||||||
.plugin(tauri_plugin_http::init())
|
|
||||||
.plugin(tauri_plugin_os::init())
|
|
||||||
.plugin(tauri_plugin_process::init())
|
|
||||||
.plugin(tauri_plugin_shell::init())
|
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
// Do update things.
|
// Do update things.
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
@ -385,7 +378,6 @@ fn main() -> Result<()> {
|
|||||||
app.get_webview("main").unwrap().open_devtools();
|
app.get_webview("main").unwrap().open_devtools();
|
||||||
}
|
}
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
#[cfg(feature = "updater")]
|
|
||||||
{
|
{
|
||||||
app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
|
app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||||
}
|
}
|
||||||
@ -445,16 +437,6 @@ fn main() -> Result<()> {
|
|||||||
source_path
|
source_path
|
||||||
};
|
};
|
||||||
|
|
||||||
// If the path does not start with a slash, it is a relative path.
|
|
||||||
// We need to convert it to an absolute path.
|
|
||||||
let source_path = if source_path.is_relative() {
|
|
||||||
std::env::current_dir()
|
|
||||||
.map_err(|e| anyhow::anyhow!("Error getting the current directory: {:?}", e))?
|
|
||||||
.join(source_path)
|
|
||||||
} else {
|
|
||||||
source_path
|
|
||||||
};
|
|
||||||
|
|
||||||
// If the path is a directory, let's assume it is a project directory.
|
// If the path is a directory, let's assume it is a project directory.
|
||||||
if source_path.is_dir() {
|
if source_path.is_dir() {
|
||||||
// Load the details about the project from the path.
|
// Load the details about the project from the path.
|
||||||
@ -511,13 +493,21 @@ fn main() -> Result<()> {
|
|||||||
// Create a state object to hold the project.
|
// Create a state object to hold the project.
|
||||||
app.manage(state::Store::new(store));
|
app.manage(state::Store::new(store));
|
||||||
|
|
||||||
// Listen on the deep links.
|
|
||||||
app.listen("deep-link://new-url", |url| {
|
|
||||||
dbg!(url);
|
|
||||||
});
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
.register_uri_scheme_protocol("zoo-modeling-app", |_app, request| {
|
||||||
|
let path = request.uri().path();
|
||||||
|
dbg!(path);
|
||||||
|
println!("Requesting path: {}", path);
|
||||||
|
|
||||||
|
tauri::http::Response::builder().status(200).body(b"{}").unwrap()
|
||||||
|
})
|
||||||
|
.plugin(tauri_plugin_dialog::init())
|
||||||
|
.plugin(tauri_plugin_fs::init())
|
||||||
|
.plugin(tauri_plugin_http::init())
|
||||||
|
.plugin(tauri_plugin_os::init())
|
||||||
|
.plugin(tauri_plugin_process::init())
|
||||||
|
.plugin(tauri_plugin_shell::init())
|
||||||
.run(tauri::generate_context!())?;
|
.run(tauri::generate_context!())?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -38,7 +38,11 @@
|
|||||||
},
|
},
|
||||||
"longDescription": "",
|
"longDescription": "",
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"entitlements": "entitlements/Zoo Modeling App.entitlements"
|
"entitlements": null,
|
||||||
|
"exceptionDomain": "",
|
||||||
|
"frameworks": [],
|
||||||
|
"providerShortName": null,
|
||||||
|
"signingIdentity": null
|
||||||
},
|
},
|
||||||
"resources": [],
|
"resources": [],
|
||||||
"shortDescription": "",
|
"shortDescription": "",
|
||||||
@ -62,15 +66,10 @@
|
|||||||
],
|
],
|
||||||
"subcommands": {}
|
"subcommands": {}
|
||||||
},
|
},
|
||||||
"deep-link": {
|
|
||||||
"domains": [
|
|
||||||
{ "host": "app.zoo.dev" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"shell": {
|
"shell": {
|
||||||
"open": true
|
"open": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"productName": "Zoo Modeling App",
|
"productName": "Zoo Modeling App",
|
||||||
"version": "0.19.4"
|
"version": "0.19.3"
|
||||||
}
|
}
|
||||||
|
@ -974,7 +974,7 @@ export class EngineCommandManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const additionalSettings = settings.enableSSAO ? '&post_effect=ssao' : ''
|
const additionalSettings = settings.enableSSAO ? '&post_effect=ssao' : ''
|
||||||
const pool = this.pool === undefined ? '' : `&pool=${this.pool}`
|
const pool = this.pool == undefined ? '' : `&pool=${this.pool}`
|
||||||
const url = `${VITE_KC_API_WS_MODELING_URL}?video_res_width=${width}&video_res_height=${height}${additionalSettings}${pool}`
|
const url = `${VITE_KC_API_WS_MODELING_URL}?video_res_width=${width}&video_res_height=${height}${additionalSettings}${pool}`
|
||||||
this.engineConnection = new EngineConnection({
|
this.engineConnection = new EngineConnection({
|
||||||
engineCommandManager: this,
|
engineCommandManager: this,
|
||||||
|
@ -5,7 +5,7 @@ const sigmaAllow = 35000 // psi
|
|||||||
const width = 6 // inch
|
const width = 6 // inch
|
||||||
const p = 300 // Force on shelf - lbs
|
const p = 300 // Force on shelf - lbs
|
||||||
const distance = 12 // inches
|
const distance = 12 // inches
|
||||||
const M = distance * p / 2 // Moment experienced at fixed end of bracket
|
const M = 12 * 300 / 2 // Moment experienced at fixed end of bracket
|
||||||
const FOS = 2 // Factor of safety of 2
|
const FOS = 2 // Factor of safety of 2
|
||||||
const shelfMountL = 8 // The length of the bracket holding up the shelf is 6 inches
|
const shelfMountL = 8 // The length of the bracket holding up the shelf is 6 inches
|
||||||
const wallMountL = 8 // the length of the bracket
|
const wallMountL = 8 // the length of the bracket
|
||||||
|
@ -14,11 +14,7 @@ export default function CodeEditor() {
|
|||||||
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black opacity-50 dark:opacity-80 pointer-events-none"
|
className="fixed inset-0 bg-black opacity-50 dark:opacity-80 pointer-events-none"
|
||||||
style={
|
style={{ clipPath: useBackdropHighlight('code-pane') }}
|
||||||
{
|
|
||||||
/*clipPath: useBackdropHighlight('code-pane')*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
|
@ -15,11 +15,7 @@ export default function InteractiveNumbers() {
|
|||||||
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black opacity-50 pointer-events-none"
|
className="fixed inset-0 bg-black opacity-50 pointer-events-none"
|
||||||
style={
|
style={{ clipPath: useBackdropHighlight('code-pane') }}
|
||||||
{
|
|
||||||
/*clipPath: useBackdropHighlight('code-pane')*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
|
@ -31,11 +31,7 @@ export default function ParametricModeling() {
|
|||||||
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black dark:bg-black-80 opacity-50 pointer-events-none"
|
className="fixed inset-0 bg-black dark:bg-black-80 opacity-50 pointer-events-none"
|
||||||
style={
|
style={{ clipPath: useBackdropHighlight('code-pane') }}
|
||||||
{
|
|
||||||
/*clipPath: useBackdropHighlight('code-pane')*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
|
4
src/wasm-lib/Cargo.lock
generated
4
src/wasm-lib/Cargo.lock
generated
@ -240,9 +240,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-recursion"
|
name = "async-recursion"
|
||||||
version = "1.1.1"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
|
checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -12,7 +12,7 @@ keywords = ["kcl", "KittyCAD", "CAD"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { version = "1.0.82", features = ["backtrace"] }
|
anyhow = { version = "1.0.82", features = ["backtrace"] }
|
||||||
async-recursion = "1.1.1"
|
async-recursion = "1.1.0"
|
||||||
async-trait = "0.1.80"
|
async-trait = "0.1.80"
|
||||||
base64 = "0.22.0"
|
base64 = "0.22.0"
|
||||||
chrono = "0.4.38"
|
chrono = "0.4.38"
|
||||||
|
Reference in New Issue
Block a user