diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3d16f0..00c3532 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,38 +63,23 @@ check:lint: - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != 'master' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ when: manual -check:test-generate: +check:test: stage: check needs: [] script: - > nix-shell --arg ci true --run $' - ./scripts/check-test-generate.sh > ./tmp/check-test.yml; + npm test -- --ci --coverage; ' artifacts: when: always - paths: - - ./tmp/check-test.yml - rules: - # Runs on feature commits and ignores version commits - - if: $CI_COMMIT_BRANCH =~ /^feature.*$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ - # Manually run on commits other than master and staging and ignore version commits - - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH !~ /^(?:master|staging)$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ - when: manual - -check:test: - stage: check - needs: - - check:test-generate - trigger: - include: - - artifact: tmp/check-test.yml - job: check:test-generate - strategy: depend - inherit: - variables: false - variables: - PARENT_PIPELINE_ID: $CI_PIPELINE_ID + reports: + junit: + - ./tmp/junit/junit.xml + coverage_report: + coverage_format: cobertura + path: ./tmp/coverage/cobertura-coverage.xml + coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' rules: # Runs on feature commits and ignores version commits - if: $CI_COMMIT_BRANCH =~ /^feature.*$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ @@ -148,37 +133,79 @@ build:dist: # Runs on tag pipeline where the tag is a prerelease or release version - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ -build:platforms-generate: +build:linux: stage: build needs: [] script: - > nix-shell --arg ci true --run $' - ./scripts/build-platforms-generate.sh > ./tmp/build-platforms.yml; + npm test -- --ci --coverage; ' artifacts: when: always - paths: - - ./tmp/build-platforms.yml + reports: + junit: + - ./tmp/junit/junit.xml + coverage_report: + coverage_format: cobertura + path: ./tmp/coverage/cobertura-coverage.xml + coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' rules: # Runs on staging commits and ignores version commits - if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ # Runs on tag pipeline where the tag is a prerelease or release version - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ -build:platforms: +build:windows: stage: build - needs: - - build:platforms-generate - trigger: - include: - - artifact: tmp/build-platforms.yml - job: build:platforms-generate - strategy: depend - inherit: - variables: false - variables: - PARENT_PIPELINE_ID: $CI_PIPELINE_ID + needs: [] + tags: + - windows + before_script: + - mkdir -Force "$CI_PROJECT_DIR/tmp" + script: + - .\scripts\choco-install.ps1 + - refreshenv + - npm install --ignore-scripts + - $env:Path = "$(npm root)\.bin;" + $env:Path + - npm test -- --ci --coverage + artifacts: + when: always + reports: + junit: + - ./tmp/junit/junit.xml + coverage_report: + coverage_format: cobertura + path: ./tmp/coverage/cobertura-coverage.xml + coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' + rules: + # Runs on staging commits and ignores version commits + - if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ + # Runs on tag pipeline where the tag is a prerelease or release version + - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ + +build:macos: + stage: build + needs: [] + tags: + - saas-macos-medium-m1 + image: macos-12-xcode-14 + script: + - eval "$(brew shellenv)" + - ./scripts/brew-install.sh + - hash -r + - npm install --ignore-scripts + - export PATH="$(npm root)/.bin:$PATH" + - npm test -- --ci --coverage + artifacts: + when: always + reports: + junit: + - ./tmp/junit/junit.xml + coverage_report: + coverage_format: cobertura + path: ./tmp/coverage/cobertura-coverage.xml + coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' rules: # Runs on staging commits and ignores version commits - if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/ @@ -189,7 +216,9 @@ build:prerelease: stage: build needs: - build:dist - - build:platforms + - build:linux + - build:windows + - build:macos # Don't interrupt publishing job interruptible: false script: @@ -212,7 +241,11 @@ integration:merge: stage: integration needs: - build:merge - - job: build:platforms + - job: build:linux + optional: true + - job: build:windows + optional: true + - job: build:macos optional: true # Requires mutual exclusion resource_group: integration:merge @@ -245,12 +278,12 @@ release:distribution: stage: release needs: - build:dist - - build:platforms + - build:linux + - build:windows + - build:macos - integration:merge # Don't interrupt publishing job interruptible: false - # Requires mutual exclusion - resource_group: release:distribution script: - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc - echo 'Publishing library' diff --git a/docs/assets/search.js b/docs/assets/search.js index fa04c57..7790d85 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"32\":\"Variable\",\"64\":\"Function\",\"128\":\"Class\",\"1024\":\"Property\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":4,\"name\":\"decorators\",\"url\":\"modules/decorators.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"context\",\"url\":\"functions/decorators.context.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":64,\"name\":\"cancellable\",\"url\":\"functions/decorators.cancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.cancellable.html#cancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.cancellable.cancellable\"},{\"kind\":64,\"name\":\"timed\",\"url\":\"functions/decorators.timed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.timed.html#timed.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.timed.timed\"},{\"kind\":64,\"name\":\"timedCancellable\",\"url\":\"functions/decorators.timedCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.timedCancellable.html#timedCancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.timedCancellable.timedCancellable\"},{\"kind\":4,\"name\":\"functions\",\"url\":\"modules/functions.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"cancellable\",\"url\":\"functions/functions.cancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.cancellable.html#cancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.cancellable.cancellable\"},{\"kind\":64,\"name\":\"timed\",\"url\":\"functions/functions.timed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.timed.html#timed.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.timed.timed\"},{\"kind\":64,\"name\":\"timedCancellable\",\"url\":\"functions/functions.timedCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.timedCancellable.html#timedCancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.timedCancellable.timedCancellable\"},{\"kind\":4,\"name\":\"utils\",\"url\":\"modules/utils.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":32,\"name\":\"AsyncFunction\",\"url\":\"variables/utils.AsyncFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"GeneratorFunction\",\"url\":\"variables/utils.GeneratorFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"AsyncGeneratorFunction\",\"url\":\"variables/utils.AsyncGeneratorFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"contexts\",\"url\":\"variables/utils.contexts.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"getContextIndex\",\"url\":\"functions/utils.getContextIndex.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"checkContextCancellable\",\"url\":\"functions/utils.checkContextCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"checkContextTimed\",\"url\":\"functions/utils.checkContextTimed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isPromiseLike\",\"url\":\"functions/utils.isPromiseLike.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isGenerator\",\"url\":\"functions/utils.isGenerator.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isAsyncGenerator\",\"url\":\"functions/utils.isAsyncGenerator.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":4,\"name\":\"errors\",\"url\":\"modules/errors.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":128,\"name\":\"ErrorContexts\",\"url\":\"classes/errors.ErrorContexts.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"errors\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"classes/errors.ErrorContexts.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"errors.ErrorContexts\"},{\"kind\":128,\"name\":\"ErrorContextsTimedTimeOut\",\"url\":\"classes/errors.ErrorContextsTimedTimeOut.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"errors\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"classes/errors.ErrorContextsTimedTimeOut.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"errors.ErrorContextsTimedTimeOut\"},{\"kind\":4194304,\"name\":\"ContextCancellable\",\"url\":\"types/ContextCancellable.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/ContextCancellable.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ContextCancellable\"},{\"kind\":1024,\"name\":\"signal\",\"url\":\"types/ContextCancellable.html#__type.signal\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ContextCancellable.__type\"},{\"kind\":4194304,\"name\":\"ContextTimed\",\"url\":\"types/ContextTimed.html\",\"classes\":\"tsd-kind-type-alias\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,31.781]],[\"comment/0\",[]],[\"name/1\",[1,31.781]],[\"comment/1\",[]],[\"name/2\",[2,26.672]],[\"comment/2\",[]],[\"name/3\",[3,15.686]],[\"comment/3\",[]],[\"name/4\",[4,26.672]],[\"comment/4\",[]],[\"name/5\",[3,15.686]],[\"comment/5\",[]],[\"name/6\",[5,26.672]],[\"comment/6\",[]],[\"name/7\",[3,15.686]],[\"comment/7\",[]],[\"name/8\",[6,31.781]],[\"comment/8\",[]],[\"name/9\",[2,26.672]],[\"comment/9\",[]],[\"name/10\",[3,15.686]],[\"comment/10\",[]],[\"name/11\",[4,26.672]],[\"comment/11\",[]],[\"name/12\",[3,15.686]],[\"comment/12\",[]],[\"name/13\",[5,26.672]],[\"comment/13\",[]],[\"name/14\",[3,15.686]],[\"comment/14\",[]],[\"name/15\",[7,31.781]],[\"comment/15\",[]],[\"name/16\",[8,31.781]],[\"comment/16\",[]],[\"name/17\",[9,31.781]],[\"comment/17\",[]],[\"name/18\",[10,31.781]],[\"comment/18\",[]],[\"name/19\",[11,31.781]],[\"comment/19\",[]],[\"name/20\",[12,31.781]],[\"comment/20\",[]],[\"name/21\",[13,31.781]],[\"comment/21\",[]],[\"name/22\",[14,31.781]],[\"comment/22\",[]],[\"name/23\",[15,31.781]],[\"comment/23\",[]],[\"name/24\",[16,31.781]],[\"comment/24\",[]],[\"name/25\",[17,31.781]],[\"comment/25\",[]],[\"name/26\",[18,31.781]],[\"comment/26\",[]],[\"name/27\",[19,31.781]],[\"comment/27\",[]],[\"name/28\",[20,26.672]],[\"comment/28\",[]],[\"name/29\",[21,31.781]],[\"comment/29\",[]],[\"name/30\",[20,26.672]],[\"comment/30\",[]],[\"name/31\",[22,31.781]],[\"comment/31\",[]],[\"name/32\",[3,15.686]],[\"comment/32\",[]],[\"name/33\",[23,31.781]],[\"comment/33\",[]],[\"name/34\",[24,31.781]],[\"comment/34\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":3,\"name\":{\"3\":{},\"5\":{},\"7\":{},\"10\":{},\"12\":{},\"14\":{},\"32\":{}},\"comment\":{}}],[\"asyncfunction\",{\"_index\":8,\"name\":{\"16\":{}},\"comment\":{}}],[\"asyncgeneratorfunction\",{\"_index\":10,\"name\":{\"18\":{}},\"comment\":{}}],[\"cancellable\",{\"_index\":2,\"name\":{\"2\":{},\"9\":{}},\"comment\":{}}],[\"checkcontextcancellable\",{\"_index\":13,\"name\":{\"21\":{}},\"comment\":{}}],[\"checkcontexttimed\",{\"_index\":14,\"name\":{\"22\":{}},\"comment\":{}}],[\"context\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"contextcancellable\",{\"_index\":22,\"name\":{\"31\":{}},\"comment\":{}}],[\"contexts\",{\"_index\":11,\"name\":{\"19\":{}},\"comment\":{}}],[\"contexttimed\",{\"_index\":24,\"name\":{\"34\":{}},\"comment\":{}}],[\"decorators\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"description\",{\"_index\":20,\"name\":{\"28\":{},\"30\":{}},\"comment\":{}}],[\"errorcontexts\",{\"_index\":19,\"name\":{\"27\":{}},\"comment\":{}}],[\"errorcontextstimedtimeout\",{\"_index\":21,\"name\":{\"29\":{}},\"comment\":{}}],[\"errors\",{\"_index\":18,\"name\":{\"26\":{}},\"comment\":{}}],[\"functions\",{\"_index\":6,\"name\":{\"8\":{}},\"comment\":{}}],[\"generatorfunction\",{\"_index\":9,\"name\":{\"17\":{}},\"comment\":{}}],[\"getcontextindex\",{\"_index\":12,\"name\":{\"20\":{}},\"comment\":{}}],[\"isasyncgenerator\",{\"_index\":17,\"name\":{\"25\":{}},\"comment\":{}}],[\"isgenerator\",{\"_index\":16,\"name\":{\"24\":{}},\"comment\":{}}],[\"ispromiselike\",{\"_index\":15,\"name\":{\"23\":{}},\"comment\":{}}],[\"signal\",{\"_index\":23,\"name\":{\"33\":{}},\"comment\":{}}],[\"timed\",{\"_index\":4,\"name\":{\"4\":{},\"11\":{}},\"comment\":{}}],[\"timedcancellable\",{\"_index\":5,\"name\":{\"6\":{},\"13\":{}},\"comment\":{}}],[\"utils\",{\"_index\":7,\"name\":{\"15\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"32\":\"Variable\",\"64\":\"Function\",\"128\":\"Class\",\"1024\":\"Property\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":4,\"name\":\"decorators\",\"url\":\"modules/decorators.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"context\",\"url\":\"functions/decorators.context.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":64,\"name\":\"cancellable\",\"url\":\"functions/decorators.cancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.cancellable.html#cancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.cancellable.cancellable\"},{\"kind\":64,\"name\":\"timed\",\"url\":\"functions/decorators.timed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.timed.html#timed.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.timed.timed\"},{\"kind\":64,\"name\":\"timedCancellable\",\"url\":\"functions/decorators.timedCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"decorators\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/decorators.timedCancellable.html#timedCancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"decorators.timedCancellable.timedCancellable\"},{\"kind\":4,\"name\":\"functions\",\"url\":\"modules/functions.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"cancellable\",\"url\":\"functions/functions.cancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.cancellable.html#cancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.cancellable.cancellable\"},{\"kind\":64,\"name\":\"timed\",\"url\":\"functions/functions.timed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.timed.html#timed.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.timed.timed\"},{\"kind\":64,\"name\":\"timedCancellable\",\"url\":\"functions/functions.timedCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"functions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/functions.timedCancellable.html#timedCancellable.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"functions.timedCancellable.timedCancellable\"},{\"kind\":4,\"name\":\"utils\",\"url\":\"modules/utils.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":32,\"name\":\"AsyncFunction\",\"url\":\"variables/utils.AsyncFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"GeneratorFunction\",\"url\":\"variables/utils.GeneratorFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"AsyncGeneratorFunction\",\"url\":\"variables/utils.AsyncGeneratorFunction.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"contexts\",\"url\":\"variables/utils.contexts.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"getContextIndex\",\"url\":\"functions/utils.getContextIndex.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"checkContextCancellable\",\"url\":\"functions/utils.checkContextCancellable.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"checkContextTimed\",\"url\":\"functions/utils.checkContextTimed.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"timer\",\"url\":\"functions/utils.timer.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isPromiseLike\",\"url\":\"functions/utils.isPromiseLike.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isGenerator\",\"url\":\"functions/utils.isGenerator.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"isAsyncGenerator\",\"url\":\"functions/utils.isAsyncGenerator.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":4,\"name\":\"errors\",\"url\":\"modules/errors.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":128,\"name\":\"ErrorContexts\",\"url\":\"classes/errors.ErrorContexts.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"errors\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"classes/errors.ErrorContexts.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"errors.ErrorContexts\"},{\"kind\":128,\"name\":\"ErrorContextsTimedTimeOut\",\"url\":\"classes/errors.ErrorContextsTimedTimeOut.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"errors\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"classes/errors.ErrorContextsTimedTimeOut.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"errors.ErrorContextsTimedTimeOut\"},{\"kind\":4194304,\"name\":\"ContextCancellable\",\"url\":\"types/ContextCancellable.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/ContextCancellable.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ContextCancellable\"},{\"kind\":1024,\"name\":\"signal\",\"url\":\"types/ContextCancellable.html#__type.signal\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ContextCancellable.__type\"},{\"kind\":4194304,\"name\":\"ContextTimed\",\"url\":\"types/ContextTimed.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ContextTimedInput\",\"url\":\"types/ContextTimedInput.html\",\"classes\":\"tsd-kind-type-alias\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,32.321]],[\"comment/0\",[]],[\"name/1\",[1,32.321]],[\"comment/1\",[]],[\"name/2\",[2,27.213]],[\"comment/2\",[]],[\"name/3\",[3,16.227]],[\"comment/3\",[]],[\"name/4\",[4,27.213]],[\"comment/4\",[]],[\"name/5\",[3,16.227]],[\"comment/5\",[]],[\"name/6\",[5,27.213]],[\"comment/6\",[]],[\"name/7\",[3,16.227]],[\"comment/7\",[]],[\"name/8\",[6,32.321]],[\"comment/8\",[]],[\"name/9\",[2,27.213]],[\"comment/9\",[]],[\"name/10\",[3,16.227]],[\"comment/10\",[]],[\"name/11\",[4,27.213]],[\"comment/11\",[]],[\"name/12\",[3,16.227]],[\"comment/12\",[]],[\"name/13\",[5,27.213]],[\"comment/13\",[]],[\"name/14\",[3,16.227]],[\"comment/14\",[]],[\"name/15\",[7,32.321]],[\"comment/15\",[]],[\"name/16\",[8,32.321]],[\"comment/16\",[]],[\"name/17\",[9,32.321]],[\"comment/17\",[]],[\"name/18\",[10,32.321]],[\"comment/18\",[]],[\"name/19\",[11,32.321]],[\"comment/19\",[]],[\"name/20\",[12,32.321]],[\"comment/20\",[]],[\"name/21\",[13,32.321]],[\"comment/21\",[]],[\"name/22\",[14,32.321]],[\"comment/22\",[]],[\"name/23\",[15,32.321]],[\"comment/23\",[]],[\"name/24\",[16,32.321]],[\"comment/24\",[]],[\"name/25\",[17,32.321]],[\"comment/25\",[]],[\"name/26\",[18,32.321]],[\"comment/26\",[]],[\"name/27\",[19,32.321]],[\"comment/27\",[]],[\"name/28\",[20,32.321]],[\"comment/28\",[]],[\"name/29\",[21,27.213]],[\"comment/29\",[]],[\"name/30\",[22,32.321]],[\"comment/30\",[]],[\"name/31\",[21,27.213]],[\"comment/31\",[]],[\"name/32\",[23,32.321]],[\"comment/32\",[]],[\"name/33\",[3,16.227]],[\"comment/33\",[]],[\"name/34\",[24,32.321]],[\"comment/34\",[]],[\"name/35\",[25,32.321]],[\"comment/35\",[]],[\"name/36\",[26,32.321]],[\"comment/36\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":3,\"name\":{\"3\":{},\"5\":{},\"7\":{},\"10\":{},\"12\":{},\"14\":{},\"33\":{}},\"comment\":{}}],[\"asyncfunction\",{\"_index\":8,\"name\":{\"16\":{}},\"comment\":{}}],[\"asyncgeneratorfunction\",{\"_index\":10,\"name\":{\"18\":{}},\"comment\":{}}],[\"cancellable\",{\"_index\":2,\"name\":{\"2\":{},\"9\":{}},\"comment\":{}}],[\"checkcontextcancellable\",{\"_index\":13,\"name\":{\"21\":{}},\"comment\":{}}],[\"checkcontexttimed\",{\"_index\":14,\"name\":{\"22\":{}},\"comment\":{}}],[\"context\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"contextcancellable\",{\"_index\":23,\"name\":{\"32\":{}},\"comment\":{}}],[\"contexts\",{\"_index\":11,\"name\":{\"19\":{}},\"comment\":{}}],[\"contexttimed\",{\"_index\":25,\"name\":{\"35\":{}},\"comment\":{}}],[\"contexttimedinput\",{\"_index\":26,\"name\":{\"36\":{}},\"comment\":{}}],[\"decorators\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"description\",{\"_index\":21,\"name\":{\"29\":{},\"31\":{}},\"comment\":{}}],[\"errorcontexts\",{\"_index\":20,\"name\":{\"28\":{}},\"comment\":{}}],[\"errorcontextstimedtimeout\",{\"_index\":22,\"name\":{\"30\":{}},\"comment\":{}}],[\"errors\",{\"_index\":19,\"name\":{\"27\":{}},\"comment\":{}}],[\"functions\",{\"_index\":6,\"name\":{\"8\":{}},\"comment\":{}}],[\"generatorfunction\",{\"_index\":9,\"name\":{\"17\":{}},\"comment\":{}}],[\"getcontextindex\",{\"_index\":12,\"name\":{\"20\":{}},\"comment\":{}}],[\"isasyncgenerator\",{\"_index\":18,\"name\":{\"26\":{}},\"comment\":{}}],[\"isgenerator\",{\"_index\":17,\"name\":{\"25\":{}},\"comment\":{}}],[\"ispromiselike\",{\"_index\":16,\"name\":{\"24\":{}},\"comment\":{}}],[\"signal\",{\"_index\":24,\"name\":{\"34\":{}},\"comment\":{}}],[\"timed\",{\"_index\":4,\"name\":{\"4\":{},\"11\":{}},\"comment\":{}}],[\"timedcancellable\",{\"_index\":5,\"name\":{\"6\":{},\"13\":{}},\"comment\":{}}],[\"timer\",{\"_index\":15,\"name\":{\"23\":{}},\"comment\":{}}],[\"utils\",{\"_index\":7,\"name\":{\"15\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/classes/errors.ErrorContexts.html b/docs/classes/errors.ErrorContexts.html index ee25cc0..79ad779 100644 --- a/docs/classes/errors.ErrorContexts.html +++ b/docs/classes/errors.ErrorContexts.html @@ -1,4 +1,4 @@ -ErrorContexts | @matrixai/js-contexts
+ErrorContexts | @matrixai/contexts
  • Preparing search index...
  • -
  • The search index is not available
