@nocobase/audit 0.0.0-stage → 0.1.0-beta.0

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.
Files changed (91) hide show
  1. package/LICENSE.txt +127 -0
  2. package/README.md +33 -2
  3. package/dist/config.d.ts +25 -0
  4. package/dist/config.d.ts.map +1 -0
  5. package/dist/config.js +59 -0
  6. package/dist/config.js.map +1 -0
  7. package/dist/file-transport.d.ts +3 -0
  8. package/dist/file-transport.d.ts.map +1 -0
  9. package/dist/file-transport.js +121 -0
  10. package/dist/file-transport.js.map +1 -0
  11. package/dist/index.d.ts +49 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +4 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/ip.d.ts +4 -0
  16. package/dist/ip.d.ts.map +1 -0
  17. package/dist/ip.js +36 -0
  18. package/dist/ip.js.map +1 -0
  19. package/dist/locales/de-DE.d.ts +4 -0
  20. package/dist/locales/de-DE.d.ts.map +1 -0
  21. package/dist/locales/de-DE.js +11 -0
  22. package/dist/locales/de-DE.js.map +1 -0
  23. package/dist/locales/en-US.d.ts +13 -0
  24. package/dist/locales/en-US.d.ts.map +1 -0
  25. package/dist/locales/en-US.js +11 -0
  26. package/dist/locales/en-US.js.map +1 -0
  27. package/dist/locales/es-ES.d.ts +4 -0
  28. package/dist/locales/es-ES.d.ts.map +1 -0
  29. package/dist/locales/es-ES.js +11 -0
  30. package/dist/locales/es-ES.js.map +1 -0
  31. package/dist/locales/fr-FR.d.ts +4 -0
  32. package/dist/locales/fr-FR.d.ts.map +1 -0
  33. package/dist/locales/fr-FR.js +11 -0
  34. package/dist/locales/fr-FR.js.map +1 -0
  35. package/dist/locales/id-ID.d.ts +4 -0
  36. package/dist/locales/id-ID.d.ts.map +1 -0
  37. package/dist/locales/id-ID.js +11 -0
  38. package/dist/locales/id-ID.js.map +1 -0
  39. package/dist/locales/index.d.ts +4 -0
  40. package/dist/locales/index.d.ts.map +1 -0
  41. package/dist/locales/index.js +16 -0
  42. package/dist/locales/index.js.map +1 -0
  43. package/dist/locales/ja-JP.d.ts +4 -0
  44. package/dist/locales/ja-JP.d.ts.map +1 -0
  45. package/dist/locales/ja-JP.js +11 -0
  46. package/dist/locales/ja-JP.js.map +1 -0
  47. package/dist/locales/ko-KR.d.ts +4 -0
  48. package/dist/locales/ko-KR.d.ts.map +1 -0
  49. package/dist/locales/ko-KR.js +11 -0
  50. package/dist/locales/ko-KR.js.map +1 -0
  51. package/dist/locales/pt-BR.d.ts +4 -0
  52. package/dist/locales/pt-BR.d.ts.map +1 -0
  53. package/dist/locales/pt-BR.js +11 -0
  54. package/dist/locales/pt-BR.js.map +1 -0
  55. package/dist/locales/ru-RU.d.ts +4 -0
  56. package/dist/locales/ru-RU.d.ts.map +1 -0
  57. package/dist/locales/ru-RU.js +11 -0
  58. package/dist/locales/ru-RU.js.map +1 -0
  59. package/dist/locales/vi-VN.d.ts +4 -0
  60. package/dist/locales/vi-VN.d.ts.map +1 -0
  61. package/dist/locales/vi-VN.js +11 -0
  62. package/dist/locales/vi-VN.js.map +1 -0
  63. package/dist/locales/zh-CN.d.ts +4 -0
  64. package/dist/locales/zh-CN.d.ts.map +1 -0
  65. package/dist/locales/zh-CN.js +11 -0
  66. package/dist/locales/zh-CN.js.map +1 -0
  67. package/dist/locales/zh-TW.d.ts +4 -0
  68. package/dist/locales/zh-TW.d.ts.map +1 -0
  69. package/dist/locales/zh-TW.js +11 -0
  70. package/dist/locales/zh-TW.js.map +1 -0
  71. package/dist/redact.d.ts +12 -0
  72. package/dist/redact.d.ts.map +1 -0
  73. package/dist/redact.js +141 -0
  74. package/dist/redact.js.map +1 -0
  75. package/dist/repository.d.ts +4 -0
  76. package/dist/repository.d.ts.map +1 -0
  77. package/dist/repository.js +23 -0
  78. package/dist/repository.js.map +1 -0
  79. package/dist/request.d.ts +75 -0
  80. package/dist/request.d.ts.map +1 -0
  81. package/dist/request.js +291 -0
  82. package/dist/request.js.map +1 -0
  83. package/dist/runtime.d.ts +13 -0
  84. package/dist/runtime.d.ts.map +1 -0
  85. package/dist/runtime.js +79 -0
  86. package/dist/runtime.js.map +1 -0
  87. package/dist/service.d.ts +48 -0
  88. package/dist/service.d.ts.map +1 -0
  89. package/dist/service.js +136 -0
  90. package/dist/service.js.map +1 -0
  91. package/package.json +60 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-FR.d.ts","sourceRoot":"","sources":["../../src/locales/fr-FR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const frFR = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'Créer un enregistrement',
