pax_global_header00006660000000000000000000000064143221710620014510gustar00rootroot0000000000000052 comment=a3318aac6541572d897f404c1db7d905016c5cfe proc-log-3.0.0/000077500000000000000000000000001432217106200132325ustar00rootroot00000000000000proc-log-3.0.0/.commitlintrc.js000066400000000000000000000005531432217106200163550ustar00rootroot00000000000000/* This file is automatically added by @npmcli/template-oss. Do not edit. */ module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']], 'header-max-length': [2, 'always', 80], 'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']], }, } proc-log-3.0.0/.eslintrc.js000066400000000000000000000005451432217106200154750ustar00rootroot00000000000000/* This file is automatically added by @npmcli/template-oss. Do not edit. */ 'use strict' const { readdirSync: readdir } = require('fs') const localConfigs = readdir(__dirname) .filter((file) => file.startsWith('.eslintrc.local.')) .map((file) => `./${file}`) module.exports = { root: true, extends: [ '@npmcli', ...localConfigs, ], } proc-log-3.0.0/.github/000077500000000000000000000000001432217106200145725ustar00rootroot00000000000000proc-log-3.0.0/.github/CODEOWNERS000066400000000000000000000001321432217106200161610ustar00rootroot00000000000000# This file is automatically added by @npmcli/template-oss. Do not edit. * @npm/cli-team proc-log-3.0.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001432217106200167555ustar00rootroot00000000000000proc-log-3.0.0/.github/ISSUE_TEMPLATE/bug.yml000066400000000000000000000026551432217106200202650ustar00rootroot00000000000000# This file is automatically added by @npmcli/template-oss. Do not edit. name: Bug description: File a bug/issue title: "[BUG] " labels: [ Bug, Needs Triage ] body: - type: checkboxes attributes: label: Is there an existing issue for this? description: Please [search here](./issues) to see if an issue already exists for your problem. options: - label: I have searched the existing issues required: true - type: textarea attributes: label: Current Behavior description: A clear & concise description of what you're experiencing. validations: required: false - type: textarea attributes: label: Expected Behavior description: A clear & concise description of what you expected to happen. validations: required: false - type: textarea attributes: label: Steps To Reproduce description: Steps to reproduce the behavior. value: | 1. In this environment... 2. With this config... 3. Run '...' 4. See error... validations: required: false - type: textarea attributes: label: Environment description: | examples: - **npm**: 7.6.3 - **Node**: 13.14.0 - **OS**: Ubuntu 20.04 - **platform**: Macbook Pro value: | - npm: - Node: - OS: - platform: validations: required: false �����������������������������������������������������������������������������������proc-log-3.0.0/.github/ISSUE_TEMPLATE/config.yml����������������������������������������������������0000664�0000000�0000000�00000000145�14322171062�0020745�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. blank_issues_enabled: true ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/dependabot.yml���������������������������������������������������������������0000664�0000000�0000000�00000000563�14322171062�0017426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. version: 2 updates: - package-ecosystem: npm directory: / schedule: interval: daily allow: - dependency-type: direct versioning-strategy: increase-if-necessary commit-message: prefix: deps prefix-development: chore labels: - "Dependencies" ���������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/matchers/��������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0016400�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/matchers/tap.json������������������������������������������������������������0000664�0000000�0000000�00000001204�14322171062�0020054�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "//@npmcli/template-oss": "This file is automatically added by @npmcli/template-oss. Do not edit.", "problemMatcher": [ { "owner": "tap", "pattern": [ { "regexp": "^\\s*not ok \\d+ - (.*)", "message": 1 }, { "regexp": "^\\s*---" }, { "regexp": "^\\s*at:" }, { "regexp": "^\\s*line:\\s*(\\d+)", "line": 1 }, { "regexp": "^\\s*column:\\s*(\\d+)", "column": 1 }, { "regexp": "^\\s*file:\\s*(.*)", "file": 1 } ] } ] } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/settings.yml�����������������������������������������������������������������0000664�0000000�0000000�00000000060�14322171062�0017151�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������--- _extends: 'open-source-project-boilerplate' ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/�������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0016627�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/audit.yml����������������������������������������������������������0000664�0000000�0000000�00000001775�14322171062�0020472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: Audit on: workflow_dispatch: schedule: # "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1 - cron: "0 8 * * 1" jobs: audit: name: Audit Dependencies if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund --package-lock - name: Run Audit run: npm audit ���proc-log-3.0.0/.github/workflows/ci-release.yml�����������������������������������������������������0000664�0000000�0000000�00000012105�14322171062�0021362�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: CI - Release on: workflow_call: inputs: ref: required: true type: string check-sha: required: true type: string jobs: lint-all: name: Lint All if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check with: token: ${{ secrets.GITHUB_TOKEN }} status: in_progress name: Lint All sha: ${{ inputs.check-sha }} # XXX: this does not work when using the default GITHUB_TOKEN. # Instead we post the main job url to the PR as a comment which # will link to all the other checks. To work around this we would # need to create a GitHub that would create on-demand tokens. # https://github.com/LouisBrunner/checks-action/issues/18 # details_url: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ inputs.ref }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Lint run: npm run lint --ignore-scripts - name: Post Lint run: npm run postlint --ignore-scripts - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() with: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ steps.check.outputs.check_id }} test-all: name: Test All - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' strategy: fail-fast: false matrix: platform: - name: Linux os: ubuntu-latest shell: bash - name: macOS os: macos-latest shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 14.17.0 - 14.x - 16.13.0 - 16.x - 18.0.0 - 18.x runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check with: token: ${{ secrets.GITHUB_TOKEN }} status: in_progress name: Test All - ${{ matrix.platform.name }} - ${{ matrix.node-version }} sha: ${{ inputs.check-sha }} # XXX: this does not work when using the default GITHUB_TOKEN. # Instead we post the main job url to the PR as a comment which # will link to all the other checks. To work around this we would # need to create a GitHub that would create on-demand tokens. # https://github.com/LouisBrunner/checks-action/issues/18 # details_url: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ inputs.ref }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Update Windows npm # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) run: | curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz tar xf npm-7.5.4.tgz cd package node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz cd .. rmdir /s /q package - name: Install npm@7 if: startsWith(matrix.node-version, '10.') run: npm i --prefer-online --no-fund --no-audit -g npm@7 - name: Install npm@latest if: ${{ !startsWith(matrix.node-version, '10.') }} run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: npm test --ignore-scripts - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() with: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ steps.check.outputs.check_id }} �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/ci.yml�������������������������������������������������������������0000664�0000000�0000000�00000011746�14322171062�0017756�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: CI on: workflow_dispatch: pull_request: push: branches: - main - latest schedule: # "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1 - cron: "0 9 * * 1" jobs: engines: name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' strategy: fail-fast: false matrix: platform: - name: Linux os: ubuntu-latest shell: bash node-version: - 14.17.0 - 16.13.0 - 18.0.0 runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Update Windows npm # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) run: | curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz tar xf npm-7.5.4.tgz cd package node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz cd .. rmdir /s /q package - name: Install npm@7 if: startsWith(matrix.node-version, '10.') run: npm i --prefer-online --no-fund --no-audit -g npm@7 - name: Install npm@latest if: ${{ !startsWith(matrix.node-version, '10.') }} run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund --engines-strict lint: name: Lint if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Lint run: npm run lint --ignore-scripts - name: Post Lint run: npm run postlint --ignore-scripts test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' strategy: fail-fast: false matrix: platform: - name: Linux os: ubuntu-latest shell: bash - name: macOS os: macos-latest shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 14.17.0 - 14.x - 16.13.0 - 16.x - 18.0.0 - 18.x runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Update Windows npm # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) run: | curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz tar xf npm-7.5.4.tgz cd package node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz cd .. rmdir /s /q package - name: Install npm@7 if: startsWith(matrix.node-version, '10.') run: npm i --prefer-online --no-fund --no-audit -g npm@7 - name: Install npm@latest if: ${{ !startsWith(matrix.node-version, '10.') }} run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: npm test --ignore-scripts ��������������������������proc-log-3.0.0/.github/workflows/codeql-analysis.yml������������������������������������������������0000664�0000000�0000000�00000001605�14322171062�0022444�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: CodeQL on: push: branches: - main - latest pull_request: branches: - main - latest schedule: # "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1 - cron: "0 10 * * 1" jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: javascript - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 ���������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/post-dependabot.yml������������������������������������������������0000664�0000000�0000000�00000011653�14322171062�0022450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: Post Dependabot on: pull_request permissions: contents: write jobs: template-oss: name: template-oss if: github.repository_owner == 'npm' && github.actor == 'dependabot[bot]' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Fetch Dependabot Metadata id: metadata uses: dependabot/fetch-metadata@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} # Dependabot can update multiple directories so we output which directory # it is acting on so we can run the command for the correct root or workspace - name: Get Dependabot Directory if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss') id: flags run: | dependabot_dir="${{ steps.metadata.outputs.directory }}" if [[ "$dependabot_dir" == "/" ]]; then echo "::set-output name=workspace::-iwr" else # strip leading slash from directory so it works as a # a path to the workspace flag echo "::set-output name=workspace::-w ${dependabot_dir#/}" fi - name: Apply Changes if: steps.flags.outputs.workspace id: apply run: | npm run template-oss-apply ${{ steps.flags.outputs.workspace }} if [[ `git status --porcelain` ]]; then echo "::set-output name=changes::true" fi # This only sets the conventional commit prefix. This workflow can't reliably determine # what the breaking change is though. If a BREAKING CHANGE message is required then # this PR check will fail and the commit will be amended with stafftools if [[ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-major" ]]; then prefix='feat!' else prefix='chore!' fi echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR" # This step will fail if template-oss has made any workflow updates. It is impossible # for a workflow to update other workflows. In the case it does fail, we continue # and then try to apply only a portion of the changes in the next step - name: Push All Changes if: steps.apply.outputs.changes id: push continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git commit -am "${{ steps.apply.outputs.message }}" git push # If the previous step failed, then reset the commit and remove any workflow changes # and attempt to commit and push again. This is helpful because we will have a commit # with the correct prefix that we can then --amend with @npmcli/stafftools later. - name: Push All Changes Except Workflows if: steps.apply.outputs.changes && steps.push-all.outcome == 'failure' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git reset HEAD~ git checkout HEAD -- .github/workflows/ git clean -fd .github/workflows/ git commit -am "${{ steps.apply.outputs.message }}" git push # Check if all the necessary template-oss changes were applied. Since we continued # on errors in one of the previous steps, this check will fail if our follow up # only applied a portion of the changes and we need to followup manually. # # Note that this used to run `lint` and `postlint` but that will fail this action # if we've also shipped any linting changes separate from template-oss. We do # linting in another action, so we want to fail this one only if there are # template-oss changes that could not be applied. - name: Check Changes if: steps.apply.outputs.changes run: | npm exec --offline ${{ steps.flags.outputs.workspace }} -- template-oss-check - name: Fail on Breaking Change if: steps.apply.outputs.changes && startsWith(steps.apply.outputs.message, 'feat!') run: | echo "This PR has a breaking change. Run 'npx -p @npmcli/stafftools gh template-oss-fix'" echo "for more information on how to fix this with a BREAKING CHANGE footer." exit 1 �������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/pull-request.yml���������������������������������������������������0000664�0000000�0000000�00000002545�14322171062�0022022�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: Pull Request on: pull_request: types: - opened - reopened - edited - synchronize jobs: commitlint: name: Lint Commits if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Run Commitlint on Commits id: commit continue-on-error: true run: | npx --offline commitlint -V --from origin/${{ github.base_ref }} --to ${{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' run: | echo ${{ github.event.pull_request.title }} | npx --offline commitlint -V �����������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.github/workflows/release.yml��������������������������������������������������������0000664�0000000�0000000�00000017745�14322171062�0021010�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. name: Release on: push: branches: - main - latest permissions: contents: write pull-requests: write checks: write jobs: release: outputs: pr: ${{ steps.release.outputs.pr }} releases: ${{ steps.release.outputs.releases }} release-flags: ${{ steps.release.outputs.release-flags }} branch: ${{ steps.release.outputs.pr-branch }} pr-number: ${{ steps.release.outputs.pr-number }} comment-id: ${{ steps.pr-comment.outputs.result }} check-id: ${{ steps.check.outputs.check_id }} name: Release if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Release Please id: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | npx --offline template-oss-release-please ${{ github.ref_name }} - name: Post Pull Request Comment if: steps.release.outputs.pr-number uses: actions/github-script@v6 id: pr-comment env: PR_NUMBER: ${{ steps.release.outputs.pr-number }} with: script: | const repo = { owner: context.repo.owner, repo: context.repo.repo } const issue = { ...repo, issue_number: process.env.PR_NUMBER } const { data: workflow } = await github.rest.actions.getWorkflowRun({ ...repo, run_id: context.runId }) let body = '## Release Manager\n\n' const comments = await github.paginate(github.rest.issues.listComments, issue) let commentId = comments?.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith(body))?.id body += `- Release workflow run: ${workflow.html_url}` if (commentId) { await github.rest.issues.updateComment({ ...repo, comment_id: commentId, body }) } else { const { data: comment } = await github.rest.issues.createComment({ ...issue, body }) commentId = comment?.id } return commentId - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check if: steps.release.outputs.pr-number with: token: ${{ secrets.GITHUB_TOKEN }} status: in_progress name: Release sha: ${{ steps.release.outputs.pr-sha }} # XXX: this does not work when using the default GITHUB_TOKEN. # Instead we post the main job url to the PR as a comment which # will link to all the other checks. To work around this we would # need to create a GitHub that would create on-demand tokens. # https://github.com/LouisBrunner/checks-action/issues/18 # details_url: update: needs: release outputs: sha: ${{ steps.commit.outputs.sha }} check-id: ${{ steps.check.outputs.check_id }} name: Update - Release if: github.repository_owner == 'npm' && needs.release.outputs.pr runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 ref: ${{ needs.release.outputs.branch }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Run Post Pull Request Actions env: RELEASE_PR_NUMBER: ${{ needs.release.outputs.pr-number }} RELEASE_COMMENT_ID: ${{ needs.release.outputs.comment-id }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | npm exec --offline -- template-oss-release-manager npm run rp-pull-request --ignore-scripts --if-present - name: Commit id: commit env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git commit --all --amend --no-edit || true git push --force-with-lease echo "::set-output name=sha::$(git rev-parse HEAD)" - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check with: token: ${{ secrets.GITHUB_TOKEN }} status: in_progress name: Release sha: ${{ steps.commit.outputs.sha }} # XXX: this does not work when using the default GITHUB_TOKEN. # Instead we post the main job url to the PR as a comment which # will link to all the other checks. To work around this we would # need to create a GitHub that would create on-demand tokens. # https://github.com/LouisBrunner/checks-action/issues/18 # details_url: - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() with: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ needs.release.outputs.check-id }} ci: name: CI - Release needs: [ release, update ] if: needs.release.outputs.pr uses: ./.github/workflows/ci-release.yml with: ref: ${{ needs.release.outputs.branch }} check-sha: ${{ needs.update.outputs.sha }} post-ci: needs: [ release, update, ci ] name: Post CI - Release if: github.repository_owner == 'npm' && needs.release.outputs.pr && always() runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Get Needs Result id: needs-result run: | result="" if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then result="failure" elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then result="cancelled" else result="success" fi echo "::set-output name=result::$result" - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() with: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ steps.needs-result.outputs.result }} check_id: ${{ needs.update.outputs.check-id }} post-release: needs: release name: Post Release - Release if: github.repository_owner == 'npm' && needs.release.outputs.releases runs-on: ubuntu-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - name: npm Version run: npm -v - name: Install Dependencies run: npm i --ignore-scripts --no-audit --no-fund - name: Run Post Release Actions env: RELEASES: ${{ needs.release.outputs.releases }} run: | npm run rp-release --ignore-scripts --if-present ${{ join(fromJSON(needs.release.outputs.release-flags), ' ') }} ���������������������������proc-log-3.0.0/.gitignore���������������������������������������������������������������������������0000664�0000000�0000000�00000000665�14322171062�0015231�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is automatically added by @npmcli/template-oss. Do not edit. # ignore everything in the root /* # keep these !**/.gitignore !/.commitlintrc.js !/.eslintrc.js !/.eslintrc.local.* !/.github/ !/.gitignore !/.npmrc !/.release-please-manifest.json !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md !/docs/ !/lib/ !/LICENSE* !/map.js !/package.json !/README* !/release-please-config.json !/scripts/ !/SECURITY.md !/tap-snapshots/ !/test/ ���������������������������������������������������������������������������proc-log-3.0.0/.npmrc�������������������������������������������������������������������������������0000664�0000000�0000000�00000000135�14322171062�0014351�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������; This file is automatically added by @npmcli/template-oss. Do not edit. package-lock=false �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/.release-please-manifest.json��������������������������������������������������������0000664�0000000�0000000�00000000023�14322171062�0020671�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ ".": "3.0.0" } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/CHANGELOG.md�������������������������������������������������������������������������0000664�0000000�0000000�00000002225�14322171062�0015044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Changelog ## [3.0.0](https://github.com/npm/proc-log/compare/v2.0.1...v3.0.0) (2022-10-10) ### ⚠️ BREAKING CHANGES * `proc-log` is now compatible with the following semver range for node: `^14.17.0 || ^16.13.0 || >=18.0.0` ### Features * [`54c85c1`](https://github.com/npm/proc-log/commit/54c85c1d4c0ed59c48d6765b15e8918e2eaf8c3a) [#27](https://github.com/npm/proc-log/pull/27) postinstall for dependabot template-oss PR (@lukekarrys) ### [2.0.1](https://github.com/npm/proc-log/compare/v2.0.0...v2.0.1) (2022-03-28) ### Documentation * fix pause/resume signatures ([adccecc](https://github.com/npm/proc-log/commit/adccecc2bf5e77427e3fefe826a8e5a1a57640d7)) ## [2.0.0](https://www.github.com/npm/proc-log/compare/v1.0.0...v2.0.0) (2022-02-10) ### ⚠ BREAKING CHANGES * this drops support for node10 and non-LTS versions of node12 and node14 * @npmcli/template-oss ([#1](https://www.github.com/npm/proc-log/issues/1)) ([d340d8b](https://www.github.com/npm/proc-log/commit/d340d8b90c5612223d456a6d33d36ed83ab1ba41)) ### Documentation * add example usage ([33ef65c](https://www.github.com/npm/proc-log/commit/33ef65c4dc3cdba2a2555ec1c32f6bd5d281ff6a)) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/CODE_OF_CONDUCT.md�������������������������������������������������������������������0000664�0000000�0000000�00000000507�14322171062�0016033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> All interactions in this repo are covered by the [npm Code of Conduct](https://docs.npmjs.com/policies/conduct) The npm cli team may, at its own discretion, moderate, remove, or edit any interactions such as pull requests, issues, and comments. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/LICENSE������������������������������������������������������������������������������0000664�0000000�0000000�00000001346�14322171062�0014243�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������The ISC License Copyright (c) GitHub, Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/README.md����������������������������������������������������������������������������0000664�0000000�0000000�00000005757�14322171062�0014527�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# proc-log Emits 'log' events on the process object which a log output listener can consume and print to the terminal. This is used by various modules within the npm CLI stack in order to send log events that can be consumed by a listener on the process object. ## API * `log.error(...args)` calls `process.emit('log', 'error', ...args)` The highest log level. For printing extremely serious errors that indicate something went wrong. * `log.warn(...args)` calls `process.emit('log', 'warn', ...args)` A fairly high log level. Things that the user needs to be aware of, but which won't necessarily cause improper functioning of the system. * `log.notice(...args)` calls `process.emit('log', 'notice', ...args)` Notices which are important, but not necessarily dangerous or a cause for excess concern. * `log.info(...args)` calls `process.emit('log', 'info', ...args)` Informative messages that may benefit the user, but aren't particularly important. * `log.verbose(...args)` calls `process.emit('log', 'verbose', ...args)` Noisy output that is more detail that most users will care about. * `log.silly(...args)` calls `process.emit('log', 'silly', ...args)` Extremely noisy excessive logging messages that are typically only useful for debugging. * `log.http(...args)` calls `process.emit('log', 'http', ...args)` Information about HTTP requests made and/or completed. * `log.pause()` calls `process.emit('log', 'pause')` Used to tell the consumer to stop printing messages. * `log.resume()` calls `process.emit('log', 'resume')` Used to tell the consumer that it is ok to print messages again. * `log.LEVELS` an array of strings of all log method names ## Examples Every method calls `process.emit('log', level, ...otherArgs)` internally. So in order to consume those events you need to do `process.on('log', fn)`. ### Colorize based on level Here's an example of how to consume `proc-log` events and colorize them based on level: ```js const chalk = require('chalk') process.on('log', (level, ...args) => { if (level === 'error') { console.log(chalk.red(level), ...args) } else { console.log(chalk.blue(level), ...args) } }) ``` ### Pause and resume `pause` and `resume` are included so you have the ability to tell your consumer that you want to pause or resume your display of logs. In the npm CLI we use this to buffer all logs on init until we know the correct loglevel to display. But we also setup a second handler that writes everything to a file even if paused. ```js let paused = true const buffer = [] // this handler will buffer and replay logs only // after `procLog.resume()` is called process.on('log', (level, ...args) => { if (level === 'resume') { buffer.forEach((item) => console.log(...item)) paused = false return }  if (paused) { buffer.push([level, ...args]) } else { console.log(level, ...args) } }) // this handler will write everything to a file process.on('log', (...args) => { fs.appendFileSync('debug.log', args.join(' ')) }) ```�����������������proc-log-3.0.0/SECURITY.md��������������������������������������������������������������������������0000664�0000000�0000000�00000000246�14322171062�0015025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> Please send vulnerability reports through [hackerone](https://hackerone.com/github). ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/lib/���������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0014000�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/lib/index.js�������������������������������������������������������������������������0000664�0000000�0000000�00000000544�14322171062�0015450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// emits 'log' events on the process const LEVELS = [ 'notice', 'error', 'warn', 'info', 'verbose', 'http', 'silly', 'pause', 'resume', ] const log = level => (...args) => process.emit('log', level, ...args) const logger = {} for (const level of LEVELS) { logger[level] = log(level) } logger.LEVELS = LEVELS module.exports = logger ������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/package.json�������������������������������������������������������������������������0000664�0000000�0000000�00000002046�14322171062�0015522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "name": "proc-log", "version": "3.0.0", "files": [ "bin/", "lib/" ], "main": "lib/index.js", "description": "just emit 'log' events on the process object", "repository": { "type": "git", "url": "https://github.com/npm/proc-log.git" }, "author": "GitHub Inc.", "license": "ISC", "scripts": { "test": "tap", "snap": "tap", "posttest": "npm run lint", "postsnap": "eslint index.js test/*.js --fix", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.5.1" }, "tap": { "nyc-arg": [ "--exclude", "tap-snapshots/**" ] } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/release-please-config.json�����������������������������������������������������������0000664�0000000�0000000�00000001254�14322171062�0020261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "exclude-packages-from-root": true, "group-pull-request-title-pattern": "chore: release ${version}", "pull-request-title-pattern": "chore: release${component} ${version}", "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false }, { "type": "deps", "section": "Dependencies", "hidden": false }, { "type": "chore", "hidden": true } ], "packages": { ".": { "package-name": "" } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/tap-snapshots/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0016036�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/tap-snapshots/test/������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0017015�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/tap-snapshots/test/index.js.test.cjs�������������������������������������������������0000664�0000000�0000000�00000000701�14322171062�0022214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/index.js TAP > log levels 1`] = ` Array [ "notice", "error", "warn", "info", "verbose", "http", "silly", "pause", "resume", ] ` ���������������������������������������������������������������proc-log-3.0.0/test/��������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�14322171062�0014211�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������proc-log-3.0.0/test/index.js������������������������������������������������������������������������0000664�0000000�0000000�00000000637�14322171062�0015664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������const t = require('tap') const log = require('../') const { LEVELS } = log t.matchSnapshot(LEVELS, 'log levels') for (const level of LEVELS) { t.test(level, t => { t.match(log[level], Function) process.once('log', (actual, ...args) => { t.equal(actual, level, 'emitted log with expected level') t.same(args, [1, 2, 3], 'got expected args') t.end() }) log[level](1, 2, 3) }) } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������