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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
export class PackageManager {
|
|
6
|
+
constructor(root = process.cwd()) {
|
|
7
|
+
this.root = root;
|
|
8
|
+
this.pkgPath = path.join(root, 'package.json');
|
|
9
|
+
this.fenrirPath = path.join(root, 'fenrir.json');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async install(name) {
|
|
13
|
+
if (!fs.existsSync(this.fenrirPath)) await this.init();
|
|
14
|
+
if (name) {
|
|
15
|
+
process.stdout.write(`\x1b[36m⬇ Installing ${name}...\x1b[0m\n`);
|
|
16
|
+
execSync(`npm install ${name}`, { cwd: this.root, stdio: 'pipe' });
|
|
17
|
+
await this.sync(name, 'add');
|
|
18
|
+
process.stdout.write(`\x1b[32m✓ ${name} installed.\x1b[0m\n`);
|
|
19
|
+
} else {
|
|
20
|
+
process.stdout.write('\x1b[36m⬇ Installing dependencies...\x1b[0m\n');
|
|
21
|
+
execSync('npm install', { cwd: this.root, stdio: 'inherit' });
|
|
22
|
+
process.stdout.write('\x1b[32m✓ Done.\x1b[0m\n');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async remove(name) {
|
|
27
|
+
process.stdout.write(`\x1b[36m✗ Removing ${name}...\x1b[0m\n`);
|
|
28
|
+
execSync(`npm uninstall ${name}`, { cwd: this.root, stdio: 'pipe' });
|
|
29
|
+
await this.sync(name, 'remove');
|
|
30
|
+
process.stdout.write(`\x1b[32m✓ ${name} removed.\x1b[0m\n`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async init() {
|
|
34
|
+
const name = path.basename(this.root);
|
|
35
|
+
await fs.promises.writeFile(this.fenrirPath, JSON.stringify({ name, version:'0.1.0', description:'A Fenrir project', dependencies:{}, fenrirVersion:'0.2.0' }, null, 2));
|
|
36
|
+
if (!fs.existsSync(this.pkgPath)) {
|
|
37
|
+
await fs.promises.writeFile(this.pkgPath, JSON.stringify({ name:name.toLowerCase().replace(/[^a-z0-9-]/g,'-'), version:'0.1.0', type:'module', dependencies:{} }, null, 2));
|
|
38
|
+
}
|
|
39
|
+
process.stdout.write('\x1b[32m✓ Fenrir project initialized.\x1b[0m\n');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async sync(name, action) {
|
|
43
|
+
if (!fs.existsSync(this.fenrirPath)) return;
|
|
44
|
+
const j = JSON.parse(await fs.promises.readFile(this.fenrirPath, 'utf8'));
|
|
45
|
+
if (!j.dependencies) j.dependencies = {};
|
|
46
|
+
if (action === 'add') {
|
|
47
|
+
const pkg = fs.existsSync(this.pkgPath) ? JSON.parse(await fs.promises.readFile(this.pkgPath,'utf8')) : {};
|
|
48
|
+
j.dependencies[name] = pkg.dependencies?.[name] ?? 'latest';
|
|
49
|
+
} else { delete j.dependencies[name]; }
|
|
50
|
+
await fs.promises.writeFile(this.fenrirPath, JSON.stringify(j, null, 2));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import os from 'os';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
function transform(source, filePath) {
|
|
11
|
+
const lines = source.split('\n');
|
|
12
|
+
const out = [];
|
|
13
|
+
let i = 0;
|
|
14
|
+
|
|
15
|
+
while (i < lines.length) {
|
|
16
|
+
const raw = lines[i];
|
|
17
|
+
const line = raw.trim();
|
|
18
|
+
i++;
|
|
19
|
+
|
|
20
|
+
if (!line) { out.push(''); continue; }
|
|
21
|
+
if (line.startsWith('//') || line.startsWith('/*') || line.startsWith('*')) { out.push(raw); continue; }
|
|
22
|
+
|
|
23
|
+
if (line.startsWith('use ') && line.includes(' from ')) {
|
|
24
|
+
const m = line.match(/^use\s+(.*?)\s+from\s+(['"])(.*?)\2\s*;?$/);
|
|
25
|
+
if (m) {
|
|
26
|
+
const [, spec,, mod] = m;
|
|
27
|
+
const isLocal = /^\.\.?\//.test(mod) || mod.startsWith('/');
|
|
28
|
+
out.push(isLocal
|
|
29
|
+
? `import ${spec} from "file://${path.resolve(path.dirname(filePath), mod)}";`
|
|
30
|
+
: `import ${spec} from "${mod}";`
|
|
31
|
+
);
|
|
32
|
+
} else { out.push(raw); }
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (line.startsWith('async fn ') || line.startsWith('fn ')) {
|
|
37
|
+
out.push(sh(raw).replace(/\basync fn\s+/, 'async function ').replace(/\bfn\s+/, 'function '));
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (line.startsWith('type ') && line.includes('=')) continue;
|
|
42
|
+
if (isJs(line)) { out.push(sh(raw)); continue; }
|
|
43
|
+
|
|
44
|
+
if (!bal(line)) {
|
|
45
|
+
let full = raw;
|
|
46
|
+
while (i < lines.length && !bal(full)) { full += '\n' + lines[i]; i++; }
|
|
47
|
+
const s = sh(full);
|
|
48
|
+
out.push(s + (semi(s.trim()) ? ';' : ''));
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const s = sh(raw);
|
|
53
|
+
out.push(s.trim() + (semi(s.trim()) ? ';' : ''));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return out.join('\n');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const sh = c => c
|
|
60
|
+
.replace(/\blog\(/g, 'console.log(')
|
|
61
|
+
.replace(/\berr\(/g, 'console.error(')
|
|
62
|
+
.replace(/\bwarn\(/g, 'console.warn(')
|
|
63
|
+
.replace(/\binfo\(/g, 'console.info(')
|
|
64
|
+
.replace(/\basync fn\b/g, 'async function')
|
|
65
|
+
.replace(/\bfn\b/g, 'function');
|
|
66
|
+
|
|
67
|
+
function ch(s, c) { let n=0,inS=false,sC=''; for(let j=0;j<s.length;j++){const x=s[j];if(inS){if(x==='\\'){j++;continue}if(x===sC)inS=false;continue}if(x==='"'||x==="'"){inS=true;sC=x;continue}if(x===c)n++}return n; }
|
|
68
|
+
const bal = s => ch(s,'(')=== ch(s,')')&& ch(s,'[')=== ch(s,']')&& ch(s,'{')=== ch(s,'}');
|
|
69
|
+
|
|
70
|
+
function isJs(l) {
|
|
71
|
+
return l.startsWith('import ')||l.startsWith('export ')||l.startsWith('class ')||
|
|
72
|
+
l.startsWith('function ')||l.startsWith('async function ')||
|
|
73
|
+
l.startsWith('if ')||l.startsWith('if(')||l.startsWith('else')||l.startsWith('} else')||
|
|
74
|
+
l.startsWith('for ')||l.startsWith('for(')||l.startsWith('while ')||l.startsWith('while(')||
|
|
75
|
+
l.startsWith('switch ')||l.startsWith('switch(')||l.startsWith('try')||
|
|
76
|
+
l.startsWith('catch')||l.startsWith('finally')||l.startsWith('return')||
|
|
77
|
+
l.startsWith('throw ')||l.startsWith('case ')||l.startsWith('default:')||
|
|
78
|
+
/^}\s*(else|catch|finally)/.test(l)||l==='break'||l==='continue';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function semi(l) {
|
|
82
|
+
if(!l) return false;
|
|
83
|
+
if(l.endsWith(';')||l.endsWith('{')||l.endsWith('}')||l.endsWith(',')||l.endsWith('[')||l.endsWith('(')) return false;
|
|
84
|
+
if(isJs(l)) return false;
|
|
85
|
+
if(l.endsWith(')')&&!(l.includes('=')||l.includes('console.')||/^[a-zA-Z_$][\w$.]*\s*\(/.test(l)||/^(await|return)\s/.test(l))) return false;
|
|
86
|
+
return l.includes('=')||l.includes('console.')||
|
|
87
|
+
l.startsWith('const ')||l.startsWith('let ')||l.startsWith('var ')||
|
|
88
|
+
l.startsWith('throw ')||l.startsWith('return')||l.startsWith('import ')||
|
|
89
|
+
/^[a-zA-Z_$][\w$.]*\s*[\(`[]/.test(l)||/^(await|yield)\s/.test(l)||
|
|
90
|
+
/^\w+\s*(\+\+|--)/.test(l)||/^\w+\s*[+\-*/&|^]=/.test(l);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export async function runFile(filePath, debug=false) {
|
|
94
|
+
if (!fs.existsSync(filePath)) { console.error(`\x1b[31m✘ File not found: ${filePath}\x1b[0m`); process.exit(1); }
|
|
95
|
+
|
|
96
|
+
const source = fs.readFileSync(filePath, 'utf8');
|
|
97
|
+
if (!source.trim()) { console.error('\x1b[31m✘ File is empty.\x1b[0m'); process.exit(1); }
|
|
98
|
+
|
|
99
|
+
const userCode = transform(source, filePath);
|
|
100
|
+
const stdlibPath = path.join(__dirname, '..', 'stdlib', 'index.js');
|
|
101
|
+
const inject = fs.existsSync(stdlibPath)
|
|
102
|
+
? `import { injectGlobals } from "file://${stdlibPath}";\ninjectGlobals();\n`
|
|
103
|
+
: '';
|
|
104
|
+
|
|
105
|
+
const final = `${inject}\n// === USER CODE ===\n${userCode}`;
|
|
106
|
+
if (debug) console.log('\x1b[90m[debug]\x1b[0m\n' + final);
|
|
107
|
+
|
|
108
|
+
const tempDir = path.join(os.tmpdir(), `fenrir_${Date.now()}`);
|
|
109
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
110
|
+
const tempFile = path.join(tempDir, 'run.mjs');
|
|
111
|
+
fs.writeFileSync(tempFile, final);
|
|
112
|
+
|
|
113
|
+
const root = process.cwd();
|
|
114
|
+
const cwdMods = path.join(root, 'node_modules');
|
|
115
|
+
const tempMods = path.join(tempDir, 'node_modules');
|
|
116
|
+
if (fs.existsSync(cwdMods)) try { cpDir(cwdMods, tempMods); } catch {}
|
|
117
|
+
const pkg = path.join(root, 'package.json');
|
|
118
|
+
if (fs.existsSync(pkg)) try { fs.copyFileSync(pkg, path.join(tempDir,'package.json')); } catch {}
|
|
119
|
+
|
|
120
|
+
const env = { ...process.env,
|
|
121
|
+
NODE_PATH: [tempMods, cwdMods, process.env.NODE_PATH].filter(Boolean).join(path.delimiter) };
|
|
122
|
+
|
|
123
|
+
const child = spawn('node', [tempFile], { stdio:'inherit', env, cwd:root });
|
|
124
|
+
child.on('close', code => { del(tempDir); process.exit(code??0); });
|
|
125
|
+
child.on('error', e => { console.error(`\x1b[31m✘ ${e.message}\x1b[0m`); del(tempDir); process.exit(1); });
|
|
126
|
+
process.on('SIGINT', () => { del(tempDir); process.exit(130); });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const del = dir => { try { fs.rmSync(dir,{recursive:true,force:true}); } catch {} };
|
|
130
|
+
|
|
131
|
+
function cpDir(src, dest) {
|
|
132
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
133
|
+
for (const e of fs.readdirSync(src, { withFileTypes: true })) {
|
|
134
|
+
const s = path.join(src, e.name), d = path.join(dest, e.name);
|
|
135
|
+
if (e.isSymbolicLink()) try { cpDir(fs.realpathSync(s),d); } catch {}
|
|
136
|
+
else if (e.isDirectory()) cpDir(s,d);
|
|
137
|
+
else try { fs.copyFileSync(s,d); } catch {}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { execSync, spawn as nodeSpawn } from 'child_process';
|
|
4
|
+
import { createInterface } from 'readline';
|
|
5
|
+
|
|
6
|
+
const fmt = v => v===null?'null':v===undefined?'undefined':typeof v==='object'?JSON.stringify(v,null,2):String(v);
|
|
7
|
+
|
|
8
|
+
export const print = (...a) => { process.stdout.write(a.map(fmt).join(' ')+'\n'); };
|
|
9
|
+
export const log = print;
|
|
10
|
+
export const err = (...a) => { process.stderr.write(a.map(fmt).join(' ')+'\n'); };
|
|
11
|
+
export const warn = (...a) => { process.stderr.write('\x1b[33m'+a.map(fmt).join(' ')+'\x1b[0m\n'); };
|
|
12
|
+
export const info = (...a) => { process.stdout.write('\x1b[36m'+a.map(fmt).join(' ')+'\x1b[0m\n'); };
|
|
13
|
+
|
|
14
|
+
export const prompt = q => new Promise(r => {
|
|
15
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
16
|
+
rl.question(q, a => { rl.close(); r(a); });
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const readFile = p => fs.readFileSync(path.resolve(p), 'utf8');
|
|
20
|
+
export const writeFile = (p,c) => { fs.writeFileSync(path.resolve(p), c, 'utf8'); };
|
|
21
|
+
export const appendFile = (p,c) => { fs.appendFileSync(path.resolve(p), c, 'utf8'); };
|
|
22
|
+
export const fileExists = p => fs.existsSync(path.resolve(p));
|
|
23
|
+
export const readDir = p => fs.readdirSync(path.resolve(p));
|
|
24
|
+
export const readJSON = p => JSON.parse(readFile(p));
|
|
25
|
+
export const writeJSON = (p,d) => writeFile(p, JSON.stringify(d,null,2));
|
|
26
|
+
export const mkdir = p => { fs.mkdirSync(path.resolve(p), { recursive: true }); };
|
|
27
|
+
export const rm = p => { fs.rmSync(path.resolve(p), { recursive: true, force: true }); };
|
|
28
|
+
|
|
29
|
+
export const get = async (url, headers) => { const r=await fetch(url,{headers}); const t=await r.text(); try{return JSON.parse(t)}catch{return t}};
|
|
30
|
+
export const post = async (url, body, headers) => { const r=await fetch(url,{method:'POST',headers:{'Content-Type':'application/json',...headers},body:JSON.stringify(body)}); const t=await r.text(); try{return JSON.parse(t)}catch{return t}};
|
|
31
|
+
|
|
32
|
+
export const exec = cmd => execSync(cmd, { encoding:'utf8', stdio:['pipe','pipe','pipe'] }).trim();
|
|
33
|
+
export const run = cmd => { execSync(cmd, { stdio:'inherit' }); };
|
|
34
|
+
export const spawn = (cmd, args=[]) => new Promise((res,rej) => {
|
|
35
|
+
const c = nodeSpawn(cmd, args, { stdio:'inherit' });
|
|
36
|
+
c.on('close', res); c.on('error', rej);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const env = (k, fb='') => process.env[k] ?? fb;
|
|
40
|
+
export const args = () => process.argv.slice(2);
|
|
41
|
+
export const exit = (c=0) => process.exit(c);
|
|
42
|
+
export const cwd = () => process.cwd();
|
|
43
|
+
|
|
44
|
+
export const now = () => Date.now();
|
|
45
|
+
export const time = () => new Date().toISOString();
|
|
46
|
+
export const sleep = ms => new Promise(r => setTimeout(r, ms));
|
|
47
|
+
export const bench = async (label, fn) => { const s=performance.now(); await fn(); info(`[bench] ${label}: ${(performance.now()-s).toFixed(2)}ms`); };
|
|
48
|
+
|
|
49
|
+
export const range = (start, end, step=1) => { if(end===undefined){end=start;start=0;} const r=[];for(let i=start;i<end;i+=step)r.push(i);return r; };
|
|
50
|
+
export const rand = (min=0,max=1) => Math.random()*(max-min)+min;
|
|
51
|
+
export const randInt = (min,max) => Math.floor(rand(min,max+1));
|
|
52
|
+
export const pick = arr => arr[randInt(0,arr.length-1)];
|
|
53
|
+
export const shuffle = arr => { const a=[...arr]; for(let i=a.length-1;i>0;i--){const j=randInt(0,i);[a[i],a[j]]=[a[j],a[i]];} return a; };
|
|
54
|
+
export const chunk = (arr,n) => { const r=[];for(let i=0;i<arr.length;i+=n)r.push(arr.slice(i,i+n));return r; };
|
|
55
|
+
export const unique = arr => [...new Set(arr)];
|
|
56
|
+
export const flatten = arr => arr.flat(Infinity);
|
|
57
|
+
export const sum = arr => arr.reduce((a,b)=>a+b,0);
|
|
58
|
+
export const avg = arr => sum(arr)/arr.length;
|
|
59
|
+
export const min = (...a) => Math.min(...(Array.isArray(a[0])?a[0]:a));
|
|
60
|
+
export const max = (...a) => Math.max(...(Array.isArray(a[0])?a[0]:a));
|
|
61
|
+
export const clamp = (n,lo,hi) => Math.max(lo,Math.min(hi,n));
|
|
62
|
+
|
|
63
|
+
export const capitalize = s => s.charAt(0).toUpperCase()+s.slice(1);
|
|
64
|
+
export const truncate = (s,n,suf='...') => s.length>n?s.slice(0,n)+suf:s;
|
|
65
|
+
export const pad = (s,n,c=' ') => String(s).padStart(n,c);
|
|
66
|
+
export const repeat = (s,n) => s.repeat(n);
|
|
67
|
+
|
|
68
|
+
export const keys = o => Object.keys(o);
|
|
69
|
+
export const values = o => Object.values(o);
|
|
70
|
+
export const entries = o => Object.entries(o);
|
|
71
|
+
export const merge = (...os) => Object.assign({},...os);
|
|
72
|
+
export const clone = v => JSON.parse(JSON.stringify(v));
|
|
73
|
+
|
|
74
|
+
export const all = ps => Promise.all(ps);
|
|
75
|
+
export const race = ps => Promise.race(ps);
|
|
76
|
+
export const retry = async (fn,times=3,delay=500) => { for(let i=0;i<times;i++){try{return await fn()}catch(e){if(i===times-1)throw e;await sleep(delay);}} };
|
|
77
|
+
|
|
78
|
+
export const isString = v => typeof v==='string';
|
|
79
|
+
export const isNumber = v => typeof v==='number';
|
|
80
|
+
export const isBool = v => typeof v==='boolean';
|
|
81
|
+
export const isArray = v => Array.isArray(v);
|
|
82
|
+
export const isObject = v => v!==null&&typeof v==='object'&&!Array.isArray(v);
|
|
83
|
+
export const isNull = v => v===null;
|
|
84
|
+
export const isDefined= v => v!==undefined&&v!==null;
|
|
85
|
+
|
|
86
|
+
export const { abs,ceil,floor,round,sqrt,pow,PI,E,log2,log10,sin,cos,tan } = Math;
|
|
87
|
+
|
|
88
|
+
export function injectGlobals() {
|
|
89
|
+
Object.assign(globalThis, {
|
|
90
|
+
print,log,err,warn,info,prompt,
|
|
91
|
+
readFile,writeFile,appendFile,fileExists,readDir,readJSON,writeJSON,mkdir,rm,
|
|
92
|
+
get,post,exec,run,spawn,env,args,exit,cwd,
|
|
93
|
+
now,time,sleep,bench,
|
|
94
|
+
range,rand,randInt,pick,shuffle,chunk,unique,flatten,sum,avg,min,max,clamp,
|
|
95
|
+
capitalize,truncate,pad,repeat,
|
|
96
|
+
keys,values,entries,merge,clone,
|
|
97
|
+
all,race,retry,
|
|
98
|
+
isString,isNumber,isBool,isArray,isObject,isNull,isDefined,
|
|
99
|
+
abs,ceil,floor,round,sqrt,pow,PI,E,log2,log10,sin,cos,tan,
|
|
100
|
+
});
|
|
101
|
+
}
|
package/App/App.axaml
DELETED
package/App/App.axaml.cs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
using Avalonia;
|
|
2
|
-
using Avalonia.Controls.ApplicationLifetimes;
|
|
3
|
-
using Avalonia.Markup.Xaml;
|
|
4
|
-
|
|
5
|
-
namespace FenrirLinux;
|
|
6
|
-
|
|
7
|
-
public partial class App : Application
|
|
8
|
-
{
|
|
9
|
-
public override void Initialize()
|
|
10
|
-
{
|
|
11
|
-
AvaloniaXamlLoader.Load(this);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public override void OnFrameworkInitializationCompleted()
|
|
15
|
-
{
|
|
16
|
-
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
|
17
|
-
{
|
|
18
|
-
desktop.MainWindow = new MainWindow();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
base.OnFrameworkInitializationCompleted();
|
|
22
|
-
}
|
|
23
|
-
}
|
package/App/FenrirLinux.csproj
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
|
-
|
|
3
|
-
<PropertyGroup>
|
|
4
|
-
<OutputType>WinExe</OutputType>
|
|
5
|
-
<TargetFramework>net9.0</TargetFramework>
|
|
6
|
-
<Nullable>enable</Nullable>
|
|
7
|
-
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
|
8
|
-
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
9
|
-
</PropertyGroup>
|
|
10
|
-
|
|
11
|
-
<ItemGroup>
|
|
12
|
-
<AvaloniaResource Include="Assets\**" />
|
|
13
|
-
</ItemGroup>
|
|
14
|
-
|
|
15
|
-
<ItemGroup>
|
|
16
|
-
<TrimmerRootDescriptor Include="Roots.xml" />
|
|
17
|
-
</ItemGroup>
|
|
18
|
-
|
|
19
|
-
<ItemGroup>
|
|
20
|
-
<PackageReference Include="Avalonia" Version="11.0.6" />
|
|
21
|
-
<PackageReference Include="Avalonia.Desktop" Version="11.0.6" />
|
|
22
|
-
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.6" />
|
|
23
|
-
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.6" />
|
|
24
|
-
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.6" />
|
|
25
|
-
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.6" />
|
|
26
|
-
</ItemGroup>
|
|
27
|
-
</Project>
|