@rnaga/wp-node 1.1.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/application.d.ts +76 -0
- package/application.d.ts.map +1 -0
- package/application.js +132 -0
- package/common/async-constructor.d.ts +2 -0
- package/common/async-constructor.d.ts.map +1 -0
- package/common/async-constructor.js +7 -0
- package/common/config/define-post-status.config.d.ts +4 -0
- package/common/config/define-post-status.config.d.ts.map +1 -0
- package/common/config/define-post-status.config.js +26 -0
- package/common/config/define-post-type.config.d.ts +4 -0
- package/common/config/define-post-type.config.d.ts.map +1 -0
- package/common/config/define-post-type.config.js +39 -0
- package/common/config/define-taxonomies.config.d.ts +4 -0
- package/common/config/define-taxonomies.config.d.ts.map +1 -0
- package/common/config/define-taxonomies.config.js +26 -0
- package/common/config/define-wp.config..d.ts +12 -0
- package/common/config/define-wp.config..d.ts.map +1 -0
- package/common/config/define-wp.config..js +110 -0
- package/common/config/index.d.ts +5 -0
- package/common/config/index.d.ts.map +1 -0
- package/common/config/index.js +20 -0
- package/common/date.d.ts +19 -0
- package/common/date.d.ts.map +1 -0
- package/common/date.js +116 -0
- package/common/define-hooks.d.ts +4 -0
- package/common/define-hooks.d.ts.map +1 -0
- package/common/define-hooks.js +16 -0
- package/common/diff.d.ts +3 -0
- package/common/diff.d.ts.map +1 -0
- package/common/diff.js +23 -0
- package/common/files.d.ts +14 -0
- package/common/files.d.ts.map +1 -0
- package/common/files.js +160 -0
- package/common/formatting.d.ts +47 -0
- package/common/formatting.d.ts.map +1 -0
- package/common/formatting.js +218 -0
- package/common/hierarchy.d.ts +21 -0
- package/common/hierarchy.d.ts.map +1 -0
- package/common/hierarchy.js +78 -0
- package/common/hooks-command.d.ts +7 -0
- package/common/hooks-command.d.ts.map +1 -0
- package/common/hooks-command.js +21 -0
- package/common/index.d.ts +11 -0
- package/common/index.d.ts.map +1 -0
- package/common/index.js +49 -0
- package/common/password.d.ts +4 -0
- package/common/password.d.ts.map +1 -0
- package/common/password.js +224 -0
- package/common/php-serialize.d.ts +3 -0
- package/common/php-serialize.d.ts.map +1 -0
- package/common/php-serialize.js +17 -0
- package/common/validating.d.ts +10 -0
- package/common/validating.d.ts.map +1 -0
- package/common/validating.js +65 -0
- package/config.d.ts +99 -0
- package/config.d.ts.map +1 -0
- package/config.js +76 -0
- package/constants/async-init.d.ts +2 -0
- package/constants/async-init.d.ts.map +1 -0
- package/constants/async-init.js +4 -0
- package/constants/component.d.ts +3 -0
- package/constants/component.d.ts.map +1 -0
- package/constants/component.js +5 -0
- package/constants/database.d.ts +2 -0
- package/constants/database.d.ts.map +1 -0
- package/constants/database.js +9 -0
- package/constants/default-database-tables.d.ts +7 -0
- package/constants/default-database-tables.d.ts.map +1 -0
- package/constants/default-database-tables.js +26 -0
- package/constants/index.d.ts +9 -0
- package/constants/index.d.ts.map +1 -0
- package/constants/index.js +24 -0
- package/constants/role-capabilities.d.ts +3 -0
- package/constants/role-capabilities.d.ts.map +1 -0
- package/constants/role-capabilities.js +67 -0
- package/constants/role-capability-actions.d.ts +2 -0
- package/constants/role-capability-actions.d.ts.map +1 -0
- package/constants/role-capability-actions.js +90 -0
- package/constants/role-names.d.ts +2 -0
- package/constants/role-names.d.ts.map +1 -0
- package/constants/role-names.js +12 -0
- package/constants/scope.d.ts +6 -0
- package/constants/scope.d.ts.map +1 -0
- package/constants/scope.js +9 -0
- package/core/async-init-reflect.d.ts +5 -0
- package/core/async-init-reflect.d.ts.map +1 -0
- package/core/async-init-reflect.js +18 -0
- package/core/blog.d.ts +20 -0
- package/core/blog.d.ts.map +1 -0
- package/core/blog.js +123 -0
- package/core/capabilities.d.ts +12 -0
- package/core/capabilities.d.ts.map +1 -0
- package/core/capabilities.js +625 -0
- package/core/comment.d.ts +111 -0
- package/core/comment.d.ts.map +1 -0
- package/core/comment.js +173 -0
- package/core/components.d.ts +13 -0
- package/core/components.d.ts.map +1 -0
- package/core/components.js +129 -0
- package/core/context.d.ts +38 -0
- package/core/context.d.ts.map +1 -0
- package/core/context.js +77 -0
- package/core/current.d.ts +33 -0
- package/core/current.d.ts.map +1 -0
- package/core/current.js +229 -0
- package/core/date-time.d.ts +18 -0
- package/core/date-time.d.ts.map +1 -0
- package/core/date-time.js +71 -0
- package/core/hooks/action.d.ts +16 -0
- package/core/hooks/action.d.ts.map +1 -0
- package/core/hooks/action.js +44 -0
- package/core/hooks/actions/init.d.ts +5 -0
- package/core/hooks/actions/init.d.ts.map +1 -0
- package/core/hooks/actions/init.js +28 -0
- package/core/hooks/default-hooks.d.ts +7 -0
- package/core/hooks/default-hooks.d.ts.map +1 -0
- package/core/hooks/default-hooks.js +19 -0
- package/core/hooks/filter.d.ts +12 -0
- package/core/hooks/filter.d.ts.map +1 -0
- package/core/hooks/filter.js +76 -0
- package/core/hooks/filters/capabilities.d.ts +16 -0
- package/core/hooks/filters/capabilities.d.ts.map +1 -0
- package/core/hooks/filters/capabilities.js +395 -0
- package/core/hooks/hooks-command.d.ts +9 -0
- package/core/hooks/hooks-command.d.ts.map +1 -0
- package/core/hooks/hooks-command.js +28 -0
- package/core/hooks/hooks-reflect.d.ts +42 -0
- package/core/hooks/hooks-reflect.d.ts.map +1 -0
- package/core/hooks/hooks-reflect.js +73 -0
- package/core/hooks/hooks.d.ts +61 -0
- package/core/hooks/hooks.d.ts.map +1 -0
- package/core/hooks/hooks.js +82 -0
- package/core/hooks/index.d.ts +4 -0
- package/core/hooks/index.d.ts.map +1 -0
- package/core/hooks/index.js +19 -0
- package/core/installer.d.ts +56 -0
- package/core/installer.d.ts.map +1 -0
- package/core/installer.js +395 -0
- package/core/logger.d.ts +22 -0
- package/core/logger.d.ts.map +1 -0
- package/core/logger.js +65 -0
- package/core/meta.d.ts +20 -0
- package/core/meta.d.ts.map +1 -0
- package/core/meta.js +123 -0
- package/core/options.d.ts +20 -0
- package/core/options.d.ts.map +1 -0
- package/core/options.js +148 -0
- package/core/post.d.ts +39 -0
- package/core/post.d.ts.map +1 -0
- package/core/post.js +164 -0
- package/core/query.d.ts +14 -0
- package/core/query.d.ts.map +1 -0
- package/core/query.js +39 -0
- package/core/role.d.ts +21 -0
- package/core/role.d.ts.map +1 -0
- package/core/role.js +71 -0
- package/core/roles.d.ts +16 -0
- package/core/roles.d.ts.map +1 -0
- package/core/roles.js +84 -0
- package/core/schema.d.ts +13 -0
- package/core/schema.d.ts.map +1 -0
- package/core/schema.js +83 -0
- package/core/site.d.ts +28 -0
- package/core/site.d.ts.map +1 -0
- package/core/site.js +105 -0
- package/core/tables.d.ts +18 -0
- package/core/tables.d.ts.map +1 -0
- package/core/tables.js +64 -0
- package/core/taxonomy.d.ts +23 -0
- package/core/taxonomy.d.ts.map +1 -0
- package/core/taxonomy.js +83 -0
- package/core/term.d.ts +104 -0
- package/core/term.d.ts.map +1 -0
- package/core/term.js +136 -0
- package/core/user.d.ts +32 -0
- package/core/user.d.ts.map +1 -0
- package/core/user.js +273 -0
- package/core/utils/blog.util.d.ts +14 -0
- package/core/utils/blog.util.d.ts.map +1 -0
- package/core/utils/blog.util.js +97 -0
- package/core/utils/comment.util.d.ts +23 -0
- package/core/utils/comment.util.d.ts.map +1 -0
- package/core/utils/comment.util.js +312 -0
- package/core/utils/crud.util.d.ts +40 -0
- package/core/utils/crud.util.d.ts.map +1 -0
- package/core/utils/crud.util.js +97 -0
- package/core/utils/date-time.util.d.ts +9 -0
- package/core/utils/date-time.util.d.ts.map +1 -0
- package/core/utils/date-time.util.js +29 -0
- package/core/utils/link.util.d.ts +23 -0
- package/core/utils/link.util.d.ts.map +1 -0
- package/core/utils/link.util.js +148 -0
- package/core/utils/meta.util.d.ts +13 -0
- package/core/utils/meta.util.d.ts.map +1 -0
- package/core/utils/meta.util.js +73 -0
- package/core/utils/post.util.d.ts +34 -0
- package/core/utils/post.util.d.ts.map +1 -0
- package/core/utils/post.util.js +272 -0
- package/core/utils/query.util.d.ts +36 -0
- package/core/utils/query.util.d.ts.map +1 -0
- package/core/utils/query.util.js +168 -0
- package/core/utils/revision.util.d.ts +67 -0
- package/core/utils/revision.util.d.ts.map +1 -0
- package/core/utils/revision.util.js +105 -0
- package/core/utils/roles.util.d.ts +30 -0
- package/core/utils/roles.util.d.ts.map +1 -0
- package/core/utils/roles.util.js +189 -0
- package/core/utils/signup.util.d.ts +33 -0
- package/core/utils/signup.util.d.ts.map +1 -0
- package/core/utils/signup.util.js +227 -0
- package/core/utils/site.util.d.ts +22 -0
- package/core/utils/site.util.d.ts.map +1 -0
- package/core/utils/site.util.js +122 -0
- package/core/utils/taxonomy.util.d.ts +19 -0
- package/core/utils/taxonomy.util.d.ts.map +1 -0
- package/core/utils/taxonomy.util.js +52 -0
- package/core/utils/term.util.d.ts +13 -0
- package/core/utils/term.util.d.ts.map +1 -0
- package/core/utils/term.util.js +113 -0
- package/core/utils/trx.util.d.ts +24 -0
- package/core/utils/trx.util.d.ts.map +1 -0
- package/core/utils/trx.util.js +86 -0
- package/core/utils/user-self-registration.util.d.ts +46 -0
- package/core/utils/user-self-registration.util.d.ts.map +1 -0
- package/core/utils/user-self-registration.util.js +171 -0
- package/core/utils/user.util.d.ts +153 -0
- package/core/utils/user.util.d.ts.map +1 -0
- package/core/utils/user.util.js +550 -0
- package/core/utils/utils.d.ts +36 -0
- package/core/utils/utils.d.ts.map +1 -0
- package/core/utils/utils.js +85 -0
- package/core/validator.d.ts +11 -0
- package/core/validator.d.ts.map +1 -0
- package/core/validator.js +40 -0
- package/core/vars.d.ts +19 -0
- package/core/vars.d.ts.map +1 -0
- package/core/vars.js +54 -0
- package/crud/blog.crud.d.ts +56 -0
- package/crud/blog.crud.d.ts.map +1 -0
- package/crud/blog.crud.js +301 -0
- package/crud/comment.crud.d.ts +104 -0
- package/crud/comment.crud.d.ts.map +1 -0
- package/crud/comment.crud.js +431 -0
- package/crud/crud.d.ts +63 -0
- package/crud/crud.d.ts.map +1 -0
- package/crud/crud.js +278 -0
- package/crud/error.d.ts +23 -0
- package/crud/error.d.ts.map +1 -0
- package/crud/error.js +51 -0
- package/crud/meta.crud.d.ts +69 -0
- package/crud/meta.crud.d.ts.map +1 -0
- package/crud/meta.crud.js +244 -0
- package/crud/options.crud.d.ts +37 -0
- package/crud/options.crud.d.ts.map +1 -0
- package/crud/options.crud.js +178 -0
- package/crud/post.crud.d.ts +225 -0
- package/crud/post.crud.d.ts.map +1 -0
- package/crud/post.crud.js +589 -0
- package/crud/revision.crud.d.ts +76 -0
- package/crud/revision.crud.d.ts.map +1 -0
- package/crud/revision.crud.js +155 -0
- package/crud/roles.crud.d.ts +50 -0
- package/crud/roles.crud.d.ts.map +1 -0
- package/crud/roles.crud.js +198 -0
- package/crud/settings.crud.d.ts +50 -0
- package/crud/settings.crud.d.ts.map +1 -0
- package/crud/settings.crud.js +153 -0
- package/crud/site.crud.d.ts +62 -0
- package/crud/site.crud.d.ts.map +1 -0
- package/crud/site.crud.js +241 -0
- package/crud/sitemeta.crud.d.ts +55 -0
- package/crud/sitemeta.crud.d.ts.map +1 -0
- package/crud/sitemeta.crud.js +97 -0
- package/crud/term.crud.d.ts +85 -0
- package/crud/term.crud.d.ts.map +1 -0
- package/crud/term.crud.js +285 -0
- package/crud/user-self-registration.crud.d.ts +57 -0
- package/crud/user-self-registration.crud.d.ts.map +1 -0
- package/crud/user-self-registration.crud.js +173 -0
- package/crud/user.crud.d.ts +147 -0
- package/crud/user.crud.d.ts.map +1 -0
- package/crud/user.crud.js +626 -0
- package/database.d.ts +18 -0
- package/database.d.ts.map +1 -0
- package/database.js +80 -0
- package/decorators/async-init.d.ts +2 -0
- package/decorators/async-init.d.ts.map +1 -0
- package/decorators/async-init.js +7 -0
- package/decorators/component.d.ts +12 -0
- package/decorators/component.d.ts.map +1 -0
- package/decorators/component.js +47 -0
- package/decorators/hooks.d.ts +5 -0
- package/decorators/hooks.d.ts.map +1 -0
- package/decorators/hooks.js +30 -0
- package/defaults/extensions.d.ts +4 -0
- package/defaults/extensions.d.ts.map +1 -0
- package/defaults/extensions.js +34 -0
- package/defaults/index.d.ts +11 -0
- package/defaults/index.d.ts.map +1 -0
- package/defaults/index.js +49 -0
- package/defaults/options.d.ts +6 -0
- package/defaults/options.d.ts.map +1 -0
- package/defaults/options.js +267 -0
- package/defaults/post-status.d.ts +10 -0
- package/defaults/post-status.d.ts.map +1 -0
- package/defaults/post-status.js +83 -0
- package/defaults/post-types.d.ts +4 -0
- package/defaults/post-types.d.ts.map +1 -0
- package/defaults/post-types.js +72 -0
- package/defaults/roles.d.ts +31 -0
- package/defaults/roles.d.ts.map +1 -0
- package/defaults/roles.js +213 -0
- package/defaults/seeder.d.ts +34 -0
- package/defaults/seeder.d.ts.map +1 -0
- package/defaults/seeder.js +201 -0
- package/defaults/sitemeta.d.ts +2 -0
- package/defaults/sitemeta.d.ts.map +1 -0
- package/defaults/sitemeta.js +38 -0
- package/defaults/subdirectory-reserved-names.d.ts +2 -0
- package/defaults/subdirectory-reserved-names.d.ts.map +1 -0
- package/defaults/subdirectory-reserved-names.js +16 -0
- package/defaults/taxonomies.d.ts +5 -0
- package/defaults/taxonomies.d.ts.map +1 -0
- package/defaults/taxonomies.js +57 -0
- package/defaults/timezone.d.ts +2 -0
- package/defaults/timezone.d.ts.map +1 -0
- package/defaults/timezone.js +353 -0
- package/package.json +51 -0
- package/query-builder/alias.d.ts +24 -0
- package/query-builder/alias.d.ts.map +1 -0
- package/query-builder/alias.js +64 -0
- package/query-builder/blogs.query.d.ts +22 -0
- package/query-builder/blogs.query.d.ts.map +1 -0
- package/query-builder/blogs.query.js +85 -0
- package/query-builder/comments.query.d.ts +35 -0
- package/query-builder/comments.query.d.ts.map +1 -0
- package/query-builder/comments.query.js +211 -0
- package/query-builder/common.query.d.ts +18 -0
- package/query-builder/common.query.d.ts.map +1 -0
- package/query-builder/common.query.js +58 -0
- package/query-builder/index.d.ts +12 -0
- package/query-builder/index.d.ts.map +1 -0
- package/query-builder/index.js +27 -0
- package/query-builder/meta.query.d.ts +45 -0
- package/query-builder/meta.query.d.ts.map +1 -0
- package/query-builder/meta.query.js +188 -0
- package/query-builder/options.query.d.ts +19 -0
- package/query-builder/options.query.d.ts.map +1 -0
- package/query-builder/options.query.js +57 -0
- package/query-builder/posts.query.d.ts +30 -0
- package/query-builder/posts.query.d.ts.map +1 -0
- package/query-builder/posts.query.js +208 -0
- package/query-builder/query-builder.d.ts +21 -0
- package/query-builder/query-builder.d.ts.map +1 -0
- package/query-builder/query-builder.js +70 -0
- package/query-builder/query-builders.d.ts +18 -0
- package/query-builder/query-builders.d.ts.map +1 -0
- package/query-builder/query-builders.js +64 -0
- package/query-builder/site.query.d.ts +22 -0
- package/query-builder/site.query.d.ts.map +1 -0
- package/query-builder/site.query.js +85 -0
- package/query-builder/terms.query.d.ts +47 -0
- package/query-builder/terms.query.d.ts.map +1 -0
- package/query-builder/terms.query.js +233 -0
- package/query-builder/users.query.d.ts +37 -0
- package/query-builder/users.query.d.ts.map +1 -0
- package/query-builder/users.query.js +188 -0
- package/schema-builder/proxy.d.ts +10 -0
- package/schema-builder/proxy.d.ts.map +1 -0
- package/schema-builder/proxy.js +19 -0
- package/schema-builder/schema-builder.d.ts +21 -0
- package/schema-builder/schema-builder.d.ts.map +1 -0
- package/schema-builder/schema-builder.js +207 -0
- package/schema-builder/schema.d.ts +20 -0
- package/schema-builder/schema.d.ts.map +1 -0
- package/schema-builder/schema.js +527 -0
- package/transactions/blog.trx.d.ts +37 -0
- package/transactions/blog.trx.d.ts.map +1 -0
- package/transactions/blog.trx.js +296 -0
- package/transactions/comment.trx.d.ts +22 -0
- package/transactions/comment.trx.d.ts.map +1 -0
- package/transactions/comment.trx.js +311 -0
- package/transactions/index.d.ts +15 -0
- package/transactions/index.d.ts.map +1 -0
- package/transactions/index.js +30 -0
- package/transactions/link.trx.d.ts +22 -0
- package/transactions/link.trx.d.ts.map +1 -0
- package/transactions/link.trx.js +208 -0
- package/transactions/meta.trx.d.ts +30 -0
- package/transactions/meta.trx.d.ts.map +1 -0
- package/transactions/meta.trx.js +197 -0
- package/transactions/options.trx.d.ts +31 -0
- package/transactions/options.trx.d.ts.map +1 -0
- package/transactions/options.trx.js +192 -0
- package/transactions/post.trx.d.ts +48 -0
- package/transactions/post.trx.d.ts.map +1 -0
- package/transactions/post.trx.js +906 -0
- package/transactions/registration-log.trx.d.ts +14 -0
- package/transactions/registration-log.trx.d.ts.map +1 -0
- package/transactions/registration-log.trx.js +103 -0
- package/transactions/revision.trx.d.ts +32 -0
- package/transactions/revision.trx.d.ts.map +1 -0
- package/transactions/revision.trx.js +278 -0
- package/transactions/roles.trx.d.ts +20 -0
- package/transactions/roles.trx.d.ts.map +1 -0
- package/transactions/roles.trx.js +144 -0
- package/transactions/seeder.trx.d.ts +43 -0
- package/transactions/seeder.trx.d.ts.map +1 -0
- package/transactions/seeder.trx.js +530 -0
- package/transactions/signup.trx.d.ts +53 -0
- package/transactions/signup.trx.d.ts.map +1 -0
- package/transactions/signup.trx.js +305 -0
- package/transactions/site.trx.d.ts +21 -0
- package/transactions/site.trx.d.ts.map +1 -0
- package/transactions/site.trx.js +167 -0
- package/transactions/term.trx.d.ts +51 -0
- package/transactions/term.trx.d.ts.map +1 -0
- package/transactions/term.trx.js +838 -0
- package/transactions/trx.d.ts +9 -0
- package/transactions/trx.d.ts.map +1 -0
- package/transactions/trx.js +20 -0
- package/transactions/user.trx.d.ts +45 -0
- package/transactions/user.trx.d.ts.map +1 -0
- package/transactions/user.trx.js +535 -0
- package/types/capabilities.d.ts +71 -0
- package/types/common.d.ts +16 -0
- package/types/component.d.ts +3 -0
- package/types/config.d.ts +33 -0
- package/types/crud.d.ts +230 -0
- package/types/database.d.ts +50 -0
- package/types/hooks/actions.d.ts +67 -0
- package/types/hooks/command.d.ts +17 -0
- package/types/hooks/filters.d.ts +86 -0
- package/types/hooks/index.d.ts +11 -0
- package/types/index.d.ts +18 -0
- package/types/logging.d.ts +1 -0
- package/types/meta.d.ts +9 -0
- package/types/options.d.ts +3 -0
- package/types/post.d.ts +54 -0
- package/types/query-builder.d.ts +11 -0
- package/types/role.d.ts +34 -0
- package/types/schema.d.ts +11 -0
- package/types/schema.d.ts.map +1 -0
- package/types/schema.js +2 -0
- package/types/taxonomy.d.ts +29 -0
- package/types/timezone.d.ts +3 -0
- package/types/transactions.d.ts +32 -0
- package/types/user.d.ts +12 -0
- package/types/validating.d.ts +9 -0
- package/types/validating.d.ts.map +1 -0
- package/types/validating.js +2 -0
- package/validators/config.d.ts +948 -0
- package/validators/config.d.ts.map +1 -0
- package/validators/config.js +149 -0
- package/validators/crud.d.ts +571 -0
- package/validators/crud.d.ts.map +1 -0
- package/validators/crud.js +281 -0
- package/validators/database.d.ts +958 -0
- package/validators/database.d.ts.map +1 -0
- package/validators/database.js +245 -0
- package/validators/date.d.ts +4 -0
- package/validators/date.d.ts.map +1 -0
- package/validators/date.js +15 -0
- package/validators/helpers.d.ts +16 -0
- package/validators/helpers.d.ts.map +1 -0
- package/validators/helpers.js +86 -0
- package/validators/index.d.ts +10 -0
- package/validators/index.d.ts.map +1 -0
- package/validators/index.js +48 -0
- package/validators/options.d.ts +303 -0
- package/validators/options.d.ts.map +1 -0
- package/validators/options.js +106 -0
- package/validators/post-status.d.ts +42 -0
- package/validators/post-status.d.ts.map +1 -0
- package/validators/post-status.js +18 -0
- package/validators/query.d.ts +534 -0
- package/validators/query.d.ts.map +1 -0
- package/validators/query.js +110 -0
- package/validators/roles.d.ts +22 -0
- package/validators/roles.d.ts.map +1 -0
- package/validators/roles.js +9 -0
- package/validators/sitemeta.d.ts +105 -0
- package/validators/sitemeta.d.ts.map +1 -0
- package/validators/sitemeta.js +39 -0
- package/validators/transactions/blog.d.ts +225 -0
- package/validators/transactions/blog.d.ts.map +1 -0
- package/validators/transactions/blog.js +63 -0
- package/validators/transactions/comment.d.ts +155 -0
- package/validators/transactions/comment.d.ts.map +1 -0
- package/validators/transactions/comment.js +68 -0
- package/validators/transactions/index.d.ts +11 -0
- package/validators/transactions/index.d.ts.map +1 -0
- package/validators/transactions/index.js +26 -0
- package/validators/transactions/link.d.ts +128 -0
- package/validators/transactions/link.d.ts.map +1 -0
- package/validators/transactions/link.js +60 -0
- package/validators/transactions/meta.d.ts +23 -0
- package/validators/transactions/meta.d.ts.map +1 -0
- package/validators/transactions/meta.js +18 -0
- package/validators/transactions/post.d.ts +234 -0
- package/validators/transactions/post.d.ts.map +1 -0
- package/validators/transactions/post.js +100 -0
- package/validators/transactions/roles.d.ts +18 -0
- package/validators/transactions/roles.d.ts.map +1 -0
- package/validators/transactions/roles.js +13 -0
- package/validators/transactions/signup.d.ts +35 -0
- package/validators/transactions/signup.d.ts.map +1 -0
- package/validators/transactions/signup.js +51 -0
- package/validators/transactions/site.d.ts +36 -0
- package/validators/transactions/site.d.ts.map +1 -0
- package/validators/transactions/site.js +49 -0
- package/validators/transactions/term.d.ts +57 -0
- package/validators/transactions/term.d.ts.map +1 -0
- package/validators/transactions/term.js +44 -0
- package/validators/transactions/user.d.ts +182 -0
- package/validators/transactions/user.d.ts.map +1 -0
- package/validators/transactions/user.js +104 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-hooks.d.ts","sourceRoot":"","sources":["../../src/common/define-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,eAAO,MAAM,WAAW,GACtB,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAC9B,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAE9B,KAAK,MAAM,EACX,UAAU,KAAK,CAAC,WAAW,EAAE,8BAa9B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineHooks = void 0;
|
|
4
|
+
const hooks_1 = require("../core/hooks/hooks");
|
|
5
|
+
const defineHooks = (env, clazzes) => {
|
|
6
|
+
const hooksSet = hooks_1.Hooks.get(env);
|
|
7
|
+
clazzes &&
|
|
8
|
+
clazzes.map((clazz) => {
|
|
9
|
+
hooksSet.set(clazz.__name, clazz);
|
|
10
|
+
});
|
|
11
|
+
hooks_1.Hooks.set(env, hooksSet);
|
|
12
|
+
const hooks = new hooks_1.Hooks(hooks_1.Hooks.get(env));
|
|
13
|
+
hooks.init();
|
|
14
|
+
return hooks;
|
|
15
|
+
};
|
|
16
|
+
exports.defineHooks = defineHooks;
|
package/common/diff.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/common/diff.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,WAMxC,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,IAAG,MAAM,GAAG,MAAM,EAAO,EACzB,IAAG,MAAM,GAAG,MAAM,EAAO,KACxB,MAAM,EAWR,CAAC"}
|
package/common/diff.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.diffStringArray = exports.diffObject = void 0;
|
|
4
|
+
const deep_object_diff_1 = require("deep-object-diff");
|
|
5
|
+
const diffObject = (a, b) => {
|
|
6
|
+
const result = (0, deep_object_diff_1.diff)(a, b);
|
|
7
|
+
if (typeof result === "object") {
|
|
8
|
+
return Object.assign({}, result);
|
|
9
|
+
}
|
|
10
|
+
return {};
|
|
11
|
+
};
|
|
12
|
+
exports.diffObject = diffObject;
|
|
13
|
+
const diffStringArray = (a = [], b = []) => {
|
|
14
|
+
// Ensure both inputs are arrays
|
|
15
|
+
const arrayA = Array.isArray(a) ? a : [a];
|
|
16
|
+
const arrayB = Array.isArray(b) ? b : [b];
|
|
17
|
+
// Find elements in A not in B and elements in B not in A
|
|
18
|
+
const diffFromAtoB = arrayA.filter((item) => !arrayB.includes(item));
|
|
19
|
+
const diffFromBtoA = arrayB.filter((item) => !arrayA.includes(item));
|
|
20
|
+
// Combine and return the unique results
|
|
21
|
+
return Array.from(new Set([...diffFromAtoB, ...diffFromBtoA]));
|
|
22
|
+
};
|
|
23
|
+
exports.diffStringArray = diffStringArray;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
export declare const mkdir: (directory: string) => void;
|
|
3
|
+
export declare const fileExists: (directory: string) => boolean;
|
|
4
|
+
export declare const readFile: (filePath: string) => string | undefined;
|
|
5
|
+
export declare const copyFile: (sourcePath: string, destinationPath: string, options?: fs.CopySyncOptions) => boolean;
|
|
6
|
+
export declare const updateEnvFile: (envs: Record<string, any>, options: {
|
|
7
|
+
environment?: string;
|
|
8
|
+
distDir?: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
export declare const readJsonFile: <T extends Record<string, any> = Record<string, any>>(filePath: string) => T | undefined;
|
|
11
|
+
export declare const readJsonFiles: <T extends Record<string, any> = Record<string, any>>(directoryPath: string) => T | undefined;
|
|
12
|
+
export declare const writeFile: (filePath: string, content: string) => void;
|
|
13
|
+
export declare const writeDFile: (directoryPrefix: string, filename: string, content: string) => void;
|
|
14
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/common/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,eAAO,MAAM,KAAK,GAAI,WAAW,MAAM,SAKtC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,YAE3C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,KAAG,MAAM,GAAG,SAEpD,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,YAAY,MAAM,EAClB,iBAAiB,MAAM,EACvB,UAAU,EAAE,CAAC,eAAe,YAQ7B,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,SAgDpD,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEnD,UAAU,MAAM,KACf,CAAC,GAAG,SAQN,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEnD,eAAe,MAAM,KACpB,CAAC,GAAG,SA4BN,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,UAAU,MAAM,EAAE,SAAS,MAAM,SAG1D,CAAC;AAGF,eAAO,MAAM,UAAU,GACrB,iBAAiB,MAAM,EACvB,UAAU,MAAM,EAChB,SAAS,MAAM,SAgBhB,CAAC"}
|
package/common/files.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.writeDFile = exports.writeFile = exports.readJsonFiles = exports.readJsonFile = exports.updateEnvFile = exports.copyFile = exports.readFile = exports.fileExists = exports.mkdir = void 0;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const mkdir = (directory) => {
|
|
40
|
+
// Ensure the directory exists
|
|
41
|
+
if (!fs.existsSync(directory)) {
|
|
42
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.mkdir = mkdir;
|
|
46
|
+
const fileExists = (directory) => {
|
|
47
|
+
return fs.existsSync(directory);
|
|
48
|
+
};
|
|
49
|
+
exports.fileExists = fileExists;
|
|
50
|
+
const readFile = (filePath) => {
|
|
51
|
+
return !(0, exports.fileExists)(filePath) ? undefined : fs.readFileSync(filePath, "utf8");
|
|
52
|
+
};
|
|
53
|
+
exports.readFile = readFile;
|
|
54
|
+
const copyFile = (sourcePath, destinationPath, options) => {
|
|
55
|
+
if (options?.recursive) {
|
|
56
|
+
fs.cpSync(sourcePath, destinationPath, options);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
fs.copyFileSync(sourcePath, destinationPath);
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
};
|
|
63
|
+
exports.copyFile = copyFile;
|
|
64
|
+
const updateEnvFile = (envs, options) => {
|
|
65
|
+
const { environment, distDir = "." } = options;
|
|
66
|
+
const envPath = `${distDir}/.env${environment ? `.${environment}` : ""}`;
|
|
67
|
+
try {
|
|
68
|
+
if (!fs.existsSync(envPath)) {
|
|
69
|
+
fs.writeFileSync(envPath, "", "utf-8");
|
|
70
|
+
}
|
|
71
|
+
// Read the current env file content
|
|
72
|
+
const currentContent = fs.readFileSync(envPath, "utf-8");
|
|
73
|
+
const lines = currentContent.split("\n");
|
|
74
|
+
const existingKeys = new Set();
|
|
75
|
+
// Build a map of existing keys
|
|
76
|
+
lines.forEach((line) => {
|
|
77
|
+
const match = line.match(/^\s*([^#][^=]*?)\s*=/);
|
|
78
|
+
if (match) {
|
|
79
|
+
existingKeys.add(match[1].trim());
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
let updatedContent = currentContent;
|
|
83
|
+
// Loop through new envs and update the file content
|
|
84
|
+
for (const [key, value] of Object.entries(envs)) {
|
|
85
|
+
const envString = `${key}=${value}`;
|
|
86
|
+
if (existingKeys.has(key)) {
|
|
87
|
+
// Comment out existing key
|
|
88
|
+
updatedContent = updatedContent.replace(new RegExp(`^\\s*(${key}\\s*=\\s*[^\\n]*)`, "gm"), `# $1`);
|
|
89
|
+
}
|
|
90
|
+
// Add new key-value pair
|
|
91
|
+
updatedContent += `\n${envString}`;
|
|
92
|
+
}
|
|
93
|
+
// Write the updated content back to the file
|
|
94
|
+
fs.writeFileSync(envPath, updatedContent, "utf-8");
|
|
95
|
+
console.log(`Environment variables in ${envPath} updated successfully.`);
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
console.error("Failed to update environment variables:", err);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.updateEnvFile = updateEnvFile;
|
|
102
|
+
const readJsonFile = (filePath) => {
|
|
103
|
+
try {
|
|
104
|
+
const data = fs.readFileSync(filePath, "utf8");
|
|
105
|
+
const json = JSON.parse(data);
|
|
106
|
+
return json;
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.readJsonFile = readJsonFile;
|
|
113
|
+
const readJsonFiles = (directoryPath) => {
|
|
114
|
+
let mergedData = undefined;
|
|
115
|
+
// Read directory and process each file
|
|
116
|
+
try {
|
|
117
|
+
fs.readdirSync(directoryPath).forEach((file) => {
|
|
118
|
+
if (path.extname(file) === ".json") {
|
|
119
|
+
// Construct full file path
|
|
120
|
+
const filePath = path.join(directoryPath, file);
|
|
121
|
+
// Read and parse JSON file
|
|
122
|
+
try {
|
|
123
|
+
// const data = fs.readFileSync(filePath, "utf8");
|
|
124
|
+
// const json = JSON.parse(data);
|
|
125
|
+
const json = (0, exports.readJsonFile)(filePath);
|
|
126
|
+
// Merge jsonData into mergedData
|
|
127
|
+
mergedData = { ...mergedData, ...json };
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.info(`Error reading or parsing ${file}:`, error);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
console.info(`No JSON files found in ${directoryPath}`);
|
|
137
|
+
}
|
|
138
|
+
return mergedData;
|
|
139
|
+
};
|
|
140
|
+
exports.readJsonFiles = readJsonFiles;
|
|
141
|
+
const writeFile = (filePath, content) => {
|
|
142
|
+
fs.writeFileSync(filePath, content);
|
|
143
|
+
console.log(`${filePath} created successfully.`);
|
|
144
|
+
};
|
|
145
|
+
exports.writeFile = writeFile;
|
|
146
|
+
// Write ts declaration file
|
|
147
|
+
const writeDFile = (directoryPrefix, filename, content) => {
|
|
148
|
+
fs.writeFileSync(`${directoryPrefix}${filename}`, `export {}\n${content}`);
|
|
149
|
+
// Update index.d.ts if the code `export ${filename}` is not present in index.d.ts
|
|
150
|
+
const indexFile = `${directoryPrefix}/index.d.ts`;
|
|
151
|
+
const targetExport = `export * from "./${filename.slice(0, -5)}";`;
|
|
152
|
+
const indexContent = fs.existsSync(indexFile)
|
|
153
|
+
? fs.readFileSync(indexFile, "utf-8")
|
|
154
|
+
: "";
|
|
155
|
+
if (!indexContent.includes(targetExport)) {
|
|
156
|
+
fs.writeFileSync(indexFile, `${indexContent}\n${targetExport}`);
|
|
157
|
+
}
|
|
158
|
+
console.log(`${directoryPrefix}${filename} created successfully.`);
|
|
159
|
+
};
|
|
160
|
+
exports.writeDFile = writeDFile;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { formatDateMySQL } from "./date";
|
|
2
|
+
export declare namespace formatting {
|
|
3
|
+
const date: (...args: [] | [import("moment").MomentInput] | [import("moment").MomentInput, {
|
|
4
|
+
format?: string;
|
|
5
|
+
} & ({
|
|
6
|
+
offsetMinutes?: number;
|
|
7
|
+
withGMTOffset?: never;
|
|
8
|
+
} | {
|
|
9
|
+
offsetMinutes?: never;
|
|
10
|
+
withGMTOffset?: boolean;
|
|
11
|
+
})] | [{
|
|
12
|
+
format?: string;
|
|
13
|
+
} & ({
|
|
14
|
+
offsetMinutes?: number;
|
|
15
|
+
withGMTOffset?: never;
|
|
16
|
+
} | {
|
|
17
|
+
offsetMinutes?: never;
|
|
18
|
+
withGMTOffset?: boolean;
|
|
19
|
+
})]) => string;
|
|
20
|
+
const dateMySQL: typeof formatDateMySQL;
|
|
21
|
+
/**
|
|
22
|
+
* Parse a full name into first and last names.
|
|
23
|
+
*
|
|
24
|
+
* @param fullName - The full name to parse
|
|
25
|
+
* @returns An object containing the first and last names
|
|
26
|
+
*/
|
|
27
|
+
const parseName: (fullName: string) => {
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
30
|
+
};
|
|
31
|
+
const trimMarkupComments: (rawMarkup: string) => string;
|
|
32
|
+
const specialcharsDecode: (text: string, quoteStyle?: number | string) => string;
|
|
33
|
+
const slash: (value: any) => any;
|
|
34
|
+
const mapDeep: <V = any>(value: V, callback: (value: any) => any) => V;
|
|
35
|
+
const stripslashesDeep: <V = any>(value: V) => V;
|
|
36
|
+
const stripslashesFromStringsOnly: <V = any>(value: V) => V;
|
|
37
|
+
const unslash: <V = any>(value: V) => V;
|
|
38
|
+
const untrailingslashit: (value: string) => string;
|
|
39
|
+
const removeAccents: (input: string) => string;
|
|
40
|
+
const slug: (v: string) => string;
|
|
41
|
+
const key: (key: string | number) => string;
|
|
42
|
+
const username: (username: string, strict?: boolean) => string;
|
|
43
|
+
const stripTags: (value: string) => string;
|
|
44
|
+
const normalizeWhitespace: (str: string) => string;
|
|
45
|
+
const primitive: (value: any) => string | number | boolean | object | null | bigint | symbol | Function | undefined;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/common/formatting.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGrD,yBAAiB,UAAU,CAAC;IACnB,MAAM,IAAI;;;;;;;;;;;;;;;;kBAAa,CAAC;IACxB,MAAM,SAAS,wBAAkB,CAAC;IAEzC;;;;;OAKG;IACI,MAAM,SAAS,GAAI,UAAU,MAAM;;;KAiBzC,CAAC;IAEK,MAAM,kBAAkB,GAAI,WAAW,MAAM,KAAG,MAMtD,CAAC;IAGK,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,aAAY,MAAM,GAAG,MAAU,KAC9B,MAgDF,CAAC;IAEK,MAAM,KAAK,GAAI,OAAO,GAAG,KAAG,GAUlC,CAAC;IAEK,MAAM,OAAO,GAAI,CAAC,GAAG,GAAG,EAC7B,OAAO,CAAC,EACR,UAAU,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,KAC5B,CAkBF,CAAC;IAEK,MAAM,gBAAgB,GAAI,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,KAAG,CAEpD,CAAC;IAEK,MAAM,2BAA2B,GAAI,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,KAAG,CAK/D,CAAC;IAEK,MAAM,OAAO,GAAI,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,KAAG,CAA4B,CAAC;IAUlE,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAEjD,CAAC;IAEK,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAE7C,CAAC;IAEK,MAAM,IAAI,GAAI,GAAG,MAAM,WAM7B,CAAC;IAEK,MAAM,GAAG,GAAI,KAAK,MAAM,GAAG,MAAM,KAAG,MAM1C,CAAC;IAEK,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,gBAAc,WAShC,CAAC;IAEnB,MAAM,SAAS,GAAI,OAAO,MAAM,WAEtC,CAAC;IAEK,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,MAWjD,CAAC;IAEK,MAAM,SAAS,GACpB,OAAO,GAAG,KAER,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,IAAI,GACJ,MAAM,GACN,MAAM,GAEN,QAAQ,GACR,SAsDH,CAAC;CACH"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatting = void 0;
|
|
4
|
+
const php_serialize_1 = require("./php-serialize");
|
|
5
|
+
const date_1 = require("./date");
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
7
|
+
var formatting;
|
|
8
|
+
(function (formatting) {
|
|
9
|
+
formatting.date = date_1.formatDate;
|
|
10
|
+
formatting.dateMySQL = date_1.formatDateMySQL;
|
|
11
|
+
/**
|
|
12
|
+
* Parse a full name into first and last names.
|
|
13
|
+
*
|
|
14
|
+
* @param fullName - The full name to parse
|
|
15
|
+
* @returns An object containing the first and last names
|
|
16
|
+
*/
|
|
17
|
+
formatting.parseName = (fullName) => {
|
|
18
|
+
// Trim the input and check if it is empty
|
|
19
|
+
const trimmedName = fullName.trim();
|
|
20
|
+
if (!trimmedName) {
|
|
21
|
+
// Return default values if the input is empty or only spaces
|
|
22
|
+
return { firstName: "", lastName: "" };
|
|
23
|
+
}
|
|
24
|
+
const names = trimmedName.split(/\s+/); // Split the string by whitespace
|
|
25
|
+
if (names.length === 1) {
|
|
26
|
+
// If there's only one name part, consider it as the first name
|
|
27
|
+
return { firstName: names[0], lastName: "" };
|
|
28
|
+
}
|
|
29
|
+
// Take the first part as the first name, and join the rest as the last name
|
|
30
|
+
const firstName = names.shift(); // Remove and get the first element
|
|
31
|
+
const lastName = names.join(" "); // Join the remaining elements to form the last name
|
|
32
|
+
return { firstName, lastName };
|
|
33
|
+
};
|
|
34
|
+
formatting.trimMarkupComments = (rawMarkup) => {
|
|
35
|
+
// Regular expression to match HTML comments
|
|
36
|
+
const commentPattern = /<!--[\s\S]*?-->/g;
|
|
37
|
+
// Replace HTML comments with an empty string
|
|
38
|
+
const trimmedMarkup = rawMarkup.replace(commentPattern, "");
|
|
39
|
+
return trimmedMarkup;
|
|
40
|
+
};
|
|
41
|
+
// wp_specialchars_decode
|
|
42
|
+
formatting.specialcharsDecode = (text, quoteStyle = 2) => {
|
|
43
|
+
text = text.toString();
|
|
44
|
+
if (text.length === 0) {
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
// Don't bother if there are no entities - saves a lot of processing.
|
|
48
|
+
if (!text.includes("&")) {
|
|
49
|
+
return text;
|
|
50
|
+
}
|
|
51
|
+
// Match the previous behavior of _wp_specialchars() when the quoteStyle is not an accepted value.
|
|
52
|
+
if (!quoteStyle) {
|
|
53
|
+
quoteStyle = 2;
|
|
54
|
+
}
|
|
55
|
+
else if (![0, 2, 3, "single", "double"].includes(quoteStyle)) {
|
|
56
|
+
quoteStyle = 3;
|
|
57
|
+
}
|
|
58
|
+
// More complete than get_html_translation_table( HTML_SPECIALCHARS ).
|
|
59
|
+
const single = {
|
|
60
|
+
"'": "'",
|
|
61
|
+
"'": "'",
|
|
62
|
+
};
|
|
63
|
+
const double = {
|
|
64
|
+
""": '"',
|
|
65
|
+
""": '"',
|
|
66
|
+
""": '"',
|
|
67
|
+
};
|
|
68
|
+
const others = {
|
|
69
|
+
"<": "<",
|
|
70
|
+
"<": "<",
|
|
71
|
+
">": ">",
|
|
72
|
+
">": ">",
|
|
73
|
+
"&": "&",
|
|
74
|
+
"&": "&",
|
|
75
|
+
"&": "&",
|
|
76
|
+
"'": "'",
|
|
77
|
+
"'": "'",
|
|
78
|
+
};
|
|
79
|
+
// Define a regular expression to match HTML entities
|
|
80
|
+
const entityRegex = /&(#[0-9]+|#x[0-9a-fA-F]+|[A-Za-z]+);/g;
|
|
81
|
+
// Replace characters according to translation table.
|
|
82
|
+
return text.replace(entityRegex, (match) => {
|
|
83
|
+
return others[match] || double[match] || single[match] || match;
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
formatting.slash = (value) => {
|
|
87
|
+
if (Array.isArray(value)) {
|
|
88
|
+
return value.map(formatting.slash);
|
|
89
|
+
}
|
|
90
|
+
if (typeof value === "string") {
|
|
91
|
+
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
};
|
|
95
|
+
formatting.mapDeep = (value, callback) => {
|
|
96
|
+
if (Array.isArray(value)) {
|
|
97
|
+
for (let index = 0; index < value.length; index++) {
|
|
98
|
+
value[index] = formatting.mapDeep(value[index], callback);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (typeof value === "object" && value !== null) {
|
|
102
|
+
const objectKeys = Object.keys(value);
|
|
103
|
+
for (const propertyName of objectKeys) {
|
|
104
|
+
value[propertyName] = formatting.mapDeep(value[propertyName], callback);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
value = callback(value);
|
|
109
|
+
}
|
|
110
|
+
return value;
|
|
111
|
+
};
|
|
112
|
+
formatting.stripslashesDeep = (value) => {
|
|
113
|
+
return formatting.mapDeep(value, formatting.stripslashesFromStringsOnly);
|
|
114
|
+
};
|
|
115
|
+
formatting.stripslashesFromStringsOnly = (value) => {
|
|
116
|
+
if (typeof value === "string") {
|
|
117
|
+
return value.replace(/\\/g, "");
|
|
118
|
+
}
|
|
119
|
+
return value;
|
|
120
|
+
};
|
|
121
|
+
formatting.unslash = (value) => formatting.stripslashesDeep(value);
|
|
122
|
+
/*
|
|
123
|
+
export const unslash = <V = any>(v: V): V => {
|
|
124
|
+
if (typeof v === "string") {
|
|
125
|
+
return v.replace(/\\/g, "") as V;
|
|
126
|
+
}
|
|
127
|
+
return v;
|
|
128
|
+
};
|
|
129
|
+
*/
|
|
130
|
+
formatting.untrailingslashit = (value) => {
|
|
131
|
+
return value.replace(/[/\\]+$/, "");
|
|
132
|
+
};
|
|
133
|
+
formatting.removeAccents = (input) => {
|
|
134
|
+
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
135
|
+
};
|
|
136
|
+
formatting.slug = (v) => {
|
|
137
|
+
return formatting.unslash(formatting.removeAccents(v.trim())
|
|
138
|
+
.replace(/[\s\t]+/g, "-")
|
|
139
|
+
.toLowerCase());
|
|
140
|
+
};
|
|
141
|
+
formatting.key = (key) => {
|
|
142
|
+
if (typeof key === "string" || typeof key === "number") {
|
|
143
|
+
key = String(key).toLowerCase();
|
|
144
|
+
key = key.replace(/[^a-z0-9_-]/g, "");
|
|
145
|
+
}
|
|
146
|
+
return key;
|
|
147
|
+
};
|
|
148
|
+
formatting.username = (username, strict = false) => username
|
|
149
|
+
.replace(/<[^>]*>/g, "") // Strip all HTML tags
|
|
150
|
+
.normalize("NFD")
|
|
151
|
+
.replace(/[\u0300-\u036f]/g, "") // Remove accents
|
|
152
|
+
.replace(/%[a-fA-F0-9]{2}/g, "") // Remove percent-encoded characters
|
|
153
|
+
.replace(/&\S+?;/g, "") // Remove HTML entities
|
|
154
|
+
.replace(strict ? /[^a-z0-9 _.\-@]/gi : "", "") // If strict, reduce to ASCII for max portability
|
|
155
|
+
.trim() // Trim leading and trailing whitespace
|
|
156
|
+
.replace(/\s+/g, " "); // Consolidate contiguous whitespace
|
|
157
|
+
formatting.stripTags = (value) => {
|
|
158
|
+
return value.replace(/<[^>]*>/g, ""); // Strip all HTML tags
|
|
159
|
+
};
|
|
160
|
+
formatting.normalizeWhitespace = (str) => {
|
|
161
|
+
// Remove leading and trailing whitespace, then replace carriage returns with newlines
|
|
162
|
+
return (str
|
|
163
|
+
.trim()
|
|
164
|
+
.replace(/\r/g, "\n")
|
|
165
|
+
// Replace multiple consecutive newlines with a single newline
|
|
166
|
+
.replace(/\n+/g, "\n")
|
|
167
|
+
// Replace multiple consecutive spaces or tabs with a single space
|
|
168
|
+
.replace(/[ \t]+/g, " "));
|
|
169
|
+
};
|
|
170
|
+
formatting.primitive = (value) => {
|
|
171
|
+
if ([
|
|
172
|
+
"undefined",
|
|
173
|
+
"boolean",
|
|
174
|
+
"number",
|
|
175
|
+
"bigint",
|
|
176
|
+
"symbol",
|
|
177
|
+
"function",
|
|
178
|
+
].includes(typeof value)) {
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
if (typeof value === "object") {
|
|
182
|
+
return Object.assign({}, value);
|
|
183
|
+
}
|
|
184
|
+
if (typeof value !== "string") {
|
|
185
|
+
value = new String(value).toString();
|
|
186
|
+
}
|
|
187
|
+
if (value === "true" || value === "false") {
|
|
188
|
+
return value === "true";
|
|
189
|
+
}
|
|
190
|
+
try {
|
|
191
|
+
if (value.match(/^[0-9]+[.0-9]*$/)) {
|
|
192
|
+
const numValue = parseFloat(value);
|
|
193
|
+
if (!isNaN(numValue)) {
|
|
194
|
+
return numValue;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch (e) {
|
|
199
|
+
/* empty */
|
|
200
|
+
}
|
|
201
|
+
if (value === "null") {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
if (value === "undefined") {
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
try {
|
|
208
|
+
const parsedObject = JSON.parse(value);
|
|
209
|
+
if (typeof parsedObject === "object") {
|
|
210
|
+
return parsedObject;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
catch (e) {
|
|
214
|
+
/* empty */
|
|
215
|
+
}
|
|
216
|
+
return (0, php_serialize_1.phpUnserialize)(value);
|
|
217
|
+
};
|
|
218
|
+
})(formatting || (exports.formatting = formatting = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as types from "../types";
|
|
2
|
+
type Item<T = "terms" | "posts" | "comments", Extended = any> = T extends "terms" ? Pick<types.Tables["terms"], "term_id"> & {
|
|
3
|
+
parent: number;
|
|
4
|
+
} & Extended : T extends "comments" ? Pick<types.Tables["comments"], "comment_ID" | "comment_parent"> & Partial<types.Tables["comments"]> & Extended : Pick<types.Tables["posts"], "ID" | "post_parent"> & Extended;
|
|
5
|
+
type Hierarchy<T> = Array<T & {
|
|
6
|
+
depth: number;
|
|
7
|
+
children: Hierarchy<T>;
|
|
8
|
+
}>;
|
|
9
|
+
type Flat<T> = Array<T & {
|
|
10
|
+
depth: number;
|
|
11
|
+
}>;
|
|
12
|
+
declare const to: <Extended, T extends "terms" | "posts" | "comments", I extends Item<T, Extended> = Item<T, Extended>>(table: T, items: I[]) => Hierarchy<I>;
|
|
13
|
+
export declare const comments: <TComments extends Item<"comments", types.Tables["comments"]>>(comments: TComments[]) => Hierarchy<Pick<types.WpComments, "comment_ID" | "comment_parent"> & Partial<types.WpComments> & TComments>;
|
|
14
|
+
export declare const posts: <TPosts extends Item<"posts", types.Tables["posts"]>>(posts: TPosts[]) => Hierarchy<Pick<types.WpPosts, "ID" | "post_parent"> & TPosts>;
|
|
15
|
+
export declare const terms: <TTerms extends Item<"terms", Partial<types.Tables["terms"]>>>(terms: TTerms[]) => Hierarchy<Pick<types.WpTerms, "term_id"> & {
|
|
16
|
+
parent: number;
|
|
17
|
+
} & TTerms>;
|
|
18
|
+
export declare const flat: <T extends Parameters<typeof to>[1]>(table: Parameters<typeof to>[0], items: T) => Flat<T[number]>;
|
|
19
|
+
export declare const map: <T extends Parameters<typeof to>[1], R>(table: Parameters<typeof to>[0], items: T, cb: (item: Hierarchy<T[number]>[number], index: number) => R) => R[];
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=hierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../src/common/hierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AAEvC,KAAK,IAAI,CACP,CAAC,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,EAClC,QAAQ,GAAG,GAAG,IACZ,CAAC,SAAS,OAAO,GACjB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,GAExE,CAAC,SAAS,UAAU,GAClB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,YAAY,GAAG,gBAAgB,CAAC,GAC7D,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GACjC,QAAQ,GACV,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC,GAE/C,QAAQ,CAAC;AAEf,KAAK,SAAS,CAAC,CAAC,IAAI,KAAK,CACvB,CAAC,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACxB,CACF,CAAC;AAEF,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5C,QAAA,MAAM,EAAE,GACN,QAAQ,EACR,CAAC,SAAS,OAAO,GAAG,OAAO,GAAG,UAAU,EACxC,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,EAE/C,OAAO,CAAC,EACR,OAAO,CAAC,EAAE,iBAyCX,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,SAAS,SAAS,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAE5D,UAAU,SAAS,EAAE,+GAGtB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,MAAM,SAAS,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EACvE,OAAO,MAAM,EAAE,kEAGhB,CAAC;AAEF,eAAO,MAAM,KAAK,GAChB,MAAM,SAAS,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAE5D,OAAO,MAAM,EAAE;YArFsC,MAAM;WAwF5D,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EACrD,OAAO,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAC/B,OAAO,CAAC,oBAcT,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EACvD,OAAO,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAC/B,OAAO,CAAC,EACR,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,QAgB7D,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.map = exports.flat = exports.terms = exports.posts = exports.comments = void 0;
|
|
4
|
+
const to = (table, items) => {
|
|
5
|
+
const flat = items.map((item) => ({
|
|
6
|
+
...item,
|
|
7
|
+
depth: 0,
|
|
8
|
+
children: [],
|
|
9
|
+
}));
|
|
10
|
+
const hierarchy = [];
|
|
11
|
+
outerLoop: for (const item of flat) {
|
|
12
|
+
const parentId = table == "terms"
|
|
13
|
+
? item.parent
|
|
14
|
+
: table == "comments"
|
|
15
|
+
? item.comment_parent
|
|
16
|
+
: item.post_parent;
|
|
17
|
+
if (0 >= parentId) {
|
|
18
|
+
hierarchy.push(item);
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
for (const parent of flat) {
|
|
22
|
+
const parentItemId = table == "terms"
|
|
23
|
+
? parent.term_id
|
|
24
|
+
: table == "comments"
|
|
25
|
+
? parent.comment_ID
|
|
26
|
+
: parent.ID;
|
|
27
|
+
if (parentId == parentItemId) {
|
|
28
|
+
item.depth = parent.depth + 1;
|
|
29
|
+
parent.children.push(item);
|
|
30
|
+
continue outerLoop;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// If no parent is found in the entire flat array, add the item to hierarchy
|
|
34
|
+
hierarchy.push(item);
|
|
35
|
+
}
|
|
36
|
+
return hierarchy;
|
|
37
|
+
};
|
|
38
|
+
const comments = (comments) => {
|
|
39
|
+
return to("comments", comments);
|
|
40
|
+
};
|
|
41
|
+
exports.comments = comments;
|
|
42
|
+
const posts = (posts) => {
|
|
43
|
+
return to("posts", posts);
|
|
44
|
+
};
|
|
45
|
+
exports.posts = posts;
|
|
46
|
+
const terms = (terms) => {
|
|
47
|
+
return to("terms", terms);
|
|
48
|
+
};
|
|
49
|
+
exports.terms = terms;
|
|
50
|
+
const flat = (table, items) => {
|
|
51
|
+
const r = [];
|
|
52
|
+
function innerFn(hierarchy) {
|
|
53
|
+
for (const item of hierarchy) {
|
|
54
|
+
r.push({ ...item, depth: item.depth });
|
|
55
|
+
if (item.children) {
|
|
56
|
+
innerFn(item.children);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
innerFn(to(table, items));
|
|
61
|
+
return r;
|
|
62
|
+
};
|
|
63
|
+
exports.flat = flat;
|
|
64
|
+
const map = (table, items, cb) => {
|
|
65
|
+
const r = [];
|
|
66
|
+
let index = 0;
|
|
67
|
+
function innerFn(hierarchy) {
|
|
68
|
+
for (const item of hierarchy) {
|
|
69
|
+
r.push(cb(item, index++));
|
|
70
|
+
if (item.children) {
|
|
71
|
+
innerFn(item.children);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
innerFn(to(table, items));
|
|
76
|
+
return r;
|
|
77
|
+
};
|
|
78
|
+
exports.map = map;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HooksCommand } from "../core/hooks/hooks-command";
|
|
2
|
+
import type * as types from "../types";
|
|
3
|
+
export declare const createFilterCommand: <T1, T2 = null>() => types.hooks.CommandFilter<T1, T2>;
|
|
4
|
+
export declare const createNamedFilterCommand: <T1 extends Parameters<typeof HooksCommand.createNamedFilter>[0]>(name: T1) => types.hooks.FiltersReturnType<T1> extends Promise<any> ? types.hooks.CommandFilter<Promise<types.hooks.FilterParameters<T1>[0]>, types.hooks.CommandFilterSecondParam<T1>> : types.hooks.CommandFilter<types.hooks.FilterParameters<T1>[0], types.hooks.CommandFilterSecondParam<T1>>;
|
|
5
|
+
export declare const createActionCommand: <P>() => types.hooks.CommandAction<P>;
|
|
6
|
+
export declare const createNamedActionCommand: <T1 extends Parameters<typeof HooksCommand.createNamedAction>[0]>(name: T1) => types.hooks.CommandAction<types.hooks.ActionParameters<T1>>;
|
|
7
|
+
//# sourceMappingURL=hooks-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-command.d.ts","sourceRoot":"","sources":["../../src/common/hooks-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,mBAAmB,GAAI,EAAE,EAAE,EAAE,GAAG,IAAI,OACT,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CACvE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,EAAE,SAAS,UAAU,CAAC,OAAO,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAE/D,MAAM,EAAE,KAIH,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GACvD,KAAK,CAAC,KAAK,CAAC,aAAa,CACvB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5C,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CACzC,GACD,KAAK,CAAC,KAAK,CAAC,aAAa,CACvB,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EACnC,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAE/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,OACG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAClE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,EAAE,SAAS,UAAU,CAAC,OAAO,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAE/D,MAAM,EAAE,KAEuC,KAAK,CAAC,KAAK,CAAC,aAAa,CACtE,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAEnC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNamedActionCommand = exports.createActionCommand = exports.createNamedFilterCommand = exports.createFilterCommand = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const hooks_command_1 = require("../core/hooks/hooks-command");
|
|
6
|
+
const createFilterCommand = () => {
|
|
7
|
+
return hooks_command_1.HooksCommand.createFilter();
|
|
8
|
+
};
|
|
9
|
+
exports.createFilterCommand = createFilterCommand;
|
|
10
|
+
const createNamedFilterCommand = (name) => {
|
|
11
|
+
return hooks_command_1.HooksCommand.createNamedFilter(name);
|
|
12
|
+
};
|
|
13
|
+
exports.createNamedFilterCommand = createNamedFilterCommand;
|
|
14
|
+
const createActionCommand = () => {
|
|
15
|
+
return hooks_command_1.HooksCommand.createAction();
|
|
16
|
+
};
|
|
17
|
+
exports.createActionCommand = createActionCommand;
|
|
18
|
+
const createNamedActionCommand = (name) => {
|
|
19
|
+
return hooks_command_1.HooksCommand.createNamedAction(name);
|
|
20
|
+
};
|
|
21
|
+
exports.createNamedActionCommand = createNamedActionCommand;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./config/define-wp.config.";
|
|
2
|
+
export * from "./async-constructor";
|
|
3
|
+
export * from "./php-serialize";
|
|
4
|
+
export * from "./date";
|
|
5
|
+
export * from "./formatting";
|
|
6
|
+
export * from "./password";
|
|
7
|
+
export * from "./validating";
|
|
8
|
+
export * from "./config";
|
|
9
|
+
export * as hierarchy from "./hierarchy";
|
|
10
|
+
export * from "./define-hooks";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,gBAAgB,CAAC"}
|