{"_id":"@akashic/resurveil","_rev":"2-621250b9f72ad457e6b9ff9a6156c122","name":"@akashic/resurveil","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@akashic/resurveil","version":"1.0.0","keywords":[],"author":{"name":"DWANGO Co., Ltd."},"license":"MIT","_id":"@akashic/resurveil@1.0.0","maintainers":[{"name":"akashic-owner","email":"akashic@dwango.co.jp"},{"name":"yu-ogi","email":"yusuke_ogiwara@dwango.co.jp"},{"name":"kmkr01","email":"charonda.sasakia@gmail.com"},{"name":"akashic-extension-owner","email":"akashic@dwango.co.jp"},{"name":"shinobu_takahashi","email":"shinobu_takahashi@c.dwango.co.jp"}],"bin":{"resurveil":"lib/cli.js"},"dist":{"shasum":"093d4bb1064232afab1014d31662067e7ffef166","tarball":"https://registry.npmjs.org/@akashic/resurveil/-/resurveil-1.0.0.tgz","fileCount":19,"integrity":"sha512-5zAVjSC3G5LVHz6aHxIio/Tvx7vLShFPfiLmjaYrgF7LeUzGI9kr2N57EL/mwplHKWOLJGxRJ/BQlOMnwmoUmw==","signatures":[{"sig":"MEUCIQD9ubNnAp71VTh1q2srzZPhG38j4g3ISWh98YBKK2sbyAIgMoyNIpEHnGFmfQVIP9vvDKna8EKOQYcoTgZhcZBFyfI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18065},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","gitHead":"5f8da9c200f0c170ebdfe5acc9e7a3909af9d19e","scripts":{"test":"run-s test:**","build":"tsc","watch":"tsc -w","format":"run-s format:**","prepare":"npm run build","test:jest":"node --experimental-vm-modules node_modules/jest/bin/jest.js","test:lint":"eslint -c .eslintrc.cjs src/**/*.ts","test:format":"prettier -c . || exit 0","format:eslint":"eslint -c .eslintrc.cjs src/**/*.ts --fix","format:prettier":"prettier -w ."},"_npmUser":{"name":"akashic-owner","email":"akashic@dwango.co.jp"},"_npmVersion":"10.2.4","description":"A tool to surveil and detect content in the target files","directories":{},"_nodeVersion":"20.11.0","dependencies":{"chalk":"^5.3.0","commander":"^12.0.0","micromatch":"^4.0.5"},"publishConfig":{"access":"public","@akashic:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","mock-fs":"^5.2.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.16","npm-run-all":"^4.1.5","@types/mock-fs":"^4.13.4","@types/micromatch":"^4.0.6","eslint-plugin-jest":"^27.6.3","eslint-plugin-import":"^2.29.1","@akashic/eslint-config":"^2.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/resurveil_1.0.0_1708313981809_0.9842407553256527","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-02-19T03:39:41.713Z","modified":"2025-10-08T10:36:12.505Z","1.0.0":"2024-02-19T03:39:41.972Z"},"author":{"name":"DWANGO Co., Ltd."},"license":"MIT","keywords":[],"description":"A tool to surveil and detect content in the target files","maintainers":[{"email":"akashic@dwango.co.jp","name":"akashic-owner"},{"email":"akashic@dwango.co.jp","name":"akashic-extension-owner"}],"readme":"<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/akashic-games/resurveil/main/img/akashic.png\"/>\n</p>\n\n# resurveil\n\n**resurveil** は、対象ファイルの内容を監査してルールと一致する文言を検出するツールです。\n\n## Usage\n\n```sh\nresurveil [options] file1.txt file2.html file3.md ....\n```\n\n後述する検閲ルールと一致する内容が指定ファイル内に含まれていた場合、1 以上の exit code を返します。\n\n### Arguments\n\n検閲するファイル。\n\n### Option\n\n| オプション           | 短縮名 | 概要                                                   |\n| -------------------- | ------ | ------------------------------------------------------ |\n| `--config <string>`  | `-c`   | 設定ファイルのパス                                     |\n| `--ignore-no-config` |        | 設定ファイルが見つからない場合にエラーとすべきかどうか |\n\n## Configuration\n\n### Specification\n\n| キー名                    | 形式               | 概要                                                                                                                        |\n| ------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------- |\n| `rules`                   | `Object`           | ファイル種別ごとの検閲ルール。                                                                                              |\n| `rules.\"pattern\"`         | `String`           | [micromatch][micromatch] を使ったパターン。このパターンと一致したファイル名を検閲の対象とする。                             |\n| `rules.\"pattern\".deny`    | `Array`            | 検閲のルール。                                                                                                              |\n| `rules.\"pattern\".deny[]`  | `String \\| RegExp` | 検閲する文字列・正規表現。このルールが指定のファイル名の内容に含まれていた場合はリジェクトする。                            |\n| `rules.\"pattern\".allow`   | `Array`            | 検閲から除外するルール。                                                                                                    |\n| `rules.\"pattern\".allow[]` | `String \\| RegExp` | 検閲から除外する文字列・正規表現。`\"pattern\".deny` に該当した場合、このルールに一致した場合は例外的にリジェクトを取り消す。 |\n\n### Example\n\n```javascript\nexport default {\n  rules: {\n    \"*.html\": {\n      deny: [\"your.company.com\"],\n      allow: [/(?:www|public)\\.your\\.company\\.com/],\n    },\n  },\n};\n```\n\n### Configuration Path\n\n`--config` オプションを省略した場合、以下の優先度で設定ファイルを検索します。\n設定ファイルが見つからなかった場合は 1 以上の exit code を返します。\n(ただし `--ignore-no-config` を指定した場合は 0 の exit code を返します)\n\n1. `<pwd>/resurveilrc.<ext>`\n1. `<pwd>/resurveil-config.<ext>`\n1. `$HOME/resurveilrc.<ext>`\n1. `$HOME/resurveil-config.<ext>`\n\n`<ext>` は以下の順番で優先されます。\n\n1. `js`\n1. `cjs`\n1. `mjs`\n\n## Developers\n\n### Install\n\nNode.js が必要です。次のコマンドでインストールできます。\n\n```sh\nnpm i\n```\n\n### Build\n\n```sh\nnpm run build\n```\n\n### License\n\n本リポジトリは MIT License の元で公開されています。\n詳しくは [LICENSE](https://github.com/akashic-games/resurveil/blob/main/LICENSE) をご覧ください。\n\nただし、画像ファイルおよび音声ファイルは\n[CC BY 2.1 JP](https://creativecommons.org/licenses/by/2.1/jp/) の元で公開されています。\n\n[micromatch]: https://github.com/micromatch/micromatch\n","readmeFilename":"README.md"}