Commit Graph

51 Commits

Author SHA1 Message Date
catloversg 9920b6ae4d MISC: Add source map to transformed scripts (#1812)
* MISC: Add source map to transformed scripts

* Print error to console
2025-01-19 13:50:50 -08:00
catloversg ab17adf97a MISC: Show user-friendly error message when script is empty (#1848) 2024-12-18 03:17:48 -08:00
catloversg 90cb8a9551 MISC: Add proper type check to AST walking code (#1757) 2024-11-09 15:34:46 -08:00
catloversg f6502dd490 CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
catloversg ceaf27714b MISC: Remove testing code in ScriptTransformer (#1499) 2024-07-17 23:23:18 -07:00
catloversg 864613c616 MISC: Support JSX, TS, TSX script files (#1216) 2024-07-14 14:47:10 -07:00
Caldwell f40d4f8e92 BUGFIX: fix relative imports (#1305)
Relative paths work in imports, at last.
2024-06-02 17:38:01 -07:00
Snarling ebae35b1fb CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -04:00
Snarling e0272ad4af FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 10:26:57 -04:00
Snarling 0df984eea0 CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473) 2023-04-18 03:19:45 -04:00
David Walker ed9e6d5ea3 NETSCRIPT: Compiled modules will be even more shared (#468) 2023-04-07 21:08:39 -04:00
Snarling 04d49e3a6d SCRIPTS: Script modules are reused when they are imported (#461)
Also corrects some compile race conditions.
2023-04-07 00:33:51 -04:00
David Walker 8c4b992d59 TEST: Add a NS2 test (finally) (#458) 2023-04-01 07:45:23 -04:00
Snarling 759f86d6e5 NETSCRIPT: Rework script ram updates (#408) 2023-03-05 22:39:42 -05:00
Snarling fb1f95c26e VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
2022-12-29 20:28:53 -05:00
Olivier Gagnon f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Snarling 572c68738f Unify error handling 2022-09-27 15:34:47 -04:00
Snarling 5798c4c7d3 Unify error handling 2022-09-27 15:32:09 -04:00
Snarling 1dc1a7ed6f lint 2022-08-19 18:36:24 -04:00
Snarling 823cdf70ca Fix compile race conditions 2022-08-19 18:21:31 -04:00
Snarling f6a8d5d337 synchronize scp and write 2022-08-17 18:55:12 -04:00
Snarling 8f8d9a1d23 format+lint 2022-08-09 18:09:25 -04:00
Snarling 208495e269 Initial commit 2022-08-09 18:09:24 -04:00
Olivier Gagnon ceb9fa1249 fix more any 2022-07-20 01:13:06 -04:00
Olivier Gagnon ce2ebf576e fix an any 2022-07-19 22:44:45 -04:00
Olivier Gagnon 5b8eea66d4 rm some any 2022-07-15 23:34:27 -04:00
Olivier Gagnon 58555c0baf remove pre-defined print in .js files. 2022-04-25 13:29:59 -04:00
Olivier Gagnon 2d74b493ee Add sourceURL in comment to fill in stack trace 2022-04-11 21:46:17 -04:00
Olivier Gagnon 3e6d1f6d95 round 2 2022-03-30 21:40:51 -04:00
Olivier Gagnon 695bca73b8 revoke-fix 2022-03-30 21:38:36 -04:00
Olivier Gagnon 77f525c98c rm blob caching 2022-01-20 16:11:48 -05:00
Olivier Gagnon 05cbc25a8f 1.4 2022-01-18 14:03:24 -05:00
hydroflame 27a54217eb Merge pull request #2653 from nickofolas/fix/refactor-loops
Refactor `for ... in` loops
2022-01-17 16:01:04 -05:00
theit8514 423efe19e1 Remove dependents from cache when dependency updated 2022-01-17 12:02:00 -05:00
nickofolas ab841f7530 Refactor for ... in loops 2022-01-15 18:45:03 -06:00
theit8514 dcc9c6955a Expand support for Export declarations with source parameters 2022-01-10 15:54:57 -05:00
hydroflame ec7481b391 Merge pull request #2310 from theit8514/import-via-acorn
Replace regex import with acorn AST parser
2022-01-08 14:27:40 -05:00
Olivier Gagnon c59a267437 change sf4 2022-01-04 19:09:34 -05:00
theit8514 a5d69248dd Replace regex import with acorn AST parser 2022-01-04 13:55:01 -05:00
theit8514 8f77f720e6 Cache the blobs generated by scripts 2021-12-23 23:06:01 -05:00
Olivier Gagnon ed86577d6c imports are more flexible 2021-12-23 15:57:32 -05:00
Olivier Gagnon e117548895 fix some stack traces not printing file name 2021-12-12 14:49:02 -05:00
Olivier Gagnon 4ce0b59310 maybe ram miscalc? 2021-10-27 18:25:22 -04:00
Olivier Gagnon b255318a20 remove memory leak 2021-10-27 14:29:13 -04:00
Olivier Gagnon 6b0e5416c4 wtf 2021-10-15 12:47:43 -04:00
Olivier Gagnon 89fa79c4de fix incite violence 2021-10-14 23:39:30 -04:00
Olivier Gagnon dda6235591 revert dynamic ram miscalc 2021-10-14 17:20:13 -04:00
Olivier Gagnon c556408208 fix parent not being updated when children ram cost increase. 2021-10-14 14:50:57 -04:00
Olivier Gagnon 8b15adda8a lint 2021-09-25 02:36:49 -04:00
Olivier Gagnon b0f20c8c8f lint 2021-09-25 01:26:03 -04:00