@autofleet/sadot 1.6.16 → 1.6.18-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.
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.mjs +10 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.mjs +7 -0
- package/dist/_virtual/rolldown_runtime.mjs +22 -0
- package/dist/index.d.mts +26 -0
- package/dist/index.mjs +66 -0
- package/dist/node_modules/accepts/index.mjs +175 -0
- package/dist/node_modules/array-flatten/array-flatten.mjs +56 -0
- package/dist/node_modules/body-parser/index.mjs +135 -0
- package/dist/node_modules/body-parser/lib/read.mjs +164 -0
- package/dist/node_modules/body-parser/lib/types/json.mjs +200 -0
- package/dist/node_modules/body-parser/lib/types/raw.mjs +85 -0
- package/dist/node_modules/body-parser/lib/types/text.mjs +101 -0
- package/dist/node_modules/body-parser/lib/types/urlencoded.mjs +217 -0
- package/dist/node_modules/body-parser/node_modules/qs/lib/formats.mjs +29 -0
- package/dist/node_modules/body-parser/node_modules/qs/lib/index.mjs +21 -0
- package/dist/node_modules/body-parser/node_modules/qs/lib/parse.mjs +182 -0
- package/dist/node_modules/body-parser/node_modules/qs/lib/stringify.mjs +187 -0
- package/dist/node_modules/body-parser/node_modules/qs/lib/utils.mjs +173 -0
- package/dist/node_modules/bytes/index.mjs +121 -0
- package/dist/node_modules/call-bind-apply-helpers/actualApply.mjs +20 -0
- package/dist/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
- package/dist/node_modules/call-bind-apply-helpers/functionCall.mjs +12 -0
- package/dist/node_modules/call-bind-apply-helpers/index.mjs +23 -0
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.mjs +12 -0
- package/dist/node_modules/call-bound/index.mjs +22 -0
- package/dist/node_modules/content-disposition/index.mjs +309 -0
- package/dist/node_modules/content-type/index.mjs +151 -0
- package/dist/node_modules/cookie/index.mjs +245 -0
- package/dist/node_modules/cookie-signature/index.mjs +48 -0
- package/dist/node_modules/debug/node_modules/has-flag/index.mjs +17 -0
- package/dist/node_modules/debug/node_modules/supports-color/index.mjs +70 -0
- package/dist/node_modules/debug/src/browser.mjs +203 -0
- package/dist/node_modules/debug/src/common.mjs +209 -0
- package/dist/node_modules/debug/src/index.mjs +18 -0
- package/dist/node_modules/debug/src/node.mjs +215 -0
- package/dist/node_modules/depd/index.mjs +316 -0
- package/dist/node_modules/destroy/index.mjs +155 -0
- package/dist/node_modules/dunder-proto/get.mjs +27 -0
- package/dist/node_modules/ee-first/index.mjs +75 -0
- package/dist/node_modules/encodeurl/index.mjs +56 -0
- package/dist/node_modules/es-define-property/index.mjs +18 -0
- package/dist/node_modules/es-errors/eval.mjs +12 -0
- package/dist/node_modules/es-errors/index.mjs +12 -0
- package/dist/node_modules/es-errors/range.mjs +12 -0
- package/dist/node_modules/es-errors/ref.mjs +12 -0
- package/dist/node_modules/es-errors/syntax.mjs +12 -0
- package/dist/node_modules/es-errors/type.mjs +12 -0
- package/dist/node_modules/es-errors/uri.mjs +12 -0
- package/dist/node_modules/es-object-atoms/index.mjs +12 -0
- package/dist/node_modules/escape-html/index.mjs +67 -0
- package/dist/node_modules/etag/index.mjs +82 -0
- package/dist/node_modules/express/index.mjs +19 -0
- package/dist/node_modules/express/lib/application.mjs +503 -0
- package/dist/node_modules/express/lib/express.mjs +114 -0
- package/dist/node_modules/express/lib/middleware/init.mjs +44 -0
- package/dist/node_modules/express/lib/middleware/query.mjs +47 -0
- package/dist/node_modules/express/lib/request.mjs +422 -0
- package/dist/node_modules/express/lib/response.mjs +867 -0
- package/dist/node_modules/express/lib/router/index.mjs +424 -0
- package/dist/node_modules/express/lib/router/layer.mjs +140 -0
- package/dist/node_modules/express/lib/router/route.mjs +158 -0
- package/dist/node_modules/express/lib/utils.mjs +247 -0
- package/dist/node_modules/express/lib/view.mjs +135 -0
- package/dist/node_modules/express/node_modules/qs/lib/formats.mjs +29 -0
- package/dist/node_modules/express/node_modules/qs/lib/index.mjs +21 -0
- package/dist/node_modules/express/node_modules/qs/lib/parse.mjs +182 -0
- package/dist/node_modules/express/node_modules/qs/lib/stringify.mjs +187 -0
- package/dist/node_modules/express/node_modules/qs/lib/utils.mjs +173 -0
- package/dist/node_modules/finalhandler/index.mjs +234 -0
- package/dist/node_modules/forwarded/index.mjs +67 -0
- package/dist/node_modules/fresh/index.mjs +96 -0
- package/dist/node_modules/function-bind/implementation.mjs +58 -0
- package/dist/node_modules/function-bind/index.mjs +13 -0
- package/dist/node_modules/get-intrinsic/index.mjs +357 -0
- package/dist/node_modules/get-proto/Object.getPrototypeOf.mjs +14 -0
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.mjs +12 -0
- package/dist/node_modules/get-proto/index.mjs +25 -0
- package/dist/node_modules/gopd/gOPD.mjs +12 -0
- package/dist/node_modules/gopd/index.mjs +19 -0
- package/dist/node_modules/has-symbols/index.mjs +21 -0
- package/dist/node_modules/has-symbols/shams.mjs +35 -0
- package/dist/node_modules/hasown/index.mjs +16 -0
- package/dist/node_modules/http-errors/index.mjs +207 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.mjs +321 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.mjs +126 -0
- package/dist/node_modules/iconv-lite/encodings/index.mjs +32 -0
- package/dist/node_modules/iconv-lite/encodings/internal.mjs +135 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.mjs +53 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +458 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.mjs +150 -0
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.mjs +172 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.mjs +2587 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.mjs +2223 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.mjs +230 -0
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.mjs +428 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +430 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +232 -0
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +295 -0
- package/dist/node_modules/iconv-lite/encodings/utf16.mjs +107 -0
- package/dist/node_modules/iconv-lite/encodings/utf7.mjs +183 -0
- package/dist/node_modules/iconv-lite/lib/bom-handling.mjs +45 -0
- package/dist/node_modules/iconv-lite/lib/extend-node.mjs +150 -0
- package/dist/node_modules/iconv-lite/lib/index.mjs +96 -0
- package/dist/node_modules/iconv-lite/lib/streams.mjs +97 -0
- package/dist/node_modules/inherits/inherits.mjs +20 -0
- package/dist/node_modules/inherits/inherits_browser.mjs +30 -0
- package/dist/node_modules/ipaddr.js/lib/ipaddr.mjs +677 -0
- package/dist/node_modules/math-intrinsics/abs.mjs +12 -0
- package/dist/node_modules/math-intrinsics/floor.mjs +12 -0
- package/dist/node_modules/math-intrinsics/isNaN.mjs +14 -0
- package/dist/node_modules/math-intrinsics/max.mjs +12 -0
- package/dist/node_modules/math-intrinsics/min.mjs +12 -0
- package/dist/node_modules/math-intrinsics/pow.mjs +12 -0
- package/dist/node_modules/math-intrinsics/round.mjs +12 -0
- package/dist/node_modules/math-intrinsics/sign.mjs +17 -0
- package/dist/node_modules/merge-descriptors/index.mjs +46 -0
- package/dist/node_modules/methods/index.mjs +69 -0
- package/dist/node_modules/mime/mime.mjs +79 -0
- package/dist/node_modules/mime/types.mjs +1104 -0
- package/dist/node_modules/mime-types/index.mjs +123 -0
- package/dist/node_modules/mime-types/node_modules/mime-db/db.mjs +7051 -0
- package/dist/node_modules/mime-types/node_modules/mime-db/index.mjs +21 -0
- package/dist/node_modules/ms/index.mjs +124 -0
- package/dist/node_modules/negotiator/index.mjs +76 -0
- package/dist/node_modules/negotiator/lib/charset.mjs +132 -0
- package/dist/node_modules/negotiator/lib/encoding.mjs +143 -0
- package/dist/node_modules/negotiator/lib/language.mjs +138 -0
- package/dist/node_modules/negotiator/lib/mediaType.mjs +200 -0
- package/dist/node_modules/object-inspect/index.mjs +389 -0
- package/dist/node_modules/object-inspect/util.inspect.mjs +11 -0
- package/dist/node_modules/on-finished/index.mjs +178 -0
- package/dist/node_modules/parseurl/index.mjs +111 -0
- package/dist/node_modules/path-to-regexp/index.mjs +118 -0
- package/dist/node_modules/proxy-addr/index.mjs +212 -0
- package/dist/node_modules/range-parser/index.mjs +110 -0
- package/dist/node_modules/raw-body/index.mjs +209 -0
- package/dist/node_modules/safe-buffer/index.mjs +46 -0
- package/dist/node_modules/safer-buffer/safer.mjs +48 -0
- package/dist/node_modules/send/index.mjs +801 -0
- package/dist/node_modules/send/node_modules/encodeurl/index.mjs +56 -0
- package/dist/node_modules/serve-static/index.mjs +134 -0
- package/dist/node_modules/setprototypeof/index.mjs +19 -0
- package/dist/node_modules/side-channel/index.mjs +45 -0
- package/dist/node_modules/side-channel-list/index.mjs +84 -0
- package/dist/node_modules/side-channel-map/index.mjs +62 -0
- package/dist/node_modules/side-channel-weakmap/index.mjs +73 -0
- package/dist/node_modules/statuses/codes.mjs +75 -0
- package/dist/node_modules/statuses/index.mjs +108 -0
- package/dist/node_modules/toidentifier/index.mjs +32 -0
- package/dist/node_modules/type-is/index.mjs +179 -0
- package/dist/node_modules/type-is/node_modules/media-typer/index.mjs +186 -0
- package/dist/node_modules/unpipe/index.mjs +50 -0
- package/dist/node_modules/utils-merge/index.mjs +28 -0
- package/dist/node_modules/vary/index.mjs +95 -0
- package/dist/packages/sadot/src/api/index.mjs +11 -0
- package/dist/packages/sadot/src/api/v1/definition/index.mjs +112 -0
- package/dist/packages/sadot/src/api/v1/definition/validations.mjs +125 -0
- package/dist/packages/sadot/src/api/v1/errors.mjs +13 -0
- package/dist/packages/sadot/src/api/v1/index.mjs +15 -0
- package/dist/packages/sadot/src/api/v1/templates/index.mjs +76 -0
- package/dist/packages/sadot/src/api/v1/validator/index.mjs +114 -0
- package/dist/{api/v1/validator/validations.d.ts → packages/sadot/src/api/v1/validator/validations.d.mts} +1 -2
- package/dist/packages/sadot/src/api/v1/validator/validations.mjs +38 -0
- package/dist/packages/sadot/src/errors/index.mjs +55 -0
- package/dist/packages/sadot/src/events/index.mjs +50 -0
- package/dist/packages/sadot/src/hooks/enrich.mjs +175 -0
- package/dist/packages/sadot/src/hooks/find.mjs +22 -0
- package/dist/packages/sadot/src/hooks/hooks.mjs +302 -0
- package/dist/packages/sadot/src/hooks/index.mjs +5 -0
- package/dist/packages/sadot/src/hooks/utils/updateInstanceValues.mjs +27 -0
- package/dist/{init-state.d.ts → packages/sadot/src/init-state.d.mts} +1 -2
- package/dist/packages/sadot/src/init-state.mjs +55 -0
- package/dist/packages/sadot/src/mat-path-state.mjs +9 -0
- package/dist/{migrations/001-create-core-tables.js → packages/sadot/src/migrations/001-create-core-tables.mjs} +23 -7
- package/dist/{migrations/002-create-custom-field-entries.cjs → packages/sadot/src/migrations/002-create-custom-field-entries.mjs} +14 -4
- package/dist/{migrations/003-create-custom-field-model-type-map.js → packages/sadot/src/migrations/003-create-custom-field-model-type-map.mjs} +18 -6
- package/dist/packages/sadot/src/migrations/004-create-field-policy-tables.mjs +27 -0
- package/dist/packages/sadot/src/migrations/index.mjs +89 -0
- package/dist/{models/CustomFieldDefinition.d.ts → packages/sadot/src/models/CustomFieldDefinition.d.mts} +4 -5
- package/dist/packages/sadot/src/models/CustomFieldDefinition.mjs +146 -0
- package/dist/{models/CustomFieldEntries.d.ts → packages/sadot/src/models/CustomFieldEntries.d.mts} +1 -2
- package/dist/packages/sadot/src/models/CustomFieldEntries.mjs +70 -0
- package/dist/{models/CustomFieldModelTypeMap.d.cts → packages/sadot/src/models/CustomFieldModelTypeMap.d.mts} +2 -3
- package/dist/packages/sadot/src/models/CustomFieldModelTypeMap.mjs +61 -0
- package/dist/{models/CustomFieldValue.d.cts → packages/sadot/src/models/CustomFieldValue.d.mts} +3 -4
- package/dist/packages/sadot/src/models/CustomFieldValue.mjs +108 -0
- package/dist/{models/CustomValidator.d.cts → packages/sadot/src/models/CustomValidator.d.mts} +3 -4
- package/dist/packages/sadot/src/models/CustomValidator.mjs +67 -0
- package/dist/packages/sadot/src/models/FieldPolicy.d.mts +23 -0
- package/dist/packages/sadot/src/models/FieldPolicy.mjs +49 -0
- package/dist/packages/sadot/src/models/index.d.mts +7 -0
- package/dist/packages/sadot/src/models/index.mjs +161 -0
- package/dist/packages/sadot/src/models/tests/AssociatedTestModel.mjs +50 -0
- package/dist/packages/sadot/src/models/tests/TestModel.mjs +42 -0
- package/dist/packages/sadot/src/models/tests/contextAwareModels/ContextAwareTestModel.mjs +34 -0
- package/dist/packages/sadot/src/models/tests/contextAwareModels/ContextTestModel.mjs +32 -0
- package/dist/packages/sadot/src/repository/definition.mjs +212 -0
- package/dist/packages/sadot/src/repository/entries.mjs +67 -0
- package/dist/packages/sadot/src/repository/field-policy.d.mts +29 -0
- package/dist/packages/sadot/src/repository/field-policy.mjs +33 -0
- package/dist/packages/sadot/src/repository/utils/formatValues.mjs +14 -0
- package/dist/packages/sadot/src/repository/validator.mjs +54 -0
- package/dist/packages/sadot/src/repository/value.mjs +76 -0
- package/dist/{scopes/filter.d.ts → packages/sadot/src/scopes/filter.d.mts} +3 -4
- package/dist/packages/sadot/src/scopes/filter.mjs +54 -0
- package/dist/{scopes/helpers/filter.helpers.d.ts → packages/sadot/src/scopes/helpers/filter.helpers.d.mts} +1 -2
- package/dist/packages/sadot/src/scopes/helpers/filter.helpers.mjs +147 -0
- package/dist/packages/sadot/src/scopes/index.mjs +3 -0
- package/dist/{types/index.d.cts → packages/sadot/src/types/index.d.mts} +6 -5
- package/dist/{utils/constants/index.d.ts → packages/sadot/src/utils/constants/index.d.mts} +1 -2
- package/dist/packages/sadot/src/utils/constants/index.mjs +29 -0
- package/dist/packages/sadot/src/utils/db/index.mjs +14 -0
- package/dist/{utils/helpers/index.d.cts → packages/sadot/src/utils/helpers/index.d.mts} +3 -4
- package/dist/packages/sadot/src/utils/helpers/index.mjs +21 -0
- package/dist/packages/sadot/src/utils/init.mjs +111 -0
- package/dist/packages/sadot/src/utils/logger/index.mjs +12 -0
- package/dist/packages/sadot/src/utils/scopeAttributes.mjs +11 -0
- package/dist/packages/sadot/src/utils/validations/index.mjs +32 -0
- package/dist/{utils/validations/schema/custom-fields.d.ts → packages/sadot/src/utils/validations/schema/custom-fields.d.mts} +1 -2
- package/dist/packages/sadot/src/utils/validations/schema/custom-fields.mjs +7 -0
- package/dist/packages/sadot/src/utils/validations/schema/validator-schema.mjs +99 -0
- package/dist/packages/sadot/src/utils/validations/validators/index.mjs +42 -0
- package/dist/packages/sadot/src/utils/validations/validators/multi-select-dropdown.validator.mjs +7 -0
- package/dist/packages/sadot/src/utils/validations/validators/multi-select-status.validator.mjs +10 -0
- package/dist/packages/sadot/src/utils/validations/validators/multi-select.helpers.mjs +10 -0
- package/dist/packages/sadot/src/utils/validations/validators/select.validator.mjs +10 -0
- package/dist/packages/sadot/src/utils/validations/validators/status.validator.mjs +10 -0
- package/dist/packages/zehut/src/check-permission.d.mts +6 -0
- package/dist/packages/zehut/src/errors.d.mts +1 -0
- package/dist/packages/zehut/src/index.d.mts +6 -0
- package/dist/packages/zehut/src/permissions/SDK/evaluatePermissions.d.mts +1 -0
- package/dist/packages/zehut/src/permissions/SDK/types.d.mts +1 -0
- package/dist/packages/zehut/src/permissions/index.d.mts +2 -0
- package/dist/packages/zehut/src/permissions/middleware/requirePermissions.d.mts +1 -0
- package/dist/packages/zehut/src/user/ApiUser.d.mts +59 -0
- package/dist/packages/zehut/src/user/fastify.d.mts +8 -0
- package/dist/packages/zehut/src/user/index.d.mts +9 -0
- package/package.json +3 -3
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.cjs +0 -1
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.js +0 -1
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.cjs +0 -1
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.js +0 -1
- package/dist/_virtual/rolldown_runtime.cjs +0 -1
- package/dist/_virtual/rolldown_runtime.js +0 -1
- package/dist/api/index.cjs +0 -2
- package/dist/api/index.cjs.map +0 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +0 -1
- package/dist/api/v1/definition/index.cjs +0 -2
- package/dist/api/v1/definition/index.cjs.map +0 -1
- package/dist/api/v1/definition/index.js +0 -2
- package/dist/api/v1/definition/index.js.map +0 -1
- package/dist/api/v1/definition/validations.cjs +0 -2
- package/dist/api/v1/definition/validations.cjs.map +0 -1
- package/dist/api/v1/definition/validations.js +0 -2
- package/dist/api/v1/definition/validations.js.map +0 -1
- package/dist/api/v1/errors.cjs +0 -2
- package/dist/api/v1/errors.cjs.map +0 -1
- package/dist/api/v1/errors.js +0 -2
- package/dist/api/v1/errors.js.map +0 -1
- package/dist/api/v1/index.cjs +0 -2
- package/dist/api/v1/index.cjs.map +0 -1
- package/dist/api/v1/index.js +0 -2
- package/dist/api/v1/index.js.map +0 -1
- package/dist/api/v1/validator/index.cjs +0 -2
- package/dist/api/v1/validator/index.cjs.map +0 -1
- package/dist/api/v1/validator/index.js +0 -2
- package/dist/api/v1/validator/index.js.map +0 -1
- package/dist/api/v1/validator/validations.cjs +0 -2
- package/dist/api/v1/validator/validations.cjs.map +0 -1
- package/dist/api/v1/validator/validations.d.cts +0 -23
- package/dist/api/v1/validator/validations.js +0 -2
- package/dist/api/v1/validator/validations.js.map +0 -1
- package/dist/errors/index.cjs +0 -3
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.js +0 -3
- package/dist/errors/index.js.map +0 -1
- package/dist/events/index.cjs +0 -2
- package/dist/events/index.cjs.map +0 -1
- package/dist/events/index.js +0 -2
- package/dist/events/index.js.map +0 -1
- package/dist/hooks/enrich.cjs +0 -2
- package/dist/hooks/enrich.cjs.map +0 -1
- package/dist/hooks/enrich.js +0 -2
- package/dist/hooks/enrich.js.map +0 -1
- package/dist/hooks/find.cjs +0 -2
- package/dist/hooks/find.cjs.map +0 -1
- package/dist/hooks/find.js +0 -2
- package/dist/hooks/find.js.map +0 -1
- package/dist/hooks/hooks.cjs +0 -2
- package/dist/hooks/hooks.cjs.map +0 -1
- package/dist/hooks/hooks.js +0 -2
- package/dist/hooks/hooks.js.map +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/utils/updateInstanceValues.cjs +0 -2
- package/dist/hooks/utils/updateInstanceValues.cjs.map +0 -1
- package/dist/hooks/utils/updateInstanceValues.js +0 -2
- package/dist/hooks/utils/updateInstanceValues.js.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -25
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/init-state.cjs +0 -2
- package/dist/init-state.cjs.map +0 -1
- package/dist/init-state.d.cts +0 -36
- package/dist/init-state.js +0 -2
- package/dist/init-state.js.map +0 -1
- package/dist/mat-path-state.cjs +0 -2
- package/dist/mat-path-state.cjs.map +0 -1
- package/dist/mat-path-state.js +0 -2
- package/dist/mat-path-state.js.map +0 -1
- package/dist/migrations/001-create-core-tables.cjs +0 -52
- package/dist/migrations/001-create-core-tables.cjs.map +0 -1
- package/dist/migrations/001-create-core-tables.js.map +0 -1
- package/dist/migrations/002-create-custom-field-entries.cjs.map +0 -1
- package/dist/migrations/002-create-custom-field-entries.js +0 -15
- package/dist/migrations/002-create-custom-field-entries.js.map +0 -1
- package/dist/migrations/003-create-custom-field-model-type-map.cjs +0 -21
- package/dist/migrations/003-create-custom-field-model-type-map.cjs.map +0 -1
- package/dist/migrations/003-create-custom-field-model-type-map.js.map +0 -1
- package/dist/migrations/index.cjs +0 -2
- package/dist/migrations/index.cjs.map +0 -1
- package/dist/migrations/index.js +0 -2
- package/dist/migrations/index.js.map +0 -1
- package/dist/models/CustomFieldDefinition.cjs +0 -2
- package/dist/models/CustomFieldDefinition.cjs.map +0 -1
- package/dist/models/CustomFieldDefinition.d.cts +0 -41
- package/dist/models/CustomFieldDefinition.js +0 -2
- package/dist/models/CustomFieldDefinition.js.map +0 -1
- package/dist/models/CustomFieldEntries.cjs +0 -2
- package/dist/models/CustomFieldEntries.cjs.map +0 -1
- package/dist/models/CustomFieldEntries.d.cts +0 -16
- package/dist/models/CustomFieldEntries.js +0 -2
- package/dist/models/CustomFieldEntries.js.map +0 -1
- package/dist/models/CustomFieldModelTypeMap.cjs +0 -2
- package/dist/models/CustomFieldModelTypeMap.cjs.map +0 -1
- package/dist/models/CustomFieldModelTypeMap.d.ts +0 -15
- package/dist/models/CustomFieldModelTypeMap.js +0 -2
- package/dist/models/CustomFieldModelTypeMap.js.map +0 -1
- package/dist/models/CustomFieldValue.cjs +0 -2
- package/dist/models/CustomFieldValue.cjs.map +0 -1
- package/dist/models/CustomFieldValue.d.ts +0 -21
- package/dist/models/CustomFieldValue.js +0 -2
- package/dist/models/CustomFieldValue.js.map +0 -1
- package/dist/models/CustomValidator.cjs +0 -2
- package/dist/models/CustomValidator.cjs.map +0 -1
- package/dist/models/CustomValidator.d.ts +0 -19
- package/dist/models/CustomValidator.js +0 -2
- package/dist/models/CustomValidator.js.map +0 -1
- package/dist/models/index.cjs +0 -2
- package/dist/models/index.cjs.map +0 -1
- package/dist/models/index.d.cts +0 -7
- package/dist/models/index.d.ts +0 -7
- package/dist/models/index.js +0 -2
- package/dist/models/index.js.map +0 -1
- package/dist/models/tests/AssociatedTestModel.cjs +0 -2
- package/dist/models/tests/AssociatedTestModel.cjs.map +0 -1
- package/dist/models/tests/AssociatedTestModel.js +0 -2
- package/dist/models/tests/AssociatedTestModel.js.map +0 -1
- package/dist/models/tests/TestModel.cjs +0 -2
- package/dist/models/tests/TestModel.cjs.map +0 -1
- package/dist/models/tests/TestModel.js +0 -2
- package/dist/models/tests/TestModel.js.map +0 -1
- package/dist/models/tests/contextAwareModels/ContextAwareTestModel.cjs +0 -2
- package/dist/models/tests/contextAwareModels/ContextAwareTestModel.cjs.map +0 -1
- package/dist/models/tests/contextAwareModels/ContextAwareTestModel.js +0 -2
- package/dist/models/tests/contextAwareModels/ContextAwareTestModel.js.map +0 -1
- package/dist/models/tests/contextAwareModels/ContextTestModel.cjs +0 -2
- package/dist/models/tests/contextAwareModels/ContextTestModel.cjs.map +0 -1
- package/dist/models/tests/contextAwareModels/ContextTestModel.js +0 -2
- package/dist/models/tests/contextAwareModels/ContextTestModel.js.map +0 -1
- package/dist/repository/definition.cjs +0 -2
- package/dist/repository/definition.cjs.map +0 -1
- package/dist/repository/definition.js +0 -2
- package/dist/repository/definition.js.map +0 -1
- package/dist/repository/entries.cjs +0 -2
- package/dist/repository/entries.cjs.map +0 -1
- package/dist/repository/entries.js +0 -2
- package/dist/repository/entries.js.map +0 -1
- package/dist/repository/utils/formatValues.cjs +0 -2
- package/dist/repository/utils/formatValues.cjs.map +0 -1
- package/dist/repository/utils/formatValues.js +0 -2
- package/dist/repository/utils/formatValues.js.map +0 -1
- package/dist/repository/validator.cjs +0 -2
- package/dist/repository/validator.cjs.map +0 -1
- package/dist/repository/validator.js +0 -2
- package/dist/repository/validator.js.map +0 -1
- package/dist/repository/value.cjs +0 -2
- package/dist/repository/value.cjs.map +0 -1
- package/dist/repository/value.js +0 -2
- package/dist/repository/value.js.map +0 -1
- package/dist/scopes/filter.cjs +0 -2
- package/dist/scopes/filter.cjs.map +0 -1
- package/dist/scopes/filter.d.cts +0 -23
- package/dist/scopes/filter.js +0 -2
- package/dist/scopes/filter.js.map +0 -1
- package/dist/scopes/helpers/filter.helpers.cjs +0 -46
- package/dist/scopes/helpers/filter.helpers.cjs.map +0 -1
- package/dist/scopes/helpers/filter.helpers.d.cts +0 -17
- package/dist/scopes/helpers/filter.helpers.js +0 -46
- package/dist/scopes/helpers/filter.helpers.js.map +0 -1
- package/dist/scopes/index.cjs +0 -1
- package/dist/scopes/index.js +0 -1
- package/dist/types/index.d.ts +0 -72
- package/dist/utils/constants/index.cjs +0 -2
- package/dist/utils/constants/index.cjs.map +0 -1
- package/dist/utils/constants/index.d.cts +0 -24
- package/dist/utils/constants/index.js +0 -2
- package/dist/utils/constants/index.js.map +0 -1
- package/dist/utils/db/index.cjs +0 -2
- package/dist/utils/db/index.cjs.map +0 -1
- package/dist/utils/db/index.js +0 -2
- package/dist/utils/db/index.js.map +0 -1
- package/dist/utils/helpers/index.cjs +0 -2
- package/dist/utils/helpers/index.cjs.map +0 -1
- package/dist/utils/helpers/index.d.ts +0 -31
- package/dist/utils/helpers/index.js +0 -2
- package/dist/utils/helpers/index.js.map +0 -1
- package/dist/utils/init.cjs +0 -2
- package/dist/utils/init.cjs.map +0 -1
- package/dist/utils/init.js +0 -2
- package/dist/utils/init.js.map +0 -1
- package/dist/utils/logger/index.cjs +0 -2
- package/dist/utils/logger/index.cjs.map +0 -1
- package/dist/utils/logger/index.js +0 -2
- package/dist/utils/logger/index.js.map +0 -1
- package/dist/utils/scopeAttributes.cjs +0 -2
- package/dist/utils/scopeAttributes.cjs.map +0 -1
- package/dist/utils/scopeAttributes.js +0 -2
- package/dist/utils/scopeAttributes.js.map +0 -1
- package/dist/utils/validations/index.cjs +0 -2
- package/dist/utils/validations/index.cjs.map +0 -1
- package/dist/utils/validations/index.js +0 -2
- package/dist/utils/validations/index.js.map +0 -1
- package/dist/utils/validations/schema/custom-fields.cjs +0 -2
- package/dist/utils/validations/schema/custom-fields.cjs.map +0 -1
- package/dist/utils/validations/schema/custom-fields.d.cts +0 -7
- package/dist/utils/validations/schema/custom-fields.js +0 -2
- package/dist/utils/validations/schema/custom-fields.js.map +0 -1
- package/dist/utils/validations/schema/validator-schema.cjs +0 -2
- package/dist/utils/validations/schema/validator-schema.cjs.map +0 -1
- package/dist/utils/validations/schema/validator-schema.js +0 -2
- package/dist/utils/validations/schema/validator-schema.js.map +0 -1
- package/dist/utils/validations/validators/index.cjs +0 -2
- package/dist/utils/validations/validators/index.cjs.map +0 -1
- package/dist/utils/validations/validators/index.js +0 -2
- package/dist/utils/validations/validators/index.js.map +0 -1
- package/dist/utils/validations/validators/multi-select-dropdown.validator.cjs +0 -2
- package/dist/utils/validations/validators/multi-select-dropdown.validator.cjs.map +0 -1
- package/dist/utils/validations/validators/multi-select-dropdown.validator.js +0 -2
- package/dist/utils/validations/validators/multi-select-dropdown.validator.js.map +0 -1
- package/dist/utils/validations/validators/multi-select-status.validator.cjs +0 -2
- package/dist/utils/validations/validators/multi-select-status.validator.cjs.map +0 -1
- package/dist/utils/validations/validators/multi-select-status.validator.js +0 -2
- package/dist/utils/validations/validators/multi-select-status.validator.js.map +0 -1
- package/dist/utils/validations/validators/multi-select.helpers.cjs +0 -2
- package/dist/utils/validations/validators/multi-select.helpers.cjs.map +0 -1
- package/dist/utils/validations/validators/multi-select.helpers.js +0 -2
- package/dist/utils/validations/validators/multi-select.helpers.js.map +0 -1
- package/dist/utils/validations/validators/select.validator.cjs +0 -2
- package/dist/utils/validations/validators/select.validator.cjs.map +0 -1
- package/dist/utils/validations/validators/select.validator.js +0 -2
- package/dist/utils/validations/validators/select.validator.js.map +0 -1
- package/dist/utils/validations/validators/status.validator.cjs +0 -2
- package/dist/utils/validations/validators/status.validator.cjs.map +0 -1
- package/dist/utils/validations/validators/status.validator.js +0 -2
- package/dist/utils/validations/validators/status.validator.js.map +0 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bytes } from "../../../bytes/index.mjs";
|
|
3
|
+
import { require_content_type } from "../../../content-type/index.mjs";
|
|
4
|
+
import { require_http_errors } from "../../../http-errors/index.mjs";
|
|
5
|
+
import { require_src } from "../../../debug/src/index.mjs";
|
|
6
|
+
import { require_read } from "../read.mjs";
|
|
7
|
+
import { require_type_is } from "../../../type-is/index.mjs";
|
|
8
|
+
|
|
9
|
+
//#region ../../node_modules/body-parser/lib/types/json.js
|
|
10
|
+
/*!
|
|
11
|
+
* body-parser
|
|
12
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
13
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
14
|
+
* MIT Licensed
|
|
15
|
+
*/
|
|
16
|
+
var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17
|
+
/**
|
|
18
|
+
* Module dependencies.
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
var bytes = require_bytes();
|
|
22
|
+
var contentType = require_content_type();
|
|
23
|
+
var createError = require_http_errors();
|
|
24
|
+
var debug = require_src()("body-parser:json");
|
|
25
|
+
var read = require_read();
|
|
26
|
+
var typeis = require_type_is();
|
|
27
|
+
/**
|
|
28
|
+
* Module exports.
|
|
29
|
+
*/
|
|
30
|
+
module.exports = json;
|
|
31
|
+
/**
|
|
32
|
+
* RegExp to match the first non-space in a string.
|
|
33
|
+
*
|
|
34
|
+
* Allowed whitespace is defined in RFC 7159:
|
|
35
|
+
*
|
|
36
|
+
* ws = *(
|
|
37
|
+
* %x20 / ; Space
|
|
38
|
+
* %x09 / ; Horizontal tab
|
|
39
|
+
* %x0A / ; Line feed or New line
|
|
40
|
+
* %x0D ) ; Carriage return
|
|
41
|
+
*/
|
|
42
|
+
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/;
|
|
43
|
+
var JSON_SYNTAX_CHAR = "#";
|
|
44
|
+
var JSON_SYNTAX_REGEXP = /#+/g;
|
|
45
|
+
/**
|
|
46
|
+
* Create a middleware to parse JSON bodies.
|
|
47
|
+
*
|
|
48
|
+
* @param {object} [options]
|
|
49
|
+
* @return {function}
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
function json(options) {
|
|
53
|
+
var opts = options || {};
|
|
54
|
+
var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
|
|
55
|
+
var inflate = opts.inflate !== false;
|
|
56
|
+
var reviver = opts.reviver;
|
|
57
|
+
var strict = opts.strict !== false;
|
|
58
|
+
var type = opts.type || "application/json";
|
|
59
|
+
var verify = opts.verify || false;
|
|
60
|
+
if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
|
|
61
|
+
var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
|
|
62
|
+
function parse(body) {
|
|
63
|
+
if (body.length === 0) return {};
|
|
64
|
+
if (strict) {
|
|
65
|
+
var first = firstchar(body);
|
|
66
|
+
if (first !== "{" && first !== "[") {
|
|
67
|
+
debug("strict violation");
|
|
68
|
+
throw createStrictSyntaxError(body, first);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
debug("parse json");
|
|
73
|
+
return JSON.parse(body, reviver);
|
|
74
|
+
} catch (e) {
|
|
75
|
+
throw normalizeJsonSyntaxError(e, {
|
|
76
|
+
message: e.message,
|
|
77
|
+
stack: e.stack
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return function jsonParser(req, res, next) {
|
|
82
|
+
if (req._body) {
|
|
83
|
+
debug("body already parsed");
|
|
84
|
+
next();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
req.body = req.body || {};
|
|
88
|
+
if (!typeis.hasBody(req)) {
|
|
89
|
+
debug("skip empty body");
|
|
90
|
+
next();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
debug("content-type %j", req.headers["content-type"]);
|
|
94
|
+
if (!shouldParse(req)) {
|
|
95
|
+
debug("skip parsing");
|
|
96
|
+
next();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
var charset = getCharset(req) || "utf-8";
|
|
100
|
+
if (charset.slice(0, 4) !== "utf-") {
|
|
101
|
+
debug("invalid charset");
|
|
102
|
+
next(createError(415, "unsupported charset \"" + charset.toUpperCase() + "\"", {
|
|
103
|
+
charset,
|
|
104
|
+
type: "charset.unsupported"
|
|
105
|
+
}));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
read(req, res, next, parse, debug, {
|
|
109
|
+
encoding: charset,
|
|
110
|
+
inflate,
|
|
111
|
+
limit,
|
|
112
|
+
verify
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Create strict violation syntax error matching native error.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} str
|
|
120
|
+
* @param {string} char
|
|
121
|
+
* @return {Error}
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
function createStrictSyntaxError(str, char) {
|
|
125
|
+
var index = str.indexOf(char);
|
|
126
|
+
var partial = "";
|
|
127
|
+
if (index !== -1) {
|
|
128
|
+
partial = str.substring(0, index) + JSON_SYNTAX_CHAR;
|
|
129
|
+
for (var i = index + 1; i < str.length; i++) partial += JSON_SYNTAX_CHAR;
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
JSON.parse(partial);
|
|
133
|
+
/* istanbul ignore next */ throw new SyntaxError("strict violation");
|
|
134
|
+
} catch (e) {
|
|
135
|
+
return normalizeJsonSyntaxError(e, {
|
|
136
|
+
message: e.message.replace(JSON_SYNTAX_REGEXP, function(placeholder) {
|
|
137
|
+
return str.substring(index, index + placeholder.length);
|
|
138
|
+
}),
|
|
139
|
+
stack: e.stack
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get the first non-whitespace character in a string.
|
|
145
|
+
*
|
|
146
|
+
* @param {string} str
|
|
147
|
+
* @return {function}
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
function firstchar(str) {
|
|
151
|
+
var match = FIRST_CHAR_REGEXP.exec(str);
|
|
152
|
+
return match ? match[1] : void 0;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get the charset of a request.
|
|
156
|
+
*
|
|
157
|
+
* @param {object} req
|
|
158
|
+
* @api private
|
|
159
|
+
*/
|
|
160
|
+
function getCharset(req) {
|
|
161
|
+
try {
|
|
162
|
+
return (contentType.parse(req).parameters.charset || "").toLowerCase();
|
|
163
|
+
} catch (e) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Normalize a SyntaxError for JSON.parse.
|
|
169
|
+
*
|
|
170
|
+
* @param {SyntaxError} error
|
|
171
|
+
* @param {object} obj
|
|
172
|
+
* @return {SyntaxError}
|
|
173
|
+
*/
|
|
174
|
+
function normalizeJsonSyntaxError(error, obj) {
|
|
175
|
+
var keys = Object.getOwnPropertyNames(error);
|
|
176
|
+
for (var i = 0; i < keys.length; i++) {
|
|
177
|
+
var key = keys[i];
|
|
178
|
+
if (key !== "stack" && key !== "message") delete error[key];
|
|
179
|
+
}
|
|
180
|
+
error.stack = obj.stack.replace(error.message, obj.message);
|
|
181
|
+
error.message = obj.message;
|
|
182
|
+
return error;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Get the simple type checker.
|
|
186
|
+
*
|
|
187
|
+
* @param {string} type
|
|
188
|
+
* @return {function}
|
|
189
|
+
*/
|
|
190
|
+
function typeChecker(type) {
|
|
191
|
+
return function checkType(req) {
|
|
192
|
+
return Boolean(typeis(req, type));
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
export default require_json();
|
|
199
|
+
|
|
200
|
+
export { require_json };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bytes } from "../../../bytes/index.mjs";
|
|
3
|
+
import { require_src } from "../../../debug/src/index.mjs";
|
|
4
|
+
import { require_read } from "../read.mjs";
|
|
5
|
+
import { require_type_is } from "../../../type-is/index.mjs";
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/body-parser/lib/types/raw.js
|
|
8
|
+
/*!
|
|
9
|
+
* body-parser
|
|
10
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
*/
|
|
13
|
+
var require_raw = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14
|
+
/**
|
|
15
|
+
* Module dependencies.
|
|
16
|
+
*/
|
|
17
|
+
var bytes = require_bytes();
|
|
18
|
+
var debug = require_src()("body-parser:raw");
|
|
19
|
+
var read = require_read();
|
|
20
|
+
var typeis = require_type_is();
|
|
21
|
+
/**
|
|
22
|
+
* Module exports.
|
|
23
|
+
*/
|
|
24
|
+
module.exports = raw;
|
|
25
|
+
/**
|
|
26
|
+
* Create a middleware to parse raw bodies.
|
|
27
|
+
*
|
|
28
|
+
* @param {object} [options]
|
|
29
|
+
* @return {function}
|
|
30
|
+
* @api public
|
|
31
|
+
*/
|
|
32
|
+
function raw(options) {
|
|
33
|
+
var opts = options || {};
|
|
34
|
+
var inflate = opts.inflate !== false;
|
|
35
|
+
var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
|
|
36
|
+
var type = opts.type || "application/octet-stream";
|
|
37
|
+
var verify = opts.verify || false;
|
|
38
|
+
if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
|
|
39
|
+
var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
|
|
40
|
+
function parse(buf) {
|
|
41
|
+
return buf;
|
|
42
|
+
}
|
|
43
|
+
return function rawParser(req, res, next) {
|
|
44
|
+
if (req._body) {
|
|
45
|
+
debug("body already parsed");
|
|
46
|
+
next();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
req.body = req.body || {};
|
|
50
|
+
if (!typeis.hasBody(req)) {
|
|
51
|
+
debug("skip empty body");
|
|
52
|
+
next();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
debug("content-type %j", req.headers["content-type"]);
|
|
56
|
+
if (!shouldParse(req)) {
|
|
57
|
+
debug("skip parsing");
|
|
58
|
+
next();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
read(req, res, next, parse, debug, {
|
|
62
|
+
encoding: null,
|
|
63
|
+
inflate,
|
|
64
|
+
limit,
|
|
65
|
+
verify
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get the simple type checker.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} type
|
|
73
|
+
* @return {function}
|
|
74
|
+
*/
|
|
75
|
+
function typeChecker(type) {
|
|
76
|
+
return function checkType(req) {
|
|
77
|
+
return Boolean(typeis(req, type));
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export default require_raw();
|
|
84
|
+
|
|
85
|
+
export { require_raw };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bytes } from "../../../bytes/index.mjs";
|
|
3
|
+
import { require_content_type } from "../../../content-type/index.mjs";
|
|
4
|
+
import { require_src } from "../../../debug/src/index.mjs";
|
|
5
|
+
import { require_read } from "../read.mjs";
|
|
6
|
+
import { require_type_is } from "../../../type-is/index.mjs";
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/body-parser/lib/types/text.js
|
|
9
|
+
/*!
|
|
10
|
+
* body-parser
|
|
11
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
12
|
+
* MIT Licensed
|
|
13
|
+
*/
|
|
14
|
+
var require_text = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15
|
+
/**
|
|
16
|
+
* Module dependencies.
|
|
17
|
+
*/
|
|
18
|
+
var bytes = require_bytes();
|
|
19
|
+
var contentType = require_content_type();
|
|
20
|
+
var debug = require_src()("body-parser:text");
|
|
21
|
+
var read = require_read();
|
|
22
|
+
var typeis = require_type_is();
|
|
23
|
+
/**
|
|
24
|
+
* Module exports.
|
|
25
|
+
*/
|
|
26
|
+
module.exports = text;
|
|
27
|
+
/**
|
|
28
|
+
* Create a middleware to parse text bodies.
|
|
29
|
+
*
|
|
30
|
+
* @param {object} [options]
|
|
31
|
+
* @return {function}
|
|
32
|
+
* @api public
|
|
33
|
+
*/
|
|
34
|
+
function text(options) {
|
|
35
|
+
var opts = options || {};
|
|
36
|
+
var defaultCharset = opts.defaultCharset || "utf-8";
|
|
37
|
+
var inflate = opts.inflate !== false;
|
|
38
|
+
var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
|
|
39
|
+
var type = opts.type || "text/plain";
|
|
40
|
+
var verify = opts.verify || false;
|
|
41
|
+
if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
|
|
42
|
+
var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
|
|
43
|
+
function parse(buf) {
|
|
44
|
+
return buf;
|
|
45
|
+
}
|
|
46
|
+
return function textParser(req, res, next) {
|
|
47
|
+
if (req._body) {
|
|
48
|
+
debug("body already parsed");
|
|
49
|
+
next();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
req.body = req.body || {};
|
|
53
|
+
if (!typeis.hasBody(req)) {
|
|
54
|
+
debug("skip empty body");
|
|
55
|
+
next();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
debug("content-type %j", req.headers["content-type"]);
|
|
59
|
+
if (!shouldParse(req)) {
|
|
60
|
+
debug("skip parsing");
|
|
61
|
+
next();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
read(req, res, next, parse, debug, {
|
|
65
|
+
encoding: getCharset(req) || defaultCharset,
|
|
66
|
+
inflate,
|
|
67
|
+
limit,
|
|
68
|
+
verify
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get the charset of a request.
|
|
74
|
+
*
|
|
75
|
+
* @param {object} req
|
|
76
|
+
* @api private
|
|
77
|
+
*/
|
|
78
|
+
function getCharset(req) {
|
|
79
|
+
try {
|
|
80
|
+
return (contentType.parse(req).parameters.charset || "").toLowerCase();
|
|
81
|
+
} catch (e) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get the simple type checker.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} type
|
|
89
|
+
* @return {function}
|
|
90
|
+
*/
|
|
91
|
+
function typeChecker(type) {
|
|
92
|
+
return function checkType(req) {
|
|
93
|
+
return Boolean(typeis(req, type));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
export default require_text();
|
|
100
|
+
|
|
101
|
+
export { require_text };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_depd } from "../../../depd/index.mjs";
|
|
3
|
+
import { require_bytes } from "../../../bytes/index.mjs";
|
|
4
|
+
import { require_content_type } from "../../../content-type/index.mjs";
|
|
5
|
+
import { require_http_errors } from "../../../http-errors/index.mjs";
|
|
6
|
+
import { require_src } from "../../../debug/src/index.mjs";
|
|
7
|
+
import { require_read } from "../read.mjs";
|
|
8
|
+
import { require_type_is } from "../../../type-is/index.mjs";
|
|
9
|
+
import { require_lib } from "../../node_modules/qs/lib/index.mjs";
|
|
10
|
+
|
|
11
|
+
//#region ../../node_modules/body-parser/lib/types/urlencoded.js
|
|
12
|
+
/*!
|
|
13
|
+
* body-parser
|
|
14
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
15
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
16
|
+
* MIT Licensed
|
|
17
|
+
*/
|
|
18
|
+
var require_urlencoded = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19
|
+
/**
|
|
20
|
+
* Module dependencies.
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
var bytes = require_bytes();
|
|
24
|
+
var contentType = require_content_type();
|
|
25
|
+
var createError = require_http_errors();
|
|
26
|
+
var debug = require_src()("body-parser:urlencoded");
|
|
27
|
+
var deprecate = require_depd()("body-parser");
|
|
28
|
+
var read = require_read();
|
|
29
|
+
var typeis = require_type_is();
|
|
30
|
+
/**
|
|
31
|
+
* Module exports.
|
|
32
|
+
*/
|
|
33
|
+
module.exports = urlencoded;
|
|
34
|
+
/**
|
|
35
|
+
* Cache of parser modules.
|
|
36
|
+
*/
|
|
37
|
+
var parsers = Object.create(null);
|
|
38
|
+
/**
|
|
39
|
+
* Create a middleware to parse urlencoded bodies.
|
|
40
|
+
*
|
|
41
|
+
* @param {object} [options]
|
|
42
|
+
* @return {function}
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
function urlencoded(options) {
|
|
46
|
+
var opts = options || {};
|
|
47
|
+
if (opts.extended === void 0) deprecate("undefined extended: provide extended option");
|
|
48
|
+
var extended = opts.extended !== false;
|
|
49
|
+
var inflate = opts.inflate !== false;
|
|
50
|
+
var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
|
|
51
|
+
var type = opts.type || "application/x-www-form-urlencoded";
|
|
52
|
+
var verify = opts.verify || false;
|
|
53
|
+
var depth = typeof opts.depth !== "number" ? Number(opts.depth || 32) : opts.depth;
|
|
54
|
+
if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
|
|
55
|
+
var queryparse = extended ? extendedparser(opts) : simpleparser(opts);
|
|
56
|
+
var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
|
|
57
|
+
function parse(body) {
|
|
58
|
+
return body.length ? queryparse(body) : {};
|
|
59
|
+
}
|
|
60
|
+
return function urlencodedParser(req, res, next) {
|
|
61
|
+
if (req._body) {
|
|
62
|
+
debug("body already parsed");
|
|
63
|
+
next();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
req.body = req.body || {};
|
|
67
|
+
if (!typeis.hasBody(req)) {
|
|
68
|
+
debug("skip empty body");
|
|
69
|
+
next();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
debug("content-type %j", req.headers["content-type"]);
|
|
73
|
+
if (!shouldParse(req)) {
|
|
74
|
+
debug("skip parsing");
|
|
75
|
+
next();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
var charset = getCharset(req) || "utf-8";
|
|
79
|
+
if (charset !== "utf-8") {
|
|
80
|
+
debug("invalid charset");
|
|
81
|
+
next(createError(415, "unsupported charset \"" + charset.toUpperCase() + "\"", {
|
|
82
|
+
charset,
|
|
83
|
+
type: "charset.unsupported"
|
|
84
|
+
}));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
read(req, res, next, parse, debug, {
|
|
88
|
+
debug,
|
|
89
|
+
encoding: charset,
|
|
90
|
+
inflate,
|
|
91
|
+
limit,
|
|
92
|
+
verify,
|
|
93
|
+
depth
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the extended query parser.
|
|
99
|
+
*
|
|
100
|
+
* @param {object} options
|
|
101
|
+
*/
|
|
102
|
+
function extendedparser(options) {
|
|
103
|
+
var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
|
|
104
|
+
var depth = typeof options.depth !== "number" ? Number(options.depth || 32) : options.depth;
|
|
105
|
+
var parse = parser("qs");
|
|
106
|
+
if (isNaN(parameterLimit) || parameterLimit < 1) throw new TypeError("option parameterLimit must be a positive number");
|
|
107
|
+
if (isNaN(depth) || depth < 0) throw new TypeError("option depth must be a zero or a positive number");
|
|
108
|
+
if (isFinite(parameterLimit)) parameterLimit = parameterLimit | 0;
|
|
109
|
+
return function queryparse(body) {
|
|
110
|
+
var paramCount = parameterCount(body, parameterLimit);
|
|
111
|
+
if (paramCount === void 0) {
|
|
112
|
+
debug("too many parameters");
|
|
113
|
+
throw createError(413, "too many parameters", { type: "parameters.too.many" });
|
|
114
|
+
}
|
|
115
|
+
var arrayLimit = Math.max(100, paramCount);
|
|
116
|
+
debug("parse extended urlencoding");
|
|
117
|
+
try {
|
|
118
|
+
return parse(body, {
|
|
119
|
+
allowPrototypes: true,
|
|
120
|
+
arrayLimit,
|
|
121
|
+
depth,
|
|
122
|
+
strictDepth: true,
|
|
123
|
+
parameterLimit
|
|
124
|
+
});
|
|
125
|
+
} catch (err) {
|
|
126
|
+
if (err instanceof RangeError) throw createError(400, "The input exceeded the depth", { type: "querystring.parse.rangeError" });
|
|
127
|
+
else throw err;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get the charset of a request.
|
|
133
|
+
*
|
|
134
|
+
* @param {object} req
|
|
135
|
+
* @api private
|
|
136
|
+
*/
|
|
137
|
+
function getCharset(req) {
|
|
138
|
+
try {
|
|
139
|
+
return (contentType.parse(req).parameters.charset || "").toLowerCase();
|
|
140
|
+
} catch (e) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Count the number of parameters, stopping once limit reached
|
|
146
|
+
*
|
|
147
|
+
* @param {string} body
|
|
148
|
+
* @param {number} limit
|
|
149
|
+
* @api private
|
|
150
|
+
*/
|
|
151
|
+
function parameterCount(body, limit) {
|
|
152
|
+
var count = 0;
|
|
153
|
+
var index = 0;
|
|
154
|
+
while ((index = body.indexOf("&", index)) !== -1) {
|
|
155
|
+
count++;
|
|
156
|
+
index++;
|
|
157
|
+
if (count === limit) return;
|
|
158
|
+
}
|
|
159
|
+
return count;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get parser for module name dynamically.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} name
|
|
165
|
+
* @return {function}
|
|
166
|
+
* @api private
|
|
167
|
+
*/
|
|
168
|
+
function parser(name) {
|
|
169
|
+
var mod = parsers[name];
|
|
170
|
+
if (mod !== void 0) return mod.parse;
|
|
171
|
+
switch (name) {
|
|
172
|
+
case "qs":
|
|
173
|
+
mod = require_lib();
|
|
174
|
+
break;
|
|
175
|
+
case "querystring":
|
|
176
|
+
mod = __require("querystring");
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
parsers[name] = mod;
|
|
180
|
+
return mod.parse;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get the simple query parser.
|
|
184
|
+
*
|
|
185
|
+
* @param {object} options
|
|
186
|
+
*/
|
|
187
|
+
function simpleparser(options) {
|
|
188
|
+
var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
|
|
189
|
+
var parse = parser("querystring");
|
|
190
|
+
if (isNaN(parameterLimit) || parameterLimit < 1) throw new TypeError("option parameterLimit must be a positive number");
|
|
191
|
+
if (isFinite(parameterLimit)) parameterLimit = parameterLimit | 0;
|
|
192
|
+
return function queryparse(body) {
|
|
193
|
+
if (parameterCount(body, parameterLimit) === void 0) {
|
|
194
|
+
debug("too many parameters");
|
|
195
|
+
throw createError(413, "too many parameters", { type: "parameters.too.many" });
|
|
196
|
+
}
|
|
197
|
+
debug("parse urlencoding");
|
|
198
|
+
return parse(body, void 0, void 0, { maxKeys: parameterLimit });
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get the simple type checker.
|
|
203
|
+
*
|
|
204
|
+
* @param {string} type
|
|
205
|
+
* @return {function}
|
|
206
|
+
*/
|
|
207
|
+
function typeChecker(type) {
|
|
208
|
+
return function checkType(req) {
|
|
209
|
+
return Boolean(typeis(req, type));
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}));
|
|
213
|
+
|
|
214
|
+
//#endregion
|
|
215
|
+
export default require_urlencoded();
|
|
216
|
+
|
|
217
|
+
export { require_urlencoded };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/body-parser/node_modules/qs/lib/formats.js
|
|
4
|
+
var require_formats = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
var replace = String.prototype.replace;
|
|
6
|
+
var percentTwenties = /%20/g;
|
|
7
|
+
var Format = {
|
|
8
|
+
RFC1738: "RFC1738",
|
|
9
|
+
RFC3986: "RFC3986"
|
|
10
|
+
};
|
|
11
|
+
module.exports = {
|
|
12
|
+
"default": Format.RFC3986,
|
|
13
|
+
formatters: {
|
|
14
|
+
RFC1738: function(value) {
|
|
15
|
+
return replace.call(value, percentTwenties, "+");
|
|
16
|
+
},
|
|
17
|
+
RFC3986: function(value) {
|
|
18
|
+
return String(value);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
RFC1738: Format.RFC1738,
|
|
22
|
+
RFC3986: Format.RFC3986
|
|
23
|
+
};
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export default require_formats();
|
|
28
|
+
|
|
29
|
+
export { require_formats };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_formats } from "./formats.mjs";
|
|
3
|
+
import { require_stringify } from "./stringify.mjs";
|
|
4
|
+
import { require_parse } from "./parse.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../../node_modules/body-parser/node_modules/qs/lib/index.js
|
|
7
|
+
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8
|
+
var stringify = require_stringify();
|
|
9
|
+
var parse = require_parse();
|
|
10
|
+
var formats = require_formats();
|
|
11
|
+
module.exports = {
|
|
12
|
+
formats,
|
|
13
|
+
parse,
|
|
14
|
+
stringify
|
|
15
|
+
};
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export default require_lib();
|
|
20
|
+
|
|
21
|
+
export { require_lib };
|