goscript 0.0.36 → 0.0.37

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.
Files changed (196) hide show
  1. package/compiler/expr-call.go +26 -0
  2. package/compiler/spec.go +1 -1
  3. package/compiler/stmt.go +26 -8
  4. package/dist/gs/internal/byteorder/index.d.ts +8 -0
  5. package/dist/gs/internal/byteorder/index.js +34 -0
  6. package/dist/gs/internal/byteorder/index.js.map +1 -0
  7. package/dist/gs/internal/testlog/index.d.ts +1 -0
  8. package/dist/gs/internal/testlog/index.js +5 -0
  9. package/dist/gs/internal/testlog/index.js.map +1 -0
  10. package/dist/gs/os/dir.gs.d.ts +6 -0
  11. package/dist/gs/os/dir.gs.js +35 -0
  12. package/dist/gs/os/dir.gs.js.map +1 -0
  13. package/dist/gs/os/dir_unix.gs.d.ts +7 -0
  14. package/dist/gs/os/dir_unix.gs.js +113 -0
  15. package/dist/gs/os/dir_unix.gs.js.map +1 -0
  16. package/dist/gs/os/dirent_js.gs.d.ts +5 -0
  17. package/dist/gs/os/dirent_js.gs.js +20 -0
  18. package/dist/gs/os/dirent_js.gs.js.map +1 -0
  19. package/dist/gs/os/env.gs.d.ts +12 -0
  20. package/dist/gs/os/env.gs.js +157 -0
  21. package/dist/gs/os/env.gs.js.map +1 -0
  22. package/dist/gs/os/error.gs.d.ts +40 -0
  23. package/dist/gs/os/error.gs.js +158 -0
  24. package/dist/gs/os/error.gs.js.map +1 -0
  25. package/dist/gs/os/error_errno.gs.d.ts +1 -0
  26. package/dist/gs/os/error_errno.gs.js +5 -0
  27. package/dist/gs/os/error_errno.gs.js.map +1 -0
  28. package/dist/gs/os/exec.gs.d.ts +60 -0
  29. package/dist/gs/os/exec.gs.js +136 -0
  30. package/dist/gs/os/exec.gs.js.map +1 -0
  31. package/dist/gs/os/exec_nohandle.gs.d.ts +1 -0
  32. package/dist/gs/os/exec_nohandle.gs.js +2 -0
  33. package/dist/gs/os/exec_nohandle.gs.js.map +1 -0
  34. package/dist/gs/os/exec_posix.gs.d.ts +25 -0
  35. package/dist/gs/os/exec_posix.gs.js +67 -0
  36. package/dist/gs/os/exec_posix.gs.js.map +1 -0
  37. package/dist/gs/os/exec_unix.gs.d.ts +4 -0
  38. package/dist/gs/os/exec_unix.gs.js +46 -0
  39. package/dist/gs/os/exec_unix.gs.js.map +1 -0
  40. package/dist/gs/os/executable.gs.d.ts +2 -0
  41. package/dist/gs/os/executable.gs.js +16 -0
  42. package/dist/gs/os/executable.gs.js.map +1 -0
  43. package/dist/gs/os/executable_js.gs.d.ts +2 -0
  44. package/dist/gs/os/executable_js.gs.js +5 -0
  45. package/dist/gs/os/executable_js.gs.js.map +1 -0
  46. package/dist/gs/os/executable_wasm.gs.d.ts +2 -0
  47. package/dist/gs/os/executable_wasm.gs.js +6 -0
  48. package/dist/gs/os/executable_wasm.gs.js.map +1 -0
  49. package/dist/gs/os/file_constants_js.gs.d.ts +41 -0
  50. package/dist/gs/os/file_constants_js.gs.js +78 -0
  51. package/dist/gs/os/file_constants_js.gs.js.map +1 -0
  52. package/dist/gs/os/file_js.gs.d.ts +22 -0
  53. package/dist/gs/os/file_js.gs.js +73 -0
  54. package/dist/gs/os/file_js.gs.js.map +1 -0
  55. package/dist/gs/os/file_open_unix.gs.d.ts +6 -0
  56. package/dist/gs/os/file_open_unix.gs.js +10 -0
  57. package/dist/gs/os/file_open_unix.gs.js.map +1 -0
  58. package/dist/gs/os/file_posix_js.gs.d.ts +8 -0
  59. package/dist/gs/os/file_posix_js.gs.js +32 -0
  60. package/dist/gs/os/file_posix_js.gs.js.map +1 -0
  61. package/dist/gs/os/file_unix_js.gs.d.ts +27 -0
  62. package/dist/gs/os/file_unix_js.gs.js +64 -0
  63. package/dist/gs/os/file_unix_js.gs.js.map +1 -0
  64. package/dist/gs/os/getwd_js.gs.d.ts +6 -0
  65. package/dist/gs/os/getwd_js.gs.js +21 -0
  66. package/dist/gs/os/getwd_js.gs.js.map +1 -0
  67. package/dist/gs/os/index.d.ts +19 -0
  68. package/dist/gs/os/index.js +20 -0
  69. package/dist/gs/os/index.js.map +1 -0
  70. package/dist/gs/os/path.gs.d.ts +4 -0
  71. package/dist/gs/os/path.gs.js +32 -0
  72. package/dist/gs/os/path.gs.js.map +1 -0
  73. package/dist/gs/os/path_unix.gs.d.ts +4 -0
  74. package/dist/gs/os/path_unix.gs.js +40 -0
  75. package/dist/gs/os/path_unix.gs.js.map +1 -0
  76. package/dist/gs/os/pidfd_js.gs.d.ts +6 -0
  77. package/dist/gs/os/pidfd_js.gs.js +14 -0
  78. package/dist/gs/os/pidfd_js.gs.js.map +1 -0
  79. package/dist/gs/os/pipe_wasm.gs.d.ts +2 -0
  80. package/dist/gs/os/pipe_wasm.gs.js +14 -0
  81. package/dist/gs/os/pipe_wasm.gs.js.map +1 -0
  82. package/dist/gs/os/proc.gs.d.ts +11 -0
  83. package/dist/gs/os/proc.gs.js +68 -0
  84. package/dist/gs/os/proc.gs.js.map +1 -0
  85. package/dist/gs/os/proc_js.gs.d.ts +3 -0
  86. package/dist/gs/os/proc_js.gs.js +12 -0
  87. package/dist/gs/os/proc_js.gs.js.map +1 -0
  88. package/dist/gs/os/rawconn_js.gs.d.ts +10 -0
  89. package/dist/gs/os/rawconn_js.gs.js +26 -0
  90. package/dist/gs/os/rawconn_js.gs.js.map +1 -0
  91. package/dist/gs/os/removeall_js.gs.d.ts +2 -0
  92. package/dist/gs/os/removeall_js.gs.js +7 -0
  93. package/dist/gs/os/removeall_js.gs.js.map +1 -0
  94. package/dist/gs/os/root_js.gs.d.ts +23 -0
  95. package/dist/gs/os/root_js.gs.js +80 -0
  96. package/dist/gs/os/root_js.gs.js.map +1 -0
  97. package/dist/gs/os/root_nonwindows.gs.d.ts +2 -0
  98. package/dist/gs/os/root_nonwindows.gs.js +4 -0
  99. package/dist/gs/os/root_nonwindows.gs.js.map +1 -0
  100. package/dist/gs/os/root_noopenat.gs.d.ts +11 -0
  101. package/dist/gs/os/root_noopenat.gs.js +31 -0
  102. package/dist/gs/os/root_noopenat.gs.js.map +1 -0
  103. package/dist/gs/os/stat.gs.d.ts +24 -0
  104. package/dist/gs/os/stat.gs.js +20 -0
  105. package/dist/gs/os/stat.gs.js.map +1 -0
  106. package/dist/gs/os/stat_js.gs.d.ts +6 -0
  107. package/dist/gs/os/stat_js.gs.js +23 -0
  108. package/dist/gs/os/stat_js.gs.js.map +1 -0
  109. package/dist/gs/os/stat_unix_js.gs.d.ts +8 -0
  110. package/dist/gs/os/stat_unix_js.gs.js +16 -0
  111. package/dist/gs/os/stat_unix_js.gs.js.map +1 -0
  112. package/dist/gs/os/sticky_bsd.gs.d.ts +1 -0
  113. package/dist/gs/os/sticky_bsd.gs.js +3 -0
  114. package/dist/gs/os/sticky_bsd.gs.js.map +1 -0
  115. package/dist/gs/os/sys.gs.d.ts +2 -0
  116. package/dist/gs/os/sys.gs.js +10 -0
  117. package/dist/gs/os/sys.gs.js.map +1 -0
  118. package/dist/gs/os/sys_bsd.gs.d.ts +2 -0
  119. package/dist/gs/os/sys_bsd.gs.js +15 -0
  120. package/dist/gs/os/sys_bsd.gs.js.map +1 -0
  121. package/dist/gs/os/sys_js.gs.d.ts +2 -0
  122. package/dist/gs/os/sys_js.gs.js +6 -0
  123. package/dist/gs/os/sys_js.gs.js.map +1 -0
  124. package/dist/gs/os/tempfile.gs.d.ts +5 -0
  125. package/dist/gs/os/tempfile.gs.js +30 -0
  126. package/dist/gs/os/tempfile.gs.js.map +1 -0
  127. package/dist/gs/os/types.gs.d.ts +59 -0
  128. package/dist/gs/os/types.gs.js +123 -0
  129. package/dist/gs/os/types.gs.js.map +1 -0
  130. package/dist/gs/os/types_js.gs.d.ts +74 -0
  131. package/dist/gs/os/types_js.gs.js +147 -0
  132. package/dist/gs/os/types_js.gs.js.map +1 -0
  133. package/dist/gs/os/types_unix.gs.d.ts +40 -0
  134. package/dist/gs/os/types_unix.gs.js +87 -0
  135. package/dist/gs/os/types_unix.gs.js.map +1 -0
  136. package/dist/gs/os/wait_unimp.gs.d.ts +1 -0
  137. package/dist/gs/os/wait_unimp.gs.js +2 -0
  138. package/dist/gs/os/wait_unimp.gs.js.map +1 -0
  139. package/dist/gs/os/zero_copy_posix.gs.d.ts +4 -0
  140. package/dist/gs/os/zero_copy_posix.gs.js +27 -0
  141. package/dist/gs/os/zero_copy_posix.gs.js.map +1 -0
  142. package/dist/gs/os/zero_copy_stub.gs.d.ts +1 -0
  143. package/dist/gs/os/zero_copy_stub.gs.js +2 -0
  144. package/dist/gs/os/zero_copy_stub.gs.js.map +1 -0
  145. package/dist/gs/syscall/index.d.ts +80 -0
  146. package/dist/gs/syscall/index.js +163 -0
  147. package/dist/gs/syscall/index.js.map +1 -0
  148. package/gs/internal/byteorder/index.ts +40 -0
  149. package/gs/internal/testlog/index.ts +7 -0
  150. package/gs/os/dir.gs.ts +42 -0
  151. package/gs/os/dir_unix.gs.ts +155 -0
  152. package/gs/os/dirent_js.gs.ts +27 -0
  153. package/gs/os/env.gs.ts +179 -0
  154. package/gs/os/error.gs.ts +205 -0
  155. package/gs/os/error_errno.gs.ts +12 -0
  156. package/gs/os/exec.gs.ts +198 -0
  157. package/gs/os/exec_nohandle.gs.ts +2 -0
  158. package/gs/os/exec_posix.gs.ts +95 -0
  159. package/gs/os/exec_unix.gs.ts +64 -0
  160. package/gs/os/executable.gs.ts +18 -0
  161. package/gs/os/executable_js.gs.ts +6 -0
  162. package/gs/os/executable_wasm.gs.ts +10 -0
  163. package/gs/os/file_constants_js.gs.ts +98 -0
  164. package/gs/os/file_js.gs.ts +99 -0
  165. package/gs/os/file_open_unix.gs.ts +15 -0
  166. package/gs/os/file_posix_js.gs.ts +40 -0
  167. package/gs/os/file_unix_js.gs.ts +94 -0
  168. package/gs/os/getwd_js.gs.ts +28 -0
  169. package/gs/os/index.ts +19 -0
  170. package/gs/os/path.gs.ts +35 -0
  171. package/gs/os/path_unix.gs.ts +49 -0
  172. package/gs/os/pidfd_js.gs.ts +25 -0
  173. package/gs/os/pipe_wasm.gs.ts +17 -0
  174. package/gs/os/proc.gs.ts +84 -0
  175. package/gs/os/proc_js.gs.ts +15 -0
  176. package/gs/os/rawconn_js.gs.ts +30 -0
  177. package/gs/os/removeall_js.gs.ts +9 -0
  178. package/gs/os/root_js.gs.ts +111 -0
  179. package/gs/os/root_nonwindows.gs.ts +6 -0
  180. package/gs/os/root_noopenat.gs.ts +45 -0
  181. package/gs/os/stat.gs.ts +38 -0
  182. package/gs/os/stat_js.gs.ts +30 -0
  183. package/gs/os/stat_unix_js.gs.ts +27 -0
  184. package/gs/os/sticky_bsd.gs.ts +4 -0
  185. package/gs/os/sys.gs.ts +12 -0
  186. package/gs/os/sys_bsd.gs.ts +17 -0
  187. package/gs/os/sys_js.gs.ts +9 -0
  188. package/gs/os/tempfile.gs.ts +34 -0
  189. package/gs/os/types.gs.ts +170 -0
  190. package/gs/os/types_js.gs.ts +205 -0
  191. package/gs/os/types_unix.gs.ts +118 -0
  192. package/gs/os/wait_unimp.gs.ts +2 -0
  193. package/gs/os/zero_copy_posix.gs.ts +35 -0
  194. package/gs/os/zero_copy_stub.gs.ts +4 -0
  195. package/gs/syscall/index.ts +204 -0
  196. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare let Args: $.Slice<string>;
