Skip to content

Commit

Permalink
Release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancuric committed Nov 9, 2023
1 parent 31658bd commit 353fc58
Show file tree
Hide file tree
Showing 22 changed files with 75 additions and 19 deletions.
7 changes: 7 additions & 0 deletions apps/example-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-react

## 1.1.1

### Patch Changes

- Updated dependencies [f70472b]
- @microblink/capture@1.1.1

## 1.1.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/example-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-react",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"scripts": {
"build": "tsc && vite build",
"clean": "rimraf .turbo types dist public/resources *.tsbuildinfo",
Expand Down
7 changes: 7 additions & 0 deletions apps/example-solidjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-solidjs

## 1.1.1

### Patch Changes

- Updated dependencies [f70472b]
- @microblink/capture@1.1.1

## 1.1.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/example-solidjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "example-solidjs",
"description": "",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"scripts": {
"build": "vite build",
"build:js-dev": "vite build --mode development",
Expand Down
7 changes: 7 additions & 0 deletions apps/example-vanilla-ts-headless/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-vanilla-ts-headless

## 1.1.1

### Patch Changes

- Updated dependencies [f70472b]
- @microblink/capture@1.1.1

## 1.1.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/example-vanilla-ts-headless/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-vanilla-ts-headless",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"scripts": {
"build": "tsc && vite build",
"clean": "rimraf dist public .turbo types",
Expand Down
7 changes: 7 additions & 0 deletions apps/example-vanilla-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# example-vanilla-ts

## 1.1.1

### Patch Changes

- Updated dependencies [f70472b]
- @microblink/capture@1.1.1

## 1.1.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/example-vanilla-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-vanilla-ts",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"scripts": {
"build": "tsc && vite build",
"clean": "rimraf dist public .turbo types",
Expand Down
8 changes: 8 additions & 0 deletions packages/capture-main/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# capture-main

## 1.1.1

### Patch Changes

- f70472b: Removed the use of `data:` protocols when loading cross-origin workers. Will only use the `blob:` to be more flexible with different CSPs.
- Updated dependencies [f70472b]
- [email protected]

## 1.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/capture-main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "capture-main",
"description": "",
"private": true,
"version": "1.0.7",
"version": "1.1.1",
"author": "",
"scripts": {
"build": "concurrently pnpm:build:js pnpm:build:types",
Expand Down
12 changes: 7 additions & 5 deletions packages/capture-main/src/core/getCrossOriginWorkerURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ export const getCrossOriginWorkerURL = (
importScripts = (...urls) => _importScripts(...urls.map(_fixImports));
`;

let finalURL =
`data:${type},` + encodeURIComponent(importScriptsFix + codeString);
let finalURL = "";

if (options.useBlob) {
finalURL = URL.createObjectURL(
new Blob([`importScripts("${finalURL}")`], { type }),
);
const blob = new Blob([importScriptsFix + codeString], { type });
finalURL = URL.createObjectURL(blob);
} else {
finalURL =
`data:${type},` +
encodeURIComponent(importScriptsFix + codeString);
}

resolve(finalURL);
Expand Down
6 changes: 6 additions & 0 deletions packages/capture-published/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @microblink/capture

## 1.1.1

### Patch Changes

- Removed the use of `data:` protocols when loading cross-origin workers. Will only use the `blob:` to be more flexible with different CSPs.

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/capture-published/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo-microblink](assets/microblink-logo.png)
![logo-microblink](https://github.com/BlinkID/capture-browser/assets/2827047/ab8ab61b-ac82-4d84-8013-f6f2efe5bec5)

# _Capture_ SDK for browsers

Expand Down
5 changes: 5 additions & 0 deletions packages/capture-published/create-npm.mts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ fs.writeFileSync(
JSON.stringify(publishPackageJson, null, 2),
);

// get git root
const gitRoot = (await $`git rev-parse --show-toplevel`.quiet())
.toString()
.trim();

// copy readme file
fs.copySync(
`${releasePackagePath}/README.md`,
Expand Down
4 changes: 2 additions & 2 deletions packages/capture-published/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "",
"homepage": "https://microblink.com/",
"repository": "github:BlinkID/capture-browser",
"version": "1.1.0",
"version": "1.1.1",
"scripts": {
"build": "pnpm run create-npm",
"clean": "rimraf .turbo types dist publish-dir public *.tsbuildinfo",
Expand Down Expand Up @@ -39,7 +39,7 @@
"@mb/utils": "workspace:*",
"@microsoft/api-extractor": "^7.38.0",
"@types/emscripten": "^1.39.9",
"capture-main": "1.0.7",
"capture-main": "workspace:*",
"capture-wasm": "workspace:*",
"capture-worker": "workspace:*",
"comlink": "^4.4.1",
Expand Down
Binary file modified packages/capture-wasm/dist/advanced-threads/capture-wasm.wasm
Binary file not shown.
Binary file modified packages/capture-wasm/dist/advanced/capture-wasm.wasm
Binary file not shown.
Binary file modified packages/capture-wasm/dist/basic/capture-wasm.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/capture-worker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# capture-worker

## 1.1.1

### Patch Changes

- f70472b: Removed the use of `data:` protocols when loading cross-origin workers. Will only use the `blob:` to be more flexible with different CSPs.

## 1.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/capture-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "capture-worker",
"description": "",
"private": true,
"version": "1.0.7",
"version": "1.1.1",
"scripts": {
"build": "concurrently pnpm:build:js pnpm:build:types",
"build:dev": "concurrently pnpm:build:js-dev pnpm:build:types",
Expand Down
9 changes: 5 additions & 4 deletions packages/capture-worker/src/getCrossOriginWorkerURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ export const getCrossOriginWorkerURL = (
const workerPath = new URL(originalWorkerUrl).href.split("/");
workerPath.pop();

let finalURL = `data:${type},` + encodeURIComponent(codeString);
let finalURL = "";

if (options.useBlob) {
finalURL = URL.createObjectURL(
new Blob([`importScripts("${finalURL}")`], { type }),
);
const blob = new Blob([codeString], { type });
finalURL = URL.createObjectURL(blob);
} else {
finalURL = `data:${type},` + encodeURIComponent(codeString);
}

resolve(finalURL);
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 353fc58

Please sign in to comment.