@aml-org/amf-custom-validator 1.8.0-SNAPSHOT.4 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,77 @@
1
+ interface ReportConfiguration {
2
+ IncludeReportCreationTime: boolean;
3
+ ReportSchemaIri: string;
4
+ LexicalSchemaIri: string;
5
+ BaseIri?: string;
6
+ }
7
+ interface ValidateOptions {
8
+ debug?: boolean;
9
+ reportConfig?: ReportConfiguration | null;
10
+ }
11
+ interface WasmExports {
12
+ memory: WebAssembly.Memory;
13
+ acv_malloc(size: number): number;
14
+ acv_free(ptr: number): void;
15
+ acv_validate(profilePtr: number, profileLen: number, dataPtr: number, dataLen: number, debug: number): bigint;
16
+ acv_validate_with_configuration(profilePtr: number, profileLen: number, dataPtr: number, dataLen: number, debug: number, cfgPtr: number, cfgLen: number): bigint;
17
+ acv_generate_rego(profilePtr: number, profileLen: number): bigint;
18
+ acv_normalize_input(dataPtr: number, dataLen: number): bigint;
19
+ acv_compile_profile(profilePtr: number, profileLen: number): number;
20
+ acv_validate_compiled(handle: number, dataPtr: number, dataLen: number, debug: number): bigint;
21
+ acv_validate_compiled_with_configuration(handle: number, dataPtr: number, dataLen: number, debug: number, cfgPtr: number, cfgLen: number): bigint;
22
+ acv_release_profile(handle: number): void;
23
+ acv_last_error(): bigint;
24
+ }
25
+
26
+ declare class CustomValidator {
27
+ private exports;
28
+ constructor(exports: WasmExports);
29
+ validateCustomProfile(profile: string, data: string, debug?: boolean): string;
30
+ validateWithReportConfiguration(profile: string, data: string, debug: boolean, reportConfig: ReportConfiguration | null | undefined): string;
31
+ generateRego(profile: string): string;
32
+ normalizeInput(data: string): string;
33
+ /**
34
+ * Compiles a profile into a handle consumers can re-use against many
35
+ * payloads. ~13× faster than validateCustomProfile per-call when the
36
+ * same profile is validated repeatedly.
37
+ *
38
+ * The consumer owns the returned handle's lifetime: call release() (or
39
+ * use `using` with Symbol.dispose) to free it. validator.exit() does NOT
40
+ * release outstanding profiles because the consumer may still hold
41
+ * references.
42
+ */
43
+ compileProfile(profile: string): CompiledProfile;
44
+ exit(): void;
45
+ /** @internal */
46
+ _validateCompiled(handle: number, data: string, options: ValidateOptions): string;
47
+ /** @internal */
48
+ _releaseProfile(handle: number): void;
49
+ private readLastError;
50
+ private requireExports;
51
+ private writeString;
52
+ private readResult;
53
+ private free;
54
+ }
55
+ /**
56
+ * Opaque handle to a compiled profile. Call validate() to evaluate data
57
+ * against it; call release() (or use `using`) when done to free the Go-side
58
+ * resources. Never share a handle across validators — handles are indexed
59
+ * into one specific WASM instance's handle table and would read garbage
60
+ * in another.
61
+ */
62
+ declare class CompiledProfile {
63
+ private readonly validator;
64
+ readonly handle: number;
65
+ private released;
66
+ constructor(validator: CustomValidator, handle: number);
67
+ validate(data: string, options?: ValidateOptions | boolean): string;
68
+ release(): void;
69
+ [Symbol.dispose](): void;
70
+ }
71
+
72
+ declare class CustomValidatorFactory {
73
+ static create(): Promise<CustomValidator>;
74
+ }
75
+
76
+ export { CompiledProfile, CustomValidator, CustomValidatorFactory };
77
+ export type { ReportConfiguration, ValidateOptions };
@@ -0,0 +1,231 @@
1
+ const CLOCKID_REALTIME=0;const CLOCKID_MONOTONIC=1;const ERRNO_SUCCESS=0;const ERRNO_BADF=8;const ERRNO_INVAL=28;const ERRNO_NAMETOOLONG=37;const ERRNO_NOSYS=52;const ERRNO_NOTDIR=54;const ERRNO_NOTSUP=58;const RIGHTS_FD_WRITE=1<<6;class Iovec{static read_bytes(view,ptr){const iovec=new Iovec;iovec.buf=view.getUint32(ptr,true);iovec.buf_len=view.getUint32(ptr+4,true);return iovec}static read_bytes_array(view,ptr,len){const iovecs=[];for(let i=0;i<len;i++){iovecs.push(Iovec.read_bytes(view,ptr+8*i));}return iovecs}}class Ciovec{static read_bytes(view,ptr){const iovec=new Ciovec;iovec.buf=view.getUint32(ptr,true);iovec.buf_len=view.getUint32(ptr+4,true);return iovec}static read_bytes_array(view,ptr,len){const iovecs=[];for(let i=0;i<len;i++){iovecs.push(Ciovec.read_bytes(view,ptr+8*i));}return iovecs}}const FILETYPE_CHARACTER_DEVICE=2;class Fdstat{write_bytes(view,ptr){view.setUint8(ptr,this.fs_filetype);view.setUint16(ptr+2,this.fs_flags,true);view.setBigUint64(ptr+8,this.fs_rights_base,true);view.setBigUint64(ptr+16,this.fs_rights_inherited,true);}constructor(filetype,flags){this.fs_rights_base=0n;this.fs_rights_inherited=0n;this.fs_filetype=filetype;this.fs_flags=flags;}}class Filestat{write_bytes(view,ptr){view.setBigUint64(ptr,this.dev,true);view.setBigUint64(ptr+8,this.ino,true);view.setUint8(ptr+16,this.filetype);view.setBigUint64(ptr+24,this.nlink,true);view.setBigUint64(ptr+32,this.size,true);view.setBigUint64(ptr+38,this.atim,true);view.setBigUint64(ptr+46,this.mtim,true);view.setBigUint64(ptr+52,this.ctim,true);}constructor(ino,filetype,size){this.dev=0n;this.nlink=0n;this.atim=0n;this.mtim=0n;this.ctim=0n;this.ino=ino;this.filetype=filetype;this.size=size;}}const EVENTTYPE_CLOCK=0;const SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME=1<<0;class Subscription{static read_bytes(view,ptr){return new Subscription(view.getBigUint64(ptr,true),view.getUint8(ptr+8),view.getUint32(ptr+16,true),view.getBigUint64(ptr+24,true),view.getUint16(ptr+36,true))}constructor(userdata,eventtype,clockid,timeout,flags){this.userdata=userdata;this.eventtype=eventtype;this.clockid=clockid;this.timeout=timeout;this.flags=flags;}}class Event{write_bytes(view,ptr){view.setBigUint64(ptr,this.userdata,true);view.setUint16(ptr+8,this.error,true);view.setUint8(ptr+10,this.eventtype);}constructor(userdata,error,eventtype){this.userdata=userdata;this.error=error;this.eventtype=eventtype;}}
2
+
3
+ let Debug=class Debug{enable(enabled){this.log=createLogger(enabled===undefined?true:enabled,this.prefix);}get enabled(){return this.isEnabled}constructor(isEnabled){this.isEnabled=isEnabled;this.prefix="wasi:";this.enable(isEnabled);}};function createLogger(enabled,prefix){if(enabled){const a=console.log.bind(console,"%c%s","color: #265BA0",prefix);return a}else {return ()=>{}}}const debug=new Debug(false);
4
+
5
+ class WASIProcExit extends Error{constructor(code){super("exit with exit code "+code);this.code=code;}}let WASI=class WASI{start(instance){this.inst=instance;try{instance.exports._start();return 0}catch(e){if(e instanceof WASIProcExit){return e.code}else {throw e}}}initialize(instance){this.inst=instance;if(instance.exports._initialize){instance.exports._initialize();}}constructor(args,env,fds,options={}){this.args=[];this.env=[];this.fds=[];debug.enable(options.debug);this.args=args;this.env=env;this.fds=fds;const self=this;this.wasiImport={args_sizes_get(argc,argv_buf_size){const buffer=new DataView(self.inst.exports.memory.buffer);buffer.setUint32(argc,self.args.length,true);let buf_size=0;for(const arg of self.args){buf_size+=arg.length+1;}buffer.setUint32(argv_buf_size,buf_size,true);debug.log(buffer.getUint32(argc,true),buffer.getUint32(argv_buf_size,true));return 0},args_get(argv,argv_buf){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);const orig_argv_buf=argv_buf;for(let i=0;i<self.args.length;i++){buffer.setUint32(argv,argv_buf,true);argv+=4;const arg=new TextEncoder().encode(self.args[i]);buffer8.set(arg,argv_buf);buffer.setUint8(argv_buf+arg.length,0);argv_buf+=arg.length+1;}if(debug.enabled){debug.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_argv_buf,argv_buf)));}return 0},environ_sizes_get(environ_count,environ_size){const buffer=new DataView(self.inst.exports.memory.buffer);buffer.setUint32(environ_count,self.env.length,true);let buf_size=0;for(const environ of self.env){buf_size+=new TextEncoder().encode(environ).length+1;}buffer.setUint32(environ_size,buf_size,true);debug.log(buffer.getUint32(environ_count,true),buffer.getUint32(environ_size,true));return 0},environ_get(environ,environ_buf){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);const orig_environ_buf=environ_buf;for(let i=0;i<self.env.length;i++){buffer.setUint32(environ,environ_buf,true);environ+=4;const e=new TextEncoder().encode(self.env[i]);buffer8.set(e,environ_buf);buffer.setUint8(environ_buf+e.length,0);environ_buf+=e.length+1;}if(debug.enabled){debug.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_environ_buf,environ_buf)));}return 0},clock_res_get(id,res_ptr){let resolutionValue;switch(id){case CLOCKID_MONOTONIC:{resolutionValue=5000n;break}case CLOCKID_REALTIME:{resolutionValue=1000000n;break}default:return ERRNO_NOSYS}const view=new DataView(self.inst.exports.memory.buffer);view.setBigUint64(res_ptr,resolutionValue,true);return ERRNO_SUCCESS},clock_time_get(id,precision,time){const buffer=new DataView(self.inst.exports.memory.buffer);if(id===CLOCKID_REALTIME){buffer.setBigUint64(time,BigInt(new Date().getTime())*1000000n,true);}else if(id==CLOCKID_MONOTONIC){let monotonic_time;try{monotonic_time=BigInt(Math.round(performance.now()*1e6));}catch(e){monotonic_time=0n;}buffer.setBigUint64(time,monotonic_time,true);}else {buffer.setBigUint64(time,0n,true);}return 0},fd_advise(fd,offset,len,advice){if(self.fds[fd]!=undefined){return ERRNO_SUCCESS}else {return ERRNO_BADF}},fd_allocate(fd,offset,len){if(self.fds[fd]!=undefined){return self.fds[fd].fd_allocate(offset,len)}else {return ERRNO_BADF}},fd_close(fd){if(self.fds[fd]!=undefined){const ret=self.fds[fd].fd_close();self.fds[fd]=undefined;return ret}else {return ERRNO_BADF}},fd_datasync(fd){if(self.fds[fd]!=undefined){return self.fds[fd].fd_sync()}else {return ERRNO_BADF}},fd_fdstat_get(fd,fdstat_ptr){if(self.fds[fd]!=undefined){const{ret,fdstat}=self.fds[fd].fd_fdstat_get();if(fdstat!=null){fdstat.write_bytes(new DataView(self.inst.exports.memory.buffer),fdstat_ptr);}return ret}else {return ERRNO_BADF}},fd_fdstat_set_flags(fd,flags){if(self.fds[fd]!=undefined){return self.fds[fd].fd_fdstat_set_flags(flags)}else {return ERRNO_BADF}},fd_fdstat_set_rights(fd,fs_rights_base,fs_rights_inheriting){if(self.fds[fd]!=undefined){return self.fds[fd].fd_fdstat_set_rights(fs_rights_base,fs_rights_inheriting)}else {return ERRNO_BADF}},fd_filestat_get(fd,filestat_ptr){if(self.fds[fd]!=undefined){const{ret,filestat}=self.fds[fd].fd_filestat_get();if(filestat!=null){filestat.write_bytes(new DataView(self.inst.exports.memory.buffer),filestat_ptr);}return ret}else {return ERRNO_BADF}},fd_filestat_set_size(fd,size){if(self.fds[fd]!=undefined){return self.fds[fd].fd_filestat_set_size(size)}else {return ERRNO_BADF}},fd_filestat_set_times(fd,atim,mtim,fst_flags){if(self.fds[fd]!=undefined){return self.fds[fd].fd_filestat_set_times(atim,mtim,fst_flags)}else {return ERRNO_BADF}},fd_pread(fd,iovs_ptr,iovs_len,offset,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=Iovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nread=0;for(const iovec of iovecs){const{ret,data}=self.fds[fd].fd_pread(iovec.buf_len,offset);if(ret!=ERRNO_SUCCESS){buffer.setUint32(nread_ptr,nread,true);return ret}buffer8.set(data,iovec.buf);nread+=data.length;offset+=BigInt(data.length);if(data.length!=iovec.buf_len){break}}buffer.setUint32(nread_ptr,nread,true);return ERRNO_SUCCESS}else {return ERRNO_BADF}},fd_prestat_get(fd,buf_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,prestat}=self.fds[fd].fd_prestat_get();if(prestat!=null){prestat.write_bytes(buffer,buf_ptr);}return ret}else {return ERRNO_BADF}},fd_prestat_dir_name(fd,path_ptr,path_len){if(self.fds[fd]!=undefined){const{ret,prestat}=self.fds[fd].fd_prestat_get();if(prestat==null){return ret}const prestat_dir_name=prestat.inner.pr_name;const buffer8=new Uint8Array(self.inst.exports.memory.buffer);buffer8.set(prestat_dir_name.slice(0,path_len),path_ptr);return prestat_dir_name.byteLength>path_len?ERRNO_NAMETOOLONG:ERRNO_SUCCESS}else {return ERRNO_BADF}},fd_pwrite(fd,iovs_ptr,iovs_len,offset,nwritten_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=Ciovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nwritten=0;for(const iovec of iovecs){const data=buffer8.slice(iovec.buf,iovec.buf+iovec.buf_len);const{ret,nwritten:nwritten_part}=self.fds[fd].fd_pwrite(data,offset);if(ret!=ERRNO_SUCCESS){buffer.setUint32(nwritten_ptr,nwritten,true);return ret}nwritten+=nwritten_part;offset+=BigInt(nwritten_part);if(nwritten_part!=data.byteLength){break}}buffer.setUint32(nwritten_ptr,nwritten,true);return ERRNO_SUCCESS}else {return ERRNO_BADF}},fd_read(fd,iovs_ptr,iovs_len,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=Iovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nread=0;for(const iovec of iovecs){const{ret,data}=self.fds[fd].fd_read(iovec.buf_len);if(ret!=ERRNO_SUCCESS){buffer.setUint32(nread_ptr,nread,true);return ret}buffer8.set(data,iovec.buf);nread+=data.length;if(data.length!=iovec.buf_len){break}}buffer.setUint32(nread_ptr,nread,true);return ERRNO_SUCCESS}else {return ERRNO_BADF}},fd_readdir(fd,buf,buf_len,cookie,bufused_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){let bufused=0;while(true){const{ret,dirent}=self.fds[fd].fd_readdir_single(cookie);if(ret!=0){buffer.setUint32(bufused_ptr,bufused,true);return ret}if(dirent==null){break}if(buf_len-bufused<dirent.head_length()){bufused=buf_len;break}const head_bytes=new ArrayBuffer(dirent.head_length());dirent.write_head_bytes(new DataView(head_bytes),0);buffer8.set(new Uint8Array(head_bytes).slice(0,Math.min(head_bytes.byteLength,buf_len-bufused)),buf);buf+=dirent.head_length();bufused+=dirent.head_length();if(buf_len-bufused<dirent.name_length()){bufused=buf_len;break}dirent.write_name_bytes(buffer8,buf,buf_len-bufused);buf+=dirent.name_length();bufused+=dirent.name_length();cookie=dirent.d_next;}buffer.setUint32(bufused_ptr,bufused,true);return 0}else {return ERRNO_BADF}},fd_renumber(fd,to){if(self.fds[fd]!=undefined&&self.fds[to]!=undefined){const ret=self.fds[to].fd_close();if(ret!=0){return ret}self.fds[to]=self.fds[fd];self.fds[fd]=undefined;return 0}else {return ERRNO_BADF}},fd_seek(fd,offset,whence,offset_out_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,offset:offset_out}=self.fds[fd].fd_seek(offset,whence);buffer.setBigInt64(offset_out_ptr,offset_out,true);return ret}else {return ERRNO_BADF}},fd_sync(fd){if(self.fds[fd]!=undefined){return self.fds[fd].fd_sync()}else {return ERRNO_BADF}},fd_tell(fd,offset_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,offset}=self.fds[fd].fd_tell();buffer.setBigUint64(offset_ptr,offset,true);return ret}else {return ERRNO_BADF}},fd_write(fd,iovs_ptr,iovs_len,nwritten_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=Ciovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nwritten=0;for(const iovec of iovecs){const data=buffer8.slice(iovec.buf,iovec.buf+iovec.buf_len);const{ret,nwritten:nwritten_part}=self.fds[fd].fd_write(data);if(ret!=ERRNO_SUCCESS){buffer.setUint32(nwritten_ptr,nwritten,true);return ret}nwritten+=nwritten_part;if(nwritten_part!=data.byteLength){break}}buffer.setUint32(nwritten_ptr,nwritten,true);return ERRNO_SUCCESS}else {return ERRNO_BADF}},path_create_directory(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_create_directory(path)}else {return ERRNO_BADF}},path_filestat_get(fd,flags,path_ptr,path_len,filestat_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));const{ret,filestat}=self.fds[fd].path_filestat_get(flags,path);if(filestat!=null){filestat.write_bytes(buffer,filestat_ptr);}return ret}else {return ERRNO_BADF}},path_filestat_set_times(fd,flags,path_ptr,path_len,atim,mtim,fst_flags){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_filestat_set_times(flags,path,atim,mtim,fst_flags)}else {return ERRNO_BADF}},path_link(old_fd,old_flags,old_path_ptr,old_path_len,new_fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[old_fd]!=undefined&&self.fds[new_fd]!=undefined){const old_path=new TextDecoder("utf-8").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));const new_path=new TextDecoder("utf-8").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));const{ret,inode_obj}=self.fds[old_fd].path_lookup(old_path,old_flags);if(inode_obj==null){return ret}return self.fds[new_fd].path_link(new_path,inode_obj,false)}else {return ERRNO_BADF}},path_open(fd,dirflags,path_ptr,path_len,oflags,fs_rights_base,fs_rights_inheriting,fd_flags,opened_fd_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));debug.log(path);const{ret,fd_obj}=self.fds[fd].path_open(dirflags,path,oflags,fs_rights_base,fs_rights_inheriting,fd_flags);if(ret!=0){return ret}self.fds.push(fd_obj);const opened_fd=self.fds.length-1;buffer.setUint32(opened_fd_ptr,opened_fd,true);return 0}else {return ERRNO_BADF}},path_readlink(fd,path_ptr,path_len,buf_ptr,buf_len,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));debug.log(path);const{ret,data}=self.fds[fd].path_readlink(path);if(data!=null){const data_buf=new TextEncoder().encode(data);if(data_buf.length>buf_len){buffer.setUint32(nread_ptr,0,true);return ERRNO_BADF}buffer8.set(data_buf,buf_ptr);buffer.setUint32(nread_ptr,data_buf.length,true);}return ret}else {return ERRNO_BADF}},path_remove_directory(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_remove_directory(path)}else {return ERRNO_BADF}},path_rename(fd,old_path_ptr,old_path_len,new_fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined&&self.fds[new_fd]!=undefined){const old_path=new TextDecoder("utf-8").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));const new_path=new TextDecoder("utf-8").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));let{ret,inode_obj}=self.fds[fd].path_unlink(old_path);if(inode_obj==null){return ret}ret=self.fds[new_fd].path_link(new_path,inode_obj,true);if(ret!=ERRNO_SUCCESS){if(self.fds[fd].path_link(old_path,inode_obj,true)!=ERRNO_SUCCESS){throw "path_link should always return success when relinking an inode back to the original place"}}return ret}else {return ERRNO_BADF}},path_symlink(old_path_ptr,old_path_len,fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){new TextDecoder("utf-8").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));new TextDecoder("utf-8").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));return ERRNO_NOTSUP}else {return ERRNO_BADF}},path_unlink_file(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder("utf-8").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_unlink_file(path)}else {return ERRNO_BADF}},poll_oneoff(in_ptr,out_ptr,nsubscriptions){if(nsubscriptions===0){return ERRNO_INVAL}if(nsubscriptions>1){debug.log("poll_oneoff: only a single subscription is supported");return ERRNO_NOTSUP}const buffer=new DataView(self.inst.exports.memory.buffer);const s=Subscription.read_bytes(buffer,in_ptr);const eventtype=s.eventtype;const clockid=s.clockid;const timeout=s.timeout;if(eventtype!==EVENTTYPE_CLOCK){debug.log("poll_oneoff: only clock subscriptions are supported");return ERRNO_NOTSUP}let getNow=undefined;if(clockid===CLOCKID_MONOTONIC){getNow=()=>BigInt(Math.round(performance.now()*1e6));}else if(clockid===CLOCKID_REALTIME){getNow=()=>BigInt(new Date().getTime())*1000000n;}else {return ERRNO_INVAL}const endTime=(s.flags&SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME)!==0?timeout:getNow()+timeout;while(endTime>getNow()){}const event=new Event(s.userdata,ERRNO_SUCCESS,eventtype);event.write_bytes(buffer,out_ptr);return ERRNO_SUCCESS},proc_exit(exit_code){throw new WASIProcExit(exit_code)},proc_raise(sig){throw "raised signal "+sig},sched_yield(){},random_get(buf,buf_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer).subarray(buf,buf+buf_len);if("crypto"in globalThis&&(typeof SharedArrayBuffer==="undefined"||!(self.inst.exports.memory.buffer instanceof SharedArrayBuffer))){for(let i=0;i<buf_len;i+=65536){crypto.getRandomValues(buffer8.subarray(i,i+65536));}}else {for(let i=0;i<buf_len;i++){buffer8[i]=Math.random()*256|0;}}},sock_recv(fd,ri_data,ri_flags){throw "sockets not supported"},sock_send(fd,si_data,si_flags){throw "sockets not supported"},sock_shutdown(fd,how){throw "sockets not supported"},sock_accept(fd,flags){throw "sockets not supported"}};}};
6
+
7
+ class Fd{fd_allocate(offset,len){return ERRNO_NOTSUP}fd_close(){return 0}fd_fdstat_get(){return {ret:ERRNO_NOTSUP,fdstat:null}}fd_fdstat_set_flags(flags){return ERRNO_NOTSUP}fd_fdstat_set_rights(fs_rights_base,fs_rights_inheriting){return ERRNO_NOTSUP}fd_filestat_get(){return {ret:ERRNO_NOTSUP,filestat:null}}fd_filestat_set_size(size){return ERRNO_NOTSUP}fd_filestat_set_times(atim,mtim,fst_flags){return ERRNO_NOTSUP}fd_pread(size,offset){return {ret:ERRNO_NOTSUP,data:new Uint8Array}}fd_prestat_get(){return {ret:ERRNO_NOTSUP,prestat:null}}fd_pwrite(data,offset){return {ret:ERRNO_NOTSUP,nwritten:0}}fd_read(size){return {ret:ERRNO_NOTSUP,data:new Uint8Array}}fd_readdir_single(cookie){return {ret:ERRNO_NOTSUP,dirent:null}}fd_seek(offset,whence){return {ret:ERRNO_NOTSUP,offset:0n}}fd_sync(){return 0}fd_tell(){return {ret:ERRNO_NOTSUP,offset:0n}}fd_write(data){return {ret:ERRNO_NOTSUP,nwritten:0}}path_create_directory(path){return ERRNO_NOTSUP}path_filestat_get(flags,path){return {ret:ERRNO_NOTSUP,filestat:null}}path_filestat_set_times(flags,path,atim,mtim,fst_flags){return ERRNO_NOTSUP}path_link(path,inode,allow_dir){return ERRNO_NOTSUP}path_unlink(path){return {ret:ERRNO_NOTSUP,inode_obj:null}}path_lookup(path,dirflags){return {ret:ERRNO_NOTSUP,inode_obj:null}}path_open(dirflags,path,oflags,fs_rights_base,fs_rights_inheriting,fd_flags){return {ret:ERRNO_NOTDIR,fd_obj:null}}path_readlink(path){return {ret:ERRNO_NOTSUP,data:null}}path_remove_directory(path){return ERRNO_NOTSUP}path_rename(old_path,new_fd,new_path){return ERRNO_NOTSUP}path_unlink_file(path){return ERRNO_NOTSUP}}class Inode{static issue_ino(){return Inode.next_ino++}static root_ino(){return 0n}constructor(){this.ino=Inode.issue_ino();}}Inode.next_ino=1n;
8
+
9
+ class ConsoleStdout extends Fd{fd_filestat_get(){const filestat=new Filestat(this.ino,FILETYPE_CHARACTER_DEVICE,BigInt(0));return {ret:0,filestat}}fd_fdstat_get(){const fdstat=new Fdstat(FILETYPE_CHARACTER_DEVICE,0);fdstat.fs_rights_base=BigInt(RIGHTS_FD_WRITE);return {ret:0,fdstat}}fd_write(data){this.write(data);return {ret:0,nwritten:data.byteLength}}static lineBuffered(write){const dec=new TextDecoder("utf-8",{fatal:false});let line_buf="";return new ConsoleStdout(buffer=>{line_buf+=dec.decode(buffer,{stream:true});const lines=line_buf.split("\n");for(const[i,line]of lines.entries()){if(i<lines.length-1){write(line);}else {line_buf=line;}}})}constructor(write){super();this.ino=Inode.issue_ino();this.write=write;}}
10
+
11
+ const textEncoder = new TextEncoder();
12
+ const textDecoder = new TextDecoder();
13
+ class CustomValidator {
14
+ exports;
15
+ constructor(exports$1) {
16
+ this.exports = exports$1;
17
+ }
18
+ validateCustomProfile(profile, data, debug = false) {
19
+ const exp = this.requireExports();
20
+ const p = this.writeString(profile);
21
+ const d = this.writeString(data);
22
+ try {
23
+ const packed = exp.acv_validate(p.ptr, p.len, d.ptr, d.len, debug ? 1 : 0);
24
+ return this.readResult(packed);
25
+ }
26
+ finally {
27
+ this.free(p.ptr);
28
+ this.free(d.ptr);
29
+ }
30
+ }
31
+ validateWithReportConfiguration(profile, data, debug, reportConfig) {
32
+ const exp = this.requireExports();
33
+ const p = this.writeString(profile);
34
+ const d = this.writeString(data);
35
+ const cfg = this.writeString(reportConfig == null ? "" : JSON.stringify(reportConfig));
36
+ try {
37
+ const packed = exp.acv_validate_with_configuration(p.ptr, p.len, d.ptr, d.len, debug ? 1 : 0, cfg.ptr, cfg.len);
38
+ return this.readResult(packed);
39
+ }
40
+ finally {
41
+ this.free(p.ptr);
42
+ this.free(d.ptr);
43
+ this.free(cfg.ptr);
44
+ }
45
+ }
46
+ generateRego(profile) {
47
+ const exp = this.requireExports();
48
+ const p = this.writeString(profile);
49
+ try {
50
+ return this.readResult(exp.acv_generate_rego(p.ptr, p.len));
51
+ }
52
+ finally {
53
+ this.free(p.ptr);
54
+ }
55
+ }
56
+ normalizeInput(data) {
57
+ const exp = this.requireExports();
58
+ const d = this.writeString(data);
59
+ try {
60
+ return this.readResult(exp.acv_normalize_input(d.ptr, d.len));
61
+ }
62
+ finally {
63
+ this.free(d.ptr);
64
+ }
65
+ }
66
+ /**
67
+ * Compiles a profile into a handle consumers can re-use against many
68
+ * payloads. ~13× faster than validateCustomProfile per-call when the
69
+ * same profile is validated repeatedly.
70
+ *
71
+ * The consumer owns the returned handle's lifetime: call release() (or
72
+ * use `using` with Symbol.dispose) to free it. validator.exit() does NOT
73
+ * release outstanding profiles because the consumer may still hold
74
+ * references.
75
+ */
76
+ compileProfile(profile) {
77
+ const exp = this.requireExports();
78
+ const p = this.writeString(profile);
79
+ try {
80
+ const handle = exp.acv_compile_profile(p.ptr, p.len);
81
+ if (handle === 0)
82
+ throw new Error(this.readLastError());
83
+ return new CompiledProfile(this, handle);
84
+ }
85
+ finally {
86
+ this.free(p.ptr);
87
+ }
88
+ }
89
+ exit() {
90
+ this.exports = null;
91
+ }
92
+ /** @internal */
93
+ _validateCompiled(handle, data, options) {
94
+ const exp = this.requireExports();
95
+ const debug = options.debug ? 1 : 0;
96
+ const d = this.writeString(data);
97
+ try {
98
+ if (options.reportConfig == null) {
99
+ const packed = exp.acv_validate_compiled(handle, d.ptr, d.len, debug);
100
+ if (packed === 0n)
101
+ throw new Error(this.readLastError());
102
+ return this.readResult(packed);
103
+ }
104
+ const cfg = this.writeString(JSON.stringify(options.reportConfig));
105
+ try {
106
+ const packed = exp.acv_validate_compiled_with_configuration(handle, d.ptr, d.len, debug, cfg.ptr, cfg.len);
107
+ if (packed === 0n)
108
+ throw new Error(this.readLastError());
109
+ return this.readResult(packed);
110
+ }
111
+ finally {
112
+ this.free(cfg.ptr);
113
+ }
114
+ }
115
+ finally {
116
+ this.free(d.ptr);
117
+ }
118
+ }
119
+ /** @internal */
120
+ _releaseProfile(handle) {
121
+ if (this.exports !== null)
122
+ this.exports.acv_release_profile(handle);
123
+ }
124
+ readLastError() {
125
+ const exp = this.requireExports();
126
+ return this.readResult(exp.acv_last_error());
127
+ }
128
+ requireExports() {
129
+ if (this.exports === null) {
130
+ throw new Error("Validator has been exited");
131
+ }
132
+ return this.exports;
133
+ }
134
+ writeString(str) {
135
+ const bytes = textEncoder.encode(str);
136
+ if (bytes.length === 0)
137
+ return { ptr: 0, len: 0 };
138
+ const exp = this.requireExports();
139
+ const ptr = exp.acv_malloc(bytes.length);
140
+ new Uint8Array(exp.memory.buffer, ptr, bytes.length).set(bytes);
141
+ return { ptr, len: bytes.length };
142
+ }
143
+ readResult(packed) {
144
+ const big = BigInt.asUintN(64, packed);
145
+ const ptr = Number(big >> 32n);
146
+ const len = Number(big & 0xffffffffn);
147
+ if (len === 0)
148
+ return "";
149
+ const exp = this.requireExports();
150
+ const copy = new Uint8Array(exp.memory.buffer, ptr, len).slice();
151
+ const out = textDecoder.decode(copy);
152
+ exp.acv_free(ptr);
153
+ return out;
154
+ }
155
+ free(ptr) {
156
+ if (ptr !== 0 && this.exports !== null)
157
+ this.exports.acv_free(ptr);
158
+ }
159
+ }
160
+ /**
161
+ * Opaque handle to a compiled profile. Call validate() to evaluate data
162
+ * against it; call release() (or use `using`) when done to free the Go-side
163
+ * resources. Never share a handle across validators — handles are indexed
164
+ * into one specific WASM instance's handle table and would read garbage
165
+ * in another.
166
+ */
167
+ class CompiledProfile {
168
+ validator;
169
+ handle;
170
+ released = false;
171
+ constructor(validator, handle) {
172
+ this.validator = validator;
173
+ this.handle = handle;
174
+ }
175
+ validate(data, options = {}) {
176
+ if (this.released)
177
+ throw new Error("CompiledProfile has been released");
178
+ const opts = typeof options === "boolean" ? { debug: options } : options;
179
+ return this.validator._validateCompiled(this.handle, data, opts);
180
+ }
181
+ release() {
182
+ if (this.released)
183
+ return;
184
+ this.released = true;
185
+ this.validator._releaseProfile(this.handle);
186
+ }
187
+ [Symbol.dispose]() {
188
+ this.release();
189
+ }
190
+ }
191
+
192
+ // WASM URL is resolved relative to this module at build time. Bundlers (webpack,
193
+ // vite, esbuild) recognize `new URL(..., import.meta.url)` and emit the asset.
194
+ // At dev time (unbundled ESM served over HTTP) the URL resolves natively.
195
+ const wasmUrl = new URL("../../lib/main.wasm.gz", import.meta.url);
196
+ let compiledModulePromise = null;
197
+ async function gunzip(response) {
198
+ const ds = new DecompressionStream("gzip");
199
+ const decompressed = response.body.pipeThrough(ds);
200
+ return new Response(decompressed).arrayBuffer();
201
+ }
202
+ function getCompiledModule() {
203
+ if (compiledModulePromise === null) {
204
+ compiledModulePromise = (async () => {
205
+ const resp = await fetch(wasmUrl);
206
+ if (!resp.ok)
207
+ throw new Error(`Failed to fetch WASM at ${wasmUrl}: ${resp.status}`);
208
+ const bytes = await gunzip(resp);
209
+ return WebAssembly.compile(bytes);
210
+ })();
211
+ }
212
+ return compiledModulePromise;
213
+ }
214
+ class CustomValidatorFactory {
215
+ static async create() {
216
+ const stderr = ConsoleStdout.lineBuffered((msg) => console.error("[acv stderr]", msg));
217
+ const stdout = ConsoleStdout.lineBuffered((msg) => console.log("[acv stdout]", msg));
218
+ // WASI stdin, stdout, stderr — the validator doesn't use them for normal
219
+ // operation; stderr receives Go panics if anything goes wrong.
220
+ const wasi = new WASI([], [], [stderr, stdout, stderr]);
221
+ const module = await getCompiledModule();
222
+ const instance = await WebAssembly.instantiate(module, {
223
+ wasi_snapshot_preview1: wasi.wasiImport,
224
+ });
225
+ wasi.initialize(instance);
226
+ return new CustomValidator(instance.exports);
227
+ }
228
+ }
229
+
230
+ export { CompiledProfile, CustomValidator, CustomValidatorFactory };
231
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/@bjorn3/browser_wasi_shim/dist/wasi_defs.js","../../node_modules/@bjorn3/browser_wasi_shim/dist/debug.js","../../node_modules/@bjorn3/browser_wasi_shim/dist/wasi.js","../../node_modules/@bjorn3/browser_wasi_shim/dist/fd.js","../../node_modules/@bjorn3/browser_wasi_shim/dist/fs_mem.js","../../../src/core/validator.ts","../../../src/platforms/browser.ts"],"sourcesContent":["export const FD_STDIN=0;export const FD_STDOUT=1;export const FD_STDERR=2;export const CLOCKID_REALTIME=0;export const CLOCKID_MONOTONIC=1;export const CLOCKID_PROCESS_CPUTIME_ID=2;export const CLOCKID_THREAD_CPUTIME_ID=3;export const ERRNO_SUCCESS=0;export const ERRNO_2BIG=1;export const ERRNO_ACCES=2;export const ERRNO_ADDRINUSE=3;export const ERRNO_ADDRNOTAVAIL=4;export const ERRNO_AFNOSUPPORT=5;export const ERRNO_AGAIN=6;export const ERRNO_ALREADY=7;export const ERRNO_BADF=8;export const ERRNO_BADMSG=9;export const ERRNO_BUSY=10;export const ERRNO_CANCELED=11;export const ERRNO_CHILD=12;export const ERRNO_CONNABORTED=13;export const ERRNO_CONNREFUSED=14;export const ERRNO_CONNRESET=15;export const ERRNO_DEADLK=16;export const ERRNO_DESTADDRREQ=17;export const ERRNO_DOM=18;export const ERRNO_DQUOT=19;export const ERRNO_EXIST=20;export const ERRNO_FAULT=21;export const ERRNO_FBIG=22;export const ERRNO_HOSTUNREACH=23;export const ERRNO_IDRM=24;export const ERRNO_ILSEQ=25;export const ERRNO_INPROGRESS=26;export const ERRNO_INTR=27;export const ERRNO_INVAL=28;export const ERRNO_IO=29;export const ERRNO_ISCONN=30;export const ERRNO_ISDIR=31;export const ERRNO_LOOP=32;export const ERRNO_MFILE=33;export const ERRNO_MLINK=34;export const ERRNO_MSGSIZE=35;export const ERRNO_MULTIHOP=36;export const ERRNO_NAMETOOLONG=37;export const ERRNO_NETDOWN=38;export const ERRNO_NETRESET=39;export const ERRNO_NETUNREACH=40;export const ERRNO_NFILE=41;export const ERRNO_NOBUFS=42;export const ERRNO_NODEV=43;export const ERRNO_NOENT=44;export const ERRNO_NOEXEC=45;export const ERRNO_NOLCK=46;export const ERRNO_NOLINK=47;export const ERRNO_NOMEM=48;export const ERRNO_NOMSG=49;export const ERRNO_NOPROTOOPT=50;export const ERRNO_NOSPC=51;export const ERRNO_NOSYS=52;export const ERRNO_NOTCONN=53;export const ERRNO_NOTDIR=54;export const ERRNO_NOTEMPTY=55;export const ERRNO_NOTRECOVERABLE=56;export const ERRNO_NOTSOCK=57;export const ERRNO_NOTSUP=58;export const ERRNO_NOTTY=59;export const ERRNO_NXIO=60;export const ERRNO_OVERFLOW=61;export const ERRNO_OWNERDEAD=62;export const ERRNO_PERM=63;export const ERRNO_PIPE=64;export const ERRNO_PROTO=65;export const ERRNO_PROTONOSUPPORT=66;export const ERRNO_PROTOTYPE=67;export const ERRNO_RANGE=68;export const ERRNO_ROFS=69;export const ERRNO_SPIPE=70;export const ERRNO_SRCH=71;export const ERRNO_STALE=72;export const ERRNO_TIMEDOUT=73;export const ERRNO_TXTBSY=74;export const ERRNO_XDEV=75;export const ERRNO_NOTCAPABLE=76;export const RIGHTS_FD_DATASYNC=1<<0;export const RIGHTS_FD_READ=1<<1;export const RIGHTS_FD_SEEK=1<<2;export const RIGHTS_FD_FDSTAT_SET_FLAGS=1<<3;export const RIGHTS_FD_SYNC=1<<4;export const RIGHTS_FD_TELL=1<<5;export const RIGHTS_FD_WRITE=1<<6;export const RIGHTS_FD_ADVISE=1<<7;export const RIGHTS_FD_ALLOCATE=1<<8;export const RIGHTS_PATH_CREATE_DIRECTORY=1<<9;export const RIGHTS_PATH_CREATE_FILE=1<<10;export const RIGHTS_PATH_LINK_SOURCE=1<<11;export const RIGHTS_PATH_LINK_TARGET=1<<12;export const RIGHTS_PATH_OPEN=1<<13;export const RIGHTS_FD_READDIR=1<<14;export const RIGHTS_PATH_READLINK=1<<15;export const RIGHTS_PATH_RENAME_SOURCE=1<<16;export const RIGHTS_PATH_RENAME_TARGET=1<<17;export const RIGHTS_PATH_FILESTAT_GET=1<<18;export const RIGHTS_PATH_FILESTAT_SET_SIZE=1<<19;export const RIGHTS_PATH_FILESTAT_SET_TIMES=1<<20;export const RIGHTS_FD_FILESTAT_GET=1<<21;export const RIGHTS_FD_FILESTAT_SET_SIZE=1<<22;export const RIGHTS_FD_FILESTAT_SET_TIMES=1<<23;export const RIGHTS_PATH_SYMLINK=1<<24;export const RIGHTS_PATH_REMOVE_DIRECTORY=1<<25;export const RIGHTS_PATH_UNLINK_FILE=1<<26;export const RIGHTS_POLL_FD_READWRITE=1<<27;export const RIGHTS_SOCK_SHUTDOWN=1<<28;export class Iovec{static read_bytes(view,ptr){const iovec=new Iovec;iovec.buf=view.getUint32(ptr,true);iovec.buf_len=view.getUint32(ptr+4,true);return iovec}static read_bytes_array(view,ptr,len){const iovecs=[];for(let i=0;i<len;i++){iovecs.push(Iovec.read_bytes(view,ptr+8*i))}return iovecs}}export class Ciovec{static read_bytes(view,ptr){const iovec=new Ciovec;iovec.buf=view.getUint32(ptr,true);iovec.buf_len=view.getUint32(ptr+4,true);return iovec}static read_bytes_array(view,ptr,len){const iovecs=[];for(let i=0;i<len;i++){iovecs.push(Ciovec.read_bytes(view,ptr+8*i))}return iovecs}}export const WHENCE_SET=0;export const WHENCE_CUR=1;export const WHENCE_END=2;export const FILETYPE_UNKNOWN=0;export const FILETYPE_BLOCK_DEVICE=1;export const FILETYPE_CHARACTER_DEVICE=2;export const FILETYPE_DIRECTORY=3;export const FILETYPE_REGULAR_FILE=4;export const FILETYPE_SOCKET_DGRAM=5;export const FILETYPE_SOCKET_STREAM=6;export const FILETYPE_SYMBOLIC_LINK=7;export class Dirent{head_length(){return 24}name_length(){return this.dir_name.byteLength}write_head_bytes(view,ptr){view.setBigUint64(ptr,this.d_next,true);view.setBigUint64(ptr+8,this.d_ino,true);view.setUint32(ptr+16,this.dir_name.length,true);view.setUint8(ptr+20,this.d_type)}write_name_bytes(view8,ptr,buf_len){view8.set(this.dir_name.slice(0,Math.min(this.dir_name.byteLength,buf_len)),ptr)}constructor(next_cookie,d_ino,name,type){const encoded_name=new TextEncoder().encode(name);this.d_next=next_cookie;this.d_ino=d_ino;this.d_namlen=encoded_name.byteLength;this.d_type=type;this.dir_name=encoded_name}}export const ADVICE_NORMAL=0;export const ADVICE_SEQUENTIAL=1;export const ADVICE_RANDOM=2;export const ADVICE_WILLNEED=3;export const ADVICE_DONTNEED=4;export const ADVICE_NOREUSE=5;export const FDFLAGS_APPEND=1<<0;export const FDFLAGS_DSYNC=1<<1;export const FDFLAGS_NONBLOCK=1<<2;export const FDFLAGS_RSYNC=1<<3;export const FDFLAGS_SYNC=1<<4;export class Fdstat{write_bytes(view,ptr){view.setUint8(ptr,this.fs_filetype);view.setUint16(ptr+2,this.fs_flags,true);view.setBigUint64(ptr+8,this.fs_rights_base,true);view.setBigUint64(ptr+16,this.fs_rights_inherited,true)}constructor(filetype,flags){this.fs_rights_base=0n;this.fs_rights_inherited=0n;this.fs_filetype=filetype;this.fs_flags=flags}}export const FSTFLAGS_ATIM=1<<0;export const FSTFLAGS_ATIM_NOW=1<<1;export const FSTFLAGS_MTIM=1<<2;export const FSTFLAGS_MTIM_NOW=1<<3;export const OFLAGS_CREAT=1<<0;export const OFLAGS_DIRECTORY=1<<1;export const OFLAGS_EXCL=1<<2;export const OFLAGS_TRUNC=1<<3;export class Filestat{write_bytes(view,ptr){view.setBigUint64(ptr,this.dev,true);view.setBigUint64(ptr+8,this.ino,true);view.setUint8(ptr+16,this.filetype);view.setBigUint64(ptr+24,this.nlink,true);view.setBigUint64(ptr+32,this.size,true);view.setBigUint64(ptr+38,this.atim,true);view.setBigUint64(ptr+46,this.mtim,true);view.setBigUint64(ptr+52,this.ctim,true)}constructor(ino,filetype,size){this.dev=0n;this.nlink=0n;this.atim=0n;this.mtim=0n;this.ctim=0n;this.ino=ino;this.filetype=filetype;this.size=size}}export const EVENTTYPE_CLOCK=0;export const EVENTTYPE_FD_READ=1;export const EVENTTYPE_FD_WRITE=2;export const EVENTRWFLAGS_FD_READWRITE_HANGUP=1<<0;export const SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME=1<<0;export class Subscription{static read_bytes(view,ptr){return new Subscription(view.getBigUint64(ptr,true),view.getUint8(ptr+8),view.getUint32(ptr+16,true),view.getBigUint64(ptr+24,true),view.getUint16(ptr+36,true))}constructor(userdata,eventtype,clockid,timeout,flags){this.userdata=userdata;this.eventtype=eventtype;this.clockid=clockid;this.timeout=timeout;this.flags=flags}}export class Event{write_bytes(view,ptr){view.setBigUint64(ptr,this.userdata,true);view.setUint16(ptr+8,this.error,true);view.setUint8(ptr+10,this.eventtype)}constructor(userdata,error,eventtype){this.userdata=userdata;this.error=error;this.eventtype=eventtype}}export const SIGNAL_NONE=0;export const SIGNAL_HUP=1;export const SIGNAL_INT=2;export const SIGNAL_QUIT=3;export const SIGNAL_ILL=4;export const SIGNAL_TRAP=5;export const SIGNAL_ABRT=6;export const SIGNAL_BUS=7;export const SIGNAL_FPE=8;export const SIGNAL_KILL=9;export const SIGNAL_USR1=10;export const SIGNAL_SEGV=11;export const SIGNAL_USR2=12;export const SIGNAL_PIPE=13;export const SIGNAL_ALRM=14;export const SIGNAL_TERM=15;export const SIGNAL_CHLD=16;export const SIGNAL_CONT=17;export const SIGNAL_STOP=18;export const SIGNAL_TSTP=19;export const SIGNAL_TTIN=20;export const SIGNAL_TTOU=21;export const SIGNAL_URG=22;export const SIGNAL_XCPU=23;export const SIGNAL_XFSZ=24;export const SIGNAL_VTALRM=25;export const SIGNAL_PROF=26;export const SIGNAL_WINCH=27;export const SIGNAL_POLL=28;export const SIGNAL_PWR=29;export const SIGNAL_SYS=30;export const RIFLAGS_RECV_PEEK=1<<0;export const RIFLAGS_RECV_WAITALL=1<<1;export const ROFLAGS_RECV_DATA_TRUNCATED=1<<0;export const SDFLAGS_RD=1<<0;export const SDFLAGS_WR=1<<1;export const PREOPENTYPE_DIR=0;export class PrestatDir{write_bytes(view,ptr){view.setUint32(ptr,this.pr_name.byteLength,true)}constructor(name){this.pr_name=new TextEncoder().encode(name)}}export class Prestat{static dir(name){const prestat=new Prestat;prestat.tag=PREOPENTYPE_DIR;prestat.inner=new PrestatDir(name);return prestat}write_bytes(view,ptr){view.setUint32(ptr,this.tag,true);this.inner.write_bytes(view,ptr+4)}}","let Debug=class Debug{enable(enabled){this.log=createLogger(enabled===undefined?true:enabled,this.prefix)}get enabled(){return this.isEnabled}constructor(isEnabled){this.isEnabled=isEnabled;this.prefix=\"wasi:\";this.enable(isEnabled)}};function createLogger(enabled,prefix){if(enabled){const a=console.log.bind(console,\"%c%s\",\"color: #265BA0\",prefix);return a}else{return()=>{}}}export const debug=new Debug(false);","import*as wasi from\"./wasi_defs.js\";import{debug}from\"./debug.js\";export class WASIProcExit extends Error{constructor(code){super(\"exit with exit code \"+code);this.code=code}}let WASI=class WASI{start(instance){this.inst=instance;try{instance.exports._start();return 0}catch(e){if(e instanceof WASIProcExit){return e.code}else{throw e}}}initialize(instance){this.inst=instance;if(instance.exports._initialize){instance.exports._initialize()}}constructor(args,env,fds,options={}){this.args=[];this.env=[];this.fds=[];debug.enable(options.debug);this.args=args;this.env=env;this.fds=fds;const self=this;this.wasiImport={args_sizes_get(argc,argv_buf_size){const buffer=new DataView(self.inst.exports.memory.buffer);buffer.setUint32(argc,self.args.length,true);let buf_size=0;for(const arg of self.args){buf_size+=arg.length+1}buffer.setUint32(argv_buf_size,buf_size,true);debug.log(buffer.getUint32(argc,true),buffer.getUint32(argv_buf_size,true));return 0},args_get(argv,argv_buf){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);const orig_argv_buf=argv_buf;for(let i=0;i<self.args.length;i++){buffer.setUint32(argv,argv_buf,true);argv+=4;const arg=new TextEncoder().encode(self.args[i]);buffer8.set(arg,argv_buf);buffer.setUint8(argv_buf+arg.length,0);argv_buf+=arg.length+1}if(debug.enabled){debug.log(new TextDecoder(\"utf-8\").decode(buffer8.slice(orig_argv_buf,argv_buf)))}return 0},environ_sizes_get(environ_count,environ_size){const buffer=new DataView(self.inst.exports.memory.buffer);buffer.setUint32(environ_count,self.env.length,true);let buf_size=0;for(const environ of self.env){buf_size+=new TextEncoder().encode(environ).length+1}buffer.setUint32(environ_size,buf_size,true);debug.log(buffer.getUint32(environ_count,true),buffer.getUint32(environ_size,true));return 0},environ_get(environ,environ_buf){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);const orig_environ_buf=environ_buf;for(let i=0;i<self.env.length;i++){buffer.setUint32(environ,environ_buf,true);environ+=4;const e=new TextEncoder().encode(self.env[i]);buffer8.set(e,environ_buf);buffer.setUint8(environ_buf+e.length,0);environ_buf+=e.length+1}if(debug.enabled){debug.log(new TextDecoder(\"utf-8\").decode(buffer8.slice(orig_environ_buf,environ_buf)))}return 0},clock_res_get(id,res_ptr){let resolutionValue;switch(id){case wasi.CLOCKID_MONOTONIC:{resolutionValue=5000n;break}case wasi.CLOCKID_REALTIME:{resolutionValue=1000000n;break}default:return wasi.ERRNO_NOSYS}const view=new DataView(self.inst.exports.memory.buffer);view.setBigUint64(res_ptr,resolutionValue,true);return wasi.ERRNO_SUCCESS},clock_time_get(id,precision,time){const buffer=new DataView(self.inst.exports.memory.buffer);if(id===wasi.CLOCKID_REALTIME){buffer.setBigUint64(time,BigInt(new Date().getTime())*1000000n,true)}else if(id==wasi.CLOCKID_MONOTONIC){let monotonic_time;try{monotonic_time=BigInt(Math.round(performance.now()*1e6))}catch(e){monotonic_time=0n}buffer.setBigUint64(time,monotonic_time,true)}else{buffer.setBigUint64(time,0n,true)}return 0},fd_advise(fd,offset,len,advice){if(self.fds[fd]!=undefined){return wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},fd_allocate(fd,offset,len){if(self.fds[fd]!=undefined){return self.fds[fd].fd_allocate(offset,len)}else{return wasi.ERRNO_BADF}},fd_close(fd){if(self.fds[fd]!=undefined){const ret=self.fds[fd].fd_close();self.fds[fd]=undefined;return ret}else{return wasi.ERRNO_BADF}},fd_datasync(fd){if(self.fds[fd]!=undefined){return self.fds[fd].fd_sync()}else{return wasi.ERRNO_BADF}},fd_fdstat_get(fd,fdstat_ptr){if(self.fds[fd]!=undefined){const{ret,fdstat}=self.fds[fd].fd_fdstat_get();if(fdstat!=null){fdstat.write_bytes(new DataView(self.inst.exports.memory.buffer),fdstat_ptr)}return ret}else{return wasi.ERRNO_BADF}},fd_fdstat_set_flags(fd,flags){if(self.fds[fd]!=undefined){return self.fds[fd].fd_fdstat_set_flags(flags)}else{return wasi.ERRNO_BADF}},fd_fdstat_set_rights(fd,fs_rights_base,fs_rights_inheriting){if(self.fds[fd]!=undefined){return self.fds[fd].fd_fdstat_set_rights(fs_rights_base,fs_rights_inheriting)}else{return wasi.ERRNO_BADF}},fd_filestat_get(fd,filestat_ptr){if(self.fds[fd]!=undefined){const{ret,filestat}=self.fds[fd].fd_filestat_get();if(filestat!=null){filestat.write_bytes(new DataView(self.inst.exports.memory.buffer),filestat_ptr)}return ret}else{return wasi.ERRNO_BADF}},fd_filestat_set_size(fd,size){if(self.fds[fd]!=undefined){return self.fds[fd].fd_filestat_set_size(size)}else{return wasi.ERRNO_BADF}},fd_filestat_set_times(fd,atim,mtim,fst_flags){if(self.fds[fd]!=undefined){return self.fds[fd].fd_filestat_set_times(atim,mtim,fst_flags)}else{return wasi.ERRNO_BADF}},fd_pread(fd,iovs_ptr,iovs_len,offset,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=wasi.Iovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nread=0;for(const iovec of iovecs){const{ret,data}=self.fds[fd].fd_pread(iovec.buf_len,offset);if(ret!=wasi.ERRNO_SUCCESS){buffer.setUint32(nread_ptr,nread,true);return ret}buffer8.set(data,iovec.buf);nread+=data.length;offset+=BigInt(data.length);if(data.length!=iovec.buf_len){break}}buffer.setUint32(nread_ptr,nread,true);return wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},fd_prestat_get(fd,buf_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,prestat}=self.fds[fd].fd_prestat_get();if(prestat!=null){prestat.write_bytes(buffer,buf_ptr)}return ret}else{return wasi.ERRNO_BADF}},fd_prestat_dir_name(fd,path_ptr,path_len){if(self.fds[fd]!=undefined){const{ret,prestat}=self.fds[fd].fd_prestat_get();if(prestat==null){return ret}const prestat_dir_name=prestat.inner.pr_name;const buffer8=new Uint8Array(self.inst.exports.memory.buffer);buffer8.set(prestat_dir_name.slice(0,path_len),path_ptr);return prestat_dir_name.byteLength>path_len?wasi.ERRNO_NAMETOOLONG:wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},fd_pwrite(fd,iovs_ptr,iovs_len,offset,nwritten_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=wasi.Ciovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nwritten=0;for(const iovec of iovecs){const data=buffer8.slice(iovec.buf,iovec.buf+iovec.buf_len);const{ret,nwritten:nwritten_part}=self.fds[fd].fd_pwrite(data,offset);if(ret!=wasi.ERRNO_SUCCESS){buffer.setUint32(nwritten_ptr,nwritten,true);return ret}nwritten+=nwritten_part;offset+=BigInt(nwritten_part);if(nwritten_part!=data.byteLength){break}}buffer.setUint32(nwritten_ptr,nwritten,true);return wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},fd_read(fd,iovs_ptr,iovs_len,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=wasi.Iovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nread=0;for(const iovec of iovecs){const{ret,data}=self.fds[fd].fd_read(iovec.buf_len);if(ret!=wasi.ERRNO_SUCCESS){buffer.setUint32(nread_ptr,nread,true);return ret}buffer8.set(data,iovec.buf);nread+=data.length;if(data.length!=iovec.buf_len){break}}buffer.setUint32(nread_ptr,nread,true);return wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},fd_readdir(fd,buf,buf_len,cookie,bufused_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){let bufused=0;while(true){const{ret,dirent}=self.fds[fd].fd_readdir_single(cookie);if(ret!=0){buffer.setUint32(bufused_ptr,bufused,true);return ret}if(dirent==null){break}if(buf_len-bufused<dirent.head_length()){bufused=buf_len;break}const head_bytes=new ArrayBuffer(dirent.head_length());dirent.write_head_bytes(new DataView(head_bytes),0);buffer8.set(new Uint8Array(head_bytes).slice(0,Math.min(head_bytes.byteLength,buf_len-bufused)),buf);buf+=dirent.head_length();bufused+=dirent.head_length();if(buf_len-bufused<dirent.name_length()){bufused=buf_len;break}dirent.write_name_bytes(buffer8,buf,buf_len-bufused);buf+=dirent.name_length();bufused+=dirent.name_length();cookie=dirent.d_next}buffer.setUint32(bufused_ptr,bufused,true);return 0}else{return wasi.ERRNO_BADF}},fd_renumber(fd,to){if(self.fds[fd]!=undefined&&self.fds[to]!=undefined){const ret=self.fds[to].fd_close();if(ret!=0){return ret}self.fds[to]=self.fds[fd];self.fds[fd]=undefined;return 0}else{return wasi.ERRNO_BADF}},fd_seek(fd,offset,whence,offset_out_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,offset:offset_out}=self.fds[fd].fd_seek(offset,whence);buffer.setBigInt64(offset_out_ptr,offset_out,true);return ret}else{return wasi.ERRNO_BADF}},fd_sync(fd){if(self.fds[fd]!=undefined){return self.fds[fd].fd_sync()}else{return wasi.ERRNO_BADF}},fd_tell(fd,offset_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const{ret,offset}=self.fds[fd].fd_tell();buffer.setBigUint64(offset_ptr,offset,true);return ret}else{return wasi.ERRNO_BADF}},fd_write(fd,iovs_ptr,iovs_len,nwritten_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const iovecs=wasi.Ciovec.read_bytes_array(buffer,iovs_ptr,iovs_len);let nwritten=0;for(const iovec of iovecs){const data=buffer8.slice(iovec.buf,iovec.buf+iovec.buf_len);const{ret,nwritten:nwritten_part}=self.fds[fd].fd_write(data);if(ret!=wasi.ERRNO_SUCCESS){buffer.setUint32(nwritten_ptr,nwritten,true);return ret}nwritten+=nwritten_part;if(nwritten_part!=data.byteLength){break}}buffer.setUint32(nwritten_ptr,nwritten,true);return wasi.ERRNO_SUCCESS}else{return wasi.ERRNO_BADF}},path_create_directory(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_create_directory(path)}else{return wasi.ERRNO_BADF}},path_filestat_get(fd,flags,path_ptr,path_len,filestat_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));const{ret,filestat}=self.fds[fd].path_filestat_get(flags,path);if(filestat!=null){filestat.write_bytes(buffer,filestat_ptr)}return ret}else{return wasi.ERRNO_BADF}},path_filestat_set_times(fd,flags,path_ptr,path_len,atim,mtim,fst_flags){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_filestat_set_times(flags,path,atim,mtim,fst_flags)}else{return wasi.ERRNO_BADF}},path_link(old_fd,old_flags,old_path_ptr,old_path_len,new_fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[old_fd]!=undefined&&self.fds[new_fd]!=undefined){const old_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));const new_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));const{ret,inode_obj}=self.fds[old_fd].path_lookup(old_path,old_flags);if(inode_obj==null){return ret}return self.fds[new_fd].path_link(new_path,inode_obj,false)}else{return wasi.ERRNO_BADF}},path_open(fd,dirflags,path_ptr,path_len,oflags,fs_rights_base,fs_rights_inheriting,fd_flags,opened_fd_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));debug.log(path);const{ret,fd_obj}=self.fds[fd].path_open(dirflags,path,oflags,fs_rights_base,fs_rights_inheriting,fd_flags);if(ret!=0){return ret}self.fds.push(fd_obj);const opened_fd=self.fds.length-1;buffer.setUint32(opened_fd_ptr,opened_fd,true);return 0}else{return wasi.ERRNO_BADF}},path_readlink(fd,path_ptr,path_len,buf_ptr,buf_len,nread_ptr){const buffer=new DataView(self.inst.exports.memory.buffer);const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));debug.log(path);const{ret,data}=self.fds[fd].path_readlink(path);if(data!=null){const data_buf=new TextEncoder().encode(data);if(data_buf.length>buf_len){buffer.setUint32(nread_ptr,0,true);return wasi.ERRNO_BADF}buffer8.set(data_buf,buf_ptr);buffer.setUint32(nread_ptr,data_buf.length,true)}return ret}else{return wasi.ERRNO_BADF}},path_remove_directory(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_remove_directory(path)}else{return wasi.ERRNO_BADF}},path_rename(fd,old_path_ptr,old_path_len,new_fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined&&self.fds[new_fd]!=undefined){const old_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));const new_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));let{ret,inode_obj}=self.fds[fd].path_unlink(old_path);if(inode_obj==null){return ret}ret=self.fds[new_fd].path_link(new_path,inode_obj,true);if(ret!=wasi.ERRNO_SUCCESS){if(self.fds[fd].path_link(old_path,inode_obj,true)!=wasi.ERRNO_SUCCESS){throw\"path_link should always return success when relinking an inode back to the original place\"}}return ret}else{return wasi.ERRNO_BADF}},path_symlink(old_path_ptr,old_path_len,fd,new_path_ptr,new_path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const old_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(old_path_ptr,old_path_ptr+old_path_len));const new_path=new TextDecoder(\"utf-8\").decode(buffer8.slice(new_path_ptr,new_path_ptr+new_path_len));return wasi.ERRNO_NOTSUP}else{return wasi.ERRNO_BADF}},path_unlink_file(fd,path_ptr,path_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer);if(self.fds[fd]!=undefined){const path=new TextDecoder(\"utf-8\").decode(buffer8.slice(path_ptr,path_ptr+path_len));return self.fds[fd].path_unlink_file(path)}else{return wasi.ERRNO_BADF}},poll_oneoff(in_ptr,out_ptr,nsubscriptions){if(nsubscriptions===0){return wasi.ERRNO_INVAL}if(nsubscriptions>1){debug.log(\"poll_oneoff: only a single subscription is supported\");return wasi.ERRNO_NOTSUP}const buffer=new DataView(self.inst.exports.memory.buffer);const s=wasi.Subscription.read_bytes(buffer,in_ptr);const eventtype=s.eventtype;const clockid=s.clockid;const timeout=s.timeout;if(eventtype!==wasi.EVENTTYPE_CLOCK){debug.log(\"poll_oneoff: only clock subscriptions are supported\");return wasi.ERRNO_NOTSUP}let getNow=undefined;if(clockid===wasi.CLOCKID_MONOTONIC){getNow=()=>BigInt(Math.round(performance.now()*1e6))}else if(clockid===wasi.CLOCKID_REALTIME){getNow=()=>BigInt(new Date().getTime())*1000000n}else{return wasi.ERRNO_INVAL}const endTime=(s.flags&wasi.SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME)!==0?timeout:getNow()+timeout;while(endTime>getNow()){}const event=new wasi.Event(s.userdata,wasi.ERRNO_SUCCESS,eventtype);event.write_bytes(buffer,out_ptr);return wasi.ERRNO_SUCCESS},proc_exit(exit_code){throw new WASIProcExit(exit_code)},proc_raise(sig){throw\"raised signal \"+sig},sched_yield(){},random_get(buf,buf_len){const buffer8=new Uint8Array(self.inst.exports.memory.buffer).subarray(buf,buf+buf_len);if(\"crypto\"in globalThis&&(typeof SharedArrayBuffer===\"undefined\"||!(self.inst.exports.memory.buffer instanceof SharedArrayBuffer))){for(let i=0;i<buf_len;i+=65536){crypto.getRandomValues(buffer8.subarray(i,i+65536))}}else{for(let i=0;i<buf_len;i++){buffer8[i]=Math.random()*256|0}}},sock_recv(fd,ri_data,ri_flags){throw\"sockets not supported\"},sock_send(fd,si_data,si_flags){throw\"sockets not supported\"},sock_shutdown(fd,how){throw\"sockets not supported\"},sock_accept(fd,flags){throw\"sockets not supported\"}}}};export{WASI as default};","import*as wasi from\"./wasi_defs.js\";export class Fd{fd_allocate(offset,len){return wasi.ERRNO_NOTSUP}fd_close(){return 0}fd_fdstat_get(){return{ret:wasi.ERRNO_NOTSUP,fdstat:null}}fd_fdstat_set_flags(flags){return wasi.ERRNO_NOTSUP}fd_fdstat_set_rights(fs_rights_base,fs_rights_inheriting){return wasi.ERRNO_NOTSUP}fd_filestat_get(){return{ret:wasi.ERRNO_NOTSUP,filestat:null}}fd_filestat_set_size(size){return wasi.ERRNO_NOTSUP}fd_filestat_set_times(atim,mtim,fst_flags){return wasi.ERRNO_NOTSUP}fd_pread(size,offset){return{ret:wasi.ERRNO_NOTSUP,data:new Uint8Array}}fd_prestat_get(){return{ret:wasi.ERRNO_NOTSUP,prestat:null}}fd_pwrite(data,offset){return{ret:wasi.ERRNO_NOTSUP,nwritten:0}}fd_read(size){return{ret:wasi.ERRNO_NOTSUP,data:new Uint8Array}}fd_readdir_single(cookie){return{ret:wasi.ERRNO_NOTSUP,dirent:null}}fd_seek(offset,whence){return{ret:wasi.ERRNO_NOTSUP,offset:0n}}fd_sync(){return 0}fd_tell(){return{ret:wasi.ERRNO_NOTSUP,offset:0n}}fd_write(data){return{ret:wasi.ERRNO_NOTSUP,nwritten:0}}path_create_directory(path){return wasi.ERRNO_NOTSUP}path_filestat_get(flags,path){return{ret:wasi.ERRNO_NOTSUP,filestat:null}}path_filestat_set_times(flags,path,atim,mtim,fst_flags){return wasi.ERRNO_NOTSUP}path_link(path,inode,allow_dir){return wasi.ERRNO_NOTSUP}path_unlink(path){return{ret:wasi.ERRNO_NOTSUP,inode_obj:null}}path_lookup(path,dirflags){return{ret:wasi.ERRNO_NOTSUP,inode_obj:null}}path_open(dirflags,path,oflags,fs_rights_base,fs_rights_inheriting,fd_flags){return{ret:wasi.ERRNO_NOTDIR,fd_obj:null}}path_readlink(path){return{ret:wasi.ERRNO_NOTSUP,data:null}}path_remove_directory(path){return wasi.ERRNO_NOTSUP}path_rename(old_path,new_fd,new_path){return wasi.ERRNO_NOTSUP}path_unlink_file(path){return wasi.ERRNO_NOTSUP}}export class Inode{static issue_ino(){return Inode.next_ino++}static root_ino(){return 0n}constructor(){this.ino=Inode.issue_ino()}}Inode.next_ino=1n;","import{debug}from\"./debug.js\";import*as wasi from\"./wasi_defs.js\";import{Fd,Inode}from\"./fd.js\";export class OpenFile extends Fd{fd_allocate(offset,len){if(this.file.size>offset+len){}else{const new_data=new Uint8Array(Number(offset+len));new_data.set(this.file.data,0);this.file.data=new_data}return wasi.ERRNO_SUCCESS}fd_fdstat_get(){return{ret:0,fdstat:new wasi.Fdstat(wasi.FILETYPE_REGULAR_FILE,0)}}fd_filestat_set_size(size){if(this.file.size>size){this.file.data=new Uint8Array(this.file.data.buffer.slice(0,Number(size)))}else{const new_data=new Uint8Array(Number(size));new_data.set(this.file.data,0);this.file.data=new_data}return wasi.ERRNO_SUCCESS}fd_read(size){const slice=this.file.data.slice(Number(this.file_pos),Number(this.file_pos+BigInt(size)));this.file_pos+=BigInt(slice.length);return{ret:0,data:slice}}fd_pread(size,offset){const slice=this.file.data.slice(Number(offset),Number(offset+BigInt(size)));return{ret:0,data:slice}}fd_seek(offset,whence){let calculated_offset;switch(whence){case wasi.WHENCE_SET:calculated_offset=offset;break;case wasi.WHENCE_CUR:calculated_offset=this.file_pos+offset;break;case wasi.WHENCE_END:calculated_offset=BigInt(this.file.data.byteLength)+offset;break;default:return{ret:wasi.ERRNO_INVAL,offset:0n}}if(calculated_offset<0){return{ret:wasi.ERRNO_INVAL,offset:0n}}this.file_pos=calculated_offset;return{ret:0,offset:this.file_pos}}fd_tell(){return{ret:0,offset:this.file_pos}}fd_write(data){if(this.file.readonly)return{ret:wasi.ERRNO_BADF,nwritten:0};if(this.file_pos+BigInt(data.byteLength)>this.file.size){const old=this.file.data;this.file.data=new Uint8Array(Number(this.file_pos+BigInt(data.byteLength)));this.file.data.set(old)}this.file.data.set(data,Number(this.file_pos));this.file_pos+=BigInt(data.byteLength);return{ret:0,nwritten:data.byteLength}}fd_pwrite(data,offset){if(this.file.readonly)return{ret:wasi.ERRNO_BADF,nwritten:0};if(offset+BigInt(data.byteLength)>this.file.size){const old=this.file.data;this.file.data=new Uint8Array(Number(offset+BigInt(data.byteLength)));this.file.data.set(old)}this.file.data.set(data,Number(offset));return{ret:0,nwritten:data.byteLength}}fd_filestat_get(){return{ret:0,filestat:this.file.stat()}}constructor(file){super();this.file_pos=0n;this.file=file}}export class OpenDirectory extends Fd{fd_seek(offset,whence){return{ret:wasi.ERRNO_BADF,offset:0n}}fd_tell(){return{ret:wasi.ERRNO_BADF,offset:0n}}fd_allocate(offset,len){return wasi.ERRNO_BADF}fd_fdstat_get(){return{ret:0,fdstat:new wasi.Fdstat(wasi.FILETYPE_DIRECTORY,0)}}fd_readdir_single(cookie){if(debug.enabled){debug.log(\"readdir_single\",cookie);debug.log(cookie,this.dir.contents.keys())}if(cookie==0n){return{ret:wasi.ERRNO_SUCCESS,dirent:new wasi.Dirent(1n,this.dir.ino,\".\",wasi.FILETYPE_DIRECTORY)}}else if(cookie==1n){return{ret:wasi.ERRNO_SUCCESS,dirent:new wasi.Dirent(2n,this.dir.parent_ino(),\"..\",wasi.FILETYPE_DIRECTORY)}}if(cookie>=BigInt(this.dir.contents.size)+2n){return{ret:0,dirent:null}}const[name,entry]=Array.from(this.dir.contents.entries())[Number(cookie-2n)];return{ret:0,dirent:new wasi.Dirent(cookie+1n,entry.ino,name,entry.stat().filetype)}}path_filestat_get(flags,path_str){const{ret:path_err,path}=Path.from(path_str);if(path==null){return{ret:path_err,filestat:null}}const{ret,entry}=this.dir.get_entry_for_path(path);if(entry==null){return{ret,filestat:null}}return{ret:0,filestat:entry.stat()}}path_lookup(path_str,dirflags){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return{ret:path_ret,inode_obj:null}}const{ret,entry}=this.dir.get_entry_for_path(path);if(entry==null){return{ret,inode_obj:null}}return{ret:wasi.ERRNO_SUCCESS,inode_obj:entry}}path_open(dirflags,path_str,oflags,fs_rights_base,fs_rights_inheriting,fd_flags){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return{ret:path_ret,fd_obj:null}}let{ret,entry}=this.dir.get_entry_for_path(path);if(entry==null){if(ret!=wasi.ERRNO_NOENT){return{ret,fd_obj:null}}if((oflags&wasi.OFLAGS_CREAT)==wasi.OFLAGS_CREAT){const{ret,entry:new_entry}=this.dir.create_entry_for_path(path_str,(oflags&wasi.OFLAGS_DIRECTORY)==wasi.OFLAGS_DIRECTORY);if(new_entry==null){return{ret,fd_obj:null}}entry=new_entry}else{return{ret:wasi.ERRNO_NOENT,fd_obj:null}}}else if((oflags&wasi.OFLAGS_EXCL)==wasi.OFLAGS_EXCL){return{ret:wasi.ERRNO_EXIST,fd_obj:null}}if((oflags&wasi.OFLAGS_DIRECTORY)==wasi.OFLAGS_DIRECTORY&&entry.stat().filetype!==wasi.FILETYPE_DIRECTORY){return{ret:wasi.ERRNO_NOTDIR,fd_obj:null}}return entry.path_open(oflags,fs_rights_base,fd_flags)}path_create_directory(path){return this.path_open(0,path,wasi.OFLAGS_CREAT|wasi.OFLAGS_DIRECTORY,0n,0n,0).ret}path_link(path_str,inode,allow_dir){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return path_ret}if(path.is_dir){return wasi.ERRNO_NOENT}const{ret:parent_ret,parent_entry,filename,entry}=this.dir.get_parent_dir_and_entry_for_path(path,true);if(parent_entry==null||filename==null){return parent_ret}if(entry!=null){const source_is_dir=inode.stat().filetype==wasi.FILETYPE_DIRECTORY;const target_is_dir=entry.stat().filetype==wasi.FILETYPE_DIRECTORY;if(source_is_dir&&target_is_dir){if(allow_dir&&entry instanceof Directory){if(entry.contents.size==0){}else{return wasi.ERRNO_NOTEMPTY}}else{return wasi.ERRNO_EXIST}}else if(source_is_dir&&!target_is_dir){return wasi.ERRNO_NOTDIR}else if(!source_is_dir&&target_is_dir){return wasi.ERRNO_ISDIR}else if(inode.stat().filetype==wasi.FILETYPE_REGULAR_FILE&&entry.stat().filetype==wasi.FILETYPE_REGULAR_FILE){}else{return wasi.ERRNO_EXIST}}if(!allow_dir&&inode.stat().filetype==wasi.FILETYPE_DIRECTORY){return wasi.ERRNO_PERM}parent_entry.contents.set(filename,inode);return wasi.ERRNO_SUCCESS}path_unlink(path_str){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return{ret:path_ret,inode_obj:null}}const{ret:parent_ret,parent_entry,filename,entry}=this.dir.get_parent_dir_and_entry_for_path(path,true);if(parent_entry==null||filename==null){return{ret:parent_ret,inode_obj:null}}if(entry==null){return{ret:wasi.ERRNO_NOENT,inode_obj:null}}parent_entry.contents.delete(filename);return{ret:wasi.ERRNO_SUCCESS,inode_obj:entry}}path_unlink_file(path_str){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return path_ret}const{ret:parent_ret,parent_entry,filename,entry}=this.dir.get_parent_dir_and_entry_for_path(path,false);if(parent_entry==null||filename==null||entry==null){return parent_ret}if(entry.stat().filetype===wasi.FILETYPE_DIRECTORY){return wasi.ERRNO_ISDIR}parent_entry.contents.delete(filename);return wasi.ERRNO_SUCCESS}path_remove_directory(path_str){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return path_ret}const{ret:parent_ret,parent_entry,filename,entry}=this.dir.get_parent_dir_and_entry_for_path(path,false);if(parent_entry==null||filename==null||entry==null){return parent_ret}if(!(entry instanceof Directory)||entry.stat().filetype!==wasi.FILETYPE_DIRECTORY){return wasi.ERRNO_NOTDIR}if(entry.contents.size!==0){return wasi.ERRNO_NOTEMPTY}if(!parent_entry.contents.delete(filename)){return wasi.ERRNO_NOENT}return wasi.ERRNO_SUCCESS}fd_filestat_get(){return{ret:0,filestat:this.dir.stat()}}fd_filestat_set_size(size){return wasi.ERRNO_BADF}fd_read(size){return{ret:wasi.ERRNO_BADF,data:new Uint8Array}}fd_pread(size,offset){return{ret:wasi.ERRNO_BADF,data:new Uint8Array}}fd_write(data){return{ret:wasi.ERRNO_BADF,nwritten:0}}fd_pwrite(data,offset){return{ret:wasi.ERRNO_BADF,nwritten:0}}constructor(dir){super();this.dir=dir}}export class PreopenDirectory extends OpenDirectory{fd_prestat_get(){return{ret:0,prestat:wasi.Prestat.dir(this.prestat_name)}}constructor(name,contents){super(new Directory(contents));this.prestat_name=name}}export class File extends Inode{path_open(oflags,fs_rights_base,fd_flags){if(this.readonly&&(fs_rights_base&BigInt(wasi.RIGHTS_FD_WRITE))==BigInt(wasi.RIGHTS_FD_WRITE)){return{ret:wasi.ERRNO_PERM,fd_obj:null}}if((oflags&wasi.OFLAGS_TRUNC)==wasi.OFLAGS_TRUNC){if(this.readonly)return{ret:wasi.ERRNO_PERM,fd_obj:null};this.data=new Uint8Array([])}const file=new OpenFile(this);if(fd_flags&wasi.FDFLAGS_APPEND)file.fd_seek(0n,wasi.WHENCE_END);return{ret:wasi.ERRNO_SUCCESS,fd_obj:file}}get size(){return BigInt(this.data.byteLength)}stat(){return new wasi.Filestat(this.ino,wasi.FILETYPE_REGULAR_FILE,this.size)}constructor(data,options){super();this.data=new Uint8Array(data);this.readonly=!!options?.readonly}}let Path=class Path{static from(path){const self=new Path;self.is_dir=path.endsWith(\"/\");if(path.startsWith(\"/\")){return{ret:wasi.ERRNO_NOTCAPABLE,path:null}}if(path.includes(\"\\x00\")){return{ret:wasi.ERRNO_INVAL,path:null}}for(const component of path.split(\"/\")){if(component===\"\"||component===\".\"){continue}if(component===\"..\"){if(self.parts.pop()==undefined){return{ret:wasi.ERRNO_NOTCAPABLE,path:null}}continue}self.parts.push(component)}return{ret:wasi.ERRNO_SUCCESS,path:self}}to_path_string(){let s=this.parts.join(\"/\");if(this.is_dir){s+=\"/\"}return s}constructor(){this.parts=[];this.is_dir=false}};export class Directory extends Inode{parent_ino(){if(this.parent==null){return Inode.root_ino()}return this.parent.ino}path_open(oflags,fs_rights_base,fd_flags){return{ret:wasi.ERRNO_SUCCESS,fd_obj:new OpenDirectory(this)}}stat(){return new wasi.Filestat(this.ino,wasi.FILETYPE_DIRECTORY,0n)}get_entry_for_path(path){let entry=this;for(const component of path.parts){if(!(entry instanceof Directory)){return{ret:wasi.ERRNO_NOTDIR,entry:null}}const child=entry.contents.get(component);if(child!==undefined){entry=child}else{debug.log(component);return{ret:wasi.ERRNO_NOENT,entry:null}}}if(path.is_dir){if(entry.stat().filetype!=wasi.FILETYPE_DIRECTORY){return{ret:wasi.ERRNO_NOTDIR,entry:null}}}return{ret:wasi.ERRNO_SUCCESS,entry}}get_parent_dir_and_entry_for_path(path,allow_undefined){const filename=path.parts.pop();if(filename===undefined){return{ret:wasi.ERRNO_INVAL,parent_entry:null,filename:null,entry:null}}const{ret:entry_ret,entry:parent_entry}=this.get_entry_for_path(path);if(parent_entry==null){return{ret:entry_ret,parent_entry:null,filename:null,entry:null}}if(!(parent_entry instanceof Directory)){return{ret:wasi.ERRNO_NOTDIR,parent_entry:null,filename:null,entry:null}}const entry=parent_entry.contents.get(filename);if(entry===undefined){if(!allow_undefined){return{ret:wasi.ERRNO_NOENT,parent_entry:null,filename:null,entry:null}}else{return{ret:wasi.ERRNO_SUCCESS,parent_entry,filename,entry:null}}}if(path.is_dir){if(entry.stat().filetype!=wasi.FILETYPE_DIRECTORY){return{ret:wasi.ERRNO_NOTDIR,parent_entry:null,filename:null,entry:null}}}return{ret:wasi.ERRNO_SUCCESS,parent_entry,filename,entry}}create_entry_for_path(path_str,is_dir){const{ret:path_ret,path}=Path.from(path_str);if(path==null){return{ret:path_ret,entry:null}}let{ret:parent_ret,parent_entry,filename,entry}=this.get_parent_dir_and_entry_for_path(path,true);if(parent_entry==null||filename==null){return{ret:parent_ret,entry:null}}if(entry!=null){return{ret:wasi.ERRNO_EXIST,entry:null}}debug.log(\"create\",path);let new_child;if(!is_dir){new_child=new File(new ArrayBuffer(0))}else{new_child=new Directory(new Map)}parent_entry.contents.set(filename,new_child);entry=new_child;return{ret:wasi.ERRNO_SUCCESS,entry}}constructor(contents){super();this.parent=null;if(contents instanceof Array){this.contents=new Map(contents)}else{this.contents=contents}for(const entry of this.contents.values()){if(entry instanceof Directory){entry.parent=this}}}}export class ConsoleStdout extends Fd{fd_filestat_get(){const filestat=new wasi.Filestat(this.ino,wasi.FILETYPE_CHARACTER_DEVICE,BigInt(0));return{ret:0,filestat}}fd_fdstat_get(){const fdstat=new wasi.Fdstat(wasi.FILETYPE_CHARACTER_DEVICE,0);fdstat.fs_rights_base=BigInt(wasi.RIGHTS_FD_WRITE);return{ret:0,fdstat}}fd_write(data){this.write(data);return{ret:0,nwritten:data.byteLength}}static lineBuffered(write){const dec=new TextDecoder(\"utf-8\",{fatal:false});let line_buf=\"\";return new ConsoleStdout(buffer=>{line_buf+=dec.decode(buffer,{stream:true});const lines=line_buf.split(\"\\n\");for(const[i,line]of lines.entries()){if(i<lines.length-1){write(line)}else{line_buf=line}}})}constructor(write){super();this.ino=Inode.issue_ino();this.write=write}}",null,null],"names":["wasi.CLOCKID_MONOTONIC","wasi.CLOCKID_REALTIME","wasi.ERRNO_NOSYS","wasi.ERRNO_SUCCESS","wasi.ERRNO_BADF","wasi.Iovec","wasi.ERRNO_NAMETOOLONG","wasi.Ciovec","wasi.ERRNO_NOTSUP","wasi.ERRNO_INVAL","wasi.Subscription","wasi.EVENTTYPE_CLOCK","wasi.SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME","wasi.Event","wasi.ERRNO_NOTDIR","wasi.Filestat","wasi.FILETYPE_CHARACTER_DEVICE","wasi.Fdstat","wasi.RIGHTS_FD_WRITE","exports"],"mappings":"AAAiF,MAAM,gBAAgB,CAAC,CAAC,CAAQ,MAAM,iBAAiB,CAAC,CAAC,CAA2F,MAAM,aAAa,CAAC,CAAC,CAAuN,MAAM,UAAU,CAAC,CAAC,CAA2jB,MAAM,WAAW,CAAC,EAAE,CAA0O,MAAM,iBAAiB,CAAC,EAAE,CAAka,MAAM,WAAW,CAAC,EAAE,CAAsC,MAAM,YAAY,CAAC,EAAE,CAA0G,MAAM,YAAY,CAAC,EAAE,CAA6uB,MAAM,eAAe,CAAC,CAAC,EAAE,CAAC,CAAy7B,MAAM,KAAK,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,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