@matrixai/js-contexts
+
  • The search index is not available
  • @matrixai/contexts
    @@ -269,7 +269,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -267,7 +267,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -67,7 +67,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -54,7 +54,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -72,7 +72,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -77,7 +77,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -82,7 +82,7 @@

    Theme

    @@ -6,19 +6,19 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
      - +
    • Timed HOF This overloaded signature is external signature

      @@ -27,7 +27,9 @@

      Function timed

      Type Parameters

    Parameters

    Returns R

    +
  • Defined in src/functions/timed.ts:128
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
      - +
    • Type Parameters

      Parameters

      • -
        f: ((ctx: C, ...params: P) => PromiseLike<R>)
        +
        f: ((ctx: C_, ...params: P) => PromiseLike<R>)
          • -
          • (ctx: C, ...params: P): PromiseLike<R>
          • +
          • (ctx: C_, ...params: P): PromiseLike<R>
          • Parameters

            • -
              ctx: C
            • +
              ctx: C_
            • Rest ...params: P

            Returns PromiseLike<R>

      • @@ -72,7 +74,7 @@

        Parameters

        Rest ...params: ContextAndParameters<C, P>

    Returns PromiseCancellable<R>

    +
  • Defined in src/functions/timedCancellable.ts:167
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -31,7 +31,7 @@
    key: stringstring

    Returns void

    +
  • Defined in src/utils.ts:25
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -31,7 +31,7 @@
    key: stringstring

    Returns void

    +
  • Defined in src/utils.ts:42
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -31,7 +31,7 @@
    key: stringstring

    Returns number

    +
  • Defined in src/utils.ts:11
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -30,7 +30,7 @@

    Parameters

    v: any

    Returns v is AsyncGenerator<unknown, any, unknown>

    +
  • Defined in src/utils.ts:122
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -30,7 +30,7 @@

    Parameters

    v: any

    Returns v is Generator<unknown, any, unknown>

    +
  • Defined in src/utils.ts:108
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -27,7 +27,7 @@

    Parameters

    v: any

    Returns v is PromiseLike<unknown>

    +
  • Defined in src/utils.ts:100
  • +
    +
    +
    +
    + +

    Function timer

    +
    +
      + +
    • +

      Timer resource +Use it with withF or withG.

      +
      +
      +

      Type Parameters

      +
        +
      • +

        T = void

      +
      +

      Parameters

      +
        +
      • +
        Optional handlerOrOpts: {
            controller?: PromiseCancellableController;
            delay?: number;
            handler?: ((signal: AbortSignal) => T | PromiseLike<T>);
            lazy?: boolean;
        } | ((signal: AbortSignal) => T | PromiseLike<T>)
      • +
      • +
        delay: number = 0
      • +
      • +
        lazy: boolean = false
      • +
      • +
        Optional controller: PromiseCancellableController
      +

      Returns ResourceAcquire<Timer<T>>

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index bc52f8b..e1cd94f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -@matrixai/js-contexts
    +@matrixai/contexts
    • Preparing search index...
    • -
    • The search index is not available
    @matrixai/js-contexts
    +
  • The search index is not available
  • @matrixai/contexts
    -

    @matrixai/js-contexts

    +

    @matrixai/contexts

    @@ -6,12 +6,12 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    -

    @matrixai/js-contexts

    +

    @matrixai/contexts

    Index

    @@ -26,6 +26,7 @@

    Namespaces

    Type Aliases

    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    ContextCancellable: {
        signal: AbortSignal;
    }
    @@ -42,7 +42,7 @@

    Theme

    @@ -6,13 +6,13 @@
    @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    ContextTimed: ContextCancellable & {
        timer: Timer;
    }
    +
    +
    +@matrixai/contexts
    +
    +
    +
    +
    + +

    Type alias ContextTimedInput

    +
    ContextTimedInput: ContextCancellable & {
        timer: Timer | number;
    }
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/variables/utils.AsyncFunction.html b/docs/variables/utils.AsyncFunction.html index af4188d..b278504 100644 --- a/docs/variables/utils.AsyncFunction.html +++ b/docs/variables/utils.AsyncFunction.html @@ -1,4 +1,4 @@ -AsyncFunction | @matrixai/js-contexts
    +AsyncFunction | @matrixai/contexts
    • Preparing search index...
    • -
    • The search index is not available
    @matrixai/js-contexts
    +
  • The search index is not available
  • @matrixai/contexts
    AsyncFunction: Function = ...
    +
  • Defined in src/utils.ts:5
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts

    Variable AsyncGeneratorFunctionConst

    AsyncGeneratorFunction: Function = ...
    +
  • Defined in src/utils.ts:7
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    GeneratorFunction: Function = ...
    +
  • Defined in src/utils.ts:6
  • @matrixai/js-contexts +
  • The search index is not available
  • @matrixai/contexts
    contexts: WeakMap<object, number> = ...
    +
  • Defined in src/utils.ts:9