ima2-gen 1.1.13 → 1.1.16
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/README.md +31 -7
- package/bin/commands/capabilities.js +5 -0
- package/bin/commands/capabilities.ts +5 -0
- package/bin/commands/doctor.js +195 -0
- package/bin/commands/doctor.ts +202 -0
- package/bin/commands/edit.js +6 -6
- package/bin/commands/edit.ts +6 -6
- package/bin/commands/gen.js +6 -6
- package/bin/commands/gen.ts +6 -6
- package/bin/commands/grok.js +61 -0
- package/bin/commands/grok.ts +67 -0
- package/bin/commands/multimode.js +3 -3
- package/bin/commands/multimode.ts +3 -3
- package/bin/commands/node.js +4 -4
- package/bin/commands/node.ts +4 -4
- package/bin/ima2.js +5 -105
- package/bin/ima2.ts +5 -109
- package/config.js +17 -0
- package/config.ts +21 -0
- package/docs/API.md +77 -8
- package/docs/CLI.md +65 -3
- package/docs/FAQ.ko.md +82 -2
- package/docs/FAQ.md +85 -2
- package/docs/PROMPT_STUDIO.ko.md +111 -0
- package/docs/PROMPT_STUDIO.md +115 -0
- package/docs/README.ko.md +27 -7
- package/docs/grok-video-i2v-plan.md +419 -0
- package/docs/grok-video-i2v-research.md +204 -0
- package/docs/migration/runtime-test-inventory.md +12 -1
- package/lib/agentRuntime.js +88 -19
- package/lib/agentRuntime.ts +97 -29
- package/lib/agentSettings.js +1 -1
- package/lib/agentSettings.ts +1 -1
- package/lib/agentTypes.ts +1 -1
- package/lib/capabilities.js +10 -2
- package/lib/capabilities.ts +10 -2
- package/lib/configKeys.js +6 -0
- package/lib/configKeys.ts +6 -1
- package/lib/errorClassify.js +1 -1
- package/lib/errorClassify.ts +1 -1
- package/lib/generationErrors.js +121 -23
- package/lib/generationErrors.ts +100 -13
- package/lib/grokImageAdapter.js +364 -0
- package/lib/grokImageAdapter.ts +483 -0
- package/lib/grokMultimodeAdapter.js +54 -0
- package/lib/grokMultimodeAdapter.ts +84 -0
- package/lib/grokProxyLauncher.js +105 -0
- package/lib/grokProxyLauncher.ts +129 -0
- package/lib/grokRuntime.js +18 -0
- package/lib/grokRuntime.ts +23 -0
- package/lib/grokSizeMapper.js +63 -0
- package/lib/grokSizeMapper.ts +71 -0
- package/lib/grokVideoAdapter.js +374 -0
- package/lib/grokVideoAdapter.ts +438 -0
- package/lib/historyList.js +5 -1
- package/lib/historyList.ts +5 -1
- package/lib/imageMetadata.js +2 -0
- package/lib/imageMetadata.ts +2 -0
- package/lib/imageModels.js +101 -0
- package/lib/imageModels.ts +111 -0
- package/lib/providerOptions.js +15 -1
- package/lib/providerOptions.ts +15 -1
- package/lib/responsesDoctor.js +386 -0
- package/lib/responsesDoctor.ts +456 -0
- package/lib/responsesErrors.js +57 -0
- package/lib/responsesErrors.ts +83 -0
- package/lib/responsesFallback.js +72 -0
- package/lib/responsesFallback.ts +114 -0
- package/lib/responsesImageAdapter.js +121 -174
- package/lib/responsesImageAdapter.ts +136 -211
- package/lib/responsesParse.js +324 -0
- package/lib/responsesParse.ts +452 -0
- package/lib/responsesTools.js +15 -0
- package/lib/responsesTools.ts +28 -0
- package/lib/runtimeContext.js +12 -0
- package/lib/runtimeContext.ts +15 -0
- package/node_modules/array-flatten/LICENSE +21 -0
- package/node_modules/array-flatten/README.md +43 -0
- package/node_modules/array-flatten/array-flatten.js +64 -0
- package/node_modules/array-flatten/package.json +39 -0
- package/node_modules/bundle-name/index.js +5 -0
- package/node_modules/bundle-name/license +9 -0
- package/node_modules/bundle-name/package.json +45 -0
- package/node_modules/bundle-name/readme.md +23 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1149 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +709 -0
- package/node_modules/commander/lib/option.js +367 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +335 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/default-browser/index.d.ts +29 -0
- package/node_modules/default-browser/index.js +34 -0
- package/node_modules/default-browser/license +9 -0
- package/node_modules/default-browser/package.json +54 -0
- package/node_modules/default-browser/readme.md +24 -0
- package/node_modules/default-browser/windows.js +57 -0
- package/node_modules/default-browser-id/index.js +25 -0
- package/node_modules/default-browser-id/license +9 -0
- package/node_modules/default-browser-id/package.json +41 -0
- package/node_modules/default-browser-id/readme.md +19 -0
- package/node_modules/define-lazy-prop/index.d.ts +31 -0
- package/node_modules/define-lazy-prop/index.js +18 -0
- package/node_modules/define-lazy-prop/license +9 -0
- package/node_modules/define-lazy-prop/package.json +51 -0
- package/node_modules/define-lazy-prop/readme.md +55 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/destroy/LICENSE +23 -0
- package/node_modules/destroy/README.md +63 -0
- package/node_modules/destroy/index.js +209 -0
- package/node_modules/destroy/package.json +48 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +51 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +4 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/is-docker/cli.js +5 -0
- package/node_modules/is-docker/index.d.ts +13 -0
- package/node_modules/is-docker/index.js +29 -0
- package/node_modules/is-docker/license +9 -0
- package/node_modules/is-docker/package.json +44 -0
- package/node_modules/is-docker/readme.md +27 -0
- package/node_modules/is-inside-container/cli.js +5 -0
- package/node_modules/is-inside-container/index.d.ts +13 -0
- package/node_modules/is-inside-container/index.js +23 -0
- package/node_modules/is-inside-container/license +9 -0
- package/node_modules/is-inside-container/package.json +51 -0
- package/node_modules/is-inside-container/readme.md +36 -0
- package/node_modules/is-wsl/index.d.ts +15 -0
- package/node_modules/is-wsl/index.js +36 -0
- package/node_modules/is-wsl/license +9 -0
- package/node_modules/is-wsl/package.json +58 -0
- package/node_modules/is-wsl/readme.md +21 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/methods/HISTORY.md +29 -0
- package/node_modules/methods/LICENSE +24 -0
- package/node_modules/methods/README.md +51 -0
- package/node_modules/methods/index.js +69 -0
- package/node_modules/methods/package.json +36 -0
- package/node_modules/mime/.npmignore +0 -0
- package/node_modules/mime/CHANGELOG.md +164 -0
- package/node_modules/mime/LICENSE +21 -0
- package/node_modules/mime/README.md +90 -0
- package/node_modules/mime/cli.js +8 -0
- package/node_modules/mime/mime.js +108 -0
- package/node_modules/mime/package.json +44 -0
- package/node_modules/mime/src/build.js +53 -0
- package/node_modules/mime/src/test.js +60 -0
- package/node_modules/mime/types.json +1 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/open/index.d.ts +158 -0
- package/node_modules/open/index.js +366 -0
- package/node_modules/open/license +9 -0
- package/node_modules/open/node_modules/wsl-utils/index.d.ts +21 -0
- package/node_modules/open/node_modules/wsl-utils/index.js +57 -0
- package/node_modules/open/node_modules/wsl-utils/license +9 -0
- package/node_modules/open/node_modules/wsl-utils/package.json +46 -0
- package/node_modules/open/node_modules/wsl-utils/readme.md +50 -0
- package/node_modules/open/package.json +68 -0
- package/node_modules/open/readme.md +183 -0
- package/node_modules/open/xdg-open +1267 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/progrok/LICENSE +21 -0
- package/node_modules/progrok/README.md +53 -0
- package/node_modules/progrok/THIRD_PARTY_NOTICES.md +13 -0
- package/node_modules/progrok/dist/index.js +1142 -0
- package/node_modules/progrok/dist/index.js.map +1 -0
- package/node_modules/progrok/dist/public/app.js +529 -0
- package/node_modules/progrok/dist/public/index.html +47 -0
- package/node_modules/progrok/dist/public/style.css +392 -0
- package/node_modules/progrok/node_modules/accepts/HISTORY.md +243 -0
- package/node_modules/progrok/node_modules/accepts/LICENSE +23 -0
- package/node_modules/progrok/node_modules/accepts/README.md +140 -0
- package/node_modules/progrok/node_modules/accepts/index.js +238 -0
- package/node_modules/progrok/node_modules/accepts/package.json +47 -0
- package/node_modules/progrok/node_modules/body-parser/HISTORY.md +686 -0
- package/node_modules/progrok/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/progrok/node_modules/body-parser/README.md +476 -0
- package/node_modules/progrok/node_modules/body-parser/index.js +156 -0
- package/node_modules/progrok/node_modules/body-parser/lib/read.js +205 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/json.js +243 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/raw.js +101 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/text.js +121 -0
- package/node_modules/progrok/node_modules/body-parser/lib/types/urlencoded.js +299 -0
- package/node_modules/progrok/node_modules/body-parser/package.json +55 -0
- package/node_modules/progrok/node_modules/content-disposition/HISTORY.md +60 -0
- package/node_modules/progrok/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/progrok/node_modules/content-disposition/README.md +142 -0
- package/node_modules/progrok/node_modules/content-disposition/index.js +458 -0
- package/node_modules/progrok/node_modules/content-disposition/package.json +44 -0
- package/node_modules/progrok/node_modules/cookie-signature/History.md +42 -0
- package/node_modules/progrok/node_modules/cookie-signature/Readme.md +42 -0
- package/node_modules/progrok/node_modules/cookie-signature/index.js +51 -0
- package/node_modules/progrok/node_modules/cookie-signature/package.json +18 -0
- package/node_modules/progrok/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/progrok/node_modules/debug/.eslintrc +11 -0
- package/node_modules/progrok/node_modules/debug/.npmignore +9 -0
- package/node_modules/progrok/node_modules/debug/.travis.yml +14 -0
- package/node_modules/progrok/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/progrok/node_modules/debug/LICENSE +19 -0
- package/node_modules/progrok/node_modules/debug/Makefile +50 -0
- package/node_modules/progrok/node_modules/debug/README.md +312 -0
- package/node_modules/progrok/node_modules/debug/component.json +19 -0
- package/node_modules/progrok/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/progrok/node_modules/debug/node.js +1 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/index.js +152 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/license.md +21 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/package.json +37 -0
- package/node_modules/progrok/node_modules/debug/node_modules/ms/readme.md +51 -0
- package/node_modules/progrok/node_modules/debug/package.json +49 -0
- package/node_modules/progrok/node_modules/debug/src/browser.js +185 -0
- package/node_modules/progrok/node_modules/debug/src/debug.js +202 -0
- package/node_modules/progrok/node_modules/debug/src/index.js +10 -0
- package/node_modules/progrok/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/progrok/node_modules/debug/src/node.js +248 -0
- package/node_modules/progrok/node_modules/express/History.md +3676 -0
- package/node_modules/progrok/node_modules/express/LICENSE +24 -0
- package/node_modules/progrok/node_modules/express/Readme.md +260 -0
- package/node_modules/progrok/node_modules/express/index.js +11 -0
- package/node_modules/progrok/node_modules/express/lib/application.js +661 -0
- package/node_modules/progrok/node_modules/express/lib/express.js +116 -0
- package/node_modules/progrok/node_modules/express/lib/middleware/init.js +43 -0
- package/node_modules/progrok/node_modules/express/lib/middleware/query.js +47 -0
- package/node_modules/progrok/node_modules/express/lib/request.js +525 -0
- package/node_modules/progrok/node_modules/express/lib/response.js +1179 -0
- package/node_modules/progrok/node_modules/express/lib/router/index.js +673 -0
- package/node_modules/progrok/node_modules/express/lib/router/layer.js +181 -0
- package/node_modules/progrok/node_modules/express/lib/router/route.js +230 -0
- package/node_modules/progrok/node_modules/express/lib/utils.js +304 -0
- package/node_modules/progrok/node_modules/express/lib/view.js +182 -0
- package/node_modules/progrok/node_modules/express/package.json +102 -0
- package/node_modules/progrok/node_modules/finalhandler/HISTORY.md +216 -0
- package/node_modules/progrok/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/progrok/node_modules/finalhandler/README.md +147 -0
- package/node_modules/progrok/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/progrok/node_modules/finalhandler/index.js +341 -0
- package/node_modules/progrok/node_modules/finalhandler/package.json +47 -0
- package/node_modules/progrok/node_modules/fresh/HISTORY.md +70 -0
- package/node_modules/progrok/node_modules/fresh/LICENSE +23 -0
- package/node_modules/progrok/node_modules/fresh/README.md +119 -0
- package/node_modules/progrok/node_modules/fresh/index.js +137 -0
- package/node_modules/progrok/node_modules/fresh/package.json +46 -0
- package/node_modules/progrok/node_modules/iconv-lite/Changelog.md +162 -0
- package/node_modules/progrok/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/progrok/node_modules/iconv-lite/README.md +156 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/index.js +22 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/node_modules/progrok/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/index.js +153 -0
- package/node_modules/progrok/node_modules/iconv-lite/lib/streams.js +121 -0
- package/node_modules/progrok/node_modules/iconv-lite/package.json +46 -0
- package/node_modules/progrok/node_modules/media-typer/HISTORY.md +22 -0
- package/node_modules/progrok/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/progrok/node_modules/media-typer/README.md +81 -0
- package/node_modules/progrok/node_modules/media-typer/index.js +270 -0
- package/node_modules/progrok/node_modules/media-typer/package.json +26 -0
- package/node_modules/progrok/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/node_modules/progrok/node_modules/merge-descriptors/LICENSE +23 -0
- package/node_modules/progrok/node_modules/merge-descriptors/README.md +49 -0
- package/node_modules/progrok/node_modules/merge-descriptors/index.js +60 -0
- package/node_modules/progrok/node_modules/merge-descriptors/package.json +39 -0
- package/node_modules/progrok/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/progrok/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/progrok/node_modules/mime-db/README.md +100 -0
- package/node_modules/progrok/node_modules/mime-db/db.json +8519 -0
- package/node_modules/progrok/node_modules/mime-db/index.js +12 -0
- package/node_modules/progrok/node_modules/mime-db/package.json +60 -0
- package/node_modules/progrok/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/progrok/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/progrok/node_modules/mime-types/README.md +113 -0
- package/node_modules/progrok/node_modules/mime-types/index.js +188 -0
- package/node_modules/progrok/node_modules/mime-types/package.json +44 -0
- package/node_modules/progrok/node_modules/negotiator/HISTORY.md +108 -0
- package/node_modules/progrok/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/progrok/node_modules/negotiator/README.md +203 -0
- package/node_modules/progrok/node_modules/negotiator/index.js +82 -0
- package/node_modules/progrok/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/progrok/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/progrok/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/progrok/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/progrok/node_modules/negotiator/package.json +42 -0
- package/node_modules/progrok/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/progrok/node_modules/path-to-regexp/Readme.md +35 -0
- package/node_modules/progrok/node_modules/path-to-regexp/index.js +158 -0
- package/node_modules/progrok/node_modules/path-to-regexp/package.json +30 -0
- package/node_modules/progrok/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/progrok/node_modules/raw-body/README.md +223 -0
- package/node_modules/progrok/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/progrok/node_modules/raw-body/index.js +336 -0
- package/node_modules/progrok/node_modules/raw-body/package.json +47 -0
- package/node_modules/progrok/node_modules/send/HISTORY.md +538 -0
- package/node_modules/progrok/node_modules/send/LICENSE +23 -0
- package/node_modules/progrok/node_modules/send/README.md +327 -0
- package/node_modules/progrok/node_modules/send/SECURITY.md +24 -0
- package/node_modules/progrok/node_modules/send/index.js +1142 -0
- package/node_modules/progrok/node_modules/send/package.json +62 -0
- package/node_modules/progrok/node_modules/serve-static/HISTORY.md +493 -0
- package/node_modules/progrok/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/progrok/node_modules/serve-static/README.md +257 -0
- package/node_modules/progrok/node_modules/serve-static/index.js +209 -0
- package/node_modules/progrok/node_modules/serve-static/package.json +42 -0
- package/node_modules/progrok/node_modules/type-is/HISTORY.md +259 -0
- package/node_modules/progrok/node_modules/type-is/LICENSE +23 -0
- package/node_modules/progrok/node_modules/type-is/README.md +170 -0
- package/node_modules/progrok/node_modules/type-is/index.js +266 -0
- package/node_modules/progrok/node_modules/type-is/package.json +45 -0
- package/node_modules/progrok/package.json +52 -0
- package/node_modules/progrok/skills/progrok/SKILL.md +228 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +812 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +758 -0
- package/node_modules/qs/dist/qs.js +141 -0
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +373 -0
- package/node_modules/qs/lib/stringify.js +356 -0
- package/node_modules/qs/lib/utils.js +342 -0
- package/node_modules/qs/package.json +94 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1654 -0
- package/node_modules/qs/test/stringify.js +1319 -0
- package/node_modules/qs/test/utils.js +432 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +84 -0
- package/node_modules/range-parser/index.js +162 -0
- package/node_modules/range-parser/package.json +44 -0
- package/node_modules/run-applescript/index.d.ts +66 -0
- package/node_modules/run-applescript/index.js +37 -0
- package/node_modules/run-applescript/license +9 -0
- package/node_modules/run-applescript/package.json +42 -0
- package/node_modules/run-applescript/readme.md +78 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +110 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +43 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +104 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +36 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +111 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +154 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/utils-merge/.npmignore +9 -0
- package/node_modules/utils-merge/LICENSE +20 -0
- package/node_modules/utils-merge/README.md +34 -0
- package/node_modules/utils-merge/index.js +23 -0
- package/node_modules/utils-merge/package.json +40 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/package.json +7 -2
- package/routes/edit.js +85 -13
- package/routes/edit.ts +94 -23
- package/routes/generate.js +118 -11
- package/routes/generate.ts +127 -10
- package/routes/grok.js +22 -0
- package/routes/grok.ts +24 -0
- package/routes/health.js +5 -0
- package/routes/health.ts +5 -0
- package/routes/index.js +4 -0
- package/routes/index.ts +4 -0
- package/routes/multimode.js +71 -26
- package/routes/multimode.ts +80 -39
- package/routes/nodes.js +88 -33
- package/routes/nodes.ts +97 -42
- package/routes/video.js +197 -0
- package/routes/video.ts +216 -0
- package/server.js +42 -1
- package/server.ts +34 -1
- package/skills/ima2/SKILL.md +27 -0
- package/ui/dist/.vite/manifest.json +12 -12
- package/ui/dist/assets/AgentWorkspace-c1_kEfFN.js +3 -0
- package/ui/dist/assets/{CardNewsWorkspace-BBLdwzYU.js → CardNewsWorkspace-CTBT3MbP.js} +2 -2
- package/ui/dist/assets/NodeCanvas-D3ecSAEi.js +7 -0
- package/ui/dist/assets/{PromptBuilderPanel-Y2VygFc0.js → PromptBuilderPanel-CqepukCN.js} +2 -2
- package/ui/dist/assets/{PromptImportDialog-C6lFV-LL.js → PromptImportDialog-Bvr8Q8P2.js} +2 -2
- package/ui/dist/assets/{PromptImportDiscoverySection-D8YJFhND.js → PromptImportDiscoverySection-CyZEXyWP.js} +1 -1
- package/ui/dist/assets/{PromptImportFolderSection-ywfcQolW.js → PromptImportFolderSection-CIl-_pyV.js} +1 -1
- package/ui/dist/assets/{PromptLibraryPanel-fk4KmrGy.js → PromptLibraryPanel-Bj23Q6l9.js} +2 -2
- package/ui/dist/assets/SettingsWorkspace-D_GqtEsP.js +1 -0
- package/ui/dist/assets/index-DMjgFXdO.css +1 -0
- package/ui/dist/assets/index-DQ6jg4Ui.js +32 -0
- package/ui/dist/assets/index-DtSBvfgp.js +1 -0
- package/ui/dist/index.html +2 -2
- package/vendor/progrok-0.1.0.tgz +0 -0
- package/ui/dist/assets/AgentWorkspace-BJe9yxPA.js +0 -3
- package/ui/dist/assets/NodeCanvas-BSZ527J4.js +0 -7
- package/ui/dist/assets/SettingsWorkspace-DL5vhAHQ.js +0 -1
- package/ui/dist/assets/index-BLx55BOg.js +0 -1
- package/ui/dist/assets/index-ByViUJfx.css +0 -1
- package/ui/dist/assets/index-Ci36vcFD.js +0 -28
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cookie",
|
|
3
|
+
"description": "HTTP server cookie parsing and serialization",
|
|
4
|
+
"version": "0.7.2",
|
|
5
|
+
"author": "Roman Shtylman <shtylman@gmail.com>",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
|
8
|
+
],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"cookie",
|
|
12
|
+
"cookies"
|
|
13
|
+
],
|
|
14
|
+
"repository": "jshttp/cookie",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"beautify-benchmark": "0.2.4",
|
|
17
|
+
"benchmark": "2.1.4",
|
|
18
|
+
"eslint": "8.53.0",
|
|
19
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
20
|
+
"mocha": "10.2.0",
|
|
21
|
+
"nyc": "15.1.0",
|
|
22
|
+
"safe-buffer": "5.2.1",
|
|
23
|
+
"top-sites": "1.1.194"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"HISTORY.md",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"README.md",
|
|
29
|
+
"SECURITY.md",
|
|
30
|
+
"index.js"
|
|
31
|
+
],
|
|
32
|
+
"main": "index.js",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.6"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"bench": "node benchmark/index.js",
|
|
38
|
+
"lint": "eslint .",
|
|
39
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
40
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
41
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
42
|
+
"update-bench": "node scripts/update-benchmark.js"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type Browser = {
|
|
2
|
+
/**
|
|
3
|
+
Human-readadable name of the browser.
|
|
4
|
+
*/
|
|
5
|
+
name: string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
The unique identifier for the browser on the current platform:
|
|
9
|
+
- On macOS, it's the app's bundle identifier.
|
|
10
|
+
- On Linux, it's the desktop file identifier (from `xdg-mime`).
|
|
11
|
+
- On Windows, it's an invented identifier, because apps on Windows does not have identifiers.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
Get the default browser for the current platform.
|
|
18
|
+
|
|
19
|
+
@returns A promise for the browser.
|
|
20
|
+
|
|
21
|
+
@example
|
|
22
|
+
```
|
|
23
|
+
import defaultBrowser from 'default-browser';
|
|
24
|
+
|
|
25
|
+
console.log(await defaultBrowser());
|
|
26
|
+
//=> {name: 'Safari', id: 'com.apple.Safari'}
|
|
27
|
+
```
|
|
28
|
+
*/
|
|
29
|
+
export default function defaultBrowser(): Promise<Browser>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {promisify} from 'node:util';
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import {execFile} from 'node:child_process';
|
|
4
|
+
import defaultBrowserId from 'default-browser-id';
|
|
5
|
+
import bundleName from 'bundle-name';
|
|
6
|
+
import windows from './windows.js';
|
|
7
|
+
|
|
8
|
+
export {_windowsBrowserProgIdMap} from './windows.js';
|
|
9
|
+
|
|
10
|
+
const execFileAsync = promisify(execFile);
|
|
11
|
+
|
|
12
|
+
// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js
|
|
13
|
+
const titleize = string => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, x => x.toUpperCase());
|
|
14
|
+
|
|
15
|
+
export default async function defaultBrowser() {
|
|
16
|
+
if (process.platform === 'darwin') {
|
|
17
|
+
const id = await defaultBrowserId();
|
|
18
|
+
const name = await bundleName(id);
|
|
19
|
+
return {name, id};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (process.platform === 'linux') {
|
|
23
|
+
const {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);
|
|
24
|
+
const id = stdout.trim();
|
|
25
|
+
const name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));
|
|
26
|
+
return {name, id};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (process.platform === 'win32') {
|
|
30
|
+
return windows();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
throw new Error('Only macOS, Linux, and Windows are supported');
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "default-browser",
|
|
3
|
+
"version": "5.5.0",
|
|
4
|
+
"description": "Get the default browser",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/default-browser",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"default": "./index.js"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "xo && ava && tsd"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"index.d.ts",
|
|
28
|
+
"windows.js"
|
|
29
|
+
],
|
|
30
|
+
"keywords": [
|
|
31
|
+
"macos",
|
|
32
|
+
"linux",
|
|
33
|
+
"browser",
|
|
34
|
+
"default",
|
|
35
|
+
"plist",
|
|
36
|
+
"web",
|
|
37
|
+
"bundle",
|
|
38
|
+
"bundleid",
|
|
39
|
+
"id",
|
|
40
|
+
"identifier",
|
|
41
|
+
"uti",
|
|
42
|
+
"cfbundlename",
|
|
43
|
+
"applescript"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"bundle-name": "^4.1.0",
|
|
47
|
+
"default-browser-id": "^5.0.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"ava": "^6.0.1",
|
|
51
|
+
"tsd": "^0.30.0",
|
|
52
|
+
"xo": "^0.56.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# default-browser
|
|
2
|
+
|
|
3
|
+
> Get the default browser
|
|
4
|
+
|
|
5
|
+
Works on macOS, Linux, and Windows.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install default-browser
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import defaultBrowser from 'default-browser';
|
|
17
|
+
|
|
18
|
+
console.log(await defaultBrowser());
|
|
19
|
+
//=> {name: 'Safari', id: 'com.apple.Safari'}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Related
|
|
23
|
+
|
|
24
|
+
- [default-browser-cli](https://github.com/sindresorhus/default-browser-cli) - CLI for this package
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {promisify} from 'node:util';
|
|
2
|
+
import {execFile} from 'node:child_process';
|
|
3
|
+
|
|
4
|
+
const execFileAsync = promisify(execFile);
|
|
5
|
+
|
|
6
|
+
// TODO: Fix the casing of bundle identifiers in the next major version.
|
|
7
|
+
|
|
8
|
+
// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake
|
|
9
|
+
// ones that look real and match the macOS/Linux versions for cross-platform apps.
|
|
10
|
+
const windowsBrowserProgIds = {
|
|
11
|
+
MSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // The missing `L` is correct.
|
|
12
|
+
MSEdgeBHTML: {name: 'Edge Beta', id: 'com.microsoft.edge.beta'},
|
|
13
|
+
MSEdgeDHTML: {name: 'Edge Dev', id: 'com.microsoft.edge.dev'},
|
|
14
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},
|
|
15
|
+
ChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},
|
|
16
|
+
ChromeBHTML: {name: 'Chrome Beta', id: 'com.google.chrome.beta'},
|
|
17
|
+
ChromeDHTML: {name: 'Chrome Dev', id: 'com.google.chrome.dev'},
|
|
18
|
+
ChromiumHTM: {name: 'Chromium', id: 'org.chromium.Chromium'},
|
|
19
|
+
BraveHTML: {name: 'Brave', id: 'com.brave.Browser'},
|
|
20
|
+
BraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},
|
|
21
|
+
BraveDHTML: {name: 'Brave Dev', id: 'com.brave.Browser.dev'},
|
|
22
|
+
BraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},
|
|
23
|
+
FirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},
|
|
24
|
+
OperaStable: {name: 'Opera', id: 'com.operasoftware.Opera'},
|
|
25
|
+
VivaldiHTM: {name: 'Vivaldi', id: 'com.vivaldi.Vivaldi'},
|
|
26
|
+
'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
30
|
+
|
|
31
|
+
export class UnknownBrowserError extends Error {}
|
|
32
|
+
|
|
33
|
+
export default async function defaultBrowser(_execFileAsync = execFileAsync) {
|
|
34
|
+
const {stdout} = await _execFileAsync('reg', [
|
|
35
|
+
'QUERY',
|
|
36
|
+
' HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice',
|
|
37
|
+
'/v',
|
|
38
|
+
'ProgId',
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
42
|
+
if (!match) {
|
|
43
|
+
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const {id} = match.groups;
|
|
47
|
+
|
|
48
|
+
// Windows can append a hash suffix to ProgIds using a dot or hyphen
|
|
49
|
+
// (e.g., `ChromeHTML.ABC123`, `FirefoxURL-6F193CCC56814779`).
|
|
50
|
+
// Try exact match first, then try without the suffix.
|
|
51
|
+
const dotIndex = id.lastIndexOf('.');
|
|
52
|
+
const hyphenIndex = id.lastIndexOf('-');
|
|
53
|
+
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
54
|
+
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
55
|
+
|
|
56
|
+
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {name: id, id};
|
|
57
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {promisify} from 'node:util';
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import {execFile} from 'node:child_process';
|
|
4
|
+
|
|
5
|
+
const execFileAsync = promisify(execFile);
|
|
6
|
+
|
|
7
|
+
export default async function defaultBrowserId() {
|
|
8
|
+
if (process.platform !== 'darwin') {
|
|
9
|
+
throw new Error('macOS only');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);
|
|
13
|
+
|
|
14
|
+
// `(?!-)` is to prevent matching `LSHandlerRoleAll = "-";`.
|
|
15
|
+
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
16
|
+
|
|
17
|
+
const browserId = match?.groups.id ?? 'com.apple.Safari';
|
|
18
|
+
|
|
19
|
+
// Correct the case for Safari's bundle identifier
|
|
20
|
+
if (browserId === 'com.apple.safari') {
|
|
21
|
+
return 'com.apple.Safari';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return browserId;
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "default-browser-id",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Get the bundle identifier of the default browser (macOS). Example: com.apple.Safari",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/default-browser-id",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": "./index.js",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "xo && ava"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"index.js"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"macos",
|
|
27
|
+
"browser",
|
|
28
|
+
"default",
|
|
29
|
+
"plist",
|
|
30
|
+
"web",
|
|
31
|
+
"bundle",
|
|
32
|
+
"bundleid",
|
|
33
|
+
"id",
|
|
34
|
+
"identifier",
|
|
35
|
+
"uti"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"ava": "^6.0.1",
|
|
39
|
+
"xo": "^0.56.0"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# default-browser-id
|
|
2
|
+
|
|
3
|
+
> Get the [bundle identifier](https://developer.apple.com/library/Mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/plist/info/CFBundleIdentifier) of the default browser *(macOS)*\
|
|
4
|
+
> Example: `com.apple.Safari`
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install default-browser-id
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
import defaultBrowserId from 'default-browser-id';
|
|
16
|
+
|
|
17
|
+
console.log(await defaultBrowserId());
|
|
18
|
+
//=> 'com.apple.Safari'
|
|
19
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Define a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property on an object.
|
|
3
|
+
|
|
4
|
+
@param object - Object to add the property to.
|
|
5
|
+
@param propertyName - Name of the property to add.
|
|
6
|
+
@param valueGetter - Called the first time `propertyName` is accessed.
|
|
7
|
+
|
|
8
|
+
@example
|
|
9
|
+
```
|
|
10
|
+
import defineLazyProperty from 'define-lazy-prop';
|
|
11
|
+
|
|
12
|
+
const unicorn = {
|
|
13
|
+
// …
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
defineLazyProperty(unicorn, 'rainbow', () => expensiveComputation());
|
|
17
|
+
|
|
18
|
+
app.on('user-action', () => {
|
|
19
|
+
doSomething(unicorn.rainbow);
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
*/
|
|
23
|
+
export default function defineLazyProperty<
|
|
24
|
+
ObjectType extends Record<string, any>,
|
|
25
|
+
PropertyNameType extends string,
|
|
26
|
+
PropertyValueType
|
|
27
|
+
>(
|
|
28
|
+
object: ObjectType,
|
|
29
|
+
propertyName: PropertyNameType,
|
|
30
|
+
valueGetter: () => PropertyValueType
|
|
31
|
+
): ObjectType & {[K in PropertyNameType]: PropertyValueType};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default function defineLazyProperty(object, propertyName, valueGetter) {
|
|
2
|
+
const define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(object, propertyName, {
|
|
5
|
+
configurable: true,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get() {
|
|
8
|
+
const result = valueGetter();
|
|
9
|
+
define(result);
|
|
10
|
+
return result;
|
|
11
|
+
},
|
|
12
|
+
set(value) {
|
|
13
|
+
define(value);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
return object;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "define-lazy-prop",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Define a lazily evaluated property on an object",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/define-lazy-prop",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": "./index.js",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=12"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "xo && ava && tsd"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.js",
|
|
23
|
+
"index.d.ts"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"lazy",
|
|
27
|
+
"property",
|
|
28
|
+
"properties",
|
|
29
|
+
"prop",
|
|
30
|
+
"define",
|
|
31
|
+
"object",
|
|
32
|
+
"value",
|
|
33
|
+
"lazily",
|
|
34
|
+
"laziness",
|
|
35
|
+
"evaluation",
|
|
36
|
+
"eval",
|
|
37
|
+
"execute",
|
|
38
|
+
"getter",
|
|
39
|
+
"function",
|
|
40
|
+
"fn",
|
|
41
|
+
"memoize",
|
|
42
|
+
"cache",
|
|
43
|
+
"defer",
|
|
44
|
+
"deferred"
|
|
45
|
+
],
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"ava": "^3.15.0",
|
|
48
|
+
"tsd": "^0.14.0",
|
|
49
|
+
"xo": "^0.38.2"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# define-lazy-prop
|
|
2
|
+
|
|
3
|
+
> Define a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property on an object
|
|
4
|
+
|
|
5
|
+
Useful when the value of a property is expensive to generate, so you want to delay the computation until the property is needed. For example, improving startup performance by deferring nonessential operations.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
$ npm install define-lazy-prop
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import defineLazyProperty from 'define-lazy-prop';
|
|
17
|
+
|
|
18
|
+
const unicorn = {
|
|
19
|
+
// …
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
defineLazyProperty(unicorn, 'rainbow', () => expensiveComputation());
|
|
23
|
+
|
|
24
|
+
app.on('user-action', () => {
|
|
25
|
+
doSomething(unicorn.rainbow);
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
### defineLazyProperty(object, propertyName, valueGetter)
|
|
32
|
+
|
|
33
|
+
#### object
|
|
34
|
+
|
|
35
|
+
Type: `object`
|
|
36
|
+
|
|
37
|
+
Object to add the property to.
|
|
38
|
+
|
|
39
|
+
#### propertyName
|
|
40
|
+
|
|
41
|
+
Type: `string`
|
|
42
|
+
|
|
43
|
+
Name of the property to add.
|
|
44
|
+
|
|
45
|
+
#### valueGetter
|
|
46
|
+
|
|
47
|
+
Type: `Function`
|
|
48
|
+
|
|
49
|
+
Called the first time `propertyName` is accessed. Expected to return a value.
|
|
50
|
+
|
|
51
|
+
## Related
|
|
52
|
+
|
|
53
|
+
- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value
|
|
54
|
+
- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
|
|
55
|
+
- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
2.0.0 / 2018-10-26
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Drop support for Node.js 0.6
|
|
5
|
+
* Replace internal `eval` usage with `Function` constructor
|
|
6
|
+
* Use instance methods on `process` to check for listeners
|
|
7
|
+
|
|
8
|
+
1.1.2 / 2018-01-11
|
|
9
|
+
==================
|
|
10
|
+
|
|
11
|
+
* perf: remove argument reassignment
|
|
12
|
+
* Support Node.js 0.6 to 9.x
|
|
13
|
+
|
|
14
|
+
1.1.1 / 2017-07-27
|
|
15
|
+
==================
|
|
16
|
+
|
|
17
|
+
* Remove unnecessary `Buffer` loading
|
|
18
|
+
* Support Node.js 0.6 to 8.x
|
|
19
|
+
|
|
20
|
+
1.1.0 / 2015-09-14
|
|
21
|
+
==================
|
|
22
|
+
|
|
23
|
+
* Enable strict mode in more places
|
|
24
|
+
* Support io.js 3.x
|
|
25
|
+
* Support io.js 2.x
|
|
26
|
+
* Support web browser loading
|
|
27
|
+
- Requires bundler like Browserify or webpack
|
|
28
|
+
|
|
29
|
+
1.0.1 / 2015-04-07
|
|
30
|
+
==================
|
|
31
|
+
|
|
32
|
+
* Fix `TypeError`s when under `'use strict'` code
|
|
33
|
+
* Fix useless type name on auto-generated messages
|
|
34
|
+
* Support io.js 1.x
|
|
35
|
+
* Support Node.js 0.12
|
|
36
|
+
|
|
37
|
+
1.0.0 / 2014-09-17
|
|
38
|
+
==================
|
|
39
|
+
|
|
40
|
+
* No changes
|
|
41
|
+
|
|
42
|
+
0.4.5 / 2014-09-09
|
|
43
|
+
==================
|
|
44
|
+
|
|
45
|
+
* Improve call speed to functions using the function wrapper
|
|
46
|
+
* Support Node.js 0.6
|
|
47
|
+
|
|
48
|
+
0.4.4 / 2014-07-27
|
|
49
|
+
==================
|
|
50
|
+
|
|
51
|
+
* Work-around v8 generating empty stack traces
|
|
52
|
+
|
|
53
|
+
0.4.3 / 2014-07-26
|
|
54
|
+
==================
|
|
55
|
+
|
|
56
|
+
* Fix exception when global `Error.stackTraceLimit` is too low
|
|
57
|
+
|
|
58
|
+
0.4.2 / 2014-07-19
|
|
59
|
+
==================
|
|
60
|
+
|
|
61
|
+
* Correct call site for wrapped functions and properties
|
|
62
|
+
|
|
63
|
+
0.4.1 / 2014-07-19
|
|
64
|
+
==================
|
|
65
|
+
|
|
66
|
+
* Improve automatic message generation for function properties
|
|
67
|
+
|
|
68
|
+
0.4.0 / 2014-07-19
|
|
69
|
+
==================
|
|
70
|
+
|
|
71
|
+
* Add `TRACE_DEPRECATION` environment variable
|
|
72
|
+
* Remove non-standard grey color from color output
|
|
73
|
+
* Support `--no-deprecation` argument
|
|
74
|
+
* Support `--trace-deprecation` argument
|
|
75
|
+
* Support `deprecate.property(fn, prop, message)`
|
|
76
|
+
|
|
77
|
+
0.3.0 / 2014-06-16
|
|
78
|
+
==================
|
|
79
|
+
|
|
80
|
+
* Add `NO_DEPRECATION` environment variable
|
|
81
|
+
|
|
82
|
+
0.2.0 / 2014-06-15
|
|
83
|
+
==================
|
|
84
|
+
|
|
85
|
+
* Add `deprecate.property(obj, prop, message)`
|
|
86
|
+
* Remove `supports-color` dependency for node.js 0.8
|
|
87
|
+
|
|
88
|
+
0.1.0 / 2014-06-15
|
|
89
|
+
==================
|
|
90
|
+
|
|
91
|
+
* Add `deprecate.function(fn, message)`
|
|
92
|
+
* Add `process.on('deprecation', fn)` emitter
|
|
93
|
+
* Automatically generate message when omitted from `deprecate()`
|
|
94
|
+
|
|
95
|
+
0.0.1 / 2014-06-15
|
|
96
|
+
==================
|
|
97
|
+
|
|
98
|
+
* Fix warning for dynamic calls at singe call site
|
|
99
|
+
|
|
100
|
+
0.0.0 / 2014-06-15
|
|
101
|
+
==================
|
|
102
|
+
|
|
103
|
+
* Initial implementation
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2018 Douglas Christopher Wilson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|