typenative 0.0.6 → 0.0.7

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 (107) hide show
  1. package/bin/index.js +4 -1
  2. package/package.json +1 -1
  3. /package/{tcc → bin/tcc}/doc/tcc-doc.html +0 -0
  4. /package/{tcc → bin/tcc}/doc/tcc-win32.txt +0 -0
  5. /package/{tcc → bin/tcc}/examples/dll.c +0 -0
  6. /package/{tcc → bin/tcc}/examples/fib.c +0 -0
  7. /package/{tcc → bin/tcc}/examples/hello_dll.c +0 -0
  8. /package/{tcc → bin/tcc}/examples/hello_win.c +0 -0
  9. /package/{tcc → bin/tcc}/examples/libtcc_test.c +0 -0
  10. /package/{tcc → bin/tcc}/include/_mingw.h +0 -0
  11. /package/{tcc → bin/tcc}/include/assert.h +0 -0
  12. /package/{tcc → bin/tcc}/include/conio.h +0 -0
  13. /package/{tcc → bin/tcc}/include/ctype.h +0 -0
  14. /package/{tcc → bin/tcc}/include/dir.h +0 -0
  15. /package/{tcc → bin/tcc}/include/direct.h +0 -0
  16. /package/{tcc → bin/tcc}/include/dirent.h +0 -0
  17. /package/{tcc → bin/tcc}/include/dos.h +0 -0
  18. /package/{tcc → bin/tcc}/include/errno.h +0 -0
  19. /package/{tcc → bin/tcc}/include/excpt.h +0 -0
  20. /package/{tcc → bin/tcc}/include/fcntl.h +0 -0
  21. /package/{tcc → bin/tcc}/include/fenv.h +0 -0
  22. /package/{tcc → bin/tcc}/include/float.h +0 -0
  23. /package/{tcc → bin/tcc}/include/inttypes.h +0 -0
  24. /package/{tcc → bin/tcc}/include/io.h +0 -0
  25. /package/{tcc → bin/tcc}/include/limits.h +0 -0
  26. /package/{tcc → bin/tcc}/include/locale.h +0 -0
  27. /package/{tcc → bin/tcc}/include/malloc.h +0 -0
  28. /package/{tcc → bin/tcc}/include/math.h +0 -0
  29. /package/{tcc → bin/tcc}/include/mem.h +0 -0
  30. /package/{tcc → bin/tcc}/include/memory.h +0 -0
  31. /package/{tcc → bin/tcc}/include/process.h +0 -0
  32. /package/{tcc → bin/tcc}/include/sec_api/conio_s.h +0 -0
  33. /package/{tcc → bin/tcc}/include/sec_api/crtdbg_s.h +0 -0
  34. /package/{tcc → bin/tcc}/include/sec_api/io_s.h +0 -0
  35. /package/{tcc → bin/tcc}/include/sec_api/mbstring_s.h +0 -0
  36. /package/{tcc → bin/tcc}/include/sec_api/search_s.h +0 -0
  37. /package/{tcc → bin/tcc}/include/sec_api/stdio_s.h +0 -0
  38. /package/{tcc → bin/tcc}/include/sec_api/stdlib_s.h +0 -0
  39. /package/{tcc → bin/tcc}/include/sec_api/stralign_s.h +0 -0
  40. /package/{tcc → bin/tcc}/include/sec_api/string_s.h +0 -0
  41. /package/{tcc → bin/tcc}/include/sec_api/sys/timeb_s.h +0 -0
  42. /package/{tcc → bin/tcc}/include/sec_api/tchar_s.h +0 -0
  43. /package/{tcc → bin/tcc}/include/sec_api/time_s.h +0 -0
  44. /package/{tcc → bin/tcc}/include/sec_api/wchar_s.h +0 -0
  45. /package/{tcc → bin/tcc}/include/setjmp.h +0 -0
  46. /package/{tcc → bin/tcc}/include/share.h +0 -0
  47. /package/{tcc → bin/tcc}/include/signal.h +0 -0
  48. /package/{tcc → bin/tcc}/include/stdarg.h +0 -0
  49. /package/{tcc → bin/tcc}/include/stdbool.h +0 -0
  50. /package/{tcc → bin/tcc}/include/stddef.h +0 -0
  51. /package/{tcc → bin/tcc}/include/stdint.h +0 -0
  52. /package/{tcc → bin/tcc}/include/stdio.h +0 -0
  53. /package/{tcc → bin/tcc}/include/stdlib.h +0 -0
  54. /package/{tcc → bin/tcc}/include/string.h +0 -0
  55. /package/{tcc → bin/tcc}/include/sys/fcntl.h +0 -0
  56. /package/{tcc → bin/tcc}/include/sys/file.h +0 -0
  57. /package/{tcc → bin/tcc}/include/sys/locking.h +0 -0
  58. /package/{tcc → bin/tcc}/include/sys/stat.h +0 -0
  59. /package/{tcc → bin/tcc}/include/sys/time.h +0 -0
  60. /package/{tcc → bin/tcc}/include/sys/timeb.h +0 -0
  61. /package/{tcc → bin/tcc}/include/sys/types.h +0 -0
  62. /package/{tcc → bin/tcc}/include/sys/unistd.h +0 -0
  63. /package/{tcc → bin/tcc}/include/sys/utime.h +0 -0
  64. /package/{tcc → bin/tcc}/include/tcclib.h +0 -0
  65. /package/{tcc → bin/tcc}/include/tchar.h +0 -0
  66. /package/{tcc → bin/tcc}/include/time.h +0 -0
  67. /package/{tcc → bin/tcc}/include/vadefs.h +0 -0
  68. /package/{tcc → bin/tcc}/include/values.h +0 -0
  69. /package/{tcc → bin/tcc}/include/varargs.h +0 -0
  70. /package/{tcc → bin/tcc}/include/wchar.h +0 -0
  71. /package/{tcc → bin/tcc}/include/wctype.h +0 -0
  72. /package/{tcc → bin/tcc}/include/winapi/basetsd.h +0 -0
  73. /package/{tcc → bin/tcc}/include/winapi/basetyps.h +0 -0
  74. /package/{tcc → bin/tcc}/include/winapi/guiddef.h +0 -0
  75. /package/{tcc → bin/tcc}/include/winapi/intrin.h +0 -0
  76. /package/{tcc → bin/tcc}/include/winapi/poppack.h +0 -0
  77. /package/{tcc → bin/tcc}/include/winapi/pshpack1.h +0 -0
  78. /package/{tcc → bin/tcc}/include/winapi/pshpack2.h +0 -0
  79. /package/{tcc → bin/tcc}/include/winapi/pshpack4.h +0 -0
  80. /package/{tcc → bin/tcc}/include/winapi/pshpack8.h +0 -0
  81. /package/{tcc → bin/tcc}/include/winapi/reason.h +0 -0
  82. /package/{tcc → bin/tcc}/include/winapi/specstrings.h +0 -0
  83. /package/{tcc → bin/tcc}/include/winapi/stralign.h +0 -0
  84. /package/{tcc → bin/tcc}/include/winapi/tvout.h +0 -0
  85. /package/{tcc → bin/tcc}/include/winapi/winbase.h +0 -0
  86. /package/{tcc → bin/tcc}/include/winapi/wincon.h +0 -0
  87. /package/{tcc → bin/tcc}/include/winapi/windef.h +0 -0
  88. /package/{tcc → bin/tcc}/include/winapi/windows.h +0 -0
  89. /package/{tcc → bin/tcc}/include/winapi/winerror.h +0 -0
  90. /package/{tcc → bin/tcc}/include/winapi/wingdi.h +0 -0
  91. /package/{tcc → bin/tcc}/include/winapi/winnetwk.h +0 -0
  92. /package/{tcc → bin/tcc}/include/winapi/winnls.h +0 -0
  93. /package/{tcc → bin/tcc}/include/winapi/winnt.h +0 -0
  94. /package/{tcc → bin/tcc}/include/winapi/winreg.h +0 -0
  95. /package/{tcc → bin/tcc}/include/winapi/winuser.h +0 -0
  96. /package/{tcc → bin/tcc}/include/winapi/winver.h +0 -0
  97. /package/{tcc → bin/tcc}/lib/gdi32.def +0 -0
  98. /package/{tcc → bin/tcc}/lib/kernel32.def +0 -0
  99. /package/{tcc → bin/tcc}/lib/libtcc1.a +0 -0
  100. /package/{tcc → bin/tcc}/lib/msvcrt.def +0 -0
  101. /package/{tcc → bin/tcc}/lib/user32.def +0 -0
  102. /package/{tcc → bin/tcc}/libtcc/libtcc.def +0 -0
  103. /package/{tcc → bin/tcc}/libtcc/libtcc.h +0 -0
  104. /package/{tcc → bin/tcc}/libtcc.dll +0 -0
  105. /package/{tcc → bin/tcc}/tcc.exe +0 -0
  106. /package/{tcc → bin/tcc}/tiny_impdef.exe +0 -0
  107. /package/{tcc → bin/tcc}/tiny_libmaker.exe +0 -0