5
+ updateOne: 'Mettre à jour un enregistrement',
6
+ deleteOne: 'Supprimer un enregistrement',
7
+ },
8
+ },
9
+ };
10
+ export default frFR;
11
+ //# sourceMappingURL=fr-FR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-FR.js","sourceRoot":"","sources":["../../src/locales/fr-FR.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,yBAAyB;YACpC,SAAS,EAAE,iCAAiC;YAC5C,SAAS,EAAE,6BAA6B;SACzC;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const idID: AuditLocaleResource;
3
+ export default idID;
4
+ //# sourceMappingURL=id-ID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-ID.d.ts","sourceRoot":"","sources":["../../src/locales/id-ID.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const idID = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'Buat rekaman',
5
+ updateOne: 'Perbarui rekaman',
6
+ deleteOne: 'Hapus rekaman',
7
+ },
8
+ },
9
+ };
10
+ export default idID;
11
+ //# sourceMappingURL=id-ID.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-ID.js","sourceRoot":"","sources":["../../src/locales/id-ID.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,cAAc;YACzB,SAAS,EAAE,kBAAkB;YAC7B,SAAS,EAAE,eAAe;SAC3B;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { LocaleLoaders } from '@nocobase/i18n';
2
+ declare const locales: LocaleLoaders;
3
+ export default locales;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,QAAA,MAAM,OAAO,EAAE,aAad,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,16 @@
1
+ const locales = {
2
+ 'en-US': () => import('./en-US.js'),
3
+ 'zh-CN': () => import('./zh-CN.js'),
4
+ 'zh-TW': () => import('./zh-TW.js'),
5
+ 'ja-JP': () => import('./ja-JP.js'),
6
+ 'es-ES': () => import('./es-ES.js'),
7
+ 'pt-BR': () => import('./pt-BR.js'),
8
+ 'fr-FR': () => import('./fr-FR.js'),
9
+ 'de-DE': () => import('./de-DE.js'),
10
+ 'vi-VN': () => import('./vi-VN.js'),
11
+ 'id-ID': () => import('./id-ID.js'),
12
+ 'ru-RU': () => import('./ru-RU.js'),
13
+ 'ko-KR': () => import('./ko-KR.js'),
14
+ };
15
+ export default locales;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAkB;IAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;CACpC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const jaJP: AuditLocaleResource;
3
+ export default jaJP;
4
+ //# sourceMappingURL=ja-JP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ja-JP.d.ts","sourceRoot":"","sources":["../../src/locales/ja-JP.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const jaJP = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'レコードを作成',
5
+ updateOne: 'レコードを更新',
6
+ deleteOne: 'レコードを削除',
7
+ },
8
+ },
9
+ };
10
+ export default jaJP;
11
+ //# sourceMappingURL=ja-JP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ja-JP.js","sourceRoot":"","sources":["../../src/locales/ja-JP.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;SACrB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const koKR: AuditLocaleResource;
3
+ export default koKR;
4
+ //# sourceMappingURL=ko-KR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko-KR.d.ts","sourceRoot":"","sources":["../../src/locales/ko-KR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const koKR = {
2
+ audit: {
3
+ operations: {
4
+ createOne: '레코드 생성',
5
+ updateOne: '레코드 수정',
6
+ deleteOne: '레코드 삭제',
7
+ },
8
+ },
9
+ };
10
+ export default koKR;
11
+ //# sourceMappingURL=ko-KR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko-KR.js","sourceRoot":"","sources":["../../src/locales/ko-KR.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const ptBR: AuditLocaleResource;
3
+ export default ptBR;
4
+ //# sourceMappingURL=pt-BR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const ptBR = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'Criar um registro',
5
+ updateOne: 'Atualizar um registro',
6
+ deleteOne: 'Excluir um registro',
7
+ },
8
+ },
9
+ };
10
+ export default ptBR;
11
+ //# sourceMappingURL=pt-BR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pt-BR.js","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,mBAAmB;YAC9B,SAAS,EAAE,uBAAuB;YAClC,SAAS,EAAE,qBAAqB;SACjC;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const ruRU: AuditLocaleResource;
3
+ export default ruRU;
4
+ //# sourceMappingURL=ru-RU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-RU.d.ts","sourceRoot":"","sources":["../../src/locales/ru-RU.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const ruRU = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'Создать запись',
5
+ updateOne: 'Обновить запись',
6
+ deleteOne: 'Удалить запись',
7
+ },
8
+ },
9
+ };
10
+ export default ruRU;
11
+ //# sourceMappingURL=ru-RU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-RU.js","sourceRoot":"","sources":["../../src/locales/ru-RU.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,iBAAiB;YAC5B,SAAS,EAAE,gBAAgB;SAC5B;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const viVN: AuditLocaleResource;
3
+ export default viVN;
4
+ //# sourceMappingURL=vi-VN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-VN.d.ts","sourceRoot":"","sources":["../../src/locales/vi-VN.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const viVN = {
2
+ audit: {
3
+ operations: {
4
+ createOne: 'Tạo bản ghi',
5
+ updateOne: 'Cập nhật bản ghi',
6
+ deleteOne: 'Xóa bản ghi',
7
+ },
8
+ },
9
+ };
10
+ export default viVN;
11
+ //# sourceMappingURL=vi-VN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-VN.js","sourceRoot":"","sources":["../../src/locales/vi-VN.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,kBAAkB;YAC7B,SAAS,EAAE,aAAa;SACzB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const zhCN: AuditLocaleResource;
3
+ export default zhCN;
4
+ //# sourceMappingURL=zh-CN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const zhCN = {
2
+ audit: {
3
+ operations: {
4
+ createOne: '创建记录',
5
+ updateOne: '更新记录',
6
+ deleteOne: '删除记录',
7
+ },
8
+ },
9
+ };
10
+ export default zhCN;
11
+ //# sourceMappingURL=zh-CN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-CN.js","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;SAClB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditLocaleResource } from './en-US.js';
2
+ declare const zhTW: AuditLocaleResource;
3
+ export default zhTW;
4
+ //# sourceMappingURL=zh-TW.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,mBAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,11 @@
1
+ const zhTW = {
2
+ audit: {
3
+ operations: {
4
+ createOne: '建立記錄',
5
+ updateOne: '更新記錄',
6
+ deleteOne: '刪除記錄',
7
+ },
8
+ },
9
+ };
10
+ export default zhTW;
11
+ //# sourceMappingURL=zh-TW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-TW.js","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE;QACL,UAAU,EAAE;YACV,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;SAClB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,12 @@
1
+ export type AuditRedactRule = {
2
+ readonly field: string;
3
+ readonly path?: never;
4
+ } | {
5
+ readonly path: string;
6
+ readonly field?: never;
7
+ };
8
+ /** Capture a bounded JSON copy without consuming or changing the handler's body. */
9
+ export declare function readAuditBody(message: Request | Response): Promise<unknown>;
10
+ /** Replace sensitive values before applying the serialized size limit. */
11
+ export declare function auditSnapshot(value: unknown, rules?: readonly AuditRedactRule[]): unknown;
12
+ //# sourceMappingURL=redact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAUtD,oFAAoF;AACpF,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAC1B,OAAO,CAAC,OAAO,CAAC,CA8ClB;AAaD,0EAA0E;AAC1E,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,KAAK,GAAE,SAAS,eAAe,EAAO,GACrC,OAAO,CA2ET"}
package/dist/redact.js ADDED
@@ -0,0 +1,141 @@
1
+ import { sensitiveParameterName } from '@nocobase/secrets';
2
+ const rawLimit = 256 * 1024;
3
+ const snapshotLimit = 16 * 1024;
4
+ // A JSON stream may never finish. Collection must not hold the HTTP response open indefinitely.
5
+ const snapshotReadTimeout = 1000;
6
+ const masked = '******';
7
+ const arrayIndexSegment = /^(?:0|[1-9]\d*)(?:\.|$)/u;
8
+ const truncated = Object.freeze({ truncated: true });
9
+ /** Capture a bounded JSON copy without consuming or changing the handler's body. */
10
+ export async function readAuditBody(message) {
11
+ if (!message.body ||
12
+ !/^application\/(?:json|[^; ]+\+json)(?:\s*;|$)/iu.test(message.headers.get('content-type') ?? ''))
13
+ return undefined;
14
+ const length = Number(message.headers.get('content-length'));
15
+ if (length > rawLimit)
16
+ return { ...truncated, size: length };
17
+ try {
18
+ const stream = message.clone().body;
19
+ if (!stream)
20
+ return undefined;
21
+ const reader = stream.getReader();
22
+ const chunks = [];
23
+ let size = 0;
24
+ let timedOut = false;
25
+ const cancel = () => {
26
+ void reader.cancel().catch(() => undefined);
27
+ };
28
+ const timer = setTimeout(() => {
29
+ timedOut = true;
30
+ cancel();
31
+ }, snapshotReadTimeout);
32
+ timer.unref();
33
+ try {
34
+ for (;;) {
35
+ const { value, done } = await reader.read();
36
+ if (done)
37
+ break;
38
+ size += value.byteLength;
39
+ if (size > rawLimit)
40
+ return truncated;
41
+ chunks.push(value);
42
+ }
43
+ if (timedOut)
44
+ return truncated;
45
+ const parsed = JSON.parse(Buffer.concat(chunks).toString('utf8'));
46
+ return parsed && typeof parsed === 'object' ? parsed : undefined;
47
+ }
48
+ finally {
49
+ // A tee's cancel promise waits for the other branch. The route still owns that branch.
50
+ clearTimeout(timer);
51
+ cancel();
52
+ }
53
+ }
54
+ catch {
55
+ return undefined;
56
+ }
57
+ }
58
+ function pathsBelow(paths, segment) {
59
+ if (paths.length === 0)
60
+ return paths;
61
+ const prefix = `${segment}.`;
62
+ return paths
63
+ .filter((path) => path.startsWith(prefix))
64
+ .map((path) => path.slice(prefix.length));
65
+ }
66
+ /** Replace sensitive values before applying the serialized size limit. */
67
+ export function auditSnapshot(value, rules = []) {
68
+ if (value === undefined)
69
+ return undefined;
70
+ const fields = new Set(rules.map((rule) => rule.field));
71
+ const paths = rules.flatMap(({ path }) => (path === undefined ? [] : [path]));
72
+ let budget = snapshotLimit;
73
+ const seen = new Set();
74
+ const visit = (node, paths, depth) => {
75
+ if (depth > 32 || budget <= 0)
76
+ return truncated;
77
+ if (node === null || typeof node !== 'object') {
78
+ if (typeof node === 'function' || typeof node === 'symbol')
79
+ return undefined;
80
+ if (typeof node === 'bigint')
81
+ node = String(node);
82
+ if (typeof node === 'string')
83
+ budget -= node.length;
84
+ return node;
85
+ }
86
+ if (seen.has(node))
87
+ return truncated;
88
+ seen.add(node);
89
+ try {
90
+ if (node instanceof Date)
91
+ return node.toJSON();
92
+ if (Array.isArray(node)) {
93
+ const values = [];
94
+ // A named segment crosses an array; a numeric segment selects its position here.
95
+ const unindexed = paths.length
96
+ ? paths.filter((path) => !arrayIndexSegment.test(path))
97
+ : paths;
98
+ for (const [index, item] of node.entries()) {
99
+ budget -= 1;
100
+ if (budget <= 0)
101
+ break;
102
+ const position = String(index);
103
+ const indexed = pathsBelow(paths, position);
104
+ values.push(paths.includes(position)
105
+ ? masked
106
+ : visit(item, indexed.length
107
+ ? [...new Set([...unindexed, ...indexed])]
108
+ : unindexed, depth + 1));
109
+ }
110
+ return values;
111
+ }
112
+ const result = Object.create(null);
113
+ for (const [name, entry] of Object.entries(node)) {
114
+ budget -= name.length + 1;
115
+ if (budget <= 0)
116
+ break;
117
+ result[name] =
118
+ sensitiveParameterName.test(name) ||
119
+ fields.has(name) ||
120
+ paths.includes(name)
121
+ ? masked
122
+ : visit(entry, pathsBelow(paths, name), depth + 1);
123
+ }
124
+ return result;
125
+ }
126
+ finally {
127
+ seen.delete(node);
128
+ }
129
+ };
130
+ try {
131
+ const copy = visit(value, paths, 0);
132
+ const json = JSON.stringify(copy);
133
+ return budget <= 0 || (json && Buffer.byteLength(json) > snapshotLimit)
134
+ ? truncated
135
+ : copy;
136
+ }
137
+ catch {
138
+ return truncated;
139
+ }
140
+ }
141
+ //# sourceMappingURL=redact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAM3D,MAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;AAC5B,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC;AAChC,gGAAgG;AAChG,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,MAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAErD,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAA2B;IAE3B,IACE,CAAC,OAAO,CAAC,IAAI;QACb,CAAC,iDAAiD,CAAC,IAAI,CACrD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAC1C;QAED,OAAO,SAAS,CAAC;IACnB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC7D,IAAI,MAAM,GAAG,QAAQ;QAAE,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7D,IAAI,CAAC;QACH,MAAM,MAAM,GAAsC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC;QACvE,I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C,SAAS;YACX,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditRouteOptions } from './request.js';
2
+ /** Declare audit on a generated Repository endpoint. Repository queries also use POST, so explicitly exclude them. */
3
+ export declare function repositoryAuditOptions(exposure: string, collection: string, action: string): AuditRouteOptions | false;
4
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../src/repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,sHAAsH;AACtH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,iBAAiB,GAAG,KAAK,CAqB3B"}
@@ -0,0 +1,23 @@
1
+ import labels from './locales/en-US.js';
2
+ /** Declare audit on a generated Repository endpoint. Repository queries also use POST, so explicitly exclude them. */
3
+ export function repositoryAuditOptions(exposure, collection, action) {
4
+ if (action !== 'createOne' &&
5
+ action !== 'updateOne' &&
6
+ action !== 'deleteOne')
7
+ return false;
8
+ return {
9
+ action: `${exposure}:${action}`,
10
+ resource: exposure,
11
+ operationName: {
12
+ ns: '@nocobase/audit',
13
+ key: `audit.operations.${action}`,
14
+ defaultValue: labels.audit.operations[action],
15
+ },
16
+ target: () => ({ collection }),
17
+ resolveTargets: ({ value }) => ({ collection, key: value }),
18
+ // Collection values and filter operands can contain application secrets under arbitrary names.
19
+ captureBody: false,
20
+ resultFrom: 'context',
21
+ };
22
+ }
23
+ //# sourceMappingURL=repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.js","sourceRoot":"","sources":["../src/repository.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAGxC,sHAAsH;AACtH,MAAM,UAAU,sBAAsB,CACpC,QAAgB,EAChB,UAAkB,EAClB,MAAc;IAEd,IACE,MAAM,KAAK,WAAW;QACtB,MAAM,KAAK,WAAW;QACtB,MAAM,KAAK,WAAW;QAEtB,OAAO,KAAK,CAAC;IACf,OAAO;QACL,MAAM,EAAE,GAAG,QAAQ,IAAI,MAAM,EAAE;QAC/B,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE;YACb,EAAE,EAAE,iBAAiB;YACrB,GAAG,EAAE,oBAAoB,MAAM,EAAE;YACjC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;SAC9C;QACD,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QAC9B,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;QAC3D,+FAA+F;QAC/F,WAAW,EAAE,KAAK;QAClB,UAAU,EAAE,SAAS;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { BlockList } from 'node:net';
2
+ import type { Context, MiddlewareHandler } from 'hono';
3
+ import { type AuditRedactRule } from './redact.js';
4
+ import type { AuditTarget, AuditTranslation } from './index.js';
5
+ import type { AuditCoordinator } from './service.js';
6
+ export interface AuditTargets {
7
+ readonly source?: AuditTarget;
8
+ readonly targets: readonly AuditTarget[];
9
+ }
10
+ export interface AuditExecutionResult {
11
+ readonly status: number;
12
+ /** Bounded JSON copies used only by the resolver and the snapshot policy. */
13
+ readonly request: unknown;
14
+ readonly response: unknown;
15
+ /** An in-process result from a framework route, if provided. */
16
+ readonly value: unknown;
17
+ }
18
+ export interface AuditRouteOptions {
19
+ readonly action?: string;
20
+ readonly resource?: string;
21
+ readonly operationName?: string | (AuditTranslation & {
22
+ readonly defaultValue?: string;
23
+ });
24
+ /** Runs before guards. Only use route information available before processing. */
25
+ readonly target?: (context: Context) => AuditTarget | AuditTargets | undefined;
26
+ /** Runs after the handler succeeds. Only return identifiers safe for the log. */
27
+ readonly resolveTargets?: (result: AuditExecutionResult, context: Context) => AuditTarget | AuditTargets | undefined;
28
+ /** Select the data the target resolver needs when body snapshots are disabled. Defaults to the response. */
29
+ readonly resultFrom?: 'request' | 'response' | 'context';
30
+ readonly redact?: readonly AuditRedactRule[];
31
+ /** Set to false to omit both snapshots. A target resolver can still read bounded JSON. */
32
+ readonly captureBody?: boolean;
33
+ /** Classify credential validation errors as failures and omit identity and snapshots on failure. */
34
+ readonly authenticationAttempt?: boolean;
35
+ }
36
+ type Declaration = AuditRouteOptions | false;
37
+ type Resolver = (context: Context) => Declaration | undefined;
38
+ /** Router capabilities supplied by the host at composition time. */
39
+ export interface AuditRequestHost {
40
+ declaredRouteOf(context: Context): {
41
+ readonly hide?: boolean | ((input: {
42
+ c?: Context;
43
+ method: string;
44
+ path: string;
45
+ }) => boolean);
46
+ readonly operationId?: string | ((route: Context['req']['matchedRoutes'][number]) => string);
47
+ readonly summary?: string;
48
+ readonly tags?: readonly string[];
49
+ readonly repository?: {
50
+ readonly exposure: string;
51
+ readonly collection: string;
52
+ readonly action: string;
53
+ };
54
+ } | undefined;
55
+ declaredRouteActionOf(context: Context): string | undefined;
56
+ matchForwardedRoute(context: Context): Context | undefined;
57
+ observeForwardedContext(context: Context, observe: (child: Context) => void): void;
58
+ enableExecutionResult(context: Context): void;
59
+ executionResultOf(context: Context): unknown;
60
+ getClientAddress(context: Context): string | undefined;
61
+ getRequestId(context: Context): string;
62
+ }
63
+ export declare function describeAudit(declaration: Declaration | Resolver): MiddlewareHandler;
64
+ /** Read a scalar record key from a bounded execution result. */
65
+ export declare function auditRecordKey(value: unknown, ...path: readonly string[]): string | number | undefined;
66
+ export declare function auditMiddleware(options: {
67
+ readonly host: AuditRequestHost;
68
+ readonly service: AuditCoordinator;
69
+ readonly autoDetect: boolean;
70
+ readonly proxies: BlockList;
71
+ readonly ipAddressHeaders: readonly string[];
72
+ readonly report: () => void;
73
+ }): MiddlewareHandler;
74
+ export {};
75
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAIvD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAc,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EACrB,MAAM,GAAG,CAAC,gBAAgB,GAAG;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,kFAAkF;IAClF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAChB,OAAO,EAAE,OAAO,KACb,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC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