@nshiab/setup-data-project 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -0
- package/esm/_dnt.shims.d.ts +6 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/helpers/createFolderStructure.d.ts +2 -0
- package/esm/helpers/createFolderStructure.d.ts.map +1 -0
- package/esm/helpers/createFolderStructure.js +49 -0
- package/esm/helpers/ensureAgents.d.ts +2 -0
- package/esm/helpers/ensureAgents.d.ts.map +1 -0
- package/esm/helpers/ensureAgents.js +92 -0
- package/esm/helpers/ensureEnvFile.d.ts +2 -0
- package/esm/helpers/ensureEnvFile.d.ts.map +1 -0
- package/esm/helpers/ensureEnvFile.js +14 -0
- package/esm/helpers/ensureGitignore.d.ts +2 -0
- package/esm/helpers/ensureGitignore.d.ts.map +1 -0
- package/esm/helpers/ensureGitignore.js +29 -0
- package/esm/helpers/ensureReadme.d.ts +2 -0
- package/esm/helpers/ensureReadme.d.ts.map +1 -0
- package/esm/helpers/ensureReadme.js +37 -0
- package/esm/helpers/getInstalledPackages.d.ts +2 -0
- package/esm/helpers/getInstalledPackages.d.ts.map +1 -0
- package/esm/helpers/getInstalledPackages.js +29 -0
- package/esm/helpers/getProjectTasks.d.ts +5 -0
- package/esm/helpers/getProjectTasks.d.ts.map +1 -0
- package/esm/helpers/getProjectTasks.js +12 -0
- package/esm/helpers/getRuntime.d.ts +5 -0
- package/esm/helpers/getRuntime.d.ts.map +1 -0
- package/esm/helpers/getRuntime.js +17 -0
- package/esm/helpers/gitignoreEntries.d.ts +2 -0
- package/esm/helpers/gitignoreEntries.d.ts.map +1 -0
- package/esm/helpers/gitignoreEntries.js +9 -0
- package/esm/helpers/handleFileConflict.d.ts +5 -0
- package/esm/helpers/handleFileConflict.d.ts.map +1 -0
- package/esm/helpers/handleFileConflict.js +51 -0
- package/esm/helpers/installPackagesAndFetchDocs.d.ts +8 -0
- package/esm/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
- package/esm/helpers/installPackagesAndFetchDocs.js +61 -0
- package/esm/helpers/packageOptions.d.ts +5 -0
- package/esm/helpers/packageOptions.d.ts.map +1 -0
- package/esm/helpers/packageOptions.js +5 -0
- package/esm/helpers/packageRegistry.d.ts +7 -0
- package/esm/helpers/packageRegistry.d.ts.map +1 -0
- package/esm/helpers/packageRegistry.js +62 -0
- package/esm/helpers/updateProjectConfig.d.ts +2 -0
- package/esm/helpers/updateProjectConfig.d.ts.map +1 -0
- package/esm/helpers/updateProjectConfig.js +36 -0
- package/esm/main.d.ts +3 -0
- package/esm/main.d.ts.map +1 -0
- package/esm/main.js +93 -0
- package/esm/package.json +3 -0
- package/npm/LICENSE +21 -0
- package/npm/README.md +25 -0
- package/npm/esm/_dnt.shims.d.ts +8 -0
- package/npm/esm/_dnt.shims.d.ts.map +1 -0
- package/npm/esm/_dnt.shims.js +62 -0
- package/npm/esm/_dnt_2.shims.d.ts +6 -0
- package/npm/esm/_dnt_2.shims.d.ts.map +1 -0
- package/npm/esm/_dnt_2.shims.js +61 -0
- package/npm/esm/helpers/createFolderStructure.d.ts +2 -0
- package/npm/esm/helpers/createFolderStructure.d.ts.map +1 -0
- package/npm/esm/helpers/createFolderStructure.js +49 -0
- package/npm/esm/helpers/ensureAgents.d.ts +2 -0
- package/npm/esm/helpers/ensureAgents.d.ts.map +1 -0
- package/npm/esm/helpers/ensureAgents.js +92 -0
- package/npm/esm/helpers/ensureEnvFile.d.ts +2 -0
- package/npm/esm/helpers/ensureEnvFile.d.ts.map +1 -0
- package/npm/esm/helpers/ensureEnvFile.js +14 -0
- package/npm/esm/helpers/ensureGitignore.d.ts +2 -0
- package/npm/esm/helpers/ensureGitignore.d.ts.map +1 -0
- package/npm/esm/helpers/ensureGitignore.js +29 -0
- package/npm/esm/helpers/ensureReadme.d.ts +2 -0
- package/npm/esm/helpers/ensureReadme.d.ts.map +1 -0
- package/npm/esm/helpers/ensureReadme.js +37 -0
- package/npm/esm/helpers/getInstalledPackages.d.ts +2 -0
- package/npm/esm/helpers/getInstalledPackages.d.ts.map +1 -0
- package/npm/esm/helpers/getInstalledPackages.js +29 -0
- package/npm/esm/helpers/getProjectTasks.d.ts +5 -0
- package/npm/esm/helpers/getProjectTasks.d.ts.map +1 -0
- package/npm/esm/helpers/getProjectTasks.js +12 -0
- package/npm/esm/helpers/getRuntime.d.ts +5 -0
- package/npm/esm/helpers/getRuntime.d.ts.map +1 -0
- package/npm/esm/helpers/getRuntime.js +17 -0
- package/npm/esm/helpers/gitignoreEntries.d.ts +2 -0
- package/npm/esm/helpers/gitignoreEntries.d.ts.map +1 -0
- package/npm/esm/helpers/gitignoreEntries.js +9 -0
- package/npm/esm/helpers/handleFileConflict.d.ts +5 -0
- package/npm/esm/helpers/handleFileConflict.d.ts.map +1 -0
- package/npm/esm/helpers/handleFileConflict.js +51 -0
- package/npm/esm/helpers/installPackagesAndFetchDocs.d.ts +8 -0
- package/npm/esm/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
- package/npm/esm/helpers/installPackagesAndFetchDocs.js +61 -0
- package/npm/esm/helpers/packageOptions.d.ts +5 -0
- package/npm/esm/helpers/packageOptions.d.ts.map +1 -0
- package/npm/esm/helpers/packageOptions.js +5 -0
- package/npm/esm/helpers/packageRegistry.d.ts +7 -0
- package/npm/esm/helpers/packageRegistry.d.ts.map +1 -0
- package/npm/esm/helpers/packageRegistry.js +62 -0
- package/npm/esm/helpers/updateProjectConfig.d.ts +2 -0
- package/npm/esm/helpers/updateProjectConfig.d.ts.map +1 -0
- package/npm/esm/helpers/updateProjectConfig.js +36 -0
- package/npm/esm/main.d.ts +3 -0
- package/npm/esm/main.d.ts.map +1 -0
- package/npm/esm/main.js +93 -0
- package/npm/esm/package.json +3 -0
- package/npm/node_modules/.package-lock.json +123 -0
- package/npm/node_modules/@clack/core/CHANGELOG.md +348 -0
- package/npm/node_modules/@clack/core/LICENSE +9 -0
- package/npm/node_modules/@clack/core/README.md +22 -0
- package/npm/node_modules/@clack/core/dist/index.d.mts +363 -0
- package/npm/node_modules/@clack/core/dist/index.mjs +17 -0
- package/npm/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/npm/node_modules/@clack/core/package.json +63 -0
- package/npm/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/npm/node_modules/@clack/prompts/LICENSE +9 -0
- package/npm/node_modules/@clack/prompts/README.md +375 -0
- package/npm/node_modules/@clack/prompts/dist/index.d.mts +396 -0
- package/npm/node_modules/@clack/prompts/dist/index.mjs +144 -0
- package/npm/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/npm/node_modules/@clack/prompts/package.json +68 -0
- package/npm/node_modules/@deno/shim-deno/LICENSE +20 -0
- package/npm/node_modules/@deno/shim-deno/README.md +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js +56 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js +92 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/consts.js +4 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js +44 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js +91 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js +37 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js +8 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/streams.js +122 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/test.d.ts +1 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/test.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/internal/version.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js +143 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js +19 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js +26 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/enums.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/addSignalListener.js +18 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js +22 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js +37 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js +31 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/consoleSize.js +17 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js +27 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js +14 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js +8 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js +8 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js +6 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js +44 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js +19 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js +8 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js +6 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/gid.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/hostname.js +32 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js +16 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js +51 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js +49 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/loadavg.js +32 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js +42 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js +42 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js +11 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js +11 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js +14 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js +14 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js +22 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js +33 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js +31 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osRelease.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osUptime.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js +19 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js +26 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js +26 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js +19 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js +19 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js +34 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js +18 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js +41 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js +22 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSignalListener.js +12 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js +41 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js +276 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js +9 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js +68 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js +42 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js +30 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/uid.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js +27 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js +35 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js +46 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js +45 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js +29 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js +52 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js +44 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions.js +234 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/main.js +21 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/types.js +3 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js +38 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js +4 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js +47 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js +63 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js +8 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js +21 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js +6 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js +5 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js +12 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js +132 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js +10 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables.js +53 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno/unstable/main.js +62 -0
- package/npm/node_modules/@deno/shim-deno/dist/deno.js +17 -0
- package/npm/node_modules/@deno/shim-deno/dist/index.d.ts +4762 -0
- package/npm/node_modules/@deno/shim-deno/dist/index.js +27 -0
- package/npm/node_modules/@deno/shim-deno/package.json +50 -0
- package/npm/node_modules/@deno/shim-deno-test/LICENSE +20 -0
- package/npm/node_modules/@deno/shim-deno-test/README.md +28 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/definitions.d.ts +3 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/definitions.js +5 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts +626 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js +2 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/index.d.ts +3 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/index.js +21 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/test.d.ts +3 -0
- package/npm/node_modules/@deno/shim-deno-test/dist/test.js +87 -0
- package/npm/node_modules/@deno/shim-deno-test/package.json +34 -0
- package/npm/node_modules/@types/node/LICENSE +21 -0
- package/npm/node_modules/@types/node/README.md +15 -0
- package/npm/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/npm/node_modules/@types/node/assert.d.ts +1062 -0
- package/npm/node_modules/@types/node/async_hooks.d.ts +605 -0
- package/npm/node_modules/@types/node/buffer.buffer.d.ts +471 -0
- package/npm/node_modules/@types/node/buffer.d.ts +1936 -0
- package/npm/node_modules/@types/node/child_process.d.ts +1475 -0
- package/npm/node_modules/@types/node/cluster.d.ts +577 -0
- package/npm/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/npm/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/npm/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/npm/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/npm/node_modules/@types/node/console.d.ts +452 -0
- package/npm/node_modules/@types/node/constants.d.ts +21 -0
- package/npm/node_modules/@types/node/crypto.d.ts +4590 -0
- package/npm/node_modules/@types/node/dgram.d.ts +597 -0
- package/npm/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/npm/node_modules/@types/node/dns/promises.d.ts +479 -0
- package/npm/node_modules/@types/node/dns.d.ts +871 -0
- package/npm/node_modules/@types/node/domain.d.ts +170 -0
- package/npm/node_modules/@types/node/events.d.ts +977 -0
- package/npm/node_modules/@types/node/fs/promises.d.ts +1270 -0
- package/npm/node_modules/@types/node/fs.d.ts +4375 -0
- package/npm/node_modules/@types/node/globals.d.ts +172 -0
- package/npm/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/npm/node_modules/@types/node/http.d.ts +2049 -0
- package/npm/node_modules/@types/node/http2.d.ts +2631 -0
- package/npm/node_modules/@types/node/https.d.ts +578 -0
- package/npm/node_modules/@types/node/index.d.ts +93 -0
- package/npm/node_modules/@types/node/inspector.generated.d.ts +3966 -0
- package/npm/node_modules/@types/node/module.d.ts +539 -0
- package/npm/node_modules/@types/node/net.d.ts +1031 -0
- package/npm/node_modules/@types/node/os.d.ts +506 -0
- package/npm/node_modules/@types/node/package.json +140 -0
- package/npm/node_modules/@types/node/path.d.ts +200 -0
- package/npm/node_modules/@types/node/perf_hooks.d.ts +961 -0
- package/npm/node_modules/@types/node/process.d.ts +1961 -0
- package/npm/node_modules/@types/node/punycode.d.ts +117 -0
- package/npm/node_modules/@types/node/querystring.d.ts +152 -0
- package/npm/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/npm/node_modules/@types/node/readline.d.ts +589 -0
- package/npm/node_modules/@types/node/repl.d.ts +430 -0
- package/npm/node_modules/@types/node/sea.d.ts +153 -0
- package/npm/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/npm/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/npm/node_modules/@types/node/stream/web.d.ts +533 -0
- package/npm/node_modules/@types/node/stream.d.ts +1698 -0
- package/npm/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/npm/node_modules/@types/node/test.d.ts +1787 -0
- package/npm/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/npm/node_modules/@types/node/timers.d.ts +286 -0
- package/npm/node_modules/@types/node/tls.d.ts +1259 -0
- package/npm/node_modules/@types/node/trace_events.d.ts +197 -0
- package/npm/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/npm/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/npm/node_modules/@types/node/ts5.6/index.d.ts +93 -0
- package/npm/node_modules/@types/node/tty.d.ts +208 -0
- package/npm/node_modules/@types/node/url.d.ts +964 -0
- package/npm/node_modules/@types/node/util.d.ts +2331 -0
- package/npm/node_modules/@types/node/v8.d.ts +809 -0
- package/npm/node_modules/@types/node/vm.d.ts +1001 -0
- package/npm/node_modules/@types/node/wasi.d.ts +181 -0
- package/npm/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/npm/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/npm/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/npm/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/npm/node_modules/@types/node/worker_threads.d.ts +715 -0
- package/npm/node_modules/@types/node/zlib.d.ts +598 -0
- package/npm/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/npm/node_modules/fast-string-truncated-width/dist/index.js +111 -0
- package/npm/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
- package/npm/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/npm/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/npm/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
- package/npm/node_modules/fast-string-truncated-width/license +21 -0
- package/npm/node_modules/fast-string-truncated-width/package.json +35 -0
- package/npm/node_modules/fast-string-truncated-width/readme.md +59 -0
- package/npm/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/npm/node_modules/fast-string-width/dist/index.js +14 -0
- package/npm/node_modules/fast-string-width/license +21 -0
- package/npm/node_modules/fast-string-width/package.json +34 -0
- package/npm/node_modules/fast-string-width/readme.md +42 -0
- package/npm/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/npm/node_modules/fast-wrap-ansi/README.md +26 -0
- package/npm/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/npm/node_modules/fast-wrap-ansi/lib/main.js +219 -0
- package/npm/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
- package/npm/node_modules/fast-wrap-ansi/package.json +51 -0
- package/npm/node_modules/isexe/LICENSE.md +55 -0
- package/npm/node_modules/isexe/README.md +80 -0
- package/npm/node_modules/isexe/dist/commonjs/index.d.ts +14 -0
- package/npm/node_modules/isexe/dist/commonjs/index.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/index.js +56 -0
- package/npm/node_modules/isexe/dist/commonjs/index.js.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/index.min.js +2 -0
- package/npm/node_modules/isexe/dist/commonjs/index.min.js.map +7 -0
- package/npm/node_modules/isexe/dist/commonjs/options.d.ts +32 -0
- package/npm/node_modules/isexe/dist/commonjs/options.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/options.js +3 -0
- package/npm/node_modules/isexe/dist/commonjs/options.js.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/package.json +3 -0
- package/npm/node_modules/isexe/dist/commonjs/posix.d.ts +18 -0
- package/npm/node_modules/isexe/dist/commonjs/posix.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/posix.js +67 -0
- package/npm/node_modules/isexe/dist/commonjs/posix.js.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/win32.d.ts +18 -0
- package/npm/node_modules/isexe/dist/commonjs/win32.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/commonjs/win32.js +63 -0
- package/npm/node_modules/isexe/dist/commonjs/win32.js.map +1 -0
- package/npm/node_modules/isexe/dist/esm/index.d.ts +14 -0
- package/npm/node_modules/isexe/dist/esm/index.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/esm/index.js +16 -0
- package/npm/node_modules/isexe/dist/esm/index.js.map +1 -0
- package/npm/node_modules/isexe/dist/esm/index.min.js +2 -0
- package/npm/node_modules/isexe/dist/esm/index.min.js.map +7 -0
- package/npm/node_modules/isexe/dist/esm/options.d.ts +32 -0
- package/npm/node_modules/isexe/dist/esm/options.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/esm/options.js +2 -0
- package/npm/node_modules/isexe/dist/esm/options.js.map +1 -0
- package/npm/node_modules/isexe/dist/esm/package.json +3 -0
- package/npm/node_modules/isexe/dist/esm/posix.d.ts +18 -0
- package/npm/node_modules/isexe/dist/esm/posix.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/esm/posix.js +62 -0
- package/npm/node_modules/isexe/dist/esm/posix.js.map +1 -0
- package/npm/node_modules/isexe/dist/esm/win32.d.ts +18 -0
- package/npm/node_modules/isexe/dist/esm/win32.d.ts.map +1 -0
- package/npm/node_modules/isexe/dist/esm/win32.js +58 -0
- package/npm/node_modules/isexe/dist/esm/win32.js.map +1 -0
- package/npm/node_modules/isexe/package.json +78 -0
- package/npm/node_modules/sisteransi/license +21 -0
- package/npm/node_modules/sisteransi/package.json +34 -0
- package/npm/node_modules/sisteransi/readme.md +113 -0
- package/npm/node_modules/sisteransi/src/index.js +58 -0
- package/npm/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/npm/node_modules/undici-types/LICENSE +21 -0
- package/npm/node_modules/undici-types/README.md +6 -0
- package/npm/node_modules/undici-types/agent.d.ts +31 -0
- package/npm/node_modules/undici-types/api.d.ts +43 -0
- package/npm/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/npm/node_modules/undici-types/cache.d.ts +36 -0
- package/npm/node_modules/undici-types/client.d.ts +108 -0
- package/npm/node_modules/undici-types/connector.d.ts +34 -0
- package/npm/node_modules/undici-types/content-type.d.ts +21 -0
- package/npm/node_modules/undici-types/cookies.d.ts +28 -0
- package/npm/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/npm/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/npm/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/npm/node_modules/undici-types/errors.d.ts +149 -0
- package/npm/node_modules/undici-types/eventsource.d.ts +61 -0
- package/npm/node_modules/undici-types/fetch.d.ts +209 -0
- package/npm/node_modules/undici-types/file.d.ts +39 -0
- package/npm/node_modules/undici-types/filereader.d.ts +54 -0
- package/npm/node_modules/undici-types/formdata.d.ts +108 -0
- package/npm/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/npm/node_modules/undici-types/global-origin.d.ts +7 -0
- package/npm/node_modules/undici-types/handlers.d.ts +15 -0
- package/npm/node_modules/undici-types/header.d.ts +4 -0
- package/npm/node_modules/undici-types/index.d.ts +71 -0
- package/npm/node_modules/undici-types/interceptors.d.ts +17 -0
- package/npm/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/npm/node_modules/undici-types/mock-client.d.ts +25 -0
- package/npm/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/npm/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/npm/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/npm/node_modules/undici-types/package.json +55 -0
- package/npm/node_modules/undici-types/patch.d.ts +33 -0
- package/npm/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/npm/node_modules/undici-types/pool.d.ts +39 -0
- package/npm/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/npm/node_modules/undici-types/readable.d.ts +65 -0
- package/npm/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/npm/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/npm/node_modules/undici-types/util.d.ts +18 -0
- package/npm/node_modules/undici-types/webidl.d.ts +228 -0
- package/npm/node_modules/undici-types/websocket.d.ts +150 -0
- package/npm/node_modules/which/LICENSE +15 -0
- package/npm/node_modules/which/README.md +51 -0
- package/npm/node_modules/which/bin/which.js +52 -0
- package/npm/node_modules/which/lib/index.js +111 -0
- package/npm/node_modules/which/package.json +57 -0
- package/npm/package-lock.json +135 -0
- package/npm/package.json +30 -0
- package/npm/script/_dnt.shims.d.ts +8 -0
- package/npm/script/_dnt.shims.d.ts.map +1 -0
- package/npm/script/_dnt.shims.js +99 -0
- package/npm/script/_dnt_2.shims.d.ts +6 -0
- package/npm/script/_dnt_2.shims.d.ts.map +1 -0
- package/npm/script/_dnt_2.shims.js +65 -0
- package/npm/script/helpers/createFolderStructure.d.ts +2 -0
- package/npm/script/helpers/createFolderStructure.d.ts.map +1 -0
- package/npm/script/helpers/createFolderStructure.js +52 -0
- package/npm/script/helpers/ensureAgents.d.ts +2 -0
- package/npm/script/helpers/ensureAgents.d.ts.map +1 -0
- package/npm/script/helpers/ensureAgents.js +95 -0
- package/npm/script/helpers/ensureEnvFile.d.ts +2 -0
- package/npm/script/helpers/ensureEnvFile.d.ts.map +1 -0
- package/npm/script/helpers/ensureEnvFile.js +17 -0
- package/npm/script/helpers/ensureGitignore.d.ts +2 -0
- package/npm/script/helpers/ensureGitignore.d.ts.map +1 -0
- package/npm/script/helpers/ensureGitignore.js +32 -0
- package/npm/script/helpers/ensureReadme.d.ts +2 -0
- package/npm/script/helpers/ensureReadme.d.ts.map +1 -0
- package/npm/script/helpers/ensureReadme.js +40 -0
- package/npm/script/helpers/getInstalledPackages.d.ts +2 -0
- package/npm/script/helpers/getInstalledPackages.d.ts.map +1 -0
- package/npm/script/helpers/getInstalledPackages.js +32 -0
- package/npm/script/helpers/getProjectTasks.d.ts +5 -0
- package/npm/script/helpers/getProjectTasks.d.ts.map +1 -0
- package/npm/script/helpers/getProjectTasks.js +15 -0
- package/npm/script/helpers/getRuntime.d.ts +5 -0
- package/npm/script/helpers/getRuntime.d.ts.map +1 -0
- package/npm/script/helpers/getRuntime.js +57 -0
- package/npm/script/helpers/gitignoreEntries.d.ts +2 -0
- package/npm/script/helpers/gitignoreEntries.d.ts.map +1 -0
- package/npm/script/helpers/gitignoreEntries.js +12 -0
- package/npm/script/helpers/handleFileConflict.d.ts +5 -0
- package/npm/script/helpers/handleFileConflict.d.ts.map +1 -0
- package/npm/script/helpers/handleFileConflict.js +91 -0
- package/npm/script/helpers/installPackagesAndFetchDocs.d.ts +8 -0
- package/npm/script/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
- package/npm/script/helpers/installPackagesAndFetchDocs.js +98 -0
- package/npm/script/helpers/packageOptions.d.ts +5 -0
- package/npm/script/helpers/packageOptions.d.ts.map +1 -0
- package/npm/script/helpers/packageOptions.js +8 -0
- package/npm/script/helpers/packageRegistry.d.ts +7 -0
- package/npm/script/helpers/packageRegistry.d.ts.map +1 -0
- package/npm/script/helpers/packageRegistry.js +65 -0
- package/npm/script/helpers/updateProjectConfig.d.ts +2 -0
- package/npm/script/helpers/updateProjectConfig.d.ts.map +1 -0
- package/npm/script/helpers/updateProjectConfig.js +39 -0
- package/npm/script/main.d.ts +3 -0
- package/npm/script/main.d.ts.map +1 -0
- package/npm/script/main.js +98 -0
- package/npm/script/package.json +3 -0
- package/package.json +27 -0
- package/script/_dnt.shims.d.ts +6 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +65 -0
- package/script/helpers/createFolderStructure.d.ts +2 -0
- package/script/helpers/createFolderStructure.d.ts.map +1 -0
- package/script/helpers/createFolderStructure.js +52 -0
- package/script/helpers/ensureAgents.d.ts +2 -0
- package/script/helpers/ensureAgents.d.ts.map +1 -0
- package/script/helpers/ensureAgents.js +95 -0
- package/script/helpers/ensureEnvFile.d.ts +2 -0
- package/script/helpers/ensureEnvFile.d.ts.map +1 -0
- package/script/helpers/ensureEnvFile.js +17 -0
- package/script/helpers/ensureGitignore.d.ts +2 -0
- package/script/helpers/ensureGitignore.d.ts.map +1 -0
- package/script/helpers/ensureGitignore.js +32 -0
- package/script/helpers/ensureReadme.d.ts +2 -0
- package/script/helpers/ensureReadme.d.ts.map +1 -0
- package/script/helpers/ensureReadme.js +40 -0
- package/script/helpers/getInstalledPackages.d.ts +2 -0
- package/script/helpers/getInstalledPackages.d.ts.map +1 -0
- package/script/helpers/getInstalledPackages.js +32 -0
- package/script/helpers/getProjectTasks.d.ts +5 -0
- package/script/helpers/getProjectTasks.d.ts.map +1 -0
- package/script/helpers/getProjectTasks.js +15 -0
- package/script/helpers/getRuntime.d.ts +5 -0
- package/script/helpers/getRuntime.d.ts.map +1 -0
- package/script/helpers/getRuntime.js +57 -0
- package/script/helpers/gitignoreEntries.d.ts +2 -0
- package/script/helpers/gitignoreEntries.d.ts.map +1 -0
- package/script/helpers/gitignoreEntries.js +12 -0
- package/script/helpers/handleFileConflict.d.ts +5 -0
- package/script/helpers/handleFileConflict.d.ts.map +1 -0
- package/script/helpers/handleFileConflict.js +91 -0
- package/script/helpers/installPackagesAndFetchDocs.d.ts +8 -0
- package/script/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
- package/script/helpers/installPackagesAndFetchDocs.js +98 -0
- package/script/helpers/packageOptions.d.ts +5 -0
- package/script/helpers/packageOptions.d.ts.map +1 -0
- package/script/helpers/packageOptions.js +8 -0
- package/script/helpers/packageRegistry.d.ts +7 -0
- package/script/helpers/packageRegistry.d.ts.map +1 -0
- package/script/helpers/packageRegistry.js +65 -0
- package/script/helpers/updateProjectConfig.d.ts +2 -0
- package/script/helpers/updateProjectConfig.d.ts.map +1 -0
- package/script/helpers/updateProjectConfig.js +39 -0
- package/script/main.d.ts +3 -0
- package/script/main.d.ts.map +1 -0
- package/script/main.js +98 -0
- package/script/package.json +3 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import stringWidth from 'fast-string-width';
|
|
2
|
+
const ESC = '\x1B';
|
|
3
|
+
const CSI = '\x9B';
|
|
4
|
+
const END_CODE = 39;
|
|
5
|
+
const ANSI_ESCAPE_BELL = '\u0007';
|
|
6
|
+
const ANSI_CSI = '[';
|
|
7
|
+
const ANSI_OSC = ']';
|
|
8
|
+
const ANSI_SGR_TERMINATOR = 'm';
|
|
9
|
+
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
10
|
+
const GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, 'y');
|
|
11
|
+
const getClosingCode = (openingCode) => {
|
|
12
|
+
if (openingCode >= 30 && openingCode <= 37)
|
|
13
|
+
return 39;
|
|
14
|
+
if (openingCode >= 90 && openingCode <= 97)
|
|
15
|
+
return 39;
|
|
16
|
+
if (openingCode >= 40 && openingCode <= 47)
|
|
17
|
+
return 49;
|
|
18
|
+
if (openingCode >= 100 && openingCode <= 107)
|
|
19
|
+
return 49;
|
|
20
|
+
if (openingCode === 1 || openingCode === 2)
|
|
21
|
+
return 22;
|
|
22
|
+
if (openingCode === 3)
|
|
23
|
+
return 23;
|
|
24
|
+
if (openingCode === 4)
|
|
25
|
+
return 24;
|
|
26
|
+
if (openingCode === 7)
|
|
27
|
+
return 27;
|
|
28
|
+
if (openingCode === 8)
|
|
29
|
+
return 28;
|
|
30
|
+
if (openingCode === 9)
|
|
31
|
+
return 29;
|
|
32
|
+
if (openingCode === 0)
|
|
33
|
+
return 0;
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
const wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
37
|
+
const wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
38
|
+
const wrapWord = (rows, word, columns) => {
|
|
39
|
+
const characters = word[Symbol.iterator]();
|
|
40
|
+
let isInsideEscape = false;
|
|
41
|
+
let isInsideLinkEscape = false;
|
|
42
|
+
let lastRow = rows.at(-1);
|
|
43
|
+
let visible = lastRow === undefined ? 0 : stringWidth(lastRow);
|
|
44
|
+
let currentCharacter = characters.next();
|
|
45
|
+
let nextCharacter = characters.next();
|
|
46
|
+
let rawCharacterIndex = 0;
|
|
47
|
+
while (!currentCharacter.done) {
|
|
48
|
+
const character = currentCharacter.value;
|
|
49
|
+
const characterLength = stringWidth(character);
|
|
50
|
+
if (visible + characterLength <= columns) {
|
|
51
|
+
rows[rows.length - 1] += character;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
rows.push(character);
|
|
55
|
+
visible = 0;
|
|
56
|
+
}
|
|
57
|
+
if (character === ESC || character === CSI) {
|
|
58
|
+
isInsideEscape = true;
|
|
59
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
60
|
+
}
|
|
61
|
+
if (isInsideEscape) {
|
|
62
|
+
if (isInsideLinkEscape) {
|
|
63
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
64
|
+
isInsideEscape = false;
|
|
65
|
+
isInsideLinkEscape = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (character === ANSI_SGR_TERMINATOR) {
|
|
69
|
+
isInsideEscape = false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
visible += characterLength;
|
|
74
|
+
if (visible === columns && !nextCharacter.done) {
|
|
75
|
+
rows.push('');
|
|
76
|
+
visible = 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
currentCharacter = nextCharacter;
|
|
80
|
+
nextCharacter = characters.next();
|
|
81
|
+
rawCharacterIndex += character.length;
|
|
82
|
+
}
|
|
83
|
+
lastRow = rows.at(-1);
|
|
84
|
+
if (!visible && lastRow !== undefined && lastRow.length && rows.length > 1) {
|
|
85
|
+
rows[rows.length - 2] += rows.pop();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const stringVisibleTrimSpacesRight = (string) => {
|
|
89
|
+
const words = string.split(' ');
|
|
90
|
+
let last = words.length;
|
|
91
|
+
while (last) {
|
|
92
|
+
if (stringWidth(words[last - 1])) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
last--;
|
|
96
|
+
}
|
|
97
|
+
if (last === words.length) {
|
|
98
|
+
return string;
|
|
99
|
+
}
|
|
100
|
+
return words.slice(0, last).join(' ') + words.slice(last).join('');
|
|
101
|
+
};
|
|
102
|
+
const exec = (string, columns, options = {}) => {
|
|
103
|
+
if (options.trim !== false && string.trim() === '') {
|
|
104
|
+
return '';
|
|
105
|
+
}
|
|
106
|
+
let returnValue = '';
|
|
107
|
+
let escapeCode;
|
|
108
|
+
let escapeUrl;
|
|
109
|
+
const words = string.split(' ');
|
|
110
|
+
let rows = [''];
|
|
111
|
+
let rowLength = 0;
|
|
112
|
+
for (let index = 0; index < words.length; index++) {
|
|
113
|
+
const word = words[index];
|
|
114
|
+
if (options.trim !== false) {
|
|
115
|
+
const row = rows.at(-1) ?? '';
|
|
116
|
+
const trimmed = row.trimStart();
|
|
117
|
+
if (row.length !== trimmed.length) {
|
|
118
|
+
rows[rows.length - 1] = trimmed;
|
|
119
|
+
rowLength = stringWidth(trimmed);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (index !== 0) {
|
|
123
|
+
if (rowLength >= columns &&
|
|
124
|
+
(options.wordWrap === false || options.trim === false)) {
|
|
125
|
+
rows.push('');
|
|
126
|
+
rowLength = 0;
|
|
127
|
+
}
|
|
128
|
+
if (rowLength || options.trim === false) {
|
|
129
|
+
rows[rows.length - 1] += ' ';
|
|
130
|
+
rowLength++;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const wordLength = stringWidth(word);
|
|
134
|
+
if (options.hard && wordLength > columns) {
|
|
135
|
+
const remainingColumns = columns - rowLength;
|
|
136
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
137
|
+
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
138
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
139
|
+
rows.push('');
|
|
140
|
+
}
|
|
141
|
+
wrapWord(rows, word, columns);
|
|
142
|
+
rowLength = stringWidth(rows.at(-1) ?? '');
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
146
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
147
|
+
wrapWord(rows, word, columns);
|
|
148
|
+
rowLength = stringWidth(rows.at(-1) ?? '');
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
rows.push('');
|
|
152
|
+
rowLength = 0;
|
|
153
|
+
}
|
|
154
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
155
|
+
wrapWord(rows, word, columns);
|
|
156
|
+
rowLength = stringWidth(rows.at(-1) ?? '');
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
rows[rows.length - 1] += word;
|
|
160
|
+
rowLength += wordLength;
|
|
161
|
+
}
|
|
162
|
+
if (options.trim !== false) {
|
|
163
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
164
|
+
}
|
|
165
|
+
const preString = rows.join('\n');
|
|
166
|
+
let inSurrogate = false;
|
|
167
|
+
for (let i = 0; i < preString.length; i++) {
|
|
168
|
+
const character = preString[i];
|
|
169
|
+
returnValue += character;
|
|
170
|
+
if (!inSurrogate) {
|
|
171
|
+
inSurrogate = character >= '\ud800' && character <= '\udbff';
|
|
172
|
+
if (inSurrogate) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
inSurrogate = false;
|
|
178
|
+
}
|
|
179
|
+
if (character === ESC || character === CSI) {
|
|
180
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
181
|
+
const groupsResult = GROUP_REGEX.exec(preString);
|
|
182
|
+
const groups = groupsResult?.groups;
|
|
183
|
+
if (groups?.code !== undefined) {
|
|
184
|
+
const code = Number.parseFloat(groups.code);
|
|
185
|
+
escapeCode = code === END_CODE ? undefined : code;
|
|
186
|
+
}
|
|
187
|
+
else if (groups?.uri !== undefined) {
|
|
188
|
+
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (preString[i + 1] === '\n') {
|
|
192
|
+
if (escapeUrl) {
|
|
193
|
+
returnValue += wrapAnsiHyperlink('');
|
|
194
|
+
}
|
|
195
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : undefined;
|
|
196
|
+
if (escapeCode && closingCode) {
|
|
197
|
+
returnValue += wrapAnsiCode(closingCode);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else if (character === '\n') {
|
|
201
|
+
if (escapeCode && getClosingCode(escapeCode)) {
|
|
202
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
203
|
+
}
|
|
204
|
+
if (escapeUrl) {
|
|
205
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return returnValue;
|
|
210
|
+
};
|
|
211
|
+
const CRLF_OR_LF = /\r?\n/;
|
|
212
|
+
export function wrapAnsi(string, columns, options) {
|
|
213
|
+
return String(string)
|
|
214
|
+
.normalize()
|
|
215
|
+
.split(CRLF_OR_LF)
|
|
216
|
+
.map((line) => exec(line, columns, options))
|
|
217
|
+
.join('\n');
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,GAAG,GAAG,MAAM,CAAC;AAEnB,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAClC,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,gBAAgB,GAAG,GAAG,QAAQ,KAAK,CAAC;AAC1C,MAAM,WAAW,GAAG,IAAI,MAAM,CAC5B,QAAQ,QAAQ,oBAAoB,gBAAgB,aAAa,gBAAgB,GAAG,EACpF,GAAG,CACJ,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAsB,EAAE;IACjE,IAAI,WAAW,IAAI,EAAE,IAAI,WAAW,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IACtD,IAAI,WAAW,IAAI,EAAE,IAAI,WAAW,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IACtD,IAAI,WAAW,IAAI,EAAE,IAAI,WAAW,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IACtD,IAAI,WAAW,IAAI,GAAG,IAAI,WAAW,IAAI,GAAG;QAAE,OAAO,EAAE,CAAC;IACxD,IAA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U,CAAC;SACjB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC3C,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fast-wrap-ansi",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"files": [
|
|
5
|
+
"lib"
|
|
6
|
+
],
|
|
7
|
+
"description": "A tiny and fast text wrap library which takes ANSI escapes into account.",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"wrap",
|
|
10
|
+
"ansi",
|
|
11
|
+
"term",
|
|
12
|
+
"colors"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/43081j/fast-wrap-ansi#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/43081j/fast-wrap-ansi/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/43081j/fast-wrap-ansi.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "James Garbutt (https://github.com/43081j)",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "lib/main.js",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"format": "prettier --write src test",
|
|
28
|
+
"lint": "npm run lint:js && npm run lint:format && npm run lint:types",
|
|
29
|
+
"lint:js": "eslint src test",
|
|
30
|
+
"lint:format": "prettier --check src test",
|
|
31
|
+
"lint:types": "npx tsc --noEmit -p tsconfig.test.json",
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"test": "vitest run"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eslint/js": "^9.32.0",
|
|
37
|
+
"@types/node": "^24.2.0",
|
|
38
|
+
"eslint": "^9.32.0",
|
|
39
|
+
"fast-wrap-ansi-prod": "npm:fast-wrap-ansi@*",
|
|
40
|
+
"picocolors": "^1.1.1",
|
|
41
|
+
"prettier": "^3.6.2",
|
|
42
|
+
"tinybench": "^5.0.1",
|
|
43
|
+
"typescript": "^5.8.3",
|
|
44
|
+
"typescript-eslint": "^8.38.0",
|
|
45
|
+
"vitest": "^3.2.4",
|
|
46
|
+
"wrap-ansi": "^9.0.2"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"fast-string-width": "^3.0.2"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Blue Oak Model License
|
|
2
|
+
|
|
3
|
+
Version 1.0.0
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This license gives everyone as much permission to work with
|
|
8
|
+
this software as possible, while protecting contributors
|
|
9
|
+
from liability.
|
|
10
|
+
|
|
11
|
+
## Acceptance
|
|
12
|
+
|
|
13
|
+
In order to receive this license, you must agree to its
|
|
14
|
+
rules. The rules of this license are both obligations
|
|
15
|
+
under that agreement and conditions to your license.
|
|
16
|
+
You must not do anything with this software that triggers
|
|
17
|
+
a rule that you cannot or will not follow.
|
|
18
|
+
|
|
19
|
+
## Copyright
|
|
20
|
+
|
|
21
|
+
Each contributor licenses you to do everything with this
|
|
22
|
+
software that would otherwise infringe that contributor's
|
|
23
|
+
copyright in it.
|
|
24
|
+
|
|
25
|
+
## Notices
|
|
26
|
+
|
|
27
|
+
You must ensure that everyone who gets a copy of
|
|
28
|
+
any part of this software from you, with or without
|
|
29
|
+
changes, also gets the text of this license or a link to
|
|
30
|
+
<https://blueoakcouncil.org/license/1.0.0>.
|
|
31
|
+
|
|
32
|
+
## Excuse
|
|
33
|
+
|
|
34
|
+
If anyone notifies you in writing that you have not
|
|
35
|
+
complied with [Notices](#notices), you can keep your
|
|
36
|
+
license by taking all practical steps to comply within 30
|
|
37
|
+
days after the notice. If you do not do so, your license
|
|
38
|
+
ends immediately.
|
|
39
|
+
|
|
40
|
+
## Patent
|
|
41
|
+
|
|
42
|
+
Each contributor licenses you to do everything with this
|
|
43
|
+
software that would otherwise infringe any patent claims
|
|
44
|
+
they can license or become able to license.
|
|
45
|
+
|
|
46
|
+
## Reliability
|
|
47
|
+
|
|
48
|
+
No contributor can revoke this license.
|
|
49
|
+
|
|
50
|
+
## No Liability
|
|
51
|
+
|
|
52
|
+
***As far as the law allows, this software comes as is,
|
|
53
|
+
without any warranty or condition, and no contributor
|
|
54
|
+
will be liable to anyone for any damages related to this
|
|
55
|
+
software or this license, under any kind of legal claim.***
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# isexe
|
|
2
|
+
|
|
3
|
+
Minimal module to check if a file is executable, and a normal file.
|
|
4
|
+
|
|
5
|
+
Uses `fs.stat` and tests against the `PATHEXT` environment variable on
|
|
6
|
+
Windows.
|
|
7
|
+
|
|
8
|
+
## USAGE
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
// default export is a minified version that doesn't need to
|
|
12
|
+
// load more than one file. Load the 'isexe/raw' export if
|
|
13
|
+
// you want the non-minified version for some reason.
|
|
14
|
+
import { isexe, sync } from 'isexe'
|
|
15
|
+
// or require() works too
|
|
16
|
+
// const { isexe } = require('isexe')
|
|
17
|
+
isexe('some-file-name').then(
|
|
18
|
+
isExe => {
|
|
19
|
+
if (isExe) {
|
|
20
|
+
console.error('this thing can be run')
|
|
21
|
+
} else {
|
|
22
|
+
console.error('cannot be run')
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
err => {
|
|
26
|
+
console.error('probably file doesnt exist or something')
|
|
27
|
+
},
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
// same thing but synchronous, throws errors
|
|
31
|
+
isExe = sync('some-file-name')
|
|
32
|
+
|
|
33
|
+
// treat errors as just "not executable"
|
|
34
|
+
const isExe = await isexe('maybe-missing-file', { ignoreErrors: true })
|
|
35
|
+
const isExe = sync('maybe-missing-file', { ignoreErrors: true })
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## API
|
|
39
|
+
|
|
40
|
+
### `isexe(path, [options]) => Promise<boolean>`
|
|
41
|
+
|
|
42
|
+
Check if the path is executable.
|
|
43
|
+
|
|
44
|
+
Will raise whatever errors may be raised by `fs.stat`, unless
|
|
45
|
+
`options.ignoreErrors` is set to true.
|
|
46
|
+
|
|
47
|
+
### `sync(path, [options]) => boolean`
|
|
48
|
+
|
|
49
|
+
Same as `isexe` but returns the value and throws any errors raised.
|
|
50
|
+
|
|
51
|
+
## Platform Specific Implementations
|
|
52
|
+
|
|
53
|
+
If for some reason you want to use the implementation for a
|
|
54
|
+
specific platform, you can do that.
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import { win32, posix } from 'isexe'
|
|
58
|
+
win32.isexe(...)
|
|
59
|
+
win32.sync(...)
|
|
60
|
+
// etc
|
|
61
|
+
|
|
62
|
+
// or:
|
|
63
|
+
import { isexe, sync } from 'isexe/posix'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The default exported implementation will be chosen based on
|
|
67
|
+
`process.platform`.
|
|
68
|
+
|
|
69
|
+
### Options
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type IsexeOptions from 'isexe'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- `ignoreErrors` Treat all errors as "no, this is not
|
|
76
|
+
executable", but don't raise them.
|
|
77
|
+
- `uid` Number to use as the user id on posix
|
|
78
|
+
- `gid` Number to use as the group id on posix
|
|
79
|
+
- `pathExt` List of path extensions to use instead of `PATHEXT`
|
|
80
|
+
environment variable on Windows.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as posix from './posix.js';
|
|
2
|
+
import * as win32 from './win32.js';
|
|
3
|
+
export * from './options.js';
|
|
4
|
+
export { win32, posix };
|
|
5
|
+
/**
|
|
6
|
+
* Determine whether a path is executable on the current platform.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isexe: (path: string, options?: import("./options.js").IsexeOptions) => Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Synchronously determine whether a path is executable on the
|
|
11
|
+
* current platform.
|
|
12
|
+
*/
|
|
13
|
+
export declare const sync: (path: string, options?: import("./options.js").IsexeOptions) => boolean;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,KAAK,mFAAa,CAAA;AAC/B;;;GAGG;AACH,eAAO,MAAM,IAAI,0EAAY,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.sync = exports.isexe = exports.posix = exports.win32 = void 0;
|
|
40
|
+
const posix = __importStar(require("./posix.js"));
|
|
41
|
+
exports.posix = posix;
|
|
42
|
+
const win32 = __importStar(require("./win32.js"));
|
|
43
|
+
exports.win32 = win32;
|
|
44
|
+
__exportStar(require("./options.js"), exports);
|
|
45
|
+
const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
|
|
46
|
+
const impl = platform === 'win32' ? win32 : posix;
|
|
47
|
+
/**
|
|
48
|
+
* Determine whether a path is executable on the current platform.
|
|
49
|
+
*/
|
|
50
|
+
exports.isexe = impl.isexe;
|
|
51
|
+
/**
|
|
52
|
+
* Synchronously determine whether a path is executable on the
|
|
53
|
+
* current platform.
|
|
54
|
+
*/
|
|
55
|
+
exports.sync = impl.sync;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AAGnB,sBAAK;AAFrB,kDAAmC;AAE1B,sBAAK;AADd,+CAA4B;AAG5B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,QAAQ,CAAA;AACtE,MAAM,IAAI,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AAEjD;;GAEG;AACU,QAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/B;;;GAGG;AACU,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA","sourcesContent":["import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.sync=i.isexe=void 0;var M=require("node:fs"),x=require("node:fs/promises"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt("100",8),l=parseInt("010",8),j=parseInt("001",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.sync=o.isexe=void 0;var T=require("node:fs"),I=require("node:fs/promises"),D=require("node:path"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||""}=e,s=r.split(D.delimiter);if(s.indexOf("")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&v(r,e,s[n]);return G(r,e),r}})(),X=exports&&exports.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&v(e,t,r)};Object.defineProperty(exports,"__esModule",{value:!0});exports.sync=exports.isexe=exports.posix=exports.win32=void 0;var E=w(_());exports.posix=E;var O=w(g());exports.win32=O;X(p(),exports);var H=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=H==="win32"?O:E;exports.isexe=b.isexe;exports.sync=b.sync;
|
|
2
|
+
//# sourceMappingURL=index.min.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/posix.ts", "../../src/win32.ts", "options.js", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\n\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkStat = (stat: Stats, options: IsexeOptions) =>\n stat.isFile() && checkMode(stat, options)\n\nconst checkMode = (stat: Stats, options: IsexeOptions) => {\n const myUid = options.uid ?? process.getuid?.()\n const myGroups = options.groups ?? process.getgroups?.() ?? []\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid')\n }\n\n const groups = new Set([myGid, ...myGroups])\n\n const mod = stat.mode\n const uid = stat.uid\n const gid = stat.gid\n\n const u = parseInt('100', 8)\n const g = parseInt('010', 8)\n const o = parseInt('001', 8)\n const ug = u | g\n\n return !!(\n mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0)\n )\n}\n", "/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\nimport { delimiter } from 'node:path'\n\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkPathExt = (path: string, options: IsexeOptions) => {\n const { pathExt = process.env.PATHEXT || '' } = options\n const peSplit = pathExt.split(delimiter)\n if (peSplit.indexOf('') !== -1) {\n return true\n }\n\n for (const pes of peSplit) {\n const p = pes.toLowerCase()\n const ext = path.substring(path.length - p.length).toLowerCase()\n\n if (p && ext === p) {\n return true\n }\n }\n return false\n}\n\nconst checkStat = (stat: Stats, path: string, options: IsexeOptions) =>\n stat.isFile() && checkPathExt(path, options)\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map", "import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n"],
|
|
5
|
+
"mappings": "2KAOA,IAAAA,EAAA,QAAA,SAAA,EACAC,EAAA,QAAA,kBAAA,EAOaC,EAAQ,MACnBC,EACAC,EAAwB,CAAA,IACJ,CACpB,GAAM,CAAE,aAAAC,EAAe,EAAK,EAAKD,EACjC,GAAI,CACF,OAAOE,EAAU,QAAML,EAAA,MAAKE,CAAI,EAAGC,CAAO,CAC5C,OAASG,EAAG,CACV,IAAMC,EAAKD,EACX,GAAIF,GAAgBG,EAAG,OAAS,SAAU,MAAO,GACjD,MAAMA,CACR,CACF,EAZaC,EAAA,MAAKP,EAkBX,IAAMQ,EAAO,CAClBP,EACAC,EAAwB,CAAA,IACb,CACX,GAAM,CAAE,aAAAC,EAAe,EAAK,EAAKD,EACjC,GAAI,CACF,OAAOE,KAAUN,EAAA,UAASG,CAAI,EAAGC,CAAO,CAC1C,OAASG,EAAG,CACV,IAAMC,EAAKD,EACX,GAAIF,GAAgBG,EAAG,OAAS,SAAU,MAAO,GACjD,MAAMA,CACR,CACF,EAZaC,EAAA,KAAIC,EAcjB,IAAMJ,EAAY,CAACK,EAAaP,IAC9BO,EAAK,OAAM,GAAMC,EAAUD,EAAMP,CAAO,EAEpCQ,EAAY,CAACD,EAAaP,IAAyB,CACvD,IAAMS,EAAQT,EAAQ,KAAO,QAAQ,SAAQ,EACvCU,EAAWV,EAAQ,QAAU,QAAQ,YAAW,GAAM,CAAA,EACtDW,EAAQX,EAAQ,KAAO,QAAQ,SAAQ,GAAMU,EAAS,CAAC,EAC7D,GAAID,IAAU,QAAaE,IAAU,OACnC,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Y,EAAQ,QAAQ,EAAE,IAAM,GAC1B,MAAO,GAGT,QAAWC,KAAOD,EAAS,CACzB,IAAME,EAAID,EAAI,YAAW,EACnBE,EAAMb,EAAK,UAAUA,EAAK,OAASY,EAAE,MAAM,EAAE,YAAW,EAE9D,GAAIA,GAAKC,IAAQD,EACf,MAAO,EAEX,CACA,MAAO,EACT,EAEMT,EAAY,CAACW,EAAad,EAAcC,IAC5Ca,EAAK,OAAM,GAAMN,EAAaR,EAAMC,CAAO,ICnE7C,IAAAc,EAAAC,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,ykCCD5D,IAAAC,EAAAC,EAAA,GAAA,EAGgB,QAAA,MAAAD,EAFhB,IAAAE,EAAAD,EAAA,GAAA,EAES,QAAA,MAAAC,EADTC,EAAA,IAAA,OAAA,EAGA,IAAMC,EAAW,QAAQ,IAAI,uBAAyB,QAAQ,SACxDC,EAAOD,IAAa,QAAUF,EAAQF,EAK/B,QAAA,MAAQK,EAAK,MAKb,QAAA,KAAOA,EAAK",
|
|
6
|
+
"names": ["node_fs_1", "promises_1", "isexe", "path", "options", "ignoreErrors", "checkStat", "e", "er", "exports", "sync", "stat", "checkMode", "myUid", "myGroups", "myGid", "groups", "mod", "uid", "gid", "u", "g", "o", "ug", "node_fs_1", "promises_1", "node_path_1", "isexe", "path", "options", "ignoreErrors", "checkStat", "e", "er", "exports", "sync", "checkPathExt", "pathExt", "peSplit", "pes", "p", "ext", "stat", "require_options", "__commonJSMin", "exports", "posix", "__importStar", "win32", "__exportStar", "platform", "impl"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface IsexeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Ignore errors arising from attempting to get file access status
|
|
4
|
+
* Note that EACCES is always ignored, because that just means
|
|
5
|
+
* it's not executable. If this is not set, then attempting to check
|
|
6
|
+
* the executable-ness of a nonexistent file will raise ENOENT, for
|
|
7
|
+
* example.
|
|
8
|
+
*/
|
|
9
|
+
ignoreErrors?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* effective uid when checking executable mode flags on posix
|
|
12
|
+
* Defaults to process.getuid()
|
|
13
|
+
*/
|
|
14
|
+
uid?: number;
|
|
15
|
+
/**
|
|
16
|
+
* effective gid when checking executable mode flags on posix
|
|
17
|
+
* Defaults to process.getgid()
|
|
18
|
+
*/
|
|
19
|
+
gid?: number;
|
|
20
|
+
/**
|
|
21
|
+
* effective group ID list to use when checking executable mode flags
|
|
22
|
+
* on posix
|
|
23
|
+
* Defaults to process.getgroups()
|
|
24
|
+
*/
|
|
25
|
+
groups?: number[];
|
|
26
|
+
/**
|
|
27
|
+
* The ;-delimited path extension list for win32 implementation.
|
|
28
|
+
* Defaults to process.env.PATHEXT
|
|
29
|
+
*/
|
|
30
|
+
pathExt?: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"","sourcesContent":["export interface IsexeOptions {\n /**\n * Ignore errors arising from attempting to get file access status\n * Note that EACCES is always ignored, because that just means\n * it's not executable. If this is not set, then attempting to check\n * the executable-ness of a nonexistent file will raise ENOENT, for\n * example.\n */\n ignoreErrors?: boolean\n\n /**\n * effective uid when checking executable mode flags on posix\n * Defaults to process.getuid()\n */\n uid?: number\n\n /**\n * effective gid when checking executable mode flags on posix\n * Defaults to process.getgid()\n */\n gid?: number\n\n /**\n * effective group ID list to use when checking executable mode flags\n * on posix\n * Defaults to process.getgroups()\n */\n groups?: number[]\n\n /**\n * The ;-delimited path extension list for win32 implementation.\n * Defaults to process.env.PATHEXT\n */\n pathExt?: string\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the Posix implementation of isexe, which uses the file
|
|
3
|
+
* mode and uid/gid values.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { IsexeOptions } from './options.js';
|
|
8
|
+
/**
|
|
9
|
+
* Determine whether a path is executable according to the mode and
|
|
10
|
+
* current (or specified) user and group IDs.
|
|
11
|
+
*/
|
|
12
|
+
export declare const isexe: (path: string, options?: IsexeOptions) => Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Synchronously determine whether a path is executable according to
|
|
15
|
+
* the mode and current (or specified) user and group IDs.
|
|
16
|
+
*/
|
|
17
|
+
export declare const sync: (path: string, options?: IsexeOptions) => boolean;
|
|
18
|
+
//# sourceMappingURL=posix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posix.d.ts","sourceRoot":"","sources":["../../src/posix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,KAAK,GAChB,MAAM,MAAM,EACZ,UAAS,YAAiB,KACzB,OAAO,CAAC,OAAO,CASjB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,GACf,MAAM,MAAM,EACZ,UAAS,YAAiB,KACzB,OASF,CAAA"}
|