Compare commits
	
		
			1 Commits
		
	
	
		
			pierremtb/
			...
			achalmers/
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 36a5461de5 | 
| @ -1,3 +1,3 @@ | ||||
| [codespell] | ||||
| ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast,ue | ||||
| skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,./src-tauri/gen/schemas | ||||
| ignore-words-list: crate,everytime | ||||
| skip: **/target,node_modules,build | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands | ||||
| VITE_KC_API_BASE_URL=https://api.dev.zoo.dev | ||||
| VITE_KC_SITE_BASE_URL=https://dev.zoo.dev | ||||
| VITE_KC_API_WS_MODELING_URL=wss://api.dev.kittycad.io/ws/modeling/commands | ||||
| VITE_KC_API_BASE_URL=https://api.dev.kittycad.io | ||||
| VITE_KC_SITE_BASE_URL=https://dev.kittycad.io | ||||
| VITE_KC_SKIP_AUTH=false | ||||
| VITE_KC_CONNECTION_TIMEOUT_MS=5000 | ||||
| VITE_KC_DEV_TOKEN="your token from dev.zoo.dev should go in .env.development.local" | ||||
| VITE_KC_SENTRY_DSN= | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands | ||||
| VITE_KC_API_BASE_URL=https://api.zoo.dev | ||||
| VITE_KC_SITE_BASE_URL=https://zoo.dev | ||||
| VITE_KC_API_WS_MODELING_URL=wss://api.kittycad.io/ws/modeling/commands | ||||
| VITE_KC_API_BASE_URL=https://api.kittycad.io | ||||
| VITE_KC_SITE_BASE_URL=https://kittycad.io | ||||
| VITE_KC_SKIP_AUTH=false | ||||
| VITE_KC_CONNECTION_TIMEOUT_MS=15000 | ||||
| VITE_KC_SENTRY_DSN=https://a814f2f66734989a90367f48feee28ca@o1042111.ingest.sentry.io/4505789425844224 | ||||
|  | ||||
| @ -1,2 +1 @@ | ||||
| src/wasm-lib/* | ||||
| *.typegen.ts | ||||
|  | ||||
							
								
								
									
										12
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								.eslintrc
									
									
									
									
									
								
							| @ -4,8 +4,7 @@ | ||||
|       "project": "./tsconfig.json" | ||||
|     }, | ||||
|     "plugins": [ | ||||
|       "css-modules", | ||||
|       "suggest-no-throw", | ||||
|       "css-modules" | ||||
|     ], | ||||
|     "extends": [ | ||||
|       "react-app", | ||||
| @ -18,21 +17,14 @@ | ||||
|         "never" | ||||
|       ], | ||||
|       "react-hooks/exhaustive-deps": "off", | ||||
|       "suggest-no-throw/suggest-no-throw": "warn", | ||||
|       "@typescript-eslint/no-floating-promises": "warn" | ||||
|     }, | ||||
|     "overrides": [ | ||||
|       { | ||||
|         "files": ["e2e/**/*.ts"], // Update the pattern based on your file structure | ||||
|         "rules": { | ||||
|           "@typescript-eslint/no-floating-promises": "warn", | ||||
|           "testing-library/prefer-screen-queries": "off" | ||||
|         } | ||||
|       }, | ||||
|       { | ||||
|         "files": ["src/**/*.test.ts"], | ||||
|         "rules": { | ||||
|           "suggest-no-throw/suggest-no-throw": "off", | ||||
|         } | ||||
|       } | ||||
|     ] | ||||
| } | ||||
|  | ||||
							
								
								
									
										85
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										85
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,85 +0,0 @@ | ||||
| name: Bug Report | ||||
| description: File a bug report for the Zoo Modeling App | ||||
| title: "[BUG]: " | ||||
| labels: ["bug"] | ||||
| assignees: [] | ||||
| body: | ||||
|   - type: markdown | ||||
|     attributes: | ||||
|       value: "Thank you for taking the time to report a bug. Please provide as much information as possible to help us resolve it." | ||||
|  | ||||
|   - type: textarea | ||||
|     id: describe-bug | ||||
|     attributes: | ||||
|       label: Describe the bug | ||||
|       description: A clear and concise description of what the bug is. | ||||
|       placeholder: "Explain the bug..." | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   - type: textarea | ||||
|     id: reproduce-bug | ||||
|     attributes: | ||||
|       label: Steps to Reproduce | ||||
|       description: Steps to reproduce the behavior. | ||||
|       placeholder: | | ||||
|         1. Go to '...' | ||||
|         2. Click on '....' | ||||
|         3. Scroll down to '....' | ||||
|         4. See error | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   - type: textarea | ||||
|     id: expected-behavior | ||||
|     attributes: | ||||
|       label: Expected Behavior | ||||
|       description: Description of what you expected to happen. | ||||
|       placeholder: "I expected that..." | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   - type: textarea | ||||
|     id: screenshots | ||||
|     attributes: | ||||
|       label: Screenshots and Recordings  | ||||
|       description: If applicable, add screenshots to help explain your problem. Maximum upload size is 10MB. | ||||
|       placeholder: "You can attach images or video recordings here." | ||||
|     validations: | ||||
|       required: false | ||||
|  | ||||
|   - type: input | ||||
|     id: desktop-os | ||||
|     attributes: | ||||
|       label: Desktop OS | ||||
|       description: "Your operating system" | ||||
|       placeholder: "example: Windows 10, MacOS Big Sur" | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   - type: input | ||||
|     id: browser | ||||
|     attributes: | ||||
|       label: Browser | ||||
|       description: "If you are using the web version, please specify the browser you are using." | ||||
|       placeholder: "example: Chrome, Safari" | ||||
|     validations: | ||||
|       required: false | ||||
|  | ||||
|   - type: input | ||||
|     id: version | ||||
|     attributes: | ||||
|       label: Version | ||||
|       description: "The version of the Zoo Modeling App you're using." | ||||
|       placeholder: "example: v0.15.0. You can find this in the settings." | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
|   - type: textarea | ||||
|     id: additional-context | ||||
|     attributes: | ||||
|       label: Additional Context | ||||
|       description: Add any other context about the problem here. | ||||
|       placeholder: "Anything else you want to add..." | ||||
|     validations: | ||||
|       required: false | ||||
							
								
								
									
										12
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							| @ -9,27 +9,15 @@ updates: | ||||
|       directory: '/' # Location of package manifests | ||||
|       schedule: | ||||
|           interval: 'daily' | ||||
|       reviewers: | ||||
|           - franknoirot  | ||||
|           - irev-dev | ||||
|     - package-ecosystem: 'github-actions' # See documentation for possible values | ||||
|       directory: '/' # Location of package manifests | ||||
|       schedule: | ||||
|           interval: 'daily' | ||||
|       reviewers: | ||||
|           - adamchalmers | ||||
|           - jessfraz | ||||
|     - package-ecosystem: 'cargo' # See documentation for possible values | ||||
|       directory: '/src/wasm-lib/' # Location of package manifests | ||||
|       schedule: | ||||
|           interval: 'daily' | ||||
|       reviewers: | ||||
|           - adamchalmers | ||||
|           - jessfraz | ||||
|     - package-ecosystem: 'cargo' # See documentation for possible values | ||||
|       directory: '/src-tauri/' # Location of package manifests | ||||
|       schedule: | ||||
|           interval: 'daily' | ||||
|       reviewers: | ||||
|           - adamchalmers | ||||
|           - jessfraz | ||||
|  | ||||
							
								
								
									
										33
									
								
								.github/workflows/build-and-store-wasm.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/build-and-store-wasm.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,33 +0,0 @@ | ||||
| name: Build and Store WASM | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|  | ||||
| jobs: | ||||
|   build-and-upload: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version-file: '.nvmrc' | ||||
|           cache: 'yarn' | ||||
|       - name: Install dependencies | ||||
|         run: yarn | ||||
|       - name: Setup Rust | ||||
|         uses: dtolnay/rust-toolchain@stable | ||||
|       - name: Cache wasm | ||||
|         uses: Swatinem/rust-cache@v2 | ||||
|         with: | ||||
|           workspaces: './src/wasm-lib' | ||||
|       - name: build wasm | ||||
|         run: yarn build:wasm | ||||
|  | ||||
|  | ||||
|       # Upload the WASM bundle as an artifact | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           name: wasm-bundle | ||||
|           path: src/wasm-lib/pkg | ||||
| @ -3,38 +3,48 @@ on: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - '**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - '**.rs' | ||||
|       - .github/workflows/cargo-check.yml | ||||
|       - .github/workflows/cargo-build.yml | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - '**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-build.yml | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| name: cargo check | ||||
| name: cargo build | ||||
| jobs: | ||||
|   cargocheck: | ||||
|     name: cargo check | ||||
|   cargobuild: | ||||
|     name: cargo build | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         dir: ['src/wasm-lib'] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
| 
 | ||||
|       - name: Install latest rust | ||||
|         uses: actions-rs/toolchain@v1 | ||||
|         with: | ||||
|             toolchain: stable | ||||
|             override: true | ||||
| 
 | ||||
|       - name: install dependencies | ||||
|         if: matrix.dir ==  'src-tauri' | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
| 
 | ||||
