chore: uniform ASF license headers across sources and build outputs
Closes the license-header gap that remained after #10, end to end:
- @casbin/expression-eval: rollup output.banner puts the header on
all four format outputs (ES5 CJS/ESM, ES2017 ESM, ES5 UMD) -
bundlers regenerate code, so unlike tsc outputs the source headers
never reach the artifacts.
- nest-authz: removeComments was true, stripping license headers and
all JSDoc from the published declarations; flipped to false so the
compiled output inherits the source headers.
- every tsc package: tsc never carries a file-level leading comment
into .d.ts output, so ~40 declaration files shipped without license
information. A workspace-level post-build step
(scripts/add-dts-headers.js, idempotent, zero dependencies) now
prepends the header to any headerless *.d.ts under
packages/*/*/{lib,dist,build}; the canonical root build command is
build:all (build + header pass).
- all headers are now the standard ASF form without a copyright line
("Licensed to the Apache Software Foundation (ASF) under one or
more contributor license agreements..."), as used by the large
Apache projects; the pre-donation copyright owners ("The Casbin
Authors", "elastic.io team") are gone from file headers and the
copyright statement lives in the NOTICE files, which also document
the donation history. The third-party JSEP provenance JSDoc in
expression-eval is preserved. The husky hooks, whose headers had
been glued onto a line without a trailing newline since #10, are
repaired.
- the license gate (.licenserc.yaml) drops its legacy pattern and
enforces the single uniform header.
license-eye: 244 valid / 0 invalid. Full rebuild verified; smoke
tests pass.
Monorepo for the Apache Casbin Node.js extensions: storage adapters, watchers, framework middlewares, and utilities. Each package keeps its own npm package name and semantic version.
packages/ ├── adapters/ # storage adapters (file, redis, sequelize, typeorm, ...) ├── watchers/ # multi-instance policy synchronization ├── middlewares/ # framework integrations (express, koa, egg, nest, hapi) ├── role-managers/ # role managers (session-based) └── utils/ # shared utilities examples/ # runnable examples (not published to npm)
Requires pnpm.
pnpm install pnpm -r build pnpm -r test
Packages were imported from their original repositories with full git history preserved (authors, dates, tags) via git filter-repo --to-subdirectory-filter, with tags renamed to <package>-<version>.