fix: exec_sdk_inception now properly executes SDK file instead of path as code
This commit is contained in:
parent
b3c3957346
commit
3acc781016
13 changed files with 16 additions and 15 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
4.2.16
|
||||
4.2.17
|
||||
|
|
|
|||
|
|
@ -6013,7 +6013,7 @@ void print_usage(const char *prog) {
|
|||
* ============================================================================ */
|
||||
|
||||
const char *unsandbox_version(void) {
|
||||
return "4.2.16";
|
||||
return "4.2.17";
|
||||
}
|
||||
|
||||
const char *unsandbox_detect_language(const char *filename) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
* </ol>
|
||||
*
|
||||
* @author Permacomputer Project
|
||||
* @version 4.2.16
|
||||
* @version 4.2.17
|
||||
*/
|
||||
|
||||
import javax.crypto.Mac
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "un-async",
|
||||
"version": "4.2.16",
|
||||
"version": "4.2.17",
|
||||
"description": "Unsandbox async JavaScript SDK - Execute code in 50+ languages",
|
||||
"main": "src/un_async.js",
|
||||
"type": "module",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "un-sync",
|
||||
"version": "4.2.16",
|
||||
"version": "4.2.17",
|
||||
"description": "unsandbox.com JavaScript SDK (Isomorphic - Node.js + Browser)",
|
||||
"type": "module",
|
||||
"main": "src/un.js",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ local ltn12 = require("ltn12")
|
|||
|
||||
local Un = {}
|
||||
Un.API_BASE = "https://api.unsandbox.com"
|
||||
Un.VERSION = "4.2.16"
|
||||
Un.VERSION = "4.2.17"
|
||||
|
||||
-- Credential loading
|
||||
function Un.load_accounts_csv(path)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ use Digest::HMAC_SHA256 qw(hmac_sha256_hex);
|
|||
use File::HomeDir;
|
||||
use Time::HiRes qw(time sleep);
|
||||
|
||||
our $VERSION = "4.2.16";
|
||||
our $VERSION = "4.2.17";
|
||||
our $API_BASE = 'https://api.unsandbox.com';
|
||||
|
||||
# Credential system
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from setuptools import setup, find_packages
|
|||
|
||||
setup(
|
||||
name="unsandbox-async",
|
||||
version="4.2.16",
|
||||
version="4.2.17",
|
||||
description="Asynchronous Python SDK for unsandbox.com code execution",
|
||||
long_description=open("README.md").read() if False else "Async Python SDK for unsandbox code execution",
|
||||
author="unsandbox.com",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|||
|
||||
setup(
|
||||
name="unsandbox",
|
||||
version="4.2.16",
|
||||
version="4.2.17",
|
||||
author="Unsandbox",
|
||||
description="Synchronous Python SDK for unsandbox.com code execution",
|
||||
long_description=long_description,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ from .un import (
|
|||
CredentialsError,
|
||||
)
|
||||
|
||||
__version__ = "4.2.16"
|
||||
__version__ = "4.2.17"
|
||||
__all__ = [
|
||||
"execute_code",
|
||||
"execute_async",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[package]
|
||||
name = "un-async"
|
||||
version = "4.2.16"
|
||||
version = "4.2.17"
|
||||
edition = "2021"
|
||||
authors = ["unsandbox.com"]
|
||||
description = "Asynchronous Rust SDK for unsandbox.com secure code execution API"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[package]
|
||||
name = "un-sync"
|
||||
version = "4.2.16"
|
||||
version = "4.2.17"
|
||||
edition = "2021"
|
||||
authors = ["unsandbox.com"]
|
||||
description = "Synchronous Rust SDK for unsandbox.com secure code execution API"
|
||||
|
|
|
|||
|
|
@ -284,10 +284,11 @@ run_test "exec_network" \
|
|||
"network-ok"
|
||||
|
||||
# Test 1.5: Execute SDK file in sandbox (inception)
|
||||
# Note: May fail with syntax errors due to shebangs/imports - that's ok
|
||||
# Runs the SDK file inside unsandbox - tests that the interpreter can load/parse the SDK
|
||||
# Expected: help/usage output, or interpreter errors (all acceptable)
|
||||
run_test "exec_sdk_inception" \
|
||||
"build/un -n semitrusted -e UNSANDBOX_PUBLIC_KEY=\$UNSANDBOX_PUBLIC_KEY -e UNSANDBOX_SECRET_KEY=\$UNSANDBOX_SECRET_KEY -s '$LANG' '$SDK_FILE' 2>&1 || echo 'attempted'" \
|
||||
"usage|help|unsandbox|error|Error|syntax|unexpected|import|require|module|attempted|Illegal|division|Exception|Property|Method|Compilation|expected|package|found"
|
||||
"build/un -n semitrusted -e UNSANDBOX_PUBLIC_KEY=\$UNSANDBOX_PUBLIC_KEY -e UNSANDBOX_SECRET_KEY=\$UNSANDBOX_SECRET_KEY '$SDK_FILE' 2>&1 || echo 'attempted'" \
|
||||
"usage|help|unsandbox|Usage|error|Error|attempted"
|
||||
|
||||
echo ""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue