-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix error that excel.js is not decoded when running as remote jsr
- Loading branch information
Junhui Tong
committed
Jul 25, 2024
1 parent
e69ff15
commit 9665b2e
Showing
3 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |