tap
Version:
A Test-Anything-Protocol library for JavaScript
1 lines • 1.61 kB
Source Map (JSON)
{"version":3,"file":"run.mjs","sourceRoot":"","sources":["../../src/run.mts"],"names":[],"mappings":";AACA;;GAEG;AACH,YAAY;AACZ,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,sEAAsE;AACtE,mEAAmE;AACnE,mEAAmE;AACnE,0DAA0D;AAC1D,6CAA6C;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,uBAAuB;AACvB,MAAM,GAAG,GAAG,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACjE,IAAI,GAAiB,CAAA;AACrB,IAAI,CAAC;IACH,GAAG,GAAG,iBAAiB,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;IAC1C,qBAAqB;AACvB,CAAC;AAAC,MAAM,CAAC;IACP,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAA;AACvB,CAAC;AACD,oBAAoB;AACpB,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA","sourcesContent":["#!/usr/bin/env node\n/**\n * just load the `@tapjs/run` module, which does all the work\n */\n//@ts-ignore\nprocess.setSourceMapsEnabled(true)\nimport { resolve } from 'node:path'\nimport { pathToFileURL } from 'node:url'\n\n// Try to load the tap runner that's installed in the current project,\n// if present. Running plugin builds etc from the global space will\n// never ever work as expected, but people do global installs to be\n// able to run tap without `npm exec` or `npm run-script`,\n// so may as well make it do the right thing.\n\nimport { resolveImportSync } from 'resolve-import/resolve-import-sync'\n// import('@tapjs/run')\nconst tap = resolveImportSync('tap', pathToFileURL(resolve('x')))\nlet run: URL | string\ntry {\n run = resolveImportSync('@tapjs/run', tap)\n /* c8 ignore start */\n} catch {\n run = import.meta.url\n}\n/* c8 ignore stop */\nimport(String(run))\n"]}