package/bin/index.js CHANGED
@@ -4,6 +4,9 @@ import shell from 'shelljs';
4
4
  import fs from 'fs-extra';
5
5
  import path from 'path';
6
6
  import { transpileToC } from './transpiler.js';
7
+ import { fileURLToPath } from 'url';
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
7
10
  (async function main() {
8
11
  const scriptMode = process.argv.findIndex((a) => a === '--script') > -1;
9
12
  const targetIndex = process.argv.findIndex((a) => a === '--source');
@@ -34,7 +37,7 @@ import { transpileToC } from './transpiler.js';
34
37
  const cCode = transpileToC(tsCode);
35
38
  await fs.ensureDir('dist');
36
39
  await fs.writeFile('dist/code.c', cCode, { encoding: 'utf-8' });
37
- shell.exec(`${__dirname ?? path.resolve()}/tcc/tcc.exe -g ${path.resolve()}/dist/code.c -o ${path.resolve()}/dist/native.exe ${scriptMode ? '-run' : ''}`);
40
+ shell.exec(`${__dirname}/tcc/tcc.exe -g ${path.resolve()}/dist/code.c -o ${path.resolve()}/dist/native.exe ${scriptMode ? '-run' : ''}`);
38
41
  if (answers.output) {
39
42
  await fs.copy('dist/native.exe', answers.output, { overwrite: true });
40
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typenative",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Build native applications using Typescript.",
5
5
  "type": "module",
6
6
  "bin": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes