Skip to content

Commit

Permalink
fix error that excel.js is not decoded when running as remote jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
Junhui Tong committed Jul 25, 2024
1 parent e69ff15 commit 9665b2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions excel_tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// - Need to create child process, make it a little bit complex

import staticAssets from './static_assets.json' with { type: "json" }
import * as enc from 'jsr:@std/[email protected]'
import {debug} from './debug.ts'

let scriptProcess: Deno.ChildProcess | null = null
Expand All @@ -16,8 +17,8 @@ function launchScript() {
Deno.statSync(scriptFile)
} catch (_e) {
scriptFile = Deno.env.get('TEMP') + '\\excel.js'
const content = staticAssets['excel.js']
Deno.writeTextFileSync(scriptFile, content)
const content = enc.decodeBase64(staticAssets['excel.js'])
Deno.writeTextFileSync(scriptFile, new TextDecoder().decode(content))
}
const cmd = new Deno.Command('cscript.exe', {
args: ['//nologo', scriptFile],
Expand Down
1 change: 1 addition & 0 deletions frontend/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ function getUsage() {
1. Click "Launch Excel to open file", Excel window will open. <br>
2. Then open your file in Excel. <br>
3. Locate to any cell, you will see full row data below. <br>
4. In the review pane, you can navigate to previous/next row, pick a "review column" and change the value with predefined value. <br>
<br>
<b>Note:</b><br>
The window might be flashing on taskbar instead of showing up, just click on the flashing icon to bring it up. <br>
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@timepp/ev",
"version": "0.1.12",
"version": "0.1.13",
"exports": "./launch.ts"
}

0 comments on commit 9665b2e

Please sign in to comment.