Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor in support of future OAS 3.1 work #72

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2efd9f9
Splitting into Frontend and Backend traits.
kevinswiber Nov 27, 2023
4ed1da0
Cleaning separation between frontend and backend.
kevinswiber Nov 28, 2023
fec08d5
Breaking up lib.rs into separate modules.
kevinswiber Nov 28, 2023
7689b22
Removing old OAS 2.0 files.
kevinswiber Nov 28, 2023
005c904
Removing unnecessary clone.
kevinswiber Nov 28, 2023
b7b2300
Reducing unnecessary copies of Auth.
kevinswiber Nov 29, 2023
b6d5c81
Removing unnecessary clone.
kevinswiber Nov 29, 2023
40767f7
as_str Postman
kevinswiber Nov 29, 2023
383f804
Adding borrows to serde deserialization.
kevinswiber Nov 29, 2023
ddb8454
Changing Postman collection to Cows.
kevinswiber Nov 30, 2023
3ec206b
Adding Cow to ApiKey.
kevinswiber Nov 30, 2023
2315b79
Adding Wasm support after moving to Cow.
kevinswiber Nov 30, 2023
1279e06
Removing gloo_utils
kevinswiber Nov 30, 2023
76d8bcd
Initial support for serde-wasm-bindgen, though it's all broken.
kevinswiber Nov 30, 2023
744b45e
Using serde-wasm-bindgen for deserialization to reduce Wasm size. wa…
kevinswiber Nov 30, 2023
6439271
Still using serde_json for Wasm serialization, since it's not seriali…
kevinswiber Dec 1, 2023
cc8404b
Getting serde-wasm-bindgen to both deserialize the collection and ser…
kevinswiber Dec 1, 2023
5ab2f7a
Using json_compatible version of serde-wasm-bindgen.
kevinswiber Dec 1, 2023
d716c04
Upgrading MSRV to 1.65.0.
kevinswiber Dec 1, 2023
257dea5
Adding JavaScript to source.
kevinswiber Dec 1, 2023
024fd92
Changing Web bundler to use built JavaScript Wasm.
kevinswiber Dec 1, 2023
397bcb5
Removing wasm-pack from JavaScript and Web, upgrading to Webpack 5, u…
kevinswiber Dec 1, 2023
6fba77f
Removing wasm-pack from Web-building GitHub workflow.
kevinswiber Dec 1, 2023
8df44eb
Getting rid of VARIABLE_RE regular expression.
kevinswiber Dec 1, 2023
8a53121
Removing Regex dependency, lightening Wasm significantly.
kevinswiber Dec 1, 2023
5167d1c
Removing anyhow.
kevinswiber Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
schedule:
- cron: '00 00 * * *'
- cron: "00 00 * * *"

jobs:
test:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
rust: nightly
- build: msrv
os: ubuntu-latest
rust: 1.64.0
rust: 1.65.0
- build: stable
os: ubuntu-latest
rust: stable
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
id-token: write

concurrency:
group: 'pages'
group: "pages"
cancel-in-progress: true

jobs:
Expand All @@ -26,19 +26,29 @@ jobs:
uses: ructions/[email protected]
with:
profile: minimal
toolchain: 1.64.0
toolchain: 1.65.0
override: true

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install wasm-bindgen
run: cargo install wasm-bindgen-cli

- name: Build WebAssembly module
run: wasm-pack build --release --out-dir ./web/wasm --target bundler
- name: Install wasm-snip
run: cargo install wasm-snip

- name: Install binaryen
run: apt-ge update && apt-get -y install binaryen

- name: Build and optimize WebAssembly module
run: |
cargo build --target wasm32-unknown-unknown --release && \
wasm-bindgen --out-dir ./js ./target/wasm32-unknown-unknown/release/postman2openapi.wasm && \
wasm-snip --snip-rust-panicking-code -o ./js/postman2openapi_bg.wasm ./js/postman2openapi_bg.wasm && \
wasm-opt -Oz -o ./js/postman2openapi_bg.wasm ./js/postman2openapi_bg.wasm

- name: Install dependencies
run: npm install --prefix ./web
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/nodejs
/target
/js/postman2openapi_bg.js
/js/postman2openapi_bg.wasm
/js/postman2openapi_bg.wasm.d.ts
/js/postman2openapi.js
/js/postman2openapi.d.ts
/web/dist
/web/node_modules
/web/wasm
Loading