fenrir-runtime 0.0.1 → 0.2.0
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.
- package/Makefile +5 -11
- package/example/.fenrir/archives/2026-03-14_21-07-26/.metadata.json +7 -0
- package/example/.fenrir/archives/2026-03-14_21-07-26/fenrir.json +9 -0
- package/example/.fenrir/archives/2026-03-14_21-07-26/main.fnr +67 -0
- package/example/{fenrir+aperium → .fenrir/archives/2026-03-14_21-07-26}/package-lock.json +93 -157
- package/example/.fenrir/archives/2026-03-14_21-07-26/package.json +8 -0
- package/example/.fenrir/archives/2026-03-14_21-07-32/.metadata.json +7 -0
- package/example/.fenrir/archives/2026-03-14_21-07-32/fenrir.json +9 -0
- package/example/.fenrir/archives/2026-03-14_21-07-32/main.fnr +67 -0
- package/example/.fenrir/archives/2026-03-14_21-07-32/package-lock.json +826 -0
- package/example/.fenrir/archives/2026-03-14_21-07-32/package.json +8 -0
- package/example/fenrir.json +4 -5
- package/example/main.fnr +59 -10
- package/example/node_modules/.package-lock.json +819 -0
- package/example/node_modules/accepts/HISTORY.md +250 -0
- package/example/node_modules/accepts/LICENSE +23 -0
- package/example/node_modules/accepts/README.md +140 -0
- package/example/node_modules/accepts/index.js +238 -0
- package/example/node_modules/accepts/package.json +47 -0
- package/example/node_modules/body-parser/LICENSE +23 -0
- package/example/node_modules/body-parser/README.md +494 -0
- package/example/node_modules/body-parser/index.js +71 -0
- package/example/node_modules/body-parser/lib/read.js +247 -0
- package/example/node_modules/body-parser/lib/types/json.js +158 -0
- package/example/node_modules/body-parser/lib/types/raw.js +42 -0
- package/example/node_modules/body-parser/lib/types/text.js +36 -0
- package/example/node_modules/body-parser/lib/types/urlencoded.js +142 -0
- package/example/node_modules/body-parser/lib/utils.js +98 -0
- package/example/node_modules/body-parser/package.json +52 -0
- package/example/node_modules/bytes/History.md +97 -0
- package/example/node_modules/bytes/LICENSE +23 -0
- package/example/node_modules/bytes/Readme.md +152 -0
- package/example/node_modules/bytes/index.js +170 -0
- package/example/node_modules/bytes/package.json +42 -0
- package/example/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/example/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/example/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/example/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/example/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/example/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/example/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/example/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/example/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/example/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/example/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/example/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/example/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/example/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/example/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/example/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/example/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/example/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/example/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/example/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/example/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/example/node_modules/call-bound/.eslintrc +13 -0
- package/example/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/example/node_modules/call-bound/.nycrc +9 -0
- package/example/node_modules/call-bound/CHANGELOG.md +42 -0
- package/example/node_modules/call-bound/LICENSE +21 -0
- package/example/node_modules/call-bound/README.md +53 -0
- package/example/node_modules/call-bound/index.d.ts +94 -0
- package/example/node_modules/call-bound/index.js +19 -0
- package/example/node_modules/call-bound/package.json +99 -0
- package/example/node_modules/call-bound/test/index.js +61 -0
- package/example/node_modules/call-bound/tsconfig.json +10 -0
- package/example/node_modules/content-disposition/HISTORY.md +72 -0
- package/example/node_modules/content-disposition/LICENSE +22 -0
- package/example/node_modules/content-disposition/README.md +142 -0
- package/example/node_modules/content-disposition/index.js +458 -0
- package/example/node_modules/content-disposition/package.json +43 -0
- package/example/node_modules/content-type/HISTORY.md +29 -0
- package/example/node_modules/content-type/LICENSE +22 -0
- package/example/node_modules/content-type/README.md +94 -0
- package/example/node_modules/content-type/index.js +225 -0
- package/example/node_modules/content-type/package.json +42 -0
- package/example/node_modules/cookie/LICENSE +24 -0
- package/example/node_modules/cookie/README.md +317 -0
- package/example/node_modules/cookie/SECURITY.md +25 -0
- package/example/node_modules/cookie/index.js +335 -0
- package/example/node_modules/cookie/package.json +44 -0
- package/example/node_modules/cookie-signature/History.md +70 -0
- package/example/node_modules/cookie-signature/LICENSE +22 -0
- package/example/node_modules/cookie-signature/Readme.md +23 -0
- package/example/node_modules/cookie-signature/index.js +47 -0
- package/example/node_modules/cookie-signature/package.json +24 -0
- package/example/node_modules/debug/LICENSE +20 -0
- package/example/node_modules/debug/README.md +481 -0
- package/example/node_modules/debug/package.json +64 -0
- package/example/node_modules/debug/src/browser.js +272 -0
- package/example/node_modules/debug/src/common.js +292 -0
- package/example/node_modules/debug/src/index.js +10 -0
- package/example/node_modules/debug/src/node.js +263 -0
- package/example/node_modules/depd/History.md +103 -0
- package/example/node_modules/depd/LICENSE +22 -0
- package/example/node_modules/depd/Readme.md +280 -0
- package/example/node_modules/depd/index.js +538 -0
- package/example/node_modules/depd/lib/browser/index.js +77 -0
- package/example/node_modules/depd/package.json +45 -0
- package/example/node_modules/dunder-proto/.eslintrc +5 -0
- package/example/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/example/node_modules/dunder-proto/.nycrc +13 -0
- package/example/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/example/node_modules/dunder-proto/LICENSE +21 -0
- package/example/node_modules/dunder-proto/README.md +54 -0
- package/example/node_modules/dunder-proto/get.d.ts +5 -0
- package/example/node_modules/dunder-proto/get.js +30 -0
- package/example/node_modules/dunder-proto/package.json +76 -0
- package/example/node_modules/dunder-proto/set.d.ts +5 -0
- package/example/node_modules/dunder-proto/set.js +35 -0
- package/example/node_modules/dunder-proto/test/get.js +34 -0
- package/example/node_modules/dunder-proto/test/index.js +4 -0
- package/example/node_modules/dunder-proto/test/set.js +50 -0
- package/example/node_modules/dunder-proto/tsconfig.json +9 -0
- package/example/node_modules/ee-first/LICENSE +22 -0
- package/example/node_modules/ee-first/README.md +80 -0
- package/example/node_modules/ee-first/index.js +95 -0
- package/example/node_modules/ee-first/package.json +29 -0
- package/example/node_modules/encodeurl/LICENSE +22 -0
- package/example/node_modules/encodeurl/README.md +109 -0
- package/example/node_modules/encodeurl/index.js +60 -0
- package/example/node_modules/encodeurl/package.json +40 -0
- package/example/node_modules/es-define-property/.eslintrc +13 -0
- package/example/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/example/node_modules/es-define-property/.nycrc +9 -0
- package/example/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/example/node_modules/es-define-property/LICENSE +21 -0
- package/example/node_modules/es-define-property/README.md +49 -0
- package/example/node_modules/es-define-property/index.d.ts +3 -0
- package/example/node_modules/es-define-property/index.js +14 -0
- package/example/node_modules/es-define-property/package.json +81 -0
- package/example/node_modules/es-define-property/test/index.js +56 -0
- package/example/node_modules/es-define-property/tsconfig.json +10 -0
- package/example/node_modules/es-errors/.eslintrc +5 -0
- package/example/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/example/node_modules/es-errors/CHANGELOG.md +40 -0
- package/example/node_modules/es-errors/LICENSE +21 -0
- package/example/node_modules/es-errors/README.md +55 -0
- package/example/node_modules/es-errors/eval.d.ts +3 -0
- package/example/node_modules/es-errors/eval.js +4 -0
- package/example/node_modules/es-errors/index.d.ts +3 -0
- package/example/node_modules/es-errors/index.js +4 -0
- package/example/node_modules/es-errors/package.json +80 -0
- package/example/node_modules/es-errors/range.d.ts +3 -0
- package/example/node_modules/es-errors/range.js +4 -0
- package/example/node_modules/es-errors/ref.d.ts +3 -0
- package/example/node_modules/es-errors/ref.js +4 -0
- package/example/node_modules/es-errors/syntax.d.ts +3 -0
- package/example/node_modules/es-errors/syntax.js +4 -0
- package/example/node_modules/es-errors/test/index.js +19 -0
- package/example/node_modules/es-errors/tsconfig.json +49 -0
- package/example/node_modules/es-errors/type.d.ts +3 -0
- package/example/node_modules/es-errors/type.js +4 -0
- package/example/node_modules/es-errors/uri.d.ts +3 -0
- package/example/node_modules/es-errors/uri.js +4 -0
- package/example/node_modules/es-object-atoms/.eslintrc +16 -0
- package/example/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/example/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/example/node_modules/es-object-atoms/LICENSE +21 -0
- package/example/node_modules/es-object-atoms/README.md +63 -0
- package/example/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/example/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/example/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/example/node_modules/es-object-atoms/ToObject.js +10 -0
- package/example/node_modules/es-object-atoms/index.d.ts +3 -0
- package/example/node_modules/es-object-atoms/index.js +4 -0
- package/example/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/example/node_modules/es-object-atoms/isObject.js +6 -0
- package/example/node_modules/es-object-atoms/package.json +80 -0
- package/example/node_modules/es-object-atoms/test/index.js +38 -0
- package/example/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/example/node_modules/escape-html/LICENSE +24 -0
- package/example/node_modules/escape-html/Readme.md +43 -0
- package/example/node_modules/escape-html/index.js +78 -0
- package/example/node_modules/escape-html/package.json +24 -0
- package/example/node_modules/etag/HISTORY.md +83 -0
- package/example/node_modules/etag/LICENSE +22 -0
- package/example/node_modules/etag/README.md +159 -0
- package/example/node_modules/etag/index.js +131 -0
- package/example/node_modules/etag/package.json +47 -0
- package/example/node_modules/express/LICENSE +24 -0
- package/example/node_modules/express/Readme.md +276 -0
- package/example/node_modules/express/index.js +11 -0
- package/example/node_modules/express/lib/application.js +631 -0
- package/example/node_modules/express/lib/express.js +81 -0
- package/example/node_modules/express/lib/request.js +514 -0
- package/example/node_modules/express/lib/response.js +1053 -0
- package/example/node_modules/express/lib/utils.js +271 -0
- package/example/node_modules/express/lib/view.js +205 -0
- package/example/node_modules/express/package.json +99 -0
- package/example/node_modules/finalhandler/HISTORY.md +239 -0
- package/example/node_modules/finalhandler/LICENSE +22 -0
- package/example/node_modules/finalhandler/README.md +150 -0
- package/example/node_modules/finalhandler/index.js +293 -0
- package/example/node_modules/finalhandler/package.json +47 -0
- package/example/node_modules/forwarded/HISTORY.md +21 -0
- package/example/node_modules/forwarded/LICENSE +22 -0
- package/example/node_modules/forwarded/README.md +57 -0
- package/example/node_modules/forwarded/index.js +90 -0
- package/example/node_modules/forwarded/package.json +45 -0
- package/example/node_modules/fresh/HISTORY.md +80 -0
- package/example/node_modules/fresh/LICENSE +23 -0
- package/example/node_modules/fresh/README.md +117 -0
- package/example/node_modules/fresh/index.js +136 -0
- package/example/node_modules/fresh/package.json +46 -0
- package/example/node_modules/function-bind/.eslintrc +21 -0
- package/example/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/example/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/example/node_modules/function-bind/.nycrc +13 -0
- package/example/node_modules/function-bind/CHANGELOG.md +136 -0
- package/example/node_modules/function-bind/LICENSE +20 -0
- package/example/node_modules/function-bind/README.md +46 -0
- package/example/node_modules/function-bind/implementation.js +84 -0
- package/example/node_modules/function-bind/index.js +5 -0
- package/example/node_modules/function-bind/package.json +87 -0
- package/example/node_modules/function-bind/test/.eslintrc +9 -0
- package/example/node_modules/function-bind/test/index.js +252 -0
- package/example/node_modules/get-intrinsic/.eslintrc +42 -0
- package/example/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/example/node_modules/get-intrinsic/.nycrc +9 -0
- package/example/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/example/node_modules/get-intrinsic/LICENSE +21 -0
- package/example/node_modules/get-intrinsic/README.md +71 -0
- package/example/node_modules/get-intrinsic/index.js +378 -0
- package/example/node_modules/get-intrinsic/package.json +97 -0
- package/example/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/example/node_modules/get-proto/.eslintrc +10 -0
- package/example/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/example/node_modules/get-proto/.nycrc +9 -0
- package/example/node_modules/get-proto/CHANGELOG.md +21 -0
- package/example/node_modules/get-proto/LICENSE +21 -0
- package/example/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/example/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/example/node_modules/get-proto/README.md +50 -0
- package/example/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/example/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/example/node_modules/get-proto/index.d.ts +5 -0
- package/example/node_modules/get-proto/index.js +27 -0
- package/example/node_modules/get-proto/package.json +81 -0
- package/example/node_modules/get-proto/test/index.js +68 -0
- package/example/node_modules/get-proto/tsconfig.json +9 -0
- package/example/node_modules/gopd/.eslintrc +16 -0
- package/example/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/example/node_modules/gopd/CHANGELOG.md +45 -0
- package/example/node_modules/gopd/LICENSE +21 -0
- package/example/node_modules/gopd/README.md +40 -0
- package/example/node_modules/gopd/gOPD.d.ts +1 -0
- package/example/node_modules/gopd/gOPD.js +4 -0
- package/example/node_modules/gopd/index.d.ts +5 -0
- package/example/node_modules/gopd/index.js +15 -0
- package/example/node_modules/gopd/package.json +77 -0
- package/example/node_modules/gopd/test/index.js +36 -0
- package/example/node_modules/gopd/tsconfig.json +9 -0
- package/example/node_modules/has-symbols/.eslintrc +11 -0
- package/example/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/example/node_modules/has-symbols/.nycrc +9 -0
- package/example/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/example/node_modules/has-symbols/LICENSE +21 -0
- package/example/node_modules/has-symbols/README.md +46 -0
- package/example/node_modules/has-symbols/index.d.ts +3 -0
- package/example/node_modules/has-symbols/index.js +14 -0
- package/example/node_modules/has-symbols/package.json +111 -0
- package/example/node_modules/has-symbols/shams.d.ts +3 -0
- package/example/node_modules/has-symbols/shams.js +45 -0
- package/example/node_modules/has-symbols/test/index.js +22 -0
- package/example/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/example/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/example/node_modules/has-symbols/test/tests.js +58 -0
- package/example/node_modules/has-symbols/tsconfig.json +10 -0
- package/example/node_modules/hasown/.eslintrc +5 -0
- package/example/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/example/node_modules/hasown/.nycrc +13 -0
- package/example/node_modules/hasown/CHANGELOG.md +40 -0
- package/example/node_modules/hasown/LICENSE +21 -0
- package/example/node_modules/hasown/README.md +40 -0
- package/example/node_modules/hasown/index.d.ts +3 -0
- package/example/node_modules/hasown/index.js +8 -0
- package/example/node_modules/hasown/package.json +92 -0
- package/example/node_modules/hasown/tsconfig.json +6 -0
- package/example/node_modules/http-errors/HISTORY.md +186 -0
- package/example/node_modules/http-errors/LICENSE +23 -0
- package/example/node_modules/http-errors/README.md +169 -0
- package/example/node_modules/http-errors/index.js +290 -0
- package/example/node_modules/http-errors/package.json +54 -0
- package/example/node_modules/iconv-lite/LICENSE +21 -0
- package/example/node_modules/iconv-lite/README.md +138 -0
- package/example/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/example/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/example/node_modules/iconv-lite/encodings/index.js +23 -0
- package/example/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/example/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/example/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/example/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/example/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/example/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/example/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/example/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/example/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/example/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/example/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/example/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/example/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/example/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/example/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/example/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/example/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/example/node_modules/iconv-lite/lib/index.d.ts +129 -0
- package/example/node_modules/iconv-lite/lib/index.js +182 -0
- package/example/node_modules/iconv-lite/lib/streams.js +105 -0
- package/example/node_modules/iconv-lite/package.json +70 -0
- package/example/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/example/node_modules/inherits/LICENSE +16 -0
- package/example/node_modules/inherits/README.md +42 -0
- package/example/node_modules/inherits/inherits.js +9 -0
- package/example/node_modules/inherits/inherits_browser.js +27 -0
- package/example/node_modules/inherits/package.json +29 -0
- package/example/node_modules/ipaddr.js/LICENSE +19 -0
- package/example/node_modules/ipaddr.js/README.md +233 -0
- package/example/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/example/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/example/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/example/node_modules/ipaddr.js/package.json +35 -0
- package/example/node_modules/is-promise/LICENSE +19 -0
- package/example/node_modules/is-promise/index.d.ts +2 -0
- package/example/node_modules/is-promise/index.js +6 -0
- package/example/node_modules/is-promise/index.mjs +3 -0
- package/example/node_modules/is-promise/package.json +30 -0
- package/example/node_modules/is-promise/readme.md +33 -0
- package/example/node_modules/math-intrinsics/.eslintrc +16 -0
- package/example/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/example/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/example/node_modules/math-intrinsics/LICENSE +21 -0
- package/example/node_modules/math-intrinsics/README.md +50 -0
- package/example/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/example/node_modules/math-intrinsics/abs.js +4 -0
- package/example/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/example/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/example/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/example/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/example/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/example/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/example/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/example/node_modules/math-intrinsics/floor.js +4 -0
- package/example/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/example/node_modules/math-intrinsics/isFinite.js +12 -0
- package/example/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/example/node_modules/math-intrinsics/isInteger.js +16 -0
- package/example/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/example/node_modules/math-intrinsics/isNaN.js +6 -0
- package/example/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/example/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/example/node_modules/math-intrinsics/max.d.ts +1 -0
- package/example/node_modules/math-intrinsics/max.js +4 -0
- package/example/node_modules/math-intrinsics/min.d.ts +1 -0
- package/example/node_modules/math-intrinsics/min.js +4 -0
- package/example/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/example/node_modules/math-intrinsics/mod.js +9 -0
- package/example/node_modules/math-intrinsics/package.json +86 -0
- package/example/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/example/node_modules/math-intrinsics/pow.js +4 -0
- package/example/node_modules/math-intrinsics/round.d.ts +1 -0
- package/example/node_modules/math-intrinsics/round.js +4 -0
- package/example/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/example/node_modules/math-intrinsics/sign.js +11 -0
- package/example/node_modules/math-intrinsics/test/index.js +192 -0
- package/example/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/example/node_modules/media-typer/HISTORY.md +50 -0
- package/example/node_modules/media-typer/LICENSE +22 -0
- package/example/node_modules/media-typer/README.md +93 -0
- package/example/node_modules/media-typer/index.js +143 -0
- package/example/node_modules/media-typer/package.json +33 -0
- package/example/node_modules/merge-descriptors/index.d.ts +11 -0
- package/example/node_modules/merge-descriptors/index.js +26 -0
- package/example/node_modules/merge-descriptors/license +11 -0
- package/example/node_modules/merge-descriptors/package.json +50 -0
- package/example/node_modules/merge-descriptors/readme.md +55 -0
- package/example/node_modules/mime-db/HISTORY.md +541 -0
- package/example/node_modules/mime-db/LICENSE +23 -0
- package/example/node_modules/mime-db/README.md +109 -0
- package/example/node_modules/mime-db/db.json +9342 -0
- package/example/node_modules/mime-db/index.js +12 -0
- package/example/node_modules/mime-db/package.json +56 -0
- package/example/node_modules/mime-types/HISTORY.md +428 -0
- package/example/node_modules/mime-types/LICENSE +23 -0
- package/example/node_modules/mime-types/README.md +126 -0
- package/example/node_modules/mime-types/index.js +211 -0
- package/example/node_modules/mime-types/mimeScore.js +57 -0
- package/example/node_modules/mime-types/package.json +49 -0
- package/example/node_modules/ms/index.js +162 -0
- package/example/node_modules/ms/license.md +21 -0
- package/example/node_modules/ms/package.json +38 -0
- package/example/node_modules/ms/readme.md +59 -0
- package/example/node_modules/negotiator/HISTORY.md +114 -0
- package/example/node_modules/negotiator/LICENSE +24 -0
- package/example/node_modules/negotiator/README.md +212 -0
- package/example/node_modules/negotiator/index.js +83 -0
- package/example/node_modules/negotiator/lib/charset.js +169 -0
- package/example/node_modules/negotiator/lib/encoding.js +205 -0
- package/example/node_modules/negotiator/lib/language.js +179 -0
- package/example/node_modules/negotiator/lib/mediaType.js +294 -0
- package/example/node_modules/negotiator/package.json +43 -0
- package/example/node_modules/object-inspect/.eslintrc +53 -0
- package/example/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/example/node_modules/object-inspect/.nycrc +13 -0
- package/example/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/example/node_modules/object-inspect/LICENSE +21 -0
- package/example/node_modules/object-inspect/example/all.js +23 -0
- package/example/node_modules/object-inspect/example/circular.js +6 -0
- package/example/node_modules/object-inspect/example/fn.js +5 -0
- package/example/node_modules/object-inspect/example/inspect.js +10 -0
- package/example/node_modules/object-inspect/index.js +544 -0
- package/example/node_modules/object-inspect/package-support.json +20 -0
- package/example/node_modules/object-inspect/package.json +105 -0
- package/example/node_modules/object-inspect/readme.markdown +84 -0
- package/example/node_modules/object-inspect/test/bigint.js +58 -0
- package/example/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/example/node_modules/object-inspect/test/circular.js +16 -0
- package/example/node_modules/object-inspect/test/deep.js +12 -0
- package/example/node_modules/object-inspect/test/element.js +53 -0
- package/example/node_modules/object-inspect/test/err.js +48 -0
- package/example/node_modules/object-inspect/test/fakes.js +29 -0
- package/example/node_modules/object-inspect/test/fn.js +76 -0
- package/example/node_modules/object-inspect/test/global.js +17 -0
- package/example/node_modules/object-inspect/test/has.js +15 -0
- package/example/node_modules/object-inspect/test/holes.js +15 -0
- package/example/node_modules/object-inspect/test/indent-option.js +271 -0
- package/example/node_modules/object-inspect/test/inspect.js +139 -0
- package/example/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/example/node_modules/object-inspect/test/number.js +58 -0
- package/example/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/example/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/example/node_modules/object-inspect/test/undef.js +12 -0
- package/example/node_modules/object-inspect/test/values.js +261 -0
- package/example/node_modules/object-inspect/test-core-js.js +26 -0
- package/example/node_modules/object-inspect/util.inspect.js +1 -0
- package/example/node_modules/on-finished/HISTORY.md +98 -0
- package/example/node_modules/on-finished/LICENSE +23 -0
- package/example/node_modules/on-finished/README.md +162 -0
- package/example/node_modules/on-finished/index.js +234 -0
- package/example/node_modules/on-finished/package.json +39 -0
- package/example/node_modules/once/LICENSE +15 -0
- package/example/node_modules/once/README.md +79 -0
- package/example/node_modules/once/once.js +42 -0
- package/example/node_modules/once/package.json +33 -0
- package/example/node_modules/parseurl/HISTORY.md +58 -0
- package/example/node_modules/parseurl/LICENSE +24 -0
- package/example/node_modules/parseurl/README.md +133 -0
- package/example/node_modules/parseurl/index.js +158 -0
- package/example/node_modules/parseurl/package.json +40 -0
- package/example/node_modules/path-to-regexp/LICENSE +21 -0
- package/example/node_modules/path-to-regexp/Readme.md +224 -0
- package/example/node_modules/path-to-regexp/dist/index.d.ts +144 -0
- package/example/node_modules/path-to-regexp/dist/index.js +409 -0
- package/example/node_modules/path-to-regexp/dist/index.js.map +1 -0
- package/example/node_modules/path-to-regexp/package.json +64 -0
- package/example/node_modules/proxy-addr/HISTORY.md +161 -0
- package/example/node_modules/proxy-addr/LICENSE +22 -0
- package/example/node_modules/proxy-addr/README.md +139 -0
- package/example/node_modules/proxy-addr/index.js +327 -0
- package/example/node_modules/proxy-addr/package.json +47 -0
- package/example/node_modules/qs/.editorconfig +46 -0
- package/example/node_modules/qs/.github/FUNDING.yml +12 -0
- package/example/node_modules/qs/.github/SECURITY.md +11 -0
- package/example/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/example/node_modules/qs/.nycrc +13 -0
- package/example/node_modules/qs/CHANGELOG.md +806 -0
- package/example/node_modules/qs/LICENSE.md +29 -0
- package/example/node_modules/qs/README.md +758 -0
- package/example/node_modules/qs/dist/qs.js +141 -0
- package/example/node_modules/qs/eslint.config.mjs +56 -0
- package/example/node_modules/qs/lib/formats.js +23 -0
- package/example/node_modules/qs/lib/index.js +11 -0
- package/example/node_modules/qs/lib/parse.js +373 -0
- package/example/node_modules/qs/lib/stringify.js +356 -0
- package/example/node_modules/qs/lib/utils.js +342 -0
- package/example/node_modules/qs/package.json +94 -0
- package/example/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/example/node_modules/qs/test/parse.js +1568 -0
- package/example/node_modules/qs/test/stringify.js +1310 -0
- package/example/node_modules/qs/test/utils.js +404 -0
- package/example/node_modules/range-parser/HISTORY.md +56 -0
- package/example/node_modules/range-parser/LICENSE +23 -0
- package/example/node_modules/range-parser/README.md +84 -0
- package/example/node_modules/range-parser/index.js +162 -0
- package/example/node_modules/range-parser/package.json +44 -0
- package/example/node_modules/raw-body/LICENSE +22 -0
- package/example/node_modules/raw-body/README.md +223 -0
- package/example/node_modules/raw-body/index.d.ts +85 -0
- package/example/node_modules/raw-body/index.js +336 -0
- package/example/node_modules/raw-body/package.json +46 -0
- package/example/node_modules/router/HISTORY.md +228 -0
- package/example/node_modules/router/LICENSE +23 -0
- package/example/node_modules/router/README.md +416 -0
- package/example/node_modules/router/index.js +748 -0
- package/example/node_modules/router/lib/layer.js +247 -0
- package/example/node_modules/router/lib/route.js +242 -0
- package/example/node_modules/router/package.json +44 -0
- package/example/node_modules/safer-buffer/LICENSE +21 -0
- package/example/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/example/node_modules/safer-buffer/Readme.md +156 -0
- package/example/node_modules/safer-buffer/dangerous.js +58 -0
- package/example/node_modules/safer-buffer/package.json +34 -0
- package/example/node_modules/safer-buffer/safer.js +77 -0
- package/example/node_modules/safer-buffer/tests.js +406 -0
- package/example/node_modules/send/LICENSE +23 -0
- package/example/node_modules/send/README.md +317 -0
- package/example/node_modules/send/index.js +997 -0
- package/example/node_modules/send/package.json +63 -0
- package/example/node_modules/serve-static/LICENSE +25 -0
- package/example/node_modules/serve-static/README.md +253 -0
- package/example/node_modules/serve-static/index.js +208 -0
- package/example/node_modules/serve-static/package.json +44 -0
- package/example/node_modules/setprototypeof/LICENSE +13 -0
- package/example/node_modules/setprototypeof/README.md +31 -0
- package/example/node_modules/setprototypeof/index.d.ts +2 -0
- package/example/node_modules/setprototypeof/index.js +17 -0
- package/example/node_modules/setprototypeof/package.json +38 -0
- package/example/node_modules/setprototypeof/test/index.js +24 -0
- package/example/node_modules/side-channel/.editorconfig +9 -0
- package/example/node_modules/side-channel/.eslintrc +12 -0
- package/example/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/example/node_modules/side-channel/.nycrc +13 -0
- package/example/node_modules/side-channel/CHANGELOG.md +110 -0
- package/example/node_modules/side-channel/LICENSE +21 -0
- package/example/node_modules/side-channel/README.md +61 -0
- package/example/node_modules/side-channel/index.d.ts +14 -0
- package/example/node_modules/side-channel/index.js +43 -0
- package/example/node_modules/side-channel/package.json +85 -0
- package/example/node_modules/side-channel/test/index.js +104 -0
- package/example/node_modules/side-channel/tsconfig.json +9 -0
- package/example/node_modules/side-channel-list/.editorconfig +9 -0
- package/example/node_modules/side-channel-list/.eslintrc +11 -0
- package/example/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/example/node_modules/side-channel-list/.nycrc +13 -0
- package/example/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/example/node_modules/side-channel-list/LICENSE +21 -0
- package/example/node_modules/side-channel-list/README.md +62 -0
- package/example/node_modules/side-channel-list/index.d.ts +13 -0
- package/example/node_modules/side-channel-list/index.js +113 -0
- package/example/node_modules/side-channel-list/list.d.ts +14 -0
- package/example/node_modules/side-channel-list/package.json +77 -0
- package/example/node_modules/side-channel-list/test/index.js +104 -0
- package/example/node_modules/side-channel-list/tsconfig.json +9 -0
- package/example/node_modules/side-channel-map/.editorconfig +9 -0
- package/example/node_modules/side-channel-map/.eslintrc +11 -0
- package/example/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/example/node_modules/side-channel-map/.nycrc +13 -0
- package/example/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/example/node_modules/side-channel-map/LICENSE +21 -0
- package/example/node_modules/side-channel-map/README.md +62 -0
- package/example/node_modules/side-channel-map/index.d.ts +15 -0
- package/example/node_modules/side-channel-map/index.js +68 -0
- package/example/node_modules/side-channel-map/package.json +80 -0
- package/example/node_modules/side-channel-map/test/index.js +114 -0
- package/example/node_modules/side-channel-map/tsconfig.json +9 -0
- package/example/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/example/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/example/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/example/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/example/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/example/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/example/node_modules/side-channel-weakmap/README.md +62 -0
- package/example/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/example/node_modules/side-channel-weakmap/index.js +84 -0
- package/example/node_modules/side-channel-weakmap/package.json +87 -0
- package/example/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/example/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/example/node_modules/statuses/HISTORY.md +87 -0
- package/example/node_modules/statuses/LICENSE +23 -0
- package/example/node_modules/statuses/README.md +139 -0
- package/example/node_modules/statuses/codes.json +65 -0
- package/example/node_modules/statuses/index.js +146 -0
- package/example/node_modules/statuses/package.json +49 -0
- package/example/node_modules/toidentifier/HISTORY.md +9 -0
- package/example/node_modules/toidentifier/LICENSE +21 -0
- package/example/node_modules/toidentifier/README.md +61 -0
- package/example/node_modules/toidentifier/index.js +32 -0
- package/example/node_modules/toidentifier/package.json +38 -0
- package/example/node_modules/type-is/HISTORY.md +292 -0
- package/example/node_modules/type-is/LICENSE +23 -0
- package/example/node_modules/type-is/README.md +198 -0
- package/example/node_modules/type-is/index.js +250 -0
- package/example/node_modules/type-is/package.json +47 -0
- package/example/node_modules/unpipe/HISTORY.md +4 -0
- package/example/node_modules/unpipe/LICENSE +22 -0
- package/example/node_modules/unpipe/README.md +43 -0
- package/example/node_modules/unpipe/index.js +69 -0
- package/example/node_modules/unpipe/package.json +27 -0
- package/example/node_modules/vary/HISTORY.md +39 -0
- package/example/node_modules/vary/LICENSE +22 -0
- package/example/node_modules/vary/README.md +101 -0
- package/example/node_modules/vary/index.js +149 -0
- package/example/node_modules/vary/package.json +43 -0
- package/example/node_modules/wrappy/LICENSE +15 -0
- package/example/node_modules/wrappy/README.md +36 -0
- package/example/node_modules/wrappy/package.json +29 -0
- package/example/node_modules/wrappy/wrappy.js +33 -0
- package/example/package-lock.json +101 -142
- package/example/package.json +2 -11
- package/package.json +15 -31
- package/src/cli/archiveSystem.js +80 -0
- package/src/cli/index.js +52 -0
- package/src/cli/packageManager.js +52 -0
- package/src/runtime/runner.js +139 -0
- package/src/stdlib/index.js +101 -0
- package/App/App.axaml +0 -8
- package/App/App.axaml.cs +0 -23
- package/App/FenrirLinux.csproj +0 -27
- package/App/LICENSE +0 -674
- package/App/MainWindow.axaml +0 -10
- package/App/MainWindow.axaml.cs +0 -16
- package/App/Program.cs +0 -19
- package/App/README.md +0 -24
- package/App/Views/InstallationView.axaml +0 -48
- package/App/Views/InstallationView.axaml.cs +0 -204
- package/App/Views/PasswordView.axaml +0 -34
- package/App/Views/PasswordView.axaml.cs +0 -62
- package/App/Views/WelcomeView.axaml +0 -63
- package/App/Views/WelcomeView.axaml.cs +0 -22
- package/App/app.manifest +0 -18
- package/App/images/screenshot1.png +0 -0
- package/App/images/screenshot2.png +0 -0
- package/App/obj/Debug/net9.0/Avalonia/Resources.Inputs.cache +0 -1
- package/App/obj/Debug/net9.0/Avalonia/original.dll +0 -0
- package/App/obj/Debug/net9.0/Avalonia/original.pdb +0 -0
- package/App/obj/Debug/net9.0/Avalonia/original.ref.dll +0 -0
- package/App/obj/Debug/net9.0/Avalonia/references +0 -202
- package/App/obj/Debug/net9.0/Avalonia/resources +0 -0
- package/App/obj/Debug/net9.0/FenrirLi.7B98506C.Up2Date +0 -0
- package/App/obj/Debug/net9.0/FenrirLinux.AssemblyInfo.cs +0 -22
- package/App/obj/Debug/net9.0/FenrirLinux.AssemblyInfoInputs.cache +0 -1
- package/App/obj/Debug/net9.0/FenrirLinux.GeneratedMSBuildEditorConfig.editorconfig +0 -35
- package/App/obj/Debug/net9.0/FenrirLinux.assets.cache +0 -0
- package/App/obj/Debug/net9.0/FenrirLinux.csproj.AssemblyReference.cache +0 -0
- package/App/obj/Debug/net9.0/FenrirLinux.csproj.CoreCompileInputs.cache +0 -1
- package/App/obj/Debug/net9.0/FenrirLinux.csproj.FileListAbsolute.txt +0 -135
- package/App/obj/Debug/net9.0/FenrirLinux.dll +0 -0
- package/App/obj/Debug/net9.0/FenrirLinux.genruntimeconfig.cache +0 -1
- package/App/obj/Debug/net9.0/FenrirLinux.pdb +0 -0
- package/App/obj/Debug/net9.0/apphost +0 -0
- package/App/obj/Debug/net9.0/ref/FenrirLinux.dll +0 -0
- package/App/obj/Debug/net9.0/refint/FenrirLinux.dll +0 -0
- package/App/obj/FenrirLinux.csproj.nuget.dgspec.json +0 -115
- package/App/obj/FenrirLinux.csproj.nuget.g.props +0 -26
- package/App/obj/FenrirLinux.csproj.nuget.g.targets +0 -9
- package/App/obj/Release/net9.0/linux-x64/Avalonia/Resources.Inputs.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/Avalonia/original.dll +0 -0
- package/App/obj/Release/net9.0/linux-x64/Avalonia/original.pdb +0 -0
- package/App/obj/Release/net9.0/linux-x64/Avalonia/original.ref.dll +0 -0
- package/App/obj/Release/net9.0/linux-x64/Avalonia/references +0 -194
- package/App/obj/Release/net9.0/linux-x64/Avalonia/resources +0 -0
- package/App/obj/Release/net9.0/linux-x64/FenrirLi.7B98506C.Up2Date +0 -0
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.AssemblyInfo.cs +0 -22
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.AssemblyInfoInputs.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.GeneratedMSBuildEditorConfig.editorconfig +0 -39
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.assets.cache +0 -0
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.csproj.AssemblyReference.cache +0 -0
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.csproj.CoreCompileInputs.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.csproj.FileListAbsolute.txt +0 -238
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.deps.json +0 -1317
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.dll +0 -0
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.genbundle.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.genpublishdeps.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.genruntimeconfig.cache +0 -1
- package/App/obj/Release/net9.0/linux-x64/FenrirLinux.pdb +0 -0
- package/App/obj/Release/net9.0/linux-x64/PublishOutputs.fac9e24064.txt +0 -4
- package/App/obj/Release/net9.0/linux-x64/apphost +0 -0
- package/App/obj/Release/net9.0/linux-x64/ref/FenrirLinux.dll +0 -0
- package/App/obj/Release/net9.0/linux-x64/refint/FenrirLinux.dll +0 -0
- package/App/obj/Release/net9.0/linux-x64/singlefilehost +0 -0
- package/App/obj/project.assets.json +0 -2463
- package/App/obj/project.nuget.cache +0 -47
- package/LICENSE +0 -674
- package/README.md +0 -89
- package/dist/archiveSystem.js +0 -219
- package/dist/cli.js +0 -188
- package/dist/packageManager.js +0 -98
- package/dist/parser.js +0 -24
- package/dist/runtime.js +0 -99
- package/dist/transformer.js +0 -120
- package/example/fenrir+aperium/aperium.json +0 -17
- package/example/fenrir+aperium/aperium_modules/hello-world/index.js +0 -4
- package/example/fenrir+aperium/aperium_modules/hello-world/module.json +0 -6
- package/example/fenrir+aperium/app.fnr +0 -19
- package/example/fenrir+aperium/package.json +0 -17
- package/src/archiveSystem.ts +0 -264
- package/src/cli.ts +0 -216
- package/src/packageManager.ts +0 -119
- package/src/parser.ts +0 -36
- package/src/runtime.ts +0 -111
- package/src/transformer.ts +0 -147
- package/tsconfig.json +0 -15
package/README.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Fenrir Runtime
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**Fenrir** is a modern JavaScript runtime environment based on TypeScript.
|
|
6
|
-
It provides developers with a fast, secure, and flexible working environment. Thanks to TypeScript support, it offers powerful type safety and a modern development experience. Fenrir is distributed as open source and is open to community contributions.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
### Features
|
|
11
|
-
|
|
12
|
-
- **TypeScript Compatibility:** Compatible with all TypeScript functions, making your projects more secure and sustainable.
|
|
13
|
-
|
|
14
|
-
- **Rollback System:** Reduces the risk of errors by allowing you to undo changes.
|
|
15
|
-
|
|
16
|
-
- **Modern Framework Support:** Works seamlessly with popular libraries such as Express, Koa, and Fastify.
|
|
17
|
-
|
|
18
|
-
- **Open Source and Community-Focused:** You can review, modify, and contribute to the project.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
### Installation
|
|
23
|
-
|
|
24
|
-
Installing Fenrir is very easy. You can run the project by following the steps below:
|
|
25
|
-
|
|
26
|
-
1. Clone the repository.
|
|
27
|
-
```
|
|
28
|
-
git clone https://github.com/yigitkabak/Fenrir
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
2. Enter the Project Directory.
|
|
32
|
-
```
|
|
33
|
-
cd Fenrir
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
3. Install and Compile Dependencies.
|
|
37
|
-
```
|
|
38
|
-
make
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Or if you use Linux, you can download our application. [App](/App)
|
|
42
|
-
|
|
43
|
-
Once the installation is complete, **Fenrir** is ready to use in your projects.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
### Example Usage
|
|
48
|
-
|
|
49
|
-
Creating a simple Express server with **Fenrir** is quite easy:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
declare express from 'express'
|
|
53
|
-
|
|
54
|
-
const app = express()
|
|
55
|
-
const port = 3000
|
|
56
|
-
|
|
57
|
-
fn handle_home_request(req, res) {
|
|
58
|
-
res.send('Hello from Fenrir Express!')
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
app.get('/', handle_home_request)
|
|
62
|
-
|
|
63
|
-
fn start_server() {
|
|
64
|
-
app.listen(port, () => {
|
|
65
|
-
log(`Server running at http://localhost:${port}`)
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
start_server()
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
With this example, you can see the message **"Hello from Fenrir Express!"** by going to http://localhost:3000 in your browser.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
### Contributing
|
|
76
|
-
|
|
77
|
-
- **Fenrir** is a community-driven project. To contribute:
|
|
78
|
-
|
|
79
|
-
1. **Use the project and provide feedback:** Report bugs or suggestions.
|
|
80
|
-
|
|
81
|
-
2. **Contribute code:** Add new features or improve existing code.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
NOTE: ⚠️ **Fenrir** is currently in BETA. You may encounter unexpected errors. Your feedback will greatly contribute to the development of the project.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
## Licence
|
|
89
|
-
**Fenrir** is licensed under the [GPL](LICENSE) Licence.
|
package/dist/archiveSystem.js
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import crypto from 'crypto';
|
|
4
|
-
import { execSync } from 'child_process';
|
|
5
|
-
import { glob } from 'glob';
|
|
6
|
-
export class ArchiveSystem {
|
|
7
|
-
projectRoot;
|
|
8
|
-
archiveDir;
|
|
9
|
-
constructor(projectRoot = process.cwd()) {
|
|
10
|
-
this.projectRoot = projectRoot;
|
|
11
|
-
this.archiveDir = path.join(projectRoot, '.fenrir', 'archives');
|
|
12
|
-
}
|
|
13
|
-
async createArchive(message) {
|
|
14
|
-
const now = new Date();
|
|
15
|
-
const timestamp = this.formatTimestamp(now);
|
|
16
|
-
const archivePath = path.join(this.archiveDir, timestamp);
|
|
17
|
-
await fs.ensureDir(archivePath);
|
|
18
|
-
const filesToArchive = await this.getFilesToArchive();
|
|
19
|
-
for (const file of filesToArchive) {
|
|
20
|
-
const srcPath = path.join(this.projectRoot, file);
|
|
21
|
-
const destPath = path.join(archivePath, file);
|
|
22
|
-
await fs.ensureDir(path.dirname(destPath));
|
|
23
|
-
await fs.copy(srcPath, destPath);
|
|
24
|
-
}
|
|
25
|
-
const metadata = {
|
|
26
|
-
timestamp: now.toISOString(),
|
|
27
|
-
message: message || 'Automatic archiving',
|
|
28
|
-
files: filesToArchive.length,
|
|
29
|
-
hash: this.generateHash(filesToArchive),
|
|
30
|
-
gitHash: await this.getGitHash().catch(() => null)
|
|
31
|
-
};
|
|
32
|
-
await fs.writeJSON(path.join(archivePath, '.metadata.json'), metadata, { spaces: 2 });
|
|
33
|
-
console.log(`Archive created: ${timestamp}`);
|
|
34
|
-
console.log(` ${filesToArchive.length} file archived`);
|
|
35
|
-
console.log(`message: ${metadata.message}`);
|
|
36
|
-
return timestamp;
|
|
37
|
-
}
|
|
38
|
-
async listArchives() {
|
|
39
|
-
if (!fs.existsSync(this.archiveDir)) {
|
|
40
|
-
console.log('No archives have been created yet.');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const archives = await fs.readdir(this.archiveDir);
|
|
44
|
-
archives.sort().reverse();
|
|
45
|
-
console.log('Archive history:');
|
|
46
|
-
for (const archive of archives.slice(0, 10)) {
|
|
47
|
-
const metadataPath = path.join(this.archiveDir, archive, '.metadata.json');
|
|
48
|
-
if (fs.existsSync(metadataPath)) {
|
|
49
|
-
const metadata = await fs.readJSON(metadataPath);
|
|
50
|
-
const date = new Date(metadata.timestamp);
|
|
51
|
-
console.log(` ${archive} - ${metadata.message}`);
|
|
52
|
-
console.log(` ${date.toLocaleString('en-US')}`);
|
|
53
|
-
console.log(` ${metadata.files} file`);
|
|
54
|
-
console.log('');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (archives.length > 10) {
|
|
58
|
-
console.log(` ... and ${archives.length - 10} archive more`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async rollback(archiveId) {
|
|
62
|
-
if (!fs.existsSync(this.archiveDir)) {
|
|
63
|
-
console.log('Archive not found.');
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
let targetArchive = archiveId;
|
|
67
|
-
if (!targetArchive) {
|
|
68
|
-
const archives = await fs.readdir(this.archiveDir);
|
|
69
|
-
archives.sort().reverse();
|
|
70
|
-
targetArchive = archives[0];
|
|
71
|
-
}
|
|
72
|
-
const archivePath = path.join(this.archiveDir, targetArchive);
|
|
73
|
-
if (!fs.existsSync(archivePath)) {
|
|
74
|
-
console.log(`Archive not found: ${targetArchive}`);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
console.log('Current status is being backed up...');
|
|
78
|
-
await this.createArchive(`Pre-rollback backup - ${new Date().toISOString()}`);
|
|
79
|
-
const metadataPath = path.join(archivePath, '.metadata.json');
|
|
80
|
-
const metadata = await fs.readJSON(metadataPath);
|
|
81
|
-
console.log(`${targetArchive} returning to archive...`);
|
|
82
|
-
console.log(` ${metadata.message}`);
|
|
83
|
-
const currentFiles = await this.getFilesToArchive();
|
|
84
|
-
for (const file of currentFiles) {
|
|
85
|
-
const filePath = path.join(this.projectRoot, file);
|
|
86
|
-
if (fs.existsSync(filePath)) {
|
|
87
|
-
await fs.remove(filePath);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const archiveFiles = await glob('**/*', {
|
|
91
|
-
cwd: archivePath,
|
|
92
|
-
nodir: true,
|
|
93
|
-
ignore: '.metadata.json'
|
|
94
|
-
});
|
|
95
|
-
for (const file of archiveFiles) {
|
|
96
|
-
const srcPath = path.join(archivePath, file);
|
|
97
|
-
const destPath = path.join(this.projectRoot, file);
|
|
98
|
-
await fs.ensureDir(path.dirname(destPath));
|
|
99
|
-
await fs.copy(srcPath, destPath);
|
|
100
|
-
}
|
|
101
|
-
console.log(`The return has been completed!`);
|
|
102
|
-
console.log(`${archiveFiles.length} file restored`);
|
|
103
|
-
}
|
|
104
|
-
async cleanArchives(keepCount = 10) {
|
|
105
|
-
if (!fs.existsSync(this.archiveDir)) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const archives = await fs.readdir(this.archiveDir);
|
|
109
|
-
archives.sort().reverse();
|
|
110
|
-
if (archives.length <= keepCount) {
|
|
111
|
-
console.log(`${archives.length} There is an archive, no cleaning is necessary.`);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const toDelete = archives.slice(keepCount);
|
|
115
|
-
for (const archive of toDelete) {
|
|
116
|
-
await fs.remove(path.join(this.archiveDir, archive));
|
|
117
|
-
}
|
|
118
|
-
console.log(`${toDelete.length} The old archive has been cleared.`);
|
|
119
|
-
console.log(`${keepCount} The archive has been preserved.`);
|
|
120
|
-
}
|
|
121
|
-
formatTimestamp(date) {
|
|
122
|
-
return date.toISOString()
|
|
123
|
-
.replace(/T/, '_')
|
|
124
|
-
.replace(/:/g, '-')
|
|
125
|
-
.substring(0, 19);
|
|
126
|
-
}
|
|
127
|
-
async getFilesToArchive() {
|
|
128
|
-
const patterns = [
|
|
129
|
-
'**/*.py',
|
|
130
|
-
'**/*.pyc',
|
|
131
|
-
'**/*.pyo',
|
|
132
|
-
'**/*.java',
|
|
133
|
-
'**/*.class',
|
|
134
|
-
'**/*.jar',
|
|
135
|
-
'**/*.cpp',
|
|
136
|
-
'**/*.cxx',
|
|
137
|
-
'**/*.cc',
|
|
138
|
-
'**/*.c',
|
|
139
|
-
'**/*.hpp',
|
|
140
|
-
'**/*.h',
|
|
141
|
-
'**/*.hxx',
|
|
142
|
-
'**/*.cs',
|
|
143
|
-
'**/*.csproj',
|
|
144
|
-
'**/*.sln',
|
|
145
|
-
'**/*.rb',
|
|
146
|
-
'**/*.rake',
|
|
147
|
-
'**/*.php',
|
|
148
|
-
'**/*.phtml',
|
|
149
|
-
'**/*.php3',
|
|
150
|
-
'**/*.php4',
|
|
151
|
-
'**/*.php5',
|
|
152
|
-
'**/*.swift',
|
|
153
|
-
'**/*.go',
|
|
154
|
-
'**/*.rs',
|
|
155
|
-
'**/*.js',
|
|
156
|
-
'**/*.ts',
|
|
157
|
-
'**/*.jsx',
|
|
158
|
-
'**/*.tsx',
|
|
159
|
-
'**/*.mjs',
|
|
160
|
-
'**/*.cjs',
|
|
161
|
-
'**/*.css',
|
|
162
|
-
'**/*.scss',
|
|
163
|
-
'**/*.sass',
|
|
164
|
-
'**/*.less',
|
|
165
|
-
'**/*.html',
|
|
166
|
-
'**/*.htm',
|
|
167
|
-
'**/*.xhtml',
|
|
168
|
-
'**/*.json',
|
|
169
|
-
'**/*.xml',
|
|
170
|
-
'**/*.yml',
|
|
171
|
-
'**/*.yaml',
|
|
172
|
-
'**/*.md',
|
|
173
|
-
'**/*.markdown',
|
|
174
|
-
'**/*.mdown',
|
|
175
|
-
'**/*.txt',
|
|
176
|
-
'**/*.ini',
|
|
177
|
-
'**/*.conf',
|
|
178
|
-
'**/*.cfg',
|
|
179
|
-
'**/*.sh',
|
|
180
|
-
'**/*.bash',
|
|
181
|
-
'**/*.npm',
|
|
182
|
-
'**/*.lock',
|
|
183
|
-
'**/*.fnr'
|
|
184
|
-
];
|
|
185
|
-
const ignorePatterns = [
|
|
186
|
-
'.fenrir/**',
|
|
187
|
-
'node_modules/**',
|
|
188
|
-
'.git/**',
|
|
189
|
-
'*.log',
|
|
190
|
-
'.DS_Store',
|
|
191
|
-
'Thumbs.db',
|
|
192
|
-
'.env*',
|
|
193
|
-
'dist/**',
|
|
194
|
-
'build/**',
|
|
195
|
-
'.cache/**'
|
|
196
|
-
];
|
|
197
|
-
const files = [];
|
|
198
|
-
for (const pattern of patterns) {
|
|
199
|
-
const matches = await glob(pattern, {
|
|
200
|
-
cwd: this.projectRoot,
|
|
201
|
-
ignore: ignorePatterns,
|
|
202
|
-
nodir: true
|
|
203
|
-
});
|
|
204
|
-
files.push(...matches);
|
|
205
|
-
}
|
|
206
|
-
return [...new Set(files)].sort();
|
|
207
|
-
}
|
|
208
|
-
generateHash(files) {
|
|
209
|
-
const hash = crypto.createHash('md5');
|
|
210
|
-
hash.update(files.join('|'));
|
|
211
|
-
return hash.digest('hex').substring(0, 8);
|
|
212
|
-
}
|
|
213
|
-
async getGitHash() {
|
|
214
|
-
return execSync('git rev-parse HEAD', {
|
|
215
|
-
cwd: this.projectRoot,
|
|
216
|
-
encoding: 'utf8'
|
|
217
|
-
}).trim();
|
|
218
|
-
}
|
|
219
|
-
}
|
package/dist/cli.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from 'child_process';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
import os from 'os';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
import { transformFenrirCode } from './transformer.js';
|
|
8
|
-
import { PackageManager } from './packageManager.js';
|
|
9
|
-
import { ArchiveSystem } from './archiveSystem.js';
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = path.dirname(__filename);
|
|
12
|
-
const command = process.argv[2];
|
|
13
|
-
const args = process.argv.slice(3);
|
|
14
|
-
const packageManager = new PackageManager();
|
|
15
|
-
const archiveSystem = new ArchiveSystem();
|
|
16
|
-
const executeCode = async (filePath) => {
|
|
17
|
-
try {
|
|
18
|
-
if (!await fs.pathExists(filePath)) {
|
|
19
|
-
console.error(`Error: File ${filePath} not found.`);
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
const fileContent = await fs.readFile(filePath, 'utf-8');
|
|
23
|
-
if (!fileContent.trim()) {
|
|
24
|
-
console.error('Error: The file is empty or contains only space characters.');
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
const aperiumConfig = fs.existsSync('fenrir.json')
|
|
28
|
-
? JSON.parse(await fs.readFile('fenrir.json', 'utf8'))
|
|
29
|
-
: {};
|
|
30
|
-
const jsCode = await transformFenrirCode(fileContent, filePath, aperiumConfig.imports || {});
|
|
31
|
-
if (process.env.FENRIR_DEBUG) {
|
|
32
|
-
console.log('\nConverted JavaScript code:');
|
|
33
|
-
console.log(jsCode);
|
|
34
|
-
}
|
|
35
|
-
const tempDir = path.join(os.tmpdir(), `fenrir_temp_${Date.now()}`);
|
|
36
|
-
await fs.ensureDir(tempDir);
|
|
37
|
-
const tempFilePath = path.join(tempDir, 'runtime_output.mjs');
|
|
38
|
-
// node_modules kopyalama işlemini iyileştir
|
|
39
|
-
const originalNodeModulesPath = path.join(process.cwd(), 'node_modules');
|
|
40
|
-
const tempNodeModulesPath = path.join(tempDir, 'node_modules');
|
|
41
|
-
if (await fs.pathExists(originalNodeModulesPath)) {
|
|
42
|
-
try {
|
|
43
|
-
await fs.copy(originalNodeModulesPath, tempNodeModulesPath, {
|
|
44
|
-
dereference: true,
|
|
45
|
-
preserveTimestamps: false
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
catch (copyError) {
|
|
49
|
-
console.warn('Warning: Could not copy node_modules:', copyError?.message || copyError);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const originalPackageJsonPath = path.join(process.cwd(), 'package.json');
|
|
53
|
-
if (await fs.pathExists(originalPackageJsonPath)) {
|
|
54
|
-
try {
|
|
55
|
-
await fs.copy(originalPackageJsonPath, path.join(tempDir, 'package.json'));
|
|
56
|
-
}
|
|
57
|
-
catch (err) {
|
|
58
|
-
console.warn('Warning: Could not copy package.json:', err?.message || err);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const runtimePath = path.join(__dirname, 'runtime.js');
|
|
62
|
-
let finalCode = jsCode;
|
|
63
|
-
if (fs.existsSync(runtimePath)) {
|
|
64
|
-
const runtimeCode = await fs.readFile(runtimePath, 'utf8');
|
|
65
|
-
finalCode = `${runtimeCode}\n\n${jsCode}`;
|
|
66
|
-
}
|
|
67
|
-
await fs.writeFile(tempFilePath, finalCode);
|
|
68
|
-
const env = {
|
|
69
|
-
...process.env,
|
|
70
|
-
NODE_PATH: [
|
|
71
|
-
path.join(tempDir, 'node_modules'),
|
|
72
|
-
path.join(process.cwd(), 'node_modules'),
|
|
73
|
-
process.env.NODE_PATH
|
|
74
|
-
].filter(Boolean).join(path.delimiter)
|
|
75
|
-
};
|
|
76
|
-
if (process.env.FENRIR_DEBUG) {
|
|
77
|
-
console.log('Temp directory:', tempDir);
|
|
78
|
-
console.log('Original CWD:', process.cwd());
|
|
79
|
-
console.log('NODE_PATH:', env.NODE_PATH);
|
|
80
|
-
console.log('\nGenerated code:');
|
|
81
|
-
console.log('================');
|
|
82
|
-
console.log(finalCode);
|
|
83
|
-
console.log('================\n');
|
|
84
|
-
}
|
|
85
|
-
const child = spawn('node', [tempFilePath], {
|
|
86
|
-
stdio: 'inherit',
|
|
87
|
-
shell: false,
|
|
88
|
-
env: env,
|
|
89
|
-
cwd: process.cwd()
|
|
90
|
-
});
|
|
91
|
-
child.on('close', async (code) => {
|
|
92
|
-
try {
|
|
93
|
-
await fs.remove(tempDir);
|
|
94
|
-
}
|
|
95
|
-
catch (err) {
|
|
96
|
-
}
|
|
97
|
-
process.exit(code || 0);
|
|
98
|
-
});
|
|
99
|
-
child.on('error', async (err) => {
|
|
100
|
-
console.error('An error occurred while running Node.js:');
|
|
101
|
-
if (err.message.includes('SyntaxError')) {
|
|
102
|
-
console.error('Syntax error detected. Transformed code:');
|
|
103
|
-
finalCode.split('\n').forEach((line, index) => {
|
|
104
|
-
console.error(`${(index + 1).toString().padStart(2, ' ')}: ${line}`);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
console.error(err);
|
|
109
|
-
}
|
|
110
|
-
try {
|
|
111
|
-
await fs.remove(tempDir);
|
|
112
|
-
}
|
|
113
|
-
catch (cleanupErr) {
|
|
114
|
-
}
|
|
115
|
-
process.exit(1);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
if (error instanceof SyntaxError) {
|
|
120
|
-
console.error('Syntax error:', error.message);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
console.error('An unexpected error occurred:', error);
|
|
124
|
-
}
|
|
125
|
-
process.exit(1);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const showHelp = () => {
|
|
129
|
-
console.log(`
|
|
130
|
-
Fenrir Programming Language v0.0.1
|
|
131
|
-
|
|
132
|
-
Usage:
|
|
133
|
-
fenrir <file.fnr>
|
|
134
|
-
fenrir install [package]
|
|
135
|
-
fenrir remove <package>
|
|
136
|
-
fenrir archive [message]
|
|
137
|
-
fenrir archives
|
|
138
|
-
fenrir rollback [archive-id]
|
|
139
|
-
fenrir clean [number]
|
|
140
|
-
fenrir help
|
|
141
|
-
`);
|
|
142
|
-
};
|
|
143
|
-
const run = async () => {
|
|
144
|
-
if (!command || command === 'help') {
|
|
145
|
-
showHelp();
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
switch (command) {
|
|
149
|
-
case 'install':
|
|
150
|
-
await packageManager.install(args[0]);
|
|
151
|
-
break;
|
|
152
|
-
case 'remove':
|
|
153
|
-
if (!args[0]) {
|
|
154
|
-
console.error('Package name not specified.');
|
|
155
|
-
console.log('Usage: fenrir remove <package-name>');
|
|
156
|
-
process.exit(1);
|
|
157
|
-
}
|
|
158
|
-
await packageManager.remove(args[0]);
|
|
159
|
-
break;
|
|
160
|
-
case 'archive':
|
|
161
|
-
await archiveSystem.createArchive(args[0]);
|
|
162
|
-
break;
|
|
163
|
-
case 'archives':
|
|
164
|
-
await archiveSystem.listArchives();
|
|
165
|
-
break;
|
|
166
|
-
case 'rollback':
|
|
167
|
-
await archiveSystem.rollback(args[0]);
|
|
168
|
-
break;
|
|
169
|
-
case 'clean':
|
|
170
|
-
const keepCount = args[0] ? parseInt(args[0]) : 10;
|
|
171
|
-
await archiveSystem.cleanArchives(keepCount);
|
|
172
|
-
break;
|
|
173
|
-
default:
|
|
174
|
-
if (command.endsWith('.fnr')) {
|
|
175
|
-
const filePath = path.resolve(process.cwd(), command);
|
|
176
|
-
await executeCode(filePath);
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
console.error(`Unknown command: ${command}`);
|
|
180
|
-
console.log('For help: fenrir help');
|
|
181
|
-
process.exit(1);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
run().catch((error) => {
|
|
186
|
-
console.error('A critical error occurred while running the program:', error);
|
|
187
|
-
process.exit(1);
|
|
188
|
-
});
|
package/dist/packageManager.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
export class PackageManager {
|
|
5
|
-
projectRoot;
|
|
6
|
-
packageJsonPath;
|
|
7
|
-
fenrirJsonPath;
|
|
8
|
-
constructor(projectRoot = process.cwd()) {
|
|
9
|
-
this.projectRoot = projectRoot;
|
|
10
|
-
this.packageJsonPath = path.join(projectRoot, 'package.json');
|
|
11
|
-
this.fenrirJsonPath = path.join(projectRoot, 'fenrir.json');
|
|
12
|
-
}
|
|
13
|
-
async install(packageName) {
|
|
14
|
-
if (!fs.existsSync(this.fenrirJsonPath)) {
|
|
15
|
-
await this.initProject();
|
|
16
|
-
}
|
|
17
|
-
if (packageName) {
|
|
18
|
-
console.log(`${packageName} loading...`);
|
|
19
|
-
try {
|
|
20
|
-
execSync(`npm install ${packageName}`, {
|
|
21
|
-
cwd: this.projectRoot,
|
|
22
|
-
stdio: 'pipe'
|
|
23
|
-
});
|
|
24
|
-
await this.updateFenrirJson(packageName);
|
|
25
|
-
console.log(`${packageName} Successfully loaded!`);
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
console.error(`${packageName} An error occurred while loading:`, error);
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.log('All dependencies are being loaded...');
|
|
34
|
-
execSync('npm install', {
|
|
35
|
-
cwd: this.projectRoot,
|
|
36
|
-
stdio: 'inherit'
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
async remove(packageName) {
|
|
41
|
-
console.log(` ${packageName} being removed...`);
|
|
42
|
-
try {
|
|
43
|
-
execSync(`npm uninstall ${packageName}`, {
|
|
44
|
-
cwd: this.projectRoot,
|
|
45
|
-
stdio: 'pipe'
|
|
46
|
-
});
|
|
47
|
-
await this.removeFomFenrirJson(packageName);
|
|
48
|
-
console.log(`${packageName} removed!`);
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
console.error(`${packageName} An error occurred while removing:`, error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
async initProject() {
|
|
55
|
-
const projectName = path.basename(this.projectRoot);
|
|
56
|
-
const fenrirJson = {
|
|
57
|
-
name: projectName,
|
|
58
|
-
version: "0.0.1",
|
|
59
|
-
description: "A Fenrir project",
|
|
60
|
-
dependencies: {},
|
|
61
|
-
fenrirVersion: "0.0.1"
|
|
62
|
-
};
|
|
63
|
-
await fs.writeJSON(this.fenrirJsonPath, fenrirJson, { spaces: 2 });
|
|
64
|
-
if (!fs.existsSync(this.packageJsonPath)) {
|
|
65
|
-
const packageJson = {
|
|
66
|
-
name: projectName.toLowerCase().replace(/[^a-z0-9-]/g, '-'),
|
|
67
|
-
version: "0.0.1",
|
|
68
|
-
type: "module",
|
|
69
|
-
dependencies: {}
|
|
70
|
-
};
|
|
71
|
-
await fs.writeJSON(this.packageJsonPath, packageJson, { spaces: 2 });
|
|
72
|
-
}
|
|
73
|
-
console.log('The Fenrir project has been launched!');
|
|
74
|
-
}
|
|
75
|
-
async readFenrirJson() {
|
|
76
|
-
if (!fs.existsSync(this.fenrirJsonPath)) {
|
|
77
|
-
return { dependencies: {} };
|
|
78
|
-
}
|
|
79
|
-
return await fs.readJSON(this.fenrirJsonPath);
|
|
80
|
-
}
|
|
81
|
-
async updateFenrirJson(packageName) {
|
|
82
|
-
const fenrirJson = await this.readFenrirJson();
|
|
83
|
-
const packageJson = await fs.readJSON(this.packageJsonPath);
|
|
84
|
-
const version = packageJson.dependencies?.[packageName] || 'latest';
|
|
85
|
-
if (!fenrirJson.dependencies) {
|
|
86
|
-
fenrirJson.dependencies = {};
|
|
87
|
-
}
|
|
88
|
-
fenrirJson.dependencies[packageName] = version;
|
|
89
|
-
await fs.writeJSON(this.fenrirJsonPath, fenrirJson, { spaces: 2 });
|
|
90
|
-
}
|
|
91
|
-
async removeFomFenrirJson(packageName) {
|
|
92
|
-
const fenrirJson = await this.readFenrirJson();
|
|
93
|
-
if (fenrirJson.dependencies && fenrirJson.dependencies[packageName]) {
|
|
94
|
-
delete fenrirJson.dependencies[packageName];
|
|
95
|
-
await fs.writeJSON(this.fenrirJsonPath, fenrirJson, { spaces: 2 });
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
package/dist/parser.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const parse = (code) => {
|
|
2
|
-
const tokens = [];
|
|
3
|
-
const lines = code.split('\n');
|
|
4
|
-
for (const line of lines) {
|
|
5
|
-
if (line.trim().startsWith('fn')) {
|
|
6
|
-
tokens.push({ type: 'FN_DECL', value: line.trim() });
|
|
7
|
-
// DEĞİŞTİRİLDİ: Artık 'declare' kelimesini bir import beyanı olarak tanıyor
|
|
8
|
-
}
|
|
9
|
-
else if (line.trim().startsWith('declare')) {
|
|
10
|
-
tokens.push({ type: 'IMPORT_DECL', value: line.trim() });
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
tokens.push({ type: 'EXPRESSION', value: line.trim() });
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
const ast = {
|
|
17
|
-
type: 'Program',
|
|
18
|
-
children: tokens.map(token => ({
|
|
19
|
-
type: token.type,
|
|
20
|
-
value: token.value
|
|
21
|
-
}))
|
|
22
|
-
};
|
|
23
|
-
return ast;
|
|
24
|
-
};
|