3
+ export declare function init(): void;
4
+ export declare function runtime_args(): $.Slice<string>;
5
+ export declare function Getuid(): number;
6
+ export declare function Geteuid(): number;
7
+ export declare function Getgid(): number;
8
+ export declare function Getegid(): number;
9
+ export declare function Getgroups(): [$.Slice<number>, $.GoError];
10
+ export declare function Exit(code: number): void;
11
+ export declare function runtime_beforeExit(exitCode: number): void;
@@ -0,0 +1,68 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { ErrUnimplemented } from "./error.gs.js";
3
+ export let Args = null;
4
+ export function init() {
5
+ // In JavaScript environment, just initialize with empty args
6
+ Args = runtime_args();
7
+ }
8
+ export function runtime_args() {
9
+ return $.arrayToSlice([]);
10
+ }
11
+ // Getuid returns the numeric user id of the caller.
12
+ //
13
+ // On Windows, it returns -1.
14
+ export function Getuid() {
15
+ return -1; // Not available in JavaScript
16
+ }
17
+ // Geteuid returns the numeric effective user id of the caller.
18
+ //
19
+ // On Windows, it returns -1.
20
+ export function Geteuid() {
21
+ return -1; // Not available in JavaScript
22
+ }
23
+ // Getgid returns the numeric group id of the caller.
24
+ //
25
+ // On Windows, it returns -1.
26
+ export function Getgid() {
27
+ return -1; // Not available in JavaScript
28
+ }
29
+ // Getegid returns the numeric effective group id of the caller.
30
+ //
31
+ // On Windows, it returns -1.
32
+ export function Getegid() {
33
+ return -1; // Not available in JavaScript
34
+ }
35
+ // Getgroups returns a list of the numeric ids of groups that the caller belongs to.
36
+ //
37
+ // On Windows, it returns [syscall.EWINDOWS]. See the [os/user] package
38
+ // for a possible alternative.
39
+ export function Getgroups() {
40
+ return [$.arrayToSlice([]), ErrUnimplemented];
41
+ }
42
+ // Exit causes the current program to exit with the given status code.
43
+ // Conventionally, code zero indicates success, non-zero an error.
44
+ // The program terminates immediately; deferred functions are not run.
45
+ //
46
+ // For portability, the status code should be in the range [0, 125].
47
+ export function Exit(code) {
48
+ // Testlog functionality not available in JavaScript - stub
49
+ // if (code == 0 && testlog.PanicOnExit0()) {
50
+ // $.panic("unexpected call to os.Exit(0) during test")
51
+ // }
52
+ // Inform the runtime that os.Exit is being called. If -race is
53
+ // enabled, this will give race detector a chance to fail the
54
+ // program (racy programs do not have the right to finish
55
+ // successfully). If coverage is enabled, then this call will
56
+ // enable us to write out a coverage data file.
57
+ runtime_beforeExit(code);
58
+ // In JavaScript environment, use process.exit if available
59
+ if (typeof process !== 'undefined' && process.exit) {
60
+ process.exit(code);
61
+ }
62
+ else {
63
+ // Fallback: just return (can't really exit in browser)
64
+ return;
65
+ }
66
+ }
67
+ export function runtime_beforeExit(exitCode) { }
68
+ //# sourceMappingURL=proc.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proc.gs.js","sourceRoot":"","sources":["../../../gs/os/proc.gs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMlE,MAAM,CAAC,IAAI,IAAI,GAAoB,IAAI,CAAA;AAEvC,MAAM,UAAU,IAAI;IACnB,6DAA6D;IAC7D,IAAI,GAAG,YAAY,EAAE,CAAA;AACtB,CAAC;AAED,MAAM,UAAU,YAAY;IAC3B,OAAO,CAAC,CAAC,YAAY,CAAS,EAAE,CAAC,CAAA;AAClC,CAAC;AAED,oDAAoD;AACpD,EAAE;AACF,6BAA6B;AAC7B,MAAM,UAAU,MAAM;IACrB,OAAO,CAAC,CAAC,CAAA,CAAC,8BAA8B;AACzC,CAAC;AAED,+DAA+D;AAC/D,EAAE;AACF,6BAA6B;AAC7B,MAAM,UAAU,OAAO;IACtB,OAAO,CAAC,CAAC,CAAA,CAAC,8BAA8B;AACzC,CAAC;AAED,qDAAqD;AACrD,EAAE;AACF,6BAA6B;AAC7B,MAAM,UAAU,MAAM;IACrB,OAAO,CAAC,CAAC,CAAA,CAAC,8BAA8B;AACzC,CAAC;AAED,gEAAgE;AAChE,EAAE;AACF,6BAA6B;AAC7B,MAAM,UAAU,OAAO;IACtB,OAAO,CAAC,CAAC,CAAA,CAAC,8BAA8B;AACzC,CAAC;AAED,oFAAoF;AACpF,EAAE;AACF,uEAAuE;AACvE,8BAA8B;AAC9B,MAAM,UAAU,SAAS;IACxB,OAAO,CAAC,CAAC,CAAC,YAAY,CAAS,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAA;AACtD,CAAC;AAED,sEAAsE;AACtE,kEAAkE;AAClE,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,MAAM,UAAU,IAAI,CAAC,IAAY;IAEhC,2DAA2D;IAC3D,6CAA6C;IAC7C,uDAAuD;IACvD,IAAI;IAEJ,+DAA+D;IAC/D,6DAA6D;IAC7D,yDAAyD;IACzD,6DAA6D;IAC7D,+CAA+C;IAC/C,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAExB,2DAA2D;IAC3D,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC;SAAM,CAAC;QACP,uDAAuD;QACvD,OAAM;IACP,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAgB,IAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function runtime_args(): $.Slice<string>;
3
+ export declare function runtime_beforeExit(exitCode: number): void;
@@ -0,0 +1,12 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ // JavaScript-specific process functions
3
+ // runtime_args returns command line arguments (stub for JS)
4
+ export function runtime_args() {
5
+ // In JavaScript environment, return empty args or process.argv equivalent
6
+ return $.arrayToSlice([]);
7
+ }
8
+ // runtime_beforeExit is called before exit (stub for JS)
9
+ export function runtime_beforeExit(exitCode) {
10
+ // No-op in JavaScript
11
+ }
12
+ //# sourceMappingURL=proc_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proc_js.gs.js","sourceRoot":"","sources":["../../../gs/os/proc_js.gs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,wCAAwC;AAExC,4DAA4D;AAC5D,MAAM,UAAU,YAAY;IAC3B,0EAA0E;IAC1E,OAAO,CAAC,CAAC,YAAY,CAAS,EAAE,CAAC,CAAA;AAClC,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IAClD,sBAAsB;AACvB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { File } from "./types_js.gs.js";
3
+ export declare class rawConn {
4
+ private file;
5
+ constructor(file: File | null);
6
+ Control(f: ((fd: number) => void) | null): $.GoError;
7
+ Read(f: ((fd: number) => boolean) | null): $.GoError;
8
+ Write(f: ((fd: number) => boolean) | null): $.GoError;
9
+ }
10
+ export declare function newRawConn(file: File | null): rawConn;
@@ -0,0 +1,26 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // JavaScript-specific stub for raw connection operations
3
+ // These operations are not available in JavaScript environments
4
+ export class rawConn {
5
+ file;
6
+ constructor(file) {
7
+ this.file = file;
8
+ }
9
+ // Control calls fn with the file descriptor - stub implementation
10
+ Control(f) {
11
+ return ErrUnimplemented;
12
+ }
13
+ // Read calls fn when the file descriptor is ready for reading - stub implementation
14
+ Read(f) {
15
+ return ErrUnimplemented;
16
+ }
17
+ // Write calls fn when the file descriptor is ready for writing - stub implementation
18
+ Write(f) {
19
+ return ErrUnimplemented;
20
+ }
21
+ }
22
+ // newRawConn creates a new raw connection - stub implementation
23
+ export function newRawConn(file) {
24
+ return new rawConn(file);
25
+ }
26
+ //# sourceMappingURL=rawconn_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rawconn_js.gs.js","sourceRoot":"","sources":["../../../gs/os/rawconn_js.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,yDAAyD;AACzD,gEAAgE;AAEhE,MAAM,OAAO,OAAO;IACC;IAApB,YAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAG,CAAC;IAEzC,kEAAkE;IAC3D,OAAO,CAAC,CAAgC;QAC9C,OAAO,gBAAgB,CAAA;IACxB,CAAC;IAED,sFAAsF;IAC/E,IAAI,CAAC,CAAmC;QAC9C,OAAO,gBAAgB,CAAA;IACxB,CAAC;IAED,qFAAqF;IAC9E,KAAK,CAAC,CAAmC;QAC/C,OAAO,gBAAgB,CAAA;IACxB,CAAC;CACD;AAED,gEAAgE;AAChE,MAAM,UAAU,UAAU,CAAC,IAAiB;IAC3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function RemoveAll(path: string): $.GoError;
@@ -0,0 +1,7 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // JavaScript-specific stub for removeall operations
3
+ // These operations cannot be implemented in JavaScript environments
4
+ export function RemoveAll(path) {
5
+ return ErrUnimplemented;
6
+ }
7
+ //# sourceMappingURL=removeall_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeall_js.gs.js","sourceRoot":"","sources":["../../../gs/os/removeall_js.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,oDAAoD;AACpD,oEAAoE;AAEpE,MAAM,UAAU,SAAS,CAAC,IAAY;IACrC,OAAO,gBAAgB,CAAA;AACxB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { File } from "./types_js.gs.js";
3
+ import * as fs from "@goscript/io/fs/index.js";
4
+ export declare function OpenInRoot(dir: string, name: string): [File | null, $.GoError];
5
+ export declare class Root {
6
+ constructor();
7
+ Name(): string;
8
+ Close(): $.GoError;
9
+ Open(name: string): [File | null, $.GoError];
10
+ Create(name: string): [File | null, $.GoError];
11
+ OpenFile(name: string, flag: number, perm: number): [File | null, $.GoError];
12
+ OpenRoot(name: string): [RootType | null, $.GoError];
13
+ Mkdir(name: string, perm: number): $.GoError;
14
+ Remove(name: string): $.GoError;
15
+ Stat(name: string): [fs.FileInfo | null, $.GoError];
16
+ Lstat(name: string): [fs.FileInfo | null, $.GoError];
17
+ FS(): fs.FS;
18
+ static __typeInfo: $.StructTypeInfo;
19
+ }
20
+ export type RootType = Root;
21
+ export declare function OpenRoot(name: string): [Root | null, $.GoError];
22
+ export declare function splitPathInRoot(s: string, prefix: $.Slice<string> | null, suffix: $.Slice<string> | null): [$.Slice<string>, string, $.GoError];
23
+ export declare function isValidRootFSPath(name: string): boolean;
@@ -0,0 +1,80 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { ErrUnimplemented } from "./error.gs.js";
3
+ // JavaScript-specific implementations for root filesystem operations
4
+ // These functions stub operations that cannot be implemented in JavaScript
5
+ // OpenInRoot opens the file name in the directory dir - stub implementation
6
+ export function OpenInRoot(dir, name) {
7
+ return [null, ErrUnimplemented];
8
+ }
9
+ // Root represents a root filesystem - stub implementation
10
+ export class Root {
11
+ constructor() { }
12
+ // Name returns the name of the directory presented to OpenRoot
13
+ Name() {
14
+ return "";
15
+ }
16
+ // Close closes the Root
17
+ Close() {
18
+ return ErrUnimplemented;
19
+ }
20
+ // Open opens the named file in the root for reading
21
+ Open(name) {
22
+ return [null, ErrUnimplemented];
23
+ }
24
+ // Create creates or truncates the named file in the root
25
+ Create(name) {
26
+ return [null, ErrUnimplemented];
27
+ }
28
+ // OpenFile opens the named file in the root
29
+ OpenFile(name, flag, perm) {
30
+ return [null, ErrUnimplemented];
31
+ }
32
+ // OpenRoot opens the named directory in the root
33
+ OpenRoot(name) {
34
+ return [null, ErrUnimplemented];
35
+ }
36
+ // Mkdir creates a new directory in the root
37
+ Mkdir(name, perm) {
38
+ return ErrUnimplemented;
39
+ }
40
+ // Remove removes the named file or directory in the root
41
+ Remove(name) {
42
+ return ErrUnimplemented;
43
+ }
44
+ // Stat returns a FileInfo describing the named file in the root
45
+ Stat(name) {
46
+ return [null, ErrUnimplemented];
47
+ }
48
+ // Lstat returns a FileInfo describing the named file in the root
49
+ Lstat(name) {
50
+ return [null, ErrUnimplemented];
51
+ }
52
+ // FS returns a file system for the tree of files in the root
53
+ FS() {
54
+ return new stubFS();
55
+ }
56
+ // Register this type with the runtime type system
57
+ static __typeInfo = $.registerStructType('Root', new Root(), [
58
+ { name: "Name", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: 'string' } }] },
59
+ { name: "Close", args: [], returns: [{ type: { kind: $.TypeKind.Interface, name: 'GoError', methods: [{ name: 'Error', args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: 'string' } }] }] } }] }
60
+ ], Root, {});
61
+ }
62
+ // OpenRoot opens a root filesystem - stub implementation
63
+ export function OpenRoot(name) {
64
+ return [null, ErrUnimplemented];
65
+ }
66
+ // splitPathInRoot splits a path in root - stub implementation
67
+ export function splitPathInRoot(s, prefix, suffix) {
68
+ return [null, "", ErrUnimplemented];
69
+ }
70
+ // isValidRootFSPath checks if a path is valid for root filesystem - stub implementation
71
+ export function isValidRootFSPath(name) {
72
+ return false;
73
+ }
74
+ // Internal stub filesystem
75
+ class stubFS {
76
+ Open(name) {
77
+ return [null, ErrUnimplemented];
78
+ }
79
+ }
80
+ //# sourceMappingURL=root_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root_js.gs.js","sourceRoot":"","sources":["../../../gs/os/root_js.gs.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function rootCleanPath(s: string, prefix: $.Slice<string>, suffix: $.Slice<string>): [string, $.GoError];
@@ -0,0 +1,4 @@
1
+ export function rootCleanPath(s, prefix, suffix) {
2
+ return [s, null];
3
+ }
4
+ //# sourceMappingURL=root_nonwindows.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root_nonwindows.gs.js","sourceRoot":"","sources":["../../../gs/os/root_nonwindows.gs.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,MAAuB,EAAE,MAAuB;IACxF,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AACjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { Root } from "./root_js.gs.js";
3
+ import { File } from "./types_js.gs.js";
4
+ import * as fs from "@goscript/io/fs/index.js";
5
+ export declare function openRootNolog(name: string): [Root | null, $.GoError];
6
+ export declare function openRootInRoot(r: Root | null, name: string): [Root | null, $.GoError];
7
+ export declare function newRoot(name: string): [Root | null, $.GoError];
8
+ export declare function rootOpenFileNolog(r: Root | null, name: string, flag: number, perm: number): [File | null, $.GoError];
9
+ export declare function rootStat(r: Root | null, name: string, lstat: boolean): [fs.FileInfo | null, $.GoError];
10
+ export declare function rootMkdir(r: Root | null, name: string, perm: number): $.GoError;
11
+ export declare function rootRemove(r: Root | null, name: string): $.GoError;
@@ -0,0 +1,31 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // Stub functions for JavaScript environment - these operations cannot be implemented properly
3
+ // openRootNolog is OpenRoot - stub implementation
4
+ export function openRootNolog(name) {
5
+ return [null, ErrUnimplemented];
6
+ }
7
+ // openRootInRoot is Root.OpenRoot - stub implementation
8
+ export function openRootInRoot(r, name) {
9
+ return [null, ErrUnimplemented];
10
+ }
11
+ // newRoot returns a new Root - stub implementation
12
+ export function newRoot(name) {
13
+ return [null, ErrUnimplemented];
14
+ }
15
+ // rootOpenFileNolog is Root.OpenFile - stub implementation
16
+ export function rootOpenFileNolog(r, name, flag, perm) {
17
+ return [null, ErrUnimplemented];
18
+ }
19
+ // rootStat - stub implementation
20
+ export function rootStat(r, name, lstat) {
21
+ return [null, ErrUnimplemented];
22
+ }
23
+ // rootMkdir - stub implementation
24
+ export function rootMkdir(r, name, perm) {
25
+ return ErrUnimplemented;
26
+ }
27
+ // rootRemove - stub implementation
28
+ export function rootRemove(r, name) {
29
+ return ErrUnimplemented;
30
+ }
31
+ //# sourceMappingURL=root_noopenat.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root_noopenat.gs.js","sourceRoot":"","sources":["../../../gs/os/root_noopenat.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAOlE,8FAA8F;AAE9F,kDAAkD;AAClD,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,cAAc,CAAC,CAAc,EAAE,IAAY;IAC1D,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,OAAO,CAAC,IAAY;IACnC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,iBAAiB,CAAC,CAAc,EAAE,IAAY,EAAE,IAAY,EAAE,IAAY;IACzF,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,QAAQ,CAAC,CAAc,EAAE,IAAY,EAAE,KAAc;IACpE,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,oCAAoC;AACpC,MAAM,UAAU,SAAS,CAAC,CAAc,EAAE,IAAY,EAAE,IAAY;IACnE,OAAO,gBAAgB,CAAA;AACxB,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,UAAU,CAAC,CAAc,EAAE,IAAY;IACtD,OAAO,gBAAgB,CAAA;AACxB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { Time, FileMode } from "./types_js.gs.js";
3
+ export declare function Stat(name: string): [
4
+ null | {
5
+ IsDir(): boolean;
6
+ ModTime(): any;
7
+ Mode(): any;
8
+ Name(): string;
9
+ Size(): number;
10
+ Sys(): null | any;
11
+ },
12
+ $.GoError
13
+ ];
14
+ export declare function Lstat(name: string): [
15
+ null | {
16
+ IsDir(): boolean;
17
+ ModTime(): Time;
18
+ Mode(): FileMode;
19
+ Name(): string;
20
+ Size(): number;
21
+ Sys(): null | any;
22
+ },
23
+ $.GoError
24
+ ];
@@ -0,0 +1,20 @@
1
+ import { lstatNolog, statNolog } from "./stat_js.gs.js";
2
+ // Stat returns a [FileInfo] describing the named file.
3
+ // If there is an error, it will be of type [*PathError].
4
+ export function Stat(name) {
5
+ // testlog.Stat(name) // Testlog not available in JavaScript
6
+ return statNolog(name);
7
+ }
8
+ // Lstat returns a [FileInfo] describing the named file.
9
+ // If the file is a symbolic link, the returned FileInfo
10
+ // describes the symbolic link. Lstat makes no attempt to follow the link.
11
+ // If there is an error, it will be of type [*PathError].
12
+ //
13
+ // On Windows, if the file is a reparse point that is a surrogate for another
14
+ // named entity (such as a symbolic link or mounted folder), the returned
15
+ // FileInfo describes the reparse point, and makes no attempt to resolve it.
16
+ export function Lstat(name) {
17
+ // testlog.Stat(name) // Testlog not available in JavaScript
18
+ return lstatNolog(name);
19
+ }
20
+ //# sourceMappingURL=stat.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat.gs.js","sourceRoot":"","sources":["../../../gs/os/stat.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,uDAAuD;AACvD,yDAAyD;AACzD,MAAM,UAAU,IAAI,CAAC,IAAY;IAQhC,4DAA4D;IAC5D,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA;AACvB,CAAC;AAED,wDAAwD;AACxD,wDAAwD;AACxD,0EAA0E;AAC1E,yDAAyD;AACzD,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,MAAM,UAAU,KAAK,CAAC,IAAY;IAQjC,4DAA4D;IAC5D,OAAO,UAAU,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import * as fs from "@goscript/io/fs/index.js";
3
+ export declare function Stat(name: string): [fs.FileInfo, $.GoError];
4
+ export declare function Lstat(name: string): [fs.FileInfo, $.GoError];
5
+ export declare function statNolog(name: string): [fs.FileInfo, $.GoError];
6
+ export declare function lstatNolog(name: string): [fs.FileInfo, $.GoError];
@@ -0,0 +1,23 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // JavaScript-specific stubs for stat operations
3
+ // Stat returns a [FileInfo] describing the named file.
4
+ // If there is an error, it will be of type [*PathError].
5
+ export function Stat(name) {
6
+ return [null, ErrUnimplemented];
7
+ }
8
+ // Lstat returns a [FileInfo] describing the named file.
9
+ // If the file is a symbolic link, the returned FileInfo
10
+ // describes the symbolic link. Lstat makes no attempt to follow the link.
11
+ // If there is an error, it will be of type [*PathError].
12
+ export function Lstat(name) {
13
+ return [null, ErrUnimplemented];
14
+ }
15
+ // statNolog is the same as Stat, for use in DirFS.
16
+ export function statNolog(name) {
17
+ return [null, ErrUnimplemented];
18
+ }
19
+ // lstatNolog is the same as Lstat, for use in DirFS.
20
+ export function lstatNolog(name) {
21
+ return [null, ErrUnimplemented];
22
+ }
23
+ //# sourceMappingURL=stat_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat_js.gs.js","sourceRoot":"","sources":["../../../gs/os/stat_js.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIjD,gDAAgD;AAEhD,uDAAuD;AACvD,yDAAyD;AACzD,MAAM,UAAU,IAAI,CAAC,IAAY;IAChC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,wDAAwD;AACxD,wDAAwD;AACxD,0EAA0E;AAC1E,yDAAyD;AACzD,MAAM,UAAU,KAAK,CAAC,IAAY;IACjC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,IAAY;IACrC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,UAAU,CAAC,IAAY;IACtC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import * as fs from "@goscript/io/fs/index.js";
3
+ export declare function statNolog(name: string): [fs.FileInfo | null, $.GoError];
4
+ export declare function lstatNolog(name: string): [fs.FileInfo | null, $.GoError];
5
+ export declare function fillFileStatFromSys(fs: any, name: string): void;
6
+ export interface fileStat {
7
+ sys: any;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // JavaScript-specific stub implementations for Unix stat operations
3
+ // These operations cannot be implemented in JavaScript environments
4
+ // statNolog stats a file with no test logging - stub implementation
5
+ export function statNolog(name) {
6
+ return [null, ErrUnimplemented];
7
+ }
8
+ // lstatNolog lstats a file with no test logging - stub implementation
9
+ export function lstatNolog(name) {
10
+ return [null, ErrUnimplemented];
11
+ }
12
+ // Additional compatibility exports
13
+ export function fillFileStatFromSys(fs, name) {
14
+ // No-op in JavaScript
15
+ }
16
+ //# sourceMappingURL=stat_unix_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat_unix_js.gs.js","sourceRoot":"","sources":["../../../gs/os/stat_unix_js.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIjD,oEAAoE;AACpE,oEAAoE;AAEpE,oEAAoE;AACpE,MAAM,UAAU,SAAS,CAAC,IAAY;IACrC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,UAAU,CAAC,IAAY;IACtC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AAChC,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,mBAAmB,CAAC,EAAO,EAAE,IAAY;IACxD,sBAAsB;AACvB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ let supportsCreateWithStickyBit = false;
2
+ export {};
3
+ //# sourceMappingURL=sticky_bsd.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sticky_bsd.gs.js","sourceRoot":"","sources":["../../../gs/os/sticky_bsd.gs.ts"],"names":[],"mappings":"AAEA,IAAI,2BAA2B,GAAY,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function Hostname(): [string, $.GoError];
@@ -0,0 +1,10 @@
1
+ import { hostname } from "./sys_js.gs.js";
2
+ // Hostname returns the host name reported by the kernel.
3
+ export function Hostname() {
4
+ let name = "";
5
+ let err = null;
6
+ {
7
+ return hostname();
8
+ }
9
+ }
10
+ //# sourceMappingURL=sys.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sys.gs.js","sourceRoot":"","sources":["../../../gs/os/sys.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,yDAAyD;AACzD,MAAM,UAAU,QAAQ;IACvB,IAAI,IAAI,GAAW,EAAE,CAAA;IACrB,IAAI,GAAG,GAAc,IAAI,CAAA;IACzB,CAAC;QACA,OAAO,QAAQ,EAAE,CAAA;IAClB,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function hostname(): [string, $.GoError];
@@ -0,0 +1,15 @@
1
+ import { NewSyscallError } from "./error.gs.js";
2
+ import * as syscall from "@goscript/syscall/index.js";
3
+ export function hostname() {
4
+ let name = "";
5
+ let err = null;
6
+ {
7
+ ;
8
+ [name, err] = syscall.Sysctl("kern.hostname");
9
+ if (err != null) {
10
+ return ["", NewSyscallError("sysctl kern.hostname", err)];
11
+ }
12
+ return [name, null];
13
+ }
14
+ }
15
+ //# sourceMappingURL=sys_bsd.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sys_bsd.gs.js","sourceRoot":"","sources":["../../../gs/os/sys_bsd.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAA;AAErD,MAAM,UAAU,QAAQ;IACvB,IAAI,IAAI,GAAW,EAAE,CAAA;IACrB,IAAI,GAAG,GAAc,IAAI,CAAA;IACzB,CAAC;QACA,CAAC;QAAA,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;QAC9C,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,EAAE,EAAE,eAAe,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC,CAAA;QAC1D,CAAC;QACD,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACpB,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ export declare function hostname(): [string, $.GoError];
@@ -0,0 +1,6 @@
1
+ let supportsCloseOnExec = false;
2
+ // hostname function for JavaScript environment - return mock data
3
+ export function hostname() {
4
+ return ["goscript", null];
5
+ }
6
+ //# sourceMappingURL=sys_js.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sys_js.gs.js","sourceRoot":"","sources":["../../../gs/os/sys_js.gs.ts"],"names":[],"mappings":"AAEA,IAAI,mBAAmB,GAAY,KAAK,CAAA;AAExC,kEAAkE;AAClE,MAAM,UAAU,QAAQ;IACvB,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AAC1B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { File } from "./types.gs.js";
3
+ export declare function joinPath(dir: string, file: string): string;
4
+ export declare function CreateTemp(dir: string, pattern: string): [File | null, $.GoError];
5
+ export declare function MkdirTemp(dir: string, pattern: string): [string, $.GoError];
@@ -0,0 +1,30 @@
1
+ import { ErrUnimplemented } from "./error.gs.js";
2
+ // joinPath joins directory and file paths - simplified implementation for JavaScript
3
+ export function joinPath(dir, file) {
4
+ if (dir === "" || dir === ".") {
5
+ return file;
6
+ }
7
+ if (file === "") {
8
+ return dir;
9
+ }
10
+ // Remove trailing slash from dir if present
11
+ if (dir.endsWith("/")) {
12
+ dir = dir.slice(0, -1);
13
+ }
14
+ // Remove leading slash from file if present
15
+ if (file.startsWith("/")) {
16
+ file = file.slice(1);
17
+ }
18
+ return dir + "/" + file;
19
+ }
20
+ // CreateTemp creates a new temporary file in the directory dir.
21
+ // Stubbed implementation for JavaScript environment.
22
+ export function CreateTemp(dir, pattern) {
23
+ return [null, ErrUnimplemented];
24
+ }
25
+ // MkdirTemp creates a new temporary directory.
26
+ // Stubbed implementation for JavaScript environment.
27
+ export function MkdirTemp(dir, pattern) {
28
+ return ["", ErrUnimplemented];
29
+ }
30
+ //# sourceMappingURL=tempfile.gs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tempfile.gs.js","sourceRoot":"","sources":["../../../gs/os/tempfile.gs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,qFAAqF;AACrF,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,IAAY;IAChD,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QAChB,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,4CAA4C;IAC5C,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC;IACD,8CAA8C;IAC9C,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,GAAG,GAAG,GAAG,GAAG,IAAI,CAAA;AACzB,CAAC;AAED,gEAAgE;AAChE,qDAAqD;AACrD,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,OAAe;IACrD,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;AACjC,CAAC;AAED,+CAA+C;AAC/C,qDAAqD;AACrD,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,OAAe;IACpD,OAAO,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC/B,CAAC"}