|       - name: Run check | ||||
|       - name: Run cargo build | ||||
|         run: | | ||||
|           cd "${{ matrix.dir }}" | ||||
|           # We specifically want to test the disable-println feature | ||||
|           # Since it is not enabled by default, we need to specify it | ||||
|           # This is used in kcl-lsp | ||||
|           cargo check --all --features disable-println --features pyo3 | ||||
|           cargo build --all | ||||
|         shell: bash | ||||
							
								
								
									
										35
									
								
								.github/workflows/cargo-clippy.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										35
									
								
								.github/workflows/cargo-clippy.yml
									
									
									
									
										vendored
									
									
								
							| @ -14,7 +14,7 @@ on: | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - '**.rs' | ||||
|       - .github/workflows/cargo-clippy.yml | ||||
|       - .github/workflows/cargo-build.yml | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| @ -25,7 +25,7 @@ jobs: | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         dir: ['src/wasm-lib', 'src-tauri'] | ||||
|         dir: ['src/wasm-lib'] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Install latest rust | ||||
| @ -37,31 +37,24 @@ jobs: | ||||
|  | ||||
|       - name: install dependencies | ||||
|         if: matrix.dir ==  'src-tauri' | ||||
|         shell: bash | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install -y \ | ||||
|             libgtk-3-dev \ | ||||
|             libayatana-appindicator3-dev \ | ||||
|             webkit2gtk-driver \ | ||||
|             libsoup-3.0-dev \ | ||||
|             libjavascriptcoregtk-4.1-dev \ | ||||
|             libwebkit2gtk-4.1-dev \ | ||||
|             at-spi2-core \ | ||||
|             xvfb | ||||
|           yarn install | ||||
|           yarn build:wasm | ||||
|           yarn build:local | ||||
|  | ||||
|           sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
|  | ||||
|       - name: Install ffmpeg | ||||
|         run: | | ||||
|           sudo apt update | ||||
|           sudo apt install \ | ||||
|             ffmpeg \ | ||||
|             libavformat-dev \ | ||||
|             libavutil-dev \ | ||||
|             libclang-dev \ | ||||
|             libswscale-dev \ | ||||
|             --no-install-recommends | ||||
|  | ||||
|       - name: Run clippy | ||||
|         run: | | ||||
|           cd "${{ matrix.dir }}" | ||||
|           cargo clippy --all --tests --benches -- -D warnings | ||||
|       # If this fails, run "cargo check" to update Cargo.lock, | ||||
|       # then add Cargo.lock to the PR. | ||||
|       - name: Check Cargo.lock doesn't need updating | ||||
|         run: | | ||||
|           cargo check --locked || echo "Pls run cargo check and commit the changed Cargo.lock" | ||||
|  | ||||
| @ -7,23 +7,23 @@ on: | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-bench.yml | ||||
|       - .github/workflows/cargo-criterion.yml | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - '**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-bench.yml | ||||
|       - .github/workflows/cargo-criterion.yml | ||||
|   workflow_dispatch: | ||||
| permissions: read-all | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| name: cargo bench | ||||
| name: cargo criterion | ||||
| jobs: | ||||
|   cargo-bench: | ||||
|     name: Benchmark with iai | ||||
|   cargocriterion: | ||||
|     name: cargo criterion | ||||
|     runs-on: ubuntu-latest-8-cores | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
| @ -31,12 +31,10 @@ jobs: | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           cargo install cargo-criterion | ||||
|           sudo apt update | ||||
|           sudo apt install -y valgrind | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
|       - name: Benchmark kcl library | ||||
|         shell: bash | ||||
|         run: |- | ||||
|           cd src/wasm-lib/kcl; cargo bench -- iai | ||||
|           cd src/wasm-lib/kcl; cargo criterion | ||||
| 
 | ||||
							
								
								
									
										57
									
								
								.github/workflows/cargo-test-tauri.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/cargo-test-tauri.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,57 +0,0 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - 'src-tauri/**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-test-tauri.yml | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - 'src-tauri/**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-test-tauri.yml | ||||
|   workflow_dispatch: | ||||
| permissions: read-all | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| name: cargo test of tauri | ||||
| jobs: | ||||
|   cargotest: | ||||
|     name: cargo test | ||||
|     runs-on: ubuntu-latest-8-cores | ||||
|     strategy: | ||||
|       matrix: | ||||
|         dir: ['src-tauri'] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Install latest rust | ||||
|         uses: actions-rs/toolchain@v1 | ||||
|         with: | ||||
|           toolchain: stable | ||||
|           override: true | ||||
|       - name: install dependencies | ||||
|         if: matrix.dir ==  'src-tauri' | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install -y \ | ||||
|             libgtk-3-dev \ | ||||
|             libayatana-appindicator3-dev \ | ||||
|             webkit2gtk-driver \ | ||||
|             libsoup-3.0-dev \ | ||||
|             libjavascriptcoregtk-4.1-dev \ | ||||
|             libwebkit2gtk-4.1-dev \ | ||||
|             at-spi2-core \ | ||||
|             xvfb | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
|       - name: cargo test | ||||
|         shell: bash | ||||
|         run: |- | ||||
|           cd "${{ matrix.dir }}" | ||||
|           cargo test --all | ||||
							
								
								
									
										41
									
								
								.github/workflows/cargo-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								.github/workflows/cargo-test.yml
									
									
									
									
										vendored
									
									
								
							| @ -3,15 +3,14 @@ on: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - 'src/wasm-lib/**.rs' | ||||
|       - '**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - .github/workflows/cargo-test.yml | ||||
|  | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - 'src/wasm-lib/**.rs' | ||||
|       - '**.rs' | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
| @ -21,7 +20,7 @@ permissions: read-all | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| name: cargo test of wasm-lib | ||||
| name: cargo test | ||||
| jobs: | ||||
|   cargotest: | ||||
|     name: cargo test | ||||
| @ -41,38 +40,26 @@ jobs: | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||||
|       - name: Install vector | ||||
|         run: | | ||||
|           curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh | ||||
|           chmod +x /tmp/vector.sh | ||||
|           /tmp/vector.sh -y -no-modify-path | ||||
|           mkdir -p /tmp/vector | ||||
|           cp .github/workflows/vector.toml /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml | ||||
|           sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml | ||||
|           cat /tmp/vector.toml | ||||
|           ${HOME}/.vector/bin/vector --config /tmp/vector.toml & | ||||
|       - uses: taiki-e/install-action@cargo-llvm-cov | ||||
|       - uses: taiki-e/install-action@nextest | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
|       - name: Install ffmpeg | ||||
|         run: | | ||||
|           sudo apt update | ||||
|           sudo apt install \ | ||||
|             ffmpeg \ | ||||
|             libavformat-dev \ | ||||
|             libavutil-dev \ | ||||
|             libclang-dev \ | ||||
|             libswscale-dev \ | ||||
|             --no-install-recommends | ||||
|       - name: cargo test | ||||
|         shell: bash | ||||
|         run: |- | ||||
|           cd "${{ matrix.dir }}" | ||||
|           cargo llvm-cov nextest --all --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log | ||||
|           cargo nextest run --workspace --no-fail-fast -P ci | ||||
|         env: | ||||
|           KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} | ||||
|           RUST_MIN_STACK: 10485760000 | ||||
|       - name: Upload to codecov.io | ||||
|         uses: codecov/codecov-action@v4 | ||||
|         with: | ||||
|           token: ${{secrets.CODECOV_TOKEN}} | ||||
|           fail_ci_if_error: true | ||||
|           flags: wasm-lib | ||||
|           verbose: true | ||||
|           files: lcov.info | ||||
|  | ||||
|  | ||||
							
								
								
									
										36
									
								
								.github/workflows/check-exampleKcl.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								.github/workflows/check-exampleKcl.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,36 +0,0 @@ | ||||
| name: Check Onboarding KCL | ||||
|  | ||||
| on: | ||||
|   pull_request: | ||||
|     types: [opened, synchronize] | ||||
|     paths: | ||||
|       - 'src/lib/exampleKcl.ts' | ||||
|  | ||||
| permissions: | ||||
|   contents: read | ||||
|   issues: write | ||||
|   pull-requests: write | ||||
|  | ||||
| jobs: | ||||
|   comment: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout repository | ||||
|         uses: actions/checkout@v4 | ||||
|  | ||||
|       - name: Comment on PR | ||||
|         uses: actions/github-script@v7 | ||||
|         with: | ||||
|           script: | | ||||
|             const message = '`src/lib/exampleKcl.ts` has been updated in this PR, please review and update the `src/routes/onboarding`, if needed.'; | ||||
|             const issue_number = context.payload.pull_request.number; | ||||
|             const owner = context.repo.owner; | ||||
|             const repo = context.repo.repo; | ||||
|  | ||||
|             // Post a comment on the PR | ||||
|             await github.rest.issues.createComment({ | ||||
|               owner, | ||||
|               repo, | ||||
|               issue_number, | ||||
|               body: message, | ||||
|             }); | ||||
							
								
								
									
										252
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										252
									
								
								.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) | ||||
|  | ||||
| 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: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
| @ -46,7 +46,6 @@ jobs: | ||||
|           workspaces: './src/wasm-lib' | ||||
|  | ||||
|       - run: yarn build:wasm | ||||
|       - run: yarn xstate:typegen | ||||
|       - run: yarn tsc | ||||
|  | ||||
|  | ||||
| @ -56,7 +55,7 @@ jobs: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Set up Python | ||||
|         uses: actions/setup-python@v5 | ||||
|         uses: actions/setup-python@v4 | ||||
|       - name: Install codespell | ||||
|         run: | | ||||
|             python -m pip install codespell | ||||
| @ -86,6 +85,8 @@ jobs: | ||||
|  | ||||
|       - run: yarn test:nowatch | ||||
|  | ||||
|       - run: yarn test:cov | ||||
|  | ||||
|  | ||||
|   prepare-json-files: | ||||
|     runs-on: ubuntu-latest  # seperate job on Ubuntu for easy string manipulations (compared to Windows) | ||||
| @ -103,12 +104,8 @@ jobs: | ||||
|         if: github.event_name == 'schedule' | ||||
|         run: | | ||||
|           VERSION=$(date +'%-y.%-m.%-d') yarn bump-jsons | ||||
|           echo "$(jq --arg url 'https://dl.zoo.dev/releases/modeling-app/nightly/last_update.json' \ | ||||
|             '.plugins.updater.endpoints[]=$url' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json | ||||
|           echo "$(jq --arg id 'dev.zoo.modeling-app-nightly' \ | ||||
|             '.identifier=$id' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json | ||||
|           echo "$(jq --arg name 'Zoo Modeling App (Nightly)' \ | ||||
|             '.productName=$name' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json | ||||
|           echo "$(jq --arg url 'https://dl.kittycad.io/releases/modeling-app/nightly/last_update.json' \ | ||||
|             '.tauri.updater.endpoints[]=$url' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json | ||||
|  | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: github.event_name == 'schedule' | ||||
| @ -126,14 +123,8 @@ jobs: | ||||
|     needs: [prepare-json-files] | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-14, ubuntu-latest, windows-latest] | ||||
|     env: | ||||
|       # Specific Apple Universal target for macos | ||||
|       TAURI_ARGS_MACOS: ${{ matrix.os == 'macos-14' && '--target universal-apple-darwin' || '' }} | ||||
|       # Only build executable on linux (no appimage or deb) | ||||
|       TAURI_ARGS_UBUNTU: ${{ matrix.os == 'ubuntu-latest' && '--bundles' || '' }} | ||||
|         os: [macos-latest, ubuntu-latest, windows-latest] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|  | ||||
| @ -147,26 +138,16 @@ jobs: | ||||
|           cp artifact/src-tauri/tauri.conf.json src-tauri/tauri.conf.json | ||||
|           cp artifact/src-tauri/tauri.release.conf.json src-tauri/tauri.release.conf.json  | ||||
|  | ||||
|       - name: Update WebView2 on Windows | ||||
|         if: matrix.os == 'windows-latest' | ||||
|         # Workaround needed to build the tauri windows app with matching edge version. | ||||
|         # From https://github.com/actions/runner-images/issues/9538 | ||||
|         run: | | ||||
|           Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile 'setup.exe' | ||||
|           Start-Process -FilePath setup.exe -Verb RunAs -Wait | ||||
|  | ||||
|       - name: Install ubuntu system dependencies | ||||
|         if: matrix.os == 'ubuntu-latest' | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install -y \ | ||||
|             libgtk-3-dev \ | ||||
|             libayatana-appindicator3-dev \ | ||||
|             webkit2gtk-driver \ | ||||
|             libsoup-3.0-dev \ | ||||
|             libjavascriptcoregtk-4.1-dev \ | ||||
|             libwebkit2gtk-4.1-dev \ | ||||
|             at-spi2-core \ | ||||
|         run: > | ||||
|           sudo apt-get update && | ||||
|           sudo apt-get install -y | ||||
|           libgtk-3-dev | ||||
|           libgtksourceview-3.0-dev | ||||
|           webkit2gtk-4.0 | ||||
|           libappindicator3-dev | ||||
|           webkit2gtk-driver | ||||
|           xvfb | ||||
|  | ||||
|       - name: Sync node version and setup cache | ||||
| @ -200,16 +181,13 @@ jobs: | ||||
|           cd ../../ | ||||
|           cp src/wasm-lib/pkg/wasm_lib_bg.wasm public | ||||
|  | ||||
|       - name: Run vite build (build:both) | ||||
|         run: yarn vite build --mode ${{ env.BUILD_RELEASE == 'true' && 'production' || 'development' }} | ||||
|  | ||||
|       - name: Fix format | ||||
|         run: yarn fmt | ||||
|  | ||||
|       - name: Install x86 target for Universal builds (MacOS only) | ||||
|         if: matrix.os == 'macos-14' | ||||
|       - name: Install Universal target (MacOS only) | ||||
|         if: matrix.os == 'macos-latest' | ||||
|         run: | | ||||
|           rustup target add x86_64-apple-darwin | ||||
|           rustup target add aarch64-apple-darwin | ||||
|  | ||||
|       - name: Prepare certificate and variables (Windows only) | ||||
|         if: ${{ matrix.os == 'windows-latest' && env.BUILD_RELEASE == 'true' }} | ||||
| @ -238,104 +216,19 @@ jobs: | ||||
|         shell: cmd | ||||
|  | ||||
|       - name: Build the app (debug) | ||||
|         uses: tauri-apps/tauri-action@v0 | ||||
|         if: ${{ env.BUILD_RELEASE == 'false' }} | ||||
|         run: "yarn tauri build --debug ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|  | ||||
|       - name: Build for Mac TestFlight (nightly) | ||||
|         if: ${{ github.event_name == 'schedule' && matrix.os == 'macos-14' }} | ||||
|         shell: bash | ||||
|         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 -n "${APPLE_STORE_PROVISIONING_PROFILE}" | base64 --decode -o "${profile}" | ||||
|  | ||||
|           echo -n "${APPLE_STORE_DISTRIBUTION_CERT}" | base64 --decode -o "dist.cer" | ||||
|           echo -n "${APPLE_STORE_INSTALLER_CERT}" | base64 --decode -o "installer.cer" | ||||
|  | ||||
|           KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | ||||
|           KEYCHAIN_PASSWORD="password" | ||||
|  | ||||
|           # create temporary keychain | ||||
|           security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||||
|           security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | ||||
|           security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||||
|  | ||||
|           # import certificate to keychain | ||||
|           security import "dist.cer" -P "$APPLE_STORE_P12_PASSWORD" -k $KEYCHAIN_PATH -f pkcs12 -t cert -A | ||||
|           security import "installer.cer" -P "$APPLE_STORE_P12_PASSWORD" -k $KEYCHAIN_PATH -f pkcs12 -t cert -A | ||||
|  | ||||
|           security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||||
|           security list-keychain -d user -s $KEYCHAIN_PATH | ||||
|  | ||||
|           target="universal-apple-darwin" | ||||
|  | ||||
|           # Turn off the default target | ||||
|           # We don't want to install the updater for the apple store build | ||||
|           sed -i.bu "s/default =/# default =/" src-tauri/Cargo.toml | ||||
|           rm src-tauri/Cargo.toml.bu | ||||
|           git diff src-tauri/Cargo.toml | ||||
|  | ||||
|           yarn tauri build --target "${target}" --verbose --config src-tauri/tauri.app-store.conf.json | ||||
|  | ||||
|           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/app-store.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 }} | ||||
|           APPLE_STORE_P12_PASSWORD: ${{ secrets.APPLE_STORE_P12_PASSWORD }} | ||||
|  | ||||
|  | ||||
|       - name: 'Upload to Mac TestFlight (nightly)' | ||||
|         uses: apple-actions/upload-testflight-build@v1 | ||||
|         if: ${{ github.event_name == 'schedule' && 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 }} | ||||
|           app-type: osx | ||||
|           includeRelease: false | ||||
|           includeDebug: true | ||||
|           args: ${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} | ||||
|  | ||||
|  | ||||
|       - name: Clean up after Mac TestFlight (nightly) | ||||
|         if: ${{ github.event_name == 'schedule' && matrix.os == 'macos-14' }} | ||||
|         shell: bash | ||||
|         run: | | ||||
|           git status | ||||
|           # remove our target builds because we want to make sure the later build | ||||
|           # includes the updater, and that anything we changed with the target | ||||
|           # does not persist | ||||
|           rm -rf src-tauri/target | ||||
|           # Lets get rid of the info.plist for the normal mac builds since its | ||||
|           # being sketchy. | ||||
|           rm src-tauri/Info.plist | ||||
|  | ||||
|       # 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 | ||||
|         uses: tauri-apps/tauri-action@v0 | ||||
|         if: ${{ env.BUILD_RELEASE == 'true' }} | ||||
|         env: | ||||
|           TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||||
|           TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||||
|           TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||||
|           TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||||
|           APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||||
|           APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||||
|           APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||||
| @ -343,38 +236,25 @@ jobs: | ||||
|           APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||||
|           APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||||
|           TAURI_CONF_ARGS: "--config ${{ matrix.os == 'windows-latest' && 'src-tauri\\tauri.release.conf.json' || 'src-tauri/tauri.release.conf.json' }}" | ||||
|         run: "yarn tauri build ${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|         with: | ||||
|           args: "${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} ${{ env.TAURI_CONF_ARGS }}" | ||||
|  | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: matrix.os != 'ubuntu-latest' | ||||
|         env: | ||||
|           PREFIX: ${{ matrix.os == 'macos-14' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }} | ||||
|           PREFIX: ${{ matrix.os == 'macos-latest' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }} | ||||
|           MODE: ${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }} | ||||
|         with: | ||||
|           path: "${{ env.PREFIX }}/${{ env.MODE }}/bundle/*/*" | ||||
|  | ||||
|       - name: Run e2e tests (linux only) | ||||
|         if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'release' && github.event_name != 'schedule' }} | ||||
|         if: matrix.os == 'ubuntu-latest' | ||||
|         run: | | ||||
|           cargo install tauri-driver --force | ||||
|           source .env.${{ env.BUILD_RELEASE == 'true' && 'production' || 'development' }} | ||||
|           export VITE_KC_API_BASE_URL | ||||
|           cargo install tauri-driver | ||||
|           xvfb-run yarn test:e2e:tauri | ||||
|         env: | ||||
|           E2E_APPLICATION: "./src-tauri/target/${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}/app" | ||||
|           KITTYCAD_API_TOKEN: ${{ env.BUILD_RELEASE == 'true' && secrets.KITTYCAD_API_TOKEN || secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|           E2E_APPLICATION: "./src-tauri/target/${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}/kittycad-modeling" | ||||
|           KITTYCAD_API_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN }} | ||||
|  | ||||
|       - name: Run e2e tests (windows only) | ||||
|         if: ${{ matrix.os == 'windows-latest' && github.event_name != 'release' && github.event_name != 'schedule' }} | ||||
|         run: | | ||||
|           cargo install tauri-driver --force | ||||
|           yarn wdio run wdio.conf.ts | ||||
|         env: | ||||
|           E2E_APPLICATION: ".\\src-tauri\\target\\${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}\\app.exe" | ||||
|           KITTYCAD_API_TOKEN: ${{ env.BUILD_RELEASE == 'true' && secrets.KITTYCAD_API_TOKEN || secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|           VITE_KC_API_BASE_URL: ${{ env.BUILD_RELEASE == 'true' && 'https://api.zoo.dev' || 'https://api.dev.zoo.dev' }} | ||||
|           E2E_TAURI_ENABLED: true | ||||
|           TS_NODE_COMPILER_OPTIONS: '{"module": "commonjs"}' | ||||
|  | ||||
|   publish-apps-release: | ||||
|     runs-on: ubuntu-latest | ||||
| @ -386,25 +266,26 @@ jobs: | ||||
|       PUB_DATE: ${{ github.event_name == 'release' && github.event.release.created_at || github.event.repository.updated_at }} | ||||
|       NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Nightly build, commit {0}', github.sha) }} | ||||
|       BUCKET_DIR: ${{ github.event_name == 'release' && 'dl.kittycad.io/releases/modeling-app' || 'dl.kittycad.io/releases/modeling-app/nightly' }} | ||||
|       WEBSITE_DIR: ${{ github.event_name == 'release' && 'dl.zoo.dev/releases/modeling-app' || 'dl.zoo.dev/releases/modeling-app/nightly' }} | ||||
|       URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }} | ||||
|     steps: | ||||
|       - uses: actions/download-artifact@v3 | ||||
|  | ||||
|       - name: Generate the update static endpoint | ||||
|         run: | | ||||
|           ls -l artifact/*/*oo* | ||||
|           ls -l artifact/*/*itty* | ||||
|           DARWIN_SIG=`cat artifact/macos/*.app.tar.gz.sig` | ||||
|           LINUX_SIG=`cat artifact/appimage/*.AppImage.tar.gz.sig` | ||||
|           WINDOWS_SIG=`cat artifact/msi/*.msi.zip.sig` | ||||
|           RELEASE_DIR=https://${WEBSITE_DIR}/${VERSION} | ||||
|           RELEASE_DIR=https://${BUCKET_DIR}/${VERSION} | ||||
|           jq --null-input \ | ||||
|             --arg version "${VERSION}" \ | ||||
|             --arg pub_date "${PUB_DATE}" \ | ||||
|             --arg notes "${NOTES}" \ | ||||
|             --arg darwin_sig "$DARWIN_SIG" \ | ||||
|             --arg darwin_url "$RELEASE_DIR/macos/${{ env.URL_CODED_NAME }}.app.tar.gz" \ | ||||
|             --arg darwin_url "$RELEASE_DIR/macos/KittyCAD%20Modeling.app.tar.gz" \ | ||||
|             --arg linux_sig "$LINUX_SIG" \ | ||||
|             --arg linux_url "$RELEASE_DIR/appimage/kittycad-modeling_${VERSION_NO_V}_amd64.AppImage.tar.gz" \ | ||||
|             --arg windows_sig "$WINDOWS_SIG" \ | ||||
|             --arg windows_url "$RELEASE_DIR/msi/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_x64_en-US.msi.zip" \ | ||||
|             --arg windows_url "$RELEASE_DIR/msi/KittyCAD%20Modeling_${VERSION_NO_V}_x64_en-US.msi.zip" \ | ||||
|             '{ | ||||
|               "version": $version, | ||||
|               "pub_date": $pub_date, | ||||
| @ -418,6 +299,10 @@ jobs: | ||||
|                   "signature": $darwin_sig, | ||||
|                   "url": $darwin_url | ||||
|                 }, | ||||
|                 "linux-x86_64": { | ||||
|                   "signature": $linux_sig, | ||||
|                   "url": $linux_url | ||||
|                 }, | ||||
|                 "windows-x86_64": { | ||||
|                   "signature": $windows_sig, | ||||
|                   "url": $windows_url | ||||
| @ -428,13 +313,14 @@ jobs: | ||||
|  | ||||
|       - name: Generate the download static endpoint | ||||
|         run: | | ||||
|           RELEASE_DIR=https://${WEBSITE_DIR}/${VERSION} | ||||
|           RELEASE_DIR=https://${BUCKET_DIR}/${VERSION} | ||||
|           jq --null-input \ | ||||
|             --arg version "${VERSION}" \ | ||||
|             --arg pub_date "${PUB_DATE}" \ | ||||
|             --arg notes "${NOTES}" \ | ||||
|             --arg darwin_url "$RELEASE_DIR/dmg/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_universal.dmg" \ | ||||
|             --arg windows_url "$RELEASE_DIR/msi/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_x64_en-US.msi" \ | ||||
|             --arg darwin_url "$RELEASE_DIR/dmg/KittyCAD%20Modeling_${VERSION_NO_V}_universal.dmg" \ | ||||
|             --arg linux_url "$RELEASE_DIR/appimage/kittycad-modeling_${VERSION_NO_V}_amd64.AppImage" \ | ||||
|             --arg windows_url "$RELEASE_DIR/msi/KittyCAD%20Modeling_${VERSION_NO_V}_x64_en-US.msi" \ | ||||
|             '{ | ||||
|               "version": $version, | ||||
|               "pub_date": $pub_date, | ||||
| @ -443,6 +329,9 @@ jobs: | ||||
|                 "dmg-universal": { | ||||
|                   "url": $darwin_url | ||||
|                 }, | ||||
|                 "appimage-x86_64": { | ||||
|                   "url": $linux_url | ||||
|                 }, | ||||
|                 "msi-x86_64": { | ||||
|                   "url": $windows_url | ||||
|                 } | ||||
| @ -451,62 +340,37 @@ jobs: | ||||
|             cat last_download.json | ||||
|  | ||||
|       - name: Authenticate to Google Cloud | ||||
|         uses: 'google-github-actions/auth@v2.1.3' | ||||
|         uses: 'google-github-actions/auth@v2.0.0' | ||||
|         with: | ||||
|           credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' | ||||
|  | ||||
|       - name: Set up Google Cloud SDK | ||||
|         uses: google-github-actions/setup-gcloud@v2.1.0 | ||||
|         uses: google-github-actions/setup-gcloud@v1.1.1 | ||||
|         with: | ||||
|           project_id: kittycadapi | ||||
|  | ||||
|       - name: Upload release files to public bucket | ||||
|         uses: google-github-actions/upload-cloud-storage@v2.1.0 | ||||
|         uses: google-github-actions/upload-cloud-storage@v1.0.3 | ||||
|         with: | ||||
|           path: artifact | ||||
|           glob: '*/Zoo*' | ||||
|           glob: '*/*itty*' | ||||
|           parent: false | ||||
|           destination: ${{ env.BUCKET_DIR }}/${{ env.VERSION }} | ||||
|  | ||||
|       - name: Upload update endpoint to public bucket | ||||
|         uses: google-github-actions/upload-cloud-storage@v2.1.0 | ||||
|         uses: google-github-actions/upload-cloud-storage@v1.0.3 | ||||
|         with: | ||||
|           path: last_update.json | ||||
|           destination: ${{ env.BUCKET_DIR }} | ||||
|  | ||||
|       - name: Upload download endpoint to public bucket | ||||
|         uses: google-github-actions/upload-cloud-storage@v2.1.0 | ||||
|         uses: google-github-actions/upload-cloud-storage@v1.0.3 | ||||
|         with: | ||||
|           path: last_download.json | ||||
|           destination: ${{ env.BUCKET_DIR }} | ||||
|  | ||||
|       - name: Upload release files to Github | ||||
|         if: ${{ github.event_name == 'release' }} | ||||
|         uses: softprops/action-gh-release@v2 | ||||
|         uses: softprops/action-gh-release@v1 | ||||
|         with: | ||||
|           files: 'artifact/*/Zoo*' | ||||
|  | ||||
|   announce_release: | ||||
|     needs: [publish-apps-release] | ||||
|     runs-on: ubuntu-latest | ||||
|     if: github.event_name == 'release' | ||||
|     steps: | ||||
|       - name: Check out code | ||||
|         uses: actions/checkout@v4 | ||||
|  | ||||
|       - name: Set up Python | ||||
|         uses: actions/setup-python@v5 | ||||
|         with: | ||||
|           python-version: '3.x' | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           python -m pip install --upgrade pip | ||||
|           pip install requests | ||||
|  | ||||
|       - name: Announce Release | ||||
|         env: | ||||
|           DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||||
|           RELEASE_VERSION: ${{ github.event.release.tag_name }} | ||||
|           RELEASE_BODY: ${{ github.event.release.body}} | ||||
|         run: python public/announce_release.py | ||||
|           files: artifact/*/*itty* | ||||
|  | ||||
							
								
								
									
										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 } = context.repo | ||||
|             const pulls = await github.rest.repos.listPullRequestsAssociatedWithCommit({ | ||||
|               owner, | ||||
|               repo, | ||||
|               commit_sha: context.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) | ||||
							
								
								
									
										65
									
								
								.github/workflows/generate-website-docs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/generate-website-docs.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,65 +0,0 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - .github/workflows/generate-website-docs.yml | ||||
|       - 'docs/**' | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - .github/workflows/generate-website-docs.yml | ||||
|   workflow_dispatch: | ||||
| name: generate-website-docs | ||||
| concurrency: | ||||
|   group: docs-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
| jobs: | ||||
|   generate-website-docs: | ||||
|     name: generate-website-docs | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - uses: actions/create-github-app-token@v1 | ||||
|         id: app-token | ||||
|         with: | ||||
|           # required | ||||
|           app-id: ${{ secrets.GH_ORG_APP_ID }} | ||||
|           private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }} | ||||
|           owner: ${{ github.repository_owner }} | ||||
|       # Checkout the docs repo since we will want to update the files there. | ||||
|       - uses: actions/checkout@v4 | ||||
|         with: | ||||
|           repository: 'kittycad/documentation' | ||||
|           path: 'documentation' | ||||
|           token: ${{ steps.app-token.outputs.token }} | ||||
|       - name: move docs to docs | ||||
|         shell: bash | ||||
|         run: | | ||||
|           mkdir -p documentation/content/pages/docs/kcl/ | ||||
|           # cleanup old | ||||
|           rm -rf documentation/content/pages/docs/kcl/*.md | ||||
|           # move new | ||||
|           mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/ | ||||
|       - name: commit the changes in the docs repo | ||||
|         shell: bash | ||||
|         run: | | ||||
|           cd documentation | ||||
|           git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||||
|           git config --local user.name "github-actions[bot]" | ||||
|           git add . | ||||
|           git commit -am "YOYO NEW KCL DOCS!!" || exit 0 | ||||
|           git fetch origin | ||||
|           git rebase origin/main || exit 0 | ||||
|           export NEW_BRANCH="update-kcl-docs" | ||||
|           git checkout -b "$NEW_BRANCH" | ||||
|           git push -f origin "$NEW_BRANCH" | ||||
|           gh pr create --title "Update KCL docs" \ | ||||
|               --body "Updating the generated kcl docs cc @jessfraz @franknoirot merge this" \ | ||||
|               --head "$NEW_BRANCH" \ | ||||
|               --reviewer jessfraz \ | ||||
|               --reviewer irev-dev \ | ||||
|               --reviewer franknoirot \ | ||||
|               --base main || true | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||||
|  | ||||
							
								
								
									
										197
									
								
								.github/workflows/playwright.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										197
									
								
								.github/workflows/playwright.yml
									
									
									
									
										vendored
									
									
								
							| @ -4,88 +4,27 @@ on: | ||||
|     branches: [ main ] | ||||
|   pull_request: | ||||
|     branches: [ main ] | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| permissions: | ||||
|   contents: write | ||||
|   pull-requests: write | ||||
|   actions: read | ||||
|    | ||||
|  | ||||
| jobs: | ||||
|  | ||||
|   check-rust-changes: | ||||
|     runs-on: ubuntu-latest | ||||
|     outputs: | ||||
|       rust-changed: ${{ steps.filter.outputs.rust }} | ||||
|  | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|  | ||||
|       - id: filter | ||||
|         name: Check for Rust changes | ||||
|         uses: dorny/paths-filter@v3 | ||||
|         with: | ||||
|           filters: | | ||||
|             rust: | ||||
|               - 'src/wasm-lib/**' | ||||
|  | ||||
|   playwright-ubuntu: | ||||
|     timeout-minutes: 60 | ||||
|     runs-on: ubuntu-latest-8-cores | ||||
|     needs: check-rust-changes | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4 | ||||
|     - uses: actions/setup-node@v4 | ||||
|       with: | ||||
|         node-version-file: '.nvmrc' | ||||
|         cache: 'yarn' | ||||
|     - uses: KittyCAD/action-install-cli@main | ||||
|     - name: Install dependencies | ||||
|       run: yarn | ||||
|     - name: Cache Playwright Browsers | ||||
|       uses: actions/cache@v4 | ||||
|       with: | ||||
|         path: | | ||||
|           ~/.cache/ms-playwright/ | ||||
|         key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }} | ||||
|     - name: Install Playwright Browsers | ||||
|       run: yarn playwright install --with-deps | ||||
|     - name: Download Wasm Cache | ||||
|       id: download-wasm | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       uses: dawidd6/action-download-artifact@v6 | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         github_token: ${{secrets.GITHUB_TOKEN}} | ||||
|         name: wasm-bundle | ||||
|         workflow: build-and-store-wasm.yml | ||||
|         branch: main | ||||
|         path: src/wasm-lib/pkg | ||||
|     - name: copy wasm blob | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public | ||||
|       continue-on-error: true | ||||
|     - name: Setup Rust | ||||
|       uses: dtolnay/rust-toolchain@stable | ||||
|     - name: Cache Wasm (because rust diff) | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'true' | ||||
|     - name: Cache wasm | ||||
|       uses: Swatinem/rust-cache@v2 | ||||
|       with: | ||||
|         workspaces: './src/wasm-lib' | ||||
|     - name: OR Cache Wasm (because wasm cache failed) | ||||
|       if: steps.download-wasm.outcome == 'failure' | ||||
|       uses: Swatinem/rust-cache@v2 | ||||
|       with: | ||||
|         workspaces: './src/wasm-lib' | ||||
|     - name: Build Wasm (because rust diff) | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'true' | ||||
|       run: yarn build:wasm | ||||
|     - name: OR Build Wasm (because wasm cache failed) | ||||
|       if: steps.download-wasm.outcome == 'failure' | ||||
|     - name: build wasm | ||||
|       run: yarn build:wasm | ||||
|     - name: build web | ||||
|       run: yarn build:local | ||||
| @ -94,14 +33,21 @@ jobs: | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|         snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|     - name: check for changes | ||||
|       id: git-check | ||||
|       run: | | ||||
|           git add . | ||||
|           if git status | grep -q "Changes to be committed" | ||||
|           then echo "modified=true" >> $GITHUB_OUTPUT | ||||
|           else echo "modified=false" >> $GITHUB_OUTPUT | ||||
|           then | ||||
|             echo "::set-output name=modified::true" | ||||
|           else | ||||
|             echo "::set-output name=modified::false" | ||||
|           fi | ||||
|     - name: Commit changes, if any | ||||
|       if: steps.git-check.outputs.modified == 'true' | ||||
| @ -113,62 +59,26 @@ jobs: | ||||
|         git fetch origin | ||||
|         echo ${{ github.head_ref }} | ||||
|         git checkout ${{ github.head_ref }} | ||||
|         # TODO when webkit works on ubuntu remove the os part of the commit message | ||||
|         # TODO when safari works on ubuntu remove the os part of the commit message | ||||
|         git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" || true | ||||
|         git push | ||||
|         git push origin ${{ github.head_ref }} | ||||
|     # only upload artifacts if there's actually changes | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: steps.git-check.outputs.modified == 'true' | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|     # if have previous run results, use them | ||||
|     - uses: actions/download-artifact@v4 | ||||
|       if: always() | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         name: test-results | ||||
|         path: test-results/ | ||||
|     - name: Run ubuntu/chrome flow retry failures | ||||
|       id: retry | ||||
|       if: always() | ||||
|       run: | | ||||
|         ls -1 "test-results" | ||||
|         if [[ $(ls -1 "test-results" | wc -l) == "0" ]]; | ||||
|         then echo "retried=false" >> $GITHUB_OUTPUT; exit 0; | ||||
|         else echo "retried=true" >> $GITHUB_OUTPUT; | ||||
|         fi; | ||||
|         yarn playwright test --project="Google Chrome" --last-failed e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - name: Run ubuntu/chrome flow | ||||
|       if: steps.retry.outputs.retried == 'false' | ||||
|       run: yarn playwright test --project="Google Chrome" e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: test-results | ||||
|         path: test-results/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|   playwright-macos: | ||||
|     timeout-minutes: 60 | ||||
|     runs-on: macos-14 | ||||
|     needs: check-rust-changes | ||||
|     runs-on: macos-latest | ||||
|     needs: playwright-ubuntu | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4 | ||||
|     - uses: actions/setup-node@v4 | ||||
| @ -177,91 +87,28 @@ jobs: | ||||
|         cache: 'yarn' | ||||
|     - name: Install dependencies | ||||
|       run: yarn | ||||
|     - name: Cache Playwright Browsers | ||||
|       uses: actions/cache@v4 | ||||
|       with: | ||||
|         path: | | ||||
|           ~/.cache/ms-playwright | ||||
|         key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} | ||||
|         restore-keys: | | ||||
|           ${{ runner.os }}-playwright- | ||||
|     - name: Install Playwright Browsers | ||||
|       run: yarn playwright install --with-deps | ||||
|     - name: Download Wasm Cache | ||||
|       id: download-wasm | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       uses: dawidd6/action-download-artifact@v6 | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         github_token: ${{secrets.GITHUB_TOKEN}} | ||||
|         name: wasm-bundle | ||||
|         workflow: build-and-store-wasm.yml | ||||
|         branch: main | ||||
|         path: src/wasm-lib/pkg | ||||
|     - name: copy wasm blob | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public | ||||
|       continue-on-error: true | ||||
|     - name: Setup Rust | ||||
|       uses: dtolnay/rust-toolchain@stable | ||||
|     - name: Cache Wasm (because rust diff) | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'true' | ||||
|     - name: Cache wasm | ||||
|       uses: Swatinem/rust-cache@v2 | ||||
|       with: | ||||
|         workspaces: './src/wasm-lib' | ||||
|     - name: OR Cache Wasm (because wasm cache failed) | ||||
|       if: steps.download-wasm.outcome == 'failure' | ||||
|       uses: Swatinem/rust-cache@v2 | ||||
|       with: | ||||
|         workspaces: './src/wasm-lib' | ||||
|     - name: Build Wasm (because rust diff) | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'true' | ||||
|       run: yarn build:wasm | ||||
|     - name: OR Build Wasm (because wasm cache failed) | ||||
|       if: steps.download-wasm.outcome == 'failure' | ||||
|     - name: build wasm | ||||
|       run: yarn build:wasm | ||||
|     - name: build web | ||||
|       run: yarn build:local | ||||
|     # if have previous run results, use them | ||||
|     - uses: actions/download-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         name: test-results | ||||
|         path: test-results/ | ||||
|     - name: Run macos/safari flow retry failures | ||||
|       id: retry | ||||
|       continue-on-error: true | ||||
|       if: ${{ success() }} | ||||
|       run: | | ||||
|         if [ -d "test-results" ]; | ||||
|         then echo "retried=true" >> $GITHUB_OUTPUT; | ||||
|         else echo "retried=false" >> $GITHUB_OUTPUT; | ||||
|         fi; | ||||
|         yarn playwright test --project="webkit" --last-failed e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - name: Run macos/safari flow | ||||
|       if: ${{ steps.retry.outputs.retried != 'true' }} | ||||
|       # webkit doesn't work on Ubuntu because of the same reason tauri doesn't (webRTC issues) | ||||
|       # safari doesn't work on Ubuntu because of the same reason tauri doesn't (webRTC issues) | ||||
|       # TODO remove this and the matrix and run all tests on ubuntu when this is fixed | ||||
|       run: yarn playwright test --project="webkit" e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|       with: | ||||
|         name: test-results | ||||
|         path: test-results/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|  | ||||
							
								
								
									
										21
									
								
								.github/workflows/vector.toml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/vector.toml
									
									
									
									
										vendored
									
									
								
							| @ -1,21 +0,0 @@ | ||||
| [sources.github-actions-file] | ||||
| type = "file" | ||||
| data_dir = "/tmp/vector" | ||||
| include = ["/tmp/github-actions.log"] | ||||
|  | ||||
| # Modify the logs to include the action name. | ||||
| [transforms.add-action-name] | ||||
| type = "remap" | ||||
| inputs = [ "github-actions-file" ] | ||||
| source = ''' | ||||
| .action = "GITHUB_WORKFLOW" | ||||
| .repo = "GITHUB_REPOSITORY" | ||||
| .sha = "GITHUB_SHA" | ||||
| .ref = "GITHUB_REF_NAME" | ||||
| ''' | ||||
|  | ||||
| [sinks.axiom] | ||||
| type = "axiom" | ||||
| inputs = ["add-action-name"] | ||||
| token = "GH_ACTIONS_AXIOM_TOKEN" | ||||
| dataset = "github-actions" | ||||
							
								
								
									
										15
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -17,7 +17,6 @@ | ||||
| .env.development.local | ||||
| .env.test.local | ||||
| .env.production.local | ||||
| .direnv | ||||
|  | ||||
| npm-debug.log* | ||||
| yarn-debug.log* | ||||
| @ -34,25 +33,11 @@ src/wasm-lib/bindings | ||||
| src/wasm-lib/kcl/bindings | ||||
| public/wasm_lib_bg.wasm | ||||
| src/wasm-lib/lcov.info | ||||
| src/wasm-lib/grackle/test_json_output | ||||
|  | ||||
| e2e/playwright/playwright-secrets.env | ||||
| e2e/playwright/temp1.png | ||||
| e2e/playwright/temp2.png | ||||
| # exports from snapshot-tests.spec.ts "exports of each format should work" | ||||
| e2e/playwright/export-snapshots/* | ||||
| !e2e/playwright/export-snapshots/*.png | ||||
|  | ||||
|  | ||||
| /test-results/ | ||||
| /playwright-report/ | ||||
| /blob-report/ | ||||
| /playwright/.cache/ | ||||
|  | ||||
|  | ||||
| ## generated files | ||||
| src/**/*.typegen.ts | ||||
| src-tauri/gen | ||||
|  | ||||
| src/wasm-lib/grackle/stdlib_cube_partial.json | ||||
| Mac_App_Distribution.provisionprofile | ||||
|  | ||||
| @ -10,4 +10,4 @@ src/wasm-lib/kcl/bindings | ||||
| e2e/playwright/export-snapshots | ||||
|  | ||||
| # XState generated files | ||||
| src/machines/**.typegen.ts | ||||
| src/machines/modelingMachine.typegen.ts | ||||
|  | ||||
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							| @ -1,6 +1,6 @@ | ||||
| The MIT License (MIT) | ||||
|  | ||||
| Copyright (c) 2023 The Zoo Authors | ||||
| Copyright (c) 2023 The KittyCAD Authors | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| of this software and associated documentation files (the "Software"), to deal | ||||
|  | ||||
							
								
								
									
										17
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,17 +0,0 @@ | ||||
| .PHONY: dev | ||||
|  | ||||
| WASM_LIB_FILES := $(wildcard src/wasm-lib/**/*.rs) | ||||
| TS_SRC := $(wildcard src/**/*.tsx) $(wildcard src/**/*.ts) | ||||
| XSTATE_TYPEGENS := $(wildcard src/machines/*.typegen.ts) | ||||
|  | ||||
| dev: node_modules public/wasm_lib_bg.wasm $(XSTATE_TYPEGENS) | ||||
| 	yarn start | ||||
|  | ||||
| $(XSTATE_TYPEGENS): $(TS_SRC) | ||||
| 	yarn xstate typegen 'src/**/*.ts?(x)' | ||||
|  | ||||
| public/wasm_lib_bg.wasm: $(WASM_LIB_FILES) | ||||
| 	yarn build:wasm-dev | ||||
|  | ||||
| node_modules: package.json yarn.lock | ||||
| 	yarn install | ||||
							
								
								
									
										152
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										152
									
								
								README.md
									
									
									
									
									
								
							| @ -1,17 +1,17 @@ | ||||
|  | ||||
|  | ||||
|  | ||||
| ## Zoo Modeling App | ||||
| ## KittyCAD Modeling App | ||||
|  | ||||
| live at [app.zoo.dev](https://app.zoo.dev/) | ||||
| live at [app.kittycad.io](https://app.kittycad.io/) | ||||
|  | ||||
| A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev). | ||||
| A CAD application from the future, brought to you by the [KittyCAD team](https://kittycad.io). | ||||
|  | ||||
| Modeling App is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence: | ||||
| The KittyCAD modeling app is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence: | ||||
|  | ||||
| - All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text" | ||||
|   - This makes version control—which is a solved problem in software engineering—trivial for CAD | ||||
| - All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood | ||||
|   - This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Modeling App | ||||
|   - This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in KittyCAD Modeling App | ||||
| - Everything graphics _has_ to be built for the GPU | ||||
|   - Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it | ||||
| - Make the resource-intensive pieces of an application auto-scaling | ||||
| @ -19,9 +19,9 @@ Modeling App is our take on what a modern modelling experience can be. It is app | ||||
|  | ||||
| We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours! | ||||
|  | ||||
| Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more. | ||||
| KittyCAD Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more. | ||||
|  | ||||
| The 3D view in Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine. | ||||
| The 3D view in KittyCAD Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine. | ||||
|  | ||||
| ## Tools | ||||
|  | ||||
| @ -60,12 +60,6 @@ followed by: | ||||
| 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) | ||||
|  | ||||
| finally, to run the web app only, run: | ||||
| @ -74,13 +68,7 @@ finally, to run the web app only, run: | ||||
| yarn start | ||||
| ``` | ||||
|  | ||||
| If you're not an KittyCAD employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens ofcourse, then navigate to localhost:3000 again. Note that navigating to localhost:3000/signin removes your token so you will need to set the token again. | ||||
|  | ||||
| ### Development environment variables | ||||
|  | ||||
| The Copilot LSP plugin in the editor requires a Zoo API token to run. In production, we authenticate this with a token via cookie in the browser and device auth token in the desktop environment, but this token is inaccessible in the dev browser version because the cookie is considered "cross-site" (from `localhost` to `dev.zoo.dev`). There is an optional environment variable called `VITE_KC_DEV_TOKEN` that you can populate with a dev token in a `.env.development.local` file to not check it into Git, which will use that token instead of other methods for the LSP service. | ||||
|  | ||||
| ### Developing in Chrome | ||||
| ## Developing in Chrome | ||||
|  | ||||
| Chrome is in the process of rolling out a new default which | ||||
| [blocks Third-Party Cookies](https://developer.chrome.com/en/docs/privacy-sandbox/third-party-cookie-phase-out/). | ||||
| @ -89,6 +77,25 @@ enable third-party cookies. You can enable third-party cookies by clicking on | ||||
| the eye with a slash through it in the URL bar, and clicking on "Enable | ||||
| Third-Party Cookies". | ||||
|  | ||||
| ## Running tests | ||||
|  | ||||
| First, start the dev server following "Running a development build" above. | ||||
|  | ||||
| Then in another terminal tab, run: | ||||
|  | ||||
| ``` | ||||
| yarn test | ||||
| ``` | ||||
|  | ||||
| Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default. | ||||
|  | ||||
| For running the rust (not tauri rust though) only, you can | ||||
| ```bash | ||||
| cd src/wasm-lib | ||||
| cargo test | ||||
| ``` | ||||
| but you will need to have install ffmpeg prior to. | ||||
|  | ||||
| ## Tauri | ||||
|  | ||||
| To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have been done before hand then | ||||
| @ -130,12 +137,7 @@ Before you submit a contribution PR to this repo, please ensure that: | ||||
| VERSION=x.y.z yarn run bump-jsons | ||||
| ``` | ||||
|  | ||||
| Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you. | ||||
| run `./make-release.sh` for a patch update | ||||
| run `./make-release.sh "minor"` for minor | ||||
| run `./make-release.sh "major"` for major | ||||
|  | ||||
| The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and paste in the following | ||||
| The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and past in the following | ||||
|  | ||||
| ```typescript | ||||
| console.log( | ||||
| @ -146,7 +148,6 @@ console.log( | ||||
| - `) | ||||
| ) | ||||
| ``` | ||||
|  | ||||
| grab the md list and delete any that are older than the last bump | ||||
|  | ||||
| 2. Merge the PR | ||||
| @ -176,51 +177,39 @@ $ cargo +nightly fuzz run parser | ||||
| For more information on fuzzing you can check out | ||||
| [this guide](https://rust-fuzz.github.io/book/cargo-fuzz.html). | ||||
|  | ||||
| ## Tests | ||||
|  | ||||
| ### Playwright tests | ||||
|  | ||||
| For a portable way to run Playwright you'll need Docker. | ||||
|  | ||||
| After that, open a terminal and run: | ||||
| ### Playwright | ||||
|  | ||||
| First time running plawright locally, you'll need to add the secrets file | ||||
| ```bash | ||||
| docker run --network host  --rm --init -it playwright/chrome:playwright-1.43.1 | ||||
| touch ./e2e/playwright/playwright-secrets.env | ||||
| echo 'token="your-token"' > ./e2e/playwright/playwright-secrets.env | ||||
| ``` | ||||
| then replace "your-token" with a dev token from dev.kittycad.io/account/api-tokens | ||||
|  | ||||
| then: | ||||
| run playwright | ||||
| ``` | ||||
| yarn playwright test | ||||
| ``` | ||||
|  | ||||
| and in another terminal, run: | ||||
|  | ||||
| ```bash | ||||
| PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite> | ||||
| run a specific test suite | ||||
| ``` | ||||
|  | ||||
| An example of a `<test suite>` is: `e2e/playwright/flow-tests.spec.ts` | ||||
|  | ||||
| YOU WILL NEED A PLAYWRIGHT-SECRETS.ENV FILE: | ||||
|  | ||||
|  | ||||
| ```bash | ||||
| # ./e2e/playwright/playwright-secrets.env | ||||
| token=<your-token> | ||||
| snapshottoken=<your-snapshot-token> | ||||
| yarn playwright test src/e2e-tests/example.spec.ts | ||||
| ``` | ||||
| then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens | ||||
|  | ||||
| run a specific test change the test from `test('...` to `test.only('...` | ||||
| (note if you commit this, the tests will instantly fail without running any of the tests) | ||||
|  | ||||
| run headed | ||||
|  | ||||
| ``` | ||||
| yarn playwright test --headed | ||||
| ``` | ||||
|  | ||||
| run with step through debugger | ||||
|  | ||||
| ``` | ||||
| PWDEBUG=1 yarn playwright test | ||||
| ``` | ||||
|  | ||||
| However, if you want a debugger I recommend using VSCode and the `playwright` extension, as the above command is a cruder debugger that steps into every function call which is annoying. | ||||
| With the extension you can set a breakpoint after `waitForDefaultPlanesVisibilityChange` in order to skip app loading, then the vscode debugger's "step over" is much better for being able to stay at the right level of abstraction as you debug the code. | ||||
|  | ||||
| @ -265,39 +254,9 @@ Where `./store` should look like this | ||||
|  | ||||
| </details> | ||||
|  | ||||
|  | ||||
| However because much of our tests involve clicking in the stream at specific locations, it's code-gen looks `await page.locator('video').click();` when really we need to use a pixel coord, so I think it's of limited use. | ||||
|  | ||||
| ### Unit and component tests | ||||
|  | ||||
| If you already haven't, run the following: | ||||
|  | ||||
| ``` | ||||
| yarn | ||||
| yarn build:wasm | ||||
| yarn start | ||||
| ``` | ||||
|  | ||||
| and finally: | ||||
|  | ||||
| ``` | ||||
| yarn test:nowatch | ||||
| ``` | ||||
|  | ||||
| For individual testing: | ||||
|  | ||||
| ``` | ||||
| yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false | ||||
| ``` | ||||
|  | ||||
| Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default. | ||||
|  | ||||
| ### Rust tests | ||||
|  | ||||
| ```bash | ||||
| cd src/wasm-lib | ||||
| cargo test | ||||
| ``` | ||||
|  | ||||
| #### Some notes on CI | ||||
|  | ||||
| The tests are broken into snapshot tests and non-snapshot tests, and they run in that order, they automatically commit new snap shots, so if you see an image commit check it was an intended change. If we have non-determinism in the snapshots such that they are always committing new images, hopefully this annoyance makes us fix them asap, if you notice this happening let Kurt know. But for the odd occasion  `git reset --hard HEAD~ && git push -f` is your friend. | ||||
| @ -318,7 +277,7 @@ https://github.com/KittyCAD/modeling-app/assets/29681384/6f5e8e85-1003-4fd9-be7f | ||||
| <details> | ||||
|  | ||||
| <summary> | ||||
| PS: for the debug panel, the following JSON is useful for snapping the camera | ||||
| Ps for the debug panel, the following JSON is useful for snapping the camera | ||||
| </summary> | ||||
|  | ||||
| ```JSON | ||||
| @ -326,26 +285,3 @@ PS: for the debug panel, the following JSON is useful for snapping the camera | ||||
| ``` | ||||
|  | ||||
| </details> | ||||
|  | ||||
| ### Tauri e2e tests | ||||
|  | ||||
| #### Windows (local only until the CI edge version mismatch is fixed) | ||||
|  | ||||
| ``` | ||||
| yarn install | ||||
| yarn build:wasm-dev | ||||
| cp src/wasm-lib/pkg/wasm_lib_bg.wasm public | ||||
| yarn vite build --mode development | ||||
| yarn tauri build --debug -b | ||||
| $env:KITTYCAD_API_TOKEN="<YOUR_KITTYCAD_API_TOKEN>" | ||||
| $env:VITE_KC_API_BASE_URL="https://api.dev.zoo.dev" | ||||
| $env:E2E_TAURI_ENABLED="true" | ||||
| $env:TS_NODE_COMPILER_OPTIONS='{"module": "commonjs"}' | ||||
| $env:E2E_APPLICATION=".\src-tauri\target\debug\Zoo Modeling App.exe" | ||||
| Stop-Process -Name msedgedriver | ||||
| yarn wdio run wdio.conf.ts | ||||
| ``` | ||||
|  | ||||
| ## KCL | ||||
|  | ||||
| For how to contribute to KCL, [see our KCL README](https://github.com/KittyCAD/modeling-app/tree/main/src/wasm-lib/kcl). | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								app-icon.png
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app-icon.png
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 207 KiB | 
| @ -1,3 +1,3 @@ | ||||
| module.exports = { | ||||
|   presets: ['@babel/preset-env'], | ||||
|   presets: ["@babel/preset-env"], | ||||
| } | ||||
|  | ||||
| @ -1,29 +0,0 @@ | ||||
| --- | ||||
| title: "KCL Known Issues" | ||||
| excerpt: "Known issues with the KCL standard library for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| The following are bugs that are not in modeling-app or kcl itself. These bugs | ||||
| once fixed in engine will just start working here with no language changes. | ||||
|  | ||||
| - **Sketch on Face**: If your sketch is outside the edges of the face (on which you | ||||
|     are sketching) you will get multiple models returned instead of one single | ||||
|     model for that sketch and its underlying 3D object. | ||||
|     If you see a red line around your model, it means this is happening. | ||||
|  | ||||
| - **Import**: Right now you can import a file, even if that file has brep data | ||||
|     you cannot edit it, after v1, the engine will account for this. You also cannot | ||||
|     currently move or transform the imported objects at all, once we have assemblies | ||||
|     this will work. | ||||
|  | ||||
| - **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet | ||||
|     cases work currently. | ||||
|  | ||||
| - **Chamfers**: Chamfers cannot intersect, you will get an error. Only simple | ||||
|     chamfer cases work currently. | ||||
|  | ||||
|     Sketching on the chamfered face does not currently work. | ||||
|  | ||||
| - **Shell**: Shell is only working for `end` faces, not for `side` or `start`  | ||||
|     faces. We are tracking the engine side bug on this. | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										743
									
								
								docs/kcl/arc.md
									
									
									
									
									
								
							
							
						
						
									
										743
									
								
								docs/kcl/arc.md
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1079
									
								
								docs/kcl/hole.md
									
									
									
									
									
								
							
							
						
						
									
										1079
									
								
								docs/kcl/hole.md
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,83 +0,0 @@ | ||||
| --- | ||||
| title: "KCL Standard Library" | ||||
| excerpt: "Documentation for the KCL standard library for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| ## Table of Contents | ||||
|  | ||||
| * [Types](kcl/types) | ||||
| * [Known Issues](kcl/KNOWN-ISSUES) | ||||
| * [`abs`](kcl/abs) | ||||
| * [`acos`](kcl/acos) | ||||
| * [`angleToMatchLengthX`](kcl/angleToMatchLengthX) | ||||
| * [`angleToMatchLengthY`](kcl/angleToMatchLengthY) | ||||
| * [`angledLine`](kcl/angledLine) | ||||
| * [`angledLineOfXLength`](kcl/angledLineOfXLength) | ||||
| * [`angledLineOfYLength`](kcl/angledLineOfYLength) | ||||
| * [`angledLineThatIntersects`](kcl/angledLineThatIntersects) | ||||
| * [`angledLineToX`](kcl/angledLineToX) | ||||
| * [`angledLineToY`](kcl/angledLineToY) | ||||
| * [`arc`](kcl/arc) | ||||
| * [`asin`](kcl/asin) | ||||
| * [`atan`](kcl/atan) | ||||
| * [`bezierCurve`](kcl/bezierCurve) | ||||
| * [`ceil`](kcl/ceil) | ||||
| * [`chamfer`](kcl/chamfer) | ||||
| * [`circle`](kcl/circle) | ||||
| * [`close`](kcl/close) | ||||
| * [`cos`](kcl/cos) | ||||
| * [`e`](kcl/e) | ||||
| * [`extrude`](kcl/extrude) | ||||
| * [`fillet`](kcl/fillet) | ||||
| * [`floor`](kcl/floor) | ||||
| * [`getEdge`](kcl/getEdge) | ||||
| * [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge) | ||||
| * [`getOppositeEdge`](kcl/getOppositeEdge) | ||||
| * [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge) | ||||
| * [`helix`](kcl/helix) | ||||
| * [`hole`](kcl/hole) | ||||
| * [`import`](kcl/import) | ||||
| * [`lastSegX`](kcl/lastSegX) | ||||
| * [`lastSegY`](kcl/lastSegY) | ||||
| * [`legAngX`](kcl/legAngX) | ||||
| * [`legAngY`](kcl/legAngY) | ||||
| * [`legLen`](kcl/legLen) | ||||
| * [`line`](kcl/line) | ||||
| * [`lineTo`](kcl/lineTo) | ||||
| * [`ln`](kcl/ln) | ||||
| * [`log`](kcl/log) | ||||
| * [`log10`](kcl/log10) | ||||
| * [`log2`](kcl/log2) | ||||
| * [`max`](kcl/max) | ||||
| * [`min`](kcl/min) | ||||
| * [`patternCircular2d`](kcl/patternCircular2d) | ||||
| * [`patternCircular3d`](kcl/patternCircular3d) | ||||
| * [`patternLinear2d`](kcl/patternLinear2d) | ||||
| * [`patternLinear3d`](kcl/patternLinear3d) | ||||
| * [`pi`](kcl/pi) | ||||
| * [`pow`](kcl/pow) | ||||
| * [`profileStart`](kcl/profileStart) | ||||
| * [`profileStartX`](kcl/profileStartX) | ||||
| * [`profileStartY`](kcl/profileStartY) | ||||
| * [`revolve`](kcl/revolve) | ||||
| * [`segAng`](kcl/segAng) | ||||
| * [`segEndX`](kcl/segEndX) | ||||
| * [`segEndY`](kcl/segEndY) | ||||
| * [`segLen`](kcl/segLen) | ||||
| * [`shell`](kcl/shell) | ||||
| * [`sin`](kcl/sin) | ||||
| * [`sqrt`](kcl/sqrt) | ||||
| * [`startProfileAt`](kcl/startProfileAt) | ||||
| * [`startSketchAt`](kcl/startSketchAt) | ||||
| * [`startSketchOn`](kcl/startSketchOn) | ||||
| * [`tan`](kcl/tan) | ||||
| * [`tangentialArc`](kcl/tangentialArc) | ||||
| * [`tangentialArcTo`](kcl/tangentialArcTo) | ||||
| * [`tau`](kcl/tau) | ||||
| * [`toDegrees`](kcl/toDegrees) | ||||
| * [`toRadians`](kcl/toRadians) | ||||
| * [`xLine`](kcl/xLine) | ||||
| * [`xLineTo`](kcl/xLineTo) | ||||
| * [`yLine`](kcl/yLine) | ||||
| * [`yLineTo`](kcl/yLineTo) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,35 +0,0 @@ | ||||
| --- | ||||
| title: "legAngX" | ||||
| excerpt: "Returns the angle of the given leg for x." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| Returns the angle of the given leg for x. | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| legAngX(hypotenuse: number, leg: number) -> number | ||||
| ``` | ||||
|  | ||||
| ### Tags | ||||
|  | ||||
| * `utilities` | ||||
|  | ||||
| ### Examples | ||||
|  | ||||
| ```js | ||||
| legAngX(5, 3) | ||||
| ``` | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `hypotenuse`: `number` (REQUIRED) | ||||
| * `leg`: `number` (REQUIRED) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `number` | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -1,35 +0,0 @@ | ||||
| --- | ||||
| title: "legAngY" | ||||
| excerpt: "Returns the angle of the given leg for y." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| Returns the angle of the given leg for y. | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| legAngY(hypotenuse: number, leg: number) -> number | ||||
| ``` | ||||
|  | ||||
| ### Tags | ||||
|  | ||||
| * `utilities` | ||||
|  | ||||
| ### Examples | ||||
|  | ||||
| ```js | ||||
| legAngY(5, 3) | ||||
| ``` | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `hypotenuse`: `number` (REQUIRED) | ||||
| * `leg`: `number` (REQUIRED) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `number` | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -1,35 +0,0 @@ | ||||
| --- | ||||
| title: "legLen" | ||||
| excerpt: "Returns the length of the given leg." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| Returns the length of the given leg. | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| legLen(hypotenuse: number, leg: number) -> number | ||||
| ``` | ||||
|  | ||||
| ### Tags | ||||
|  | ||||
| * `utilities` | ||||
|  | ||||
| ### Examples | ||||
|  | ||||
| ```js | ||||
| legLen(5, 3) | ||||
| ``` | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `hypotenuse`: `number` (REQUIRED) | ||||
| * `leg`: `number` (REQUIRED) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `number` | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										737
									
								
								docs/kcl/line.md
									
									
									
									
									
								
							
							
						
						
									
										737
									
								
								docs/kcl/line.md
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										141307
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
							
						
						
									
										141307
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4709
									
								
								docs/kcl/std.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4709
									
								
								docs/kcl/std.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	