@budibase/backend-core 3.2.26 → 3.2.27
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/index.js +62 -23
- package/dist/index.js.map +4 -4
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +7 -7
- package/dist/plugins.js.map +2 -2
- package/dist/plugins.js.meta.json +1 -1
- package/dist/src/events/processors/types.d.ts +1 -1
- package/dist/src/events/publishers/index.d.ts +1 -0
- package/dist/src/events/publishers/rowAction.d.ts +6 -0
- package/dist/src/events/publishers/table.d.ts +2 -2
- package/dist/src/events/publishers/view.d.ts +17 -6
- package/dist/src/index.d.ts +11 -11
- package/dist/src/platform/platformDb.d.ts +1 -1
- package/dist/src/queue/queue.d.ts +1 -1
- package/dist/src/tenancy/db.d.ts +1 -1
- package/package.json +7 -7
- package/dist/jest.config.js +0 -25
- package/dist/jest.config.js.map +0 -1
- package/dist/src/accounts/accounts.js +0 -83
- package/dist/src/accounts/accounts.js.map +0 -1
- package/dist/src/accounts/api.js +0 -102
- package/dist/src/accounts/api.js.map +0 -1
- package/dist/src/accounts/index.js +0 -18
- package/dist/src/accounts/index.js.map +0 -1
- package/dist/src/auth/auth.js +0 -198
- package/dist/src/auth/auth.js.map +0 -1
- package/dist/src/auth/index.js +0 -18
- package/dist/src/auth/index.js.map +0 -1
- package/dist/src/blacklist/blacklist.js +0 -75
- package/dist/src/blacklist/blacklist.js.map +0 -1
- package/dist/src/blacklist/index.js +0 -18
- package/dist/src/blacklist/index.js.map +0 -1
- package/dist/src/cache/appMetadata.js +0 -96
- package/dist/src/cache/appMetadata.js.map +0 -1
- package/dist/src/cache/base/index.js +0 -189
- package/dist/src/cache/base/index.js.map +0 -1
- package/dist/src/cache/docWritethrough.js +0 -123
- package/dist/src/cache/docWritethrough.js.map +0 -1
- package/dist/src/cache/generic.js +0 -37
- package/dist/src/cache/generic.js.map +0 -1
- package/dist/src/cache/index.js +0 -48
- package/dist/src/cache/index.js.map +0 -1
- package/dist/src/cache/invite.js +0 -128
- package/dist/src/cache/invite.js.map +0 -1
- package/dist/src/cache/passwordReset.js +0 -92
- package/dist/src/cache/passwordReset.js.map +0 -1
- package/dist/src/cache/user.js +0 -183
- package/dist/src/cache/user.js.map +0 -1
- package/dist/src/cache/writethrough.js +0 -170
- package/dist/src/cache/writethrough.js.map +0 -1
- package/dist/src/configs/configs.js +0 -294
- package/dist/src/configs/configs.js.map +0 -1
- package/dist/src/configs/index.js +0 -18
- package/dist/src/configs/index.js.map +0 -1
- package/dist/src/constants/db.js +0 -75
- package/dist/src/constants/db.js.map +0 -1
- package/dist/src/constants/index.js +0 -19
- package/dist/src/constants/index.js.map +0 -1
- package/dist/src/constants/misc.js +0 -40
- package/dist/src/constants/misc.js.map +0 -1
- package/dist/src/context/Context.js +0 -14
- package/dist/src/context/Context.js.map +0 -1
- package/dist/src/context/identity.js +0 -81
- package/dist/src/context/identity.js.map +0 -1
- package/dist/src/context/index.js +0 -44
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/context/mainContext.js +0 -446
- package/dist/src/context/mainContext.js.map +0 -1
- package/dist/src/context/types.js +0 -3
- package/dist/src/context/types.js.map +0 -1
- package/dist/src/db/Replication.js +0 -90
- package/dist/src/db/Replication.js.map +0 -1
- package/dist/src/db/couch/DatabaseImpl.js +0 -475
- package/dist/src/db/couch/DatabaseImpl.js.map +0 -1
- package/dist/src/db/couch/connections.js +0 -101
- package/dist/src/db/couch/connections.js.map +0 -1
- package/dist/src/db/couch/index.js +0 -26
- package/dist/src/db/couch/index.js.map +0 -1
- package/dist/src/db/couch/pouchDB.js +0 -108
- package/dist/src/db/couch/pouchDB.js.map +0 -1
- package/dist/src/db/couch/pouchDump.js +0 -2
- package/dist/src/db/couch/pouchDump.js.map +0 -1
- package/dist/src/db/couch/utils.js +0 -60
- package/dist/src/db/couch/utils.js.map +0 -1
- package/dist/src/db/db.js +0 -47
- package/dist/src/db/db.js.map +0 -1
- package/dist/src/db/errors.js +0 -21
- package/dist/src/db/errors.js.map +0 -1
- package/dist/src/db/index.js +0 -58
- package/dist/src/db/index.js.map +0 -1
- package/dist/src/db/instrumentation.js +0 -202
- package/dist/src/db/instrumentation.js.map +0 -1
- package/dist/src/db/lucene.js +0 -638
- package/dist/src/db/lucene.js.map +0 -1
- package/dist/src/db/searchIndexes/index.js +0 -18
- package/dist/src/db/searchIndexes/index.js.map +0 -1
- package/dist/src/db/searchIndexes/searchIndexes.js +0 -76
- package/dist/src/db/searchIndexes/searchIndexes.js.map +0 -1
- package/dist/src/db/utils.js +0 -212
- package/dist/src/db/utils.js.map +0 -1
- package/dist/src/db/views.js +0 -224
- package/dist/src/db/views.js.map +0 -1
- package/dist/src/docIds/conversions.js +0 -62
- package/dist/src/docIds/conversions.js.map +0 -1
- package/dist/src/docIds/ids.js +0 -125
- package/dist/src/docIds/ids.js.map +0 -1
- package/dist/src/docIds/index.js +0 -19
- package/dist/src/docIds/index.js.map +0 -1
- package/dist/src/docIds/newid.js +0 -8
- package/dist/src/docIds/newid.js.map +0 -1
- package/dist/src/docIds/params.js +0 -141
- package/dist/src/docIds/params.js.map +0 -1
- package/dist/src/docUpdates/index.js +0 -35
- package/dist/src/docUpdates/index.js.map +0 -1
- package/dist/src/environment.js +0 -182
- package/dist/src/environment.js.map +0 -1
- package/dist/src/errors/errors.js +0 -97
- package/dist/src/errors/errors.js.map +0 -1
- package/dist/src/errors/index.js +0 -18
- package/dist/src/errors/index.js.map +0 -1
- package/dist/src/events/analytics.js +0 -52
- package/dist/src/events/analytics.js.map +0 -1
- package/dist/src/events/asyncEvents/index.js +0 -19
- package/dist/src/events/asyncEvents/index.js.map +0 -1
- package/dist/src/events/asyncEvents/publisher.js +0 -26
- package/dist/src/events/asyncEvents/publisher.js.map +0 -1
- package/dist/src/events/asyncEvents/queue.js +0 -26
- package/dist/src/events/asyncEvents/queue.js.map +0 -1
- package/dist/src/events/backfill.js +0 -189
- package/dist/src/events/backfill.js.map +0 -1
- package/dist/src/events/documentId.js +0 -27
- package/dist/src/events/documentId.js.map +0 -1
- package/dist/src/events/events.js +0 -87
- package/dist/src/events/events.js.map +0 -1
- package/dist/src/events/identification.js +0 -299
- package/dist/src/events/identification.js.map +0 -1
- package/dist/src/events/index.js +0 -59
- package/dist/src/events/index.js.map +0 -1
- package/dist/src/events/processors/AnalyticsProcessor.js +0 -103
- package/dist/src/events/processors/AnalyticsProcessor.js.map +0 -1
- package/dist/src/events/processors/AuditLogsProcessor.js +0 -86
- package/dist/src/events/processors/AuditLogsProcessor.js.map +0 -1
- package/dist/src/events/processors/LoggingProcessor.js +0 -47
- package/dist/src/events/processors/LoggingProcessor.js.map +0 -1
- package/dist/src/events/processors/Processors.js +0 -52
- package/dist/src/events/processors/Processors.js.map +0 -1
- package/dist/src/events/processors/async/DocumentUpdateProcessor.js +0 -44
- package/dist/src/events/processors/async/DocumentUpdateProcessor.js.map +0 -1
- package/dist/src/events/processors/index.js +0 -23
- package/dist/src/events/processors/index.js.map +0 -1
- package/dist/src/events/processors/posthog/PosthogProcessor.js +0 -149
- package/dist/src/events/processors/posthog/PosthogProcessor.js.map +0 -1
- package/dist/src/events/processors/posthog/index.js +0 -8
- package/dist/src/events/processors/posthog/index.js.map +0 -1
- package/dist/src/events/processors/posthog/rateLimiting.js +0 -129
- package/dist/src/events/processors/posthog/rateLimiting.js.map +0 -1
- package/dist/src/events/processors/types.js +0 -3
- package/dist/src/events/processors/types.js.map +0 -1
- package/dist/src/events/publishers/account.js +0 -43
- package/dist/src/events/publishers/account.js.map +0 -1
- package/dist/src/events/publishers/ai.js +0 -30
- package/dist/src/events/publishers/ai.js.map +0 -1
- package/dist/src/events/publishers/app.js +0 -166
- package/dist/src/events/publishers/app.js.map +0 -1
- package/dist/src/events/publishers/auditLog.js +0 -34
- package/dist/src/events/publishers/auditLog.js.map +0 -1
- package/dist/src/events/publishers/auth.js +0 -80
- package/dist/src/events/publishers/auth.js.map +0 -1
- package/dist/src/events/publishers/automation.js +0 -117
- package/dist/src/events/publishers/automation.js.map +0 -1
- package/dist/src/events/publishers/backfill.js +0 -85
- package/dist/src/events/publishers/backfill.js.map +0 -1
- package/dist/src/events/publishers/backup.js +0 -41
- package/dist/src/events/publishers/backup.js.map +0 -1
- package/dist/src/events/publishers/datasource.js +0 -54
- package/dist/src/events/publishers/datasource.js.map +0 -1
- package/dist/src/events/publishers/email.js +0 -30
- package/dist/src/events/publishers/email.js.map +0 -1
- package/dist/src/events/publishers/environmentVariable.js +0 -44
- package/dist/src/events/publishers/environmentVariable.js.map +0 -1
- package/dist/src/events/publishers/group.js +0 -107
- package/dist/src/events/publishers/group.js.map +0 -1
- package/dist/src/events/publishers/index.js +0 -57
- package/dist/src/events/publishers/index.js.map +0 -1
- package/dist/src/events/publishers/installation.js +0 -52
- package/dist/src/events/publishers/installation.js.map +0 -1
- package/dist/src/events/publishers/layout.js +0 -34
- package/dist/src/events/publishers/layout.js.map +0 -1
- package/dist/src/events/publishers/license.js +0 -77
- package/dist/src/events/publishers/license.js.map +0 -1
- package/dist/src/events/publishers/org.js +0 -52
- package/dist/src/events/publishers/org.js.map +0 -1
- package/dist/src/events/publishers/plugin.js +0 -55
- package/dist/src/events/publishers/plugin.js.map +0 -1
- package/dist/src/events/publishers/query.js +0 -74
- package/dist/src/events/publishers/query.js.map +0 -1
- package/dist/src/events/publishers/role.js +0 -69
- package/dist/src/events/publishers/role.js.map +0 -1
- package/dist/src/events/publishers/rows.js +0 -32
- package/dist/src/events/publishers/rows.js.map +0 -1
- package/dist/src/events/publishers/screen.js +0 -46
- package/dist/src/events/publishers/screen.js.map +0 -1
- package/dist/src/events/publishers/serve.js +0 -47
- package/dist/src/events/publishers/serve.js.map +0 -1
- package/dist/src/events/publishers/table.js +0 -77
- package/dist/src/events/publishers/table.js.map +0 -1
- package/dist/src/events/publishers/user.js +0 -201
- package/dist/src/events/publishers/user.js.map +0 -1
- package/dist/src/events/publishers/view.js +0 -111
- package/dist/src/events/publishers/view.js.map +0 -1
- package/dist/src/features/features.js +0 -271
- package/dist/src/features/features.js.map +0 -1
- package/dist/src/features/index.js +0 -42
- package/dist/src/features/index.js.map +0 -1
- package/dist/src/features/tests/utils.js +0 -56
- package/dist/src/features/tests/utils.js.map +0 -1
- package/dist/src/helpers.js +0 -13
- package/dist/src/helpers.js.map +0 -1
- package/dist/src/index.js +0 -99
- package/dist/src/index.js.map +0 -1
- package/dist/src/installation.js +0 -159
- package/dist/src/installation.js.map +0 -1
- package/dist/src/logging/alerts.js +0 -23
- package/dist/src/logging/alerts.js.map +0 -1
- package/dist/src/logging/correlation/correlation.js +0 -18
- package/dist/src/logging/correlation/correlation.js.map +0 -1
- package/dist/src/logging/correlation/index.js +0 -18
- package/dist/src/logging/correlation/index.js.map +0 -1
- package/dist/src/logging/correlation/middleware.js +0 -17
- package/dist/src/logging/correlation/middleware.js.map +0 -1
- package/dist/src/logging/index.js +0 -45
- package/dist/src/logging/index.js.map +0 -1
- package/dist/src/logging/pino/logger.js +0 -234
- package/dist/src/logging/pino/logger.js.map +0 -1
- package/dist/src/logging/pino/middleware.js +0 -46
- package/dist/src/logging/pino/middleware.js.map +0 -1
- package/dist/src/logging/system.js +0 -110
- package/dist/src/logging/system.js.map +0 -1
- package/dist/src/middleware/adminOnly.js +0 -19
- package/dist/src/middleware/adminOnly.js.map +0 -1
- package/dist/src/middleware/auditLog.js +0 -18
- package/dist/src/middleware/auditLog.js.map +0 -1
- package/dist/src/middleware/authenticated.js +0 -254
- package/dist/src/middleware/authenticated.js.map +0 -1
- package/dist/src/middleware/builderOnly.js +0 -33
- package/dist/src/middleware/builderOnly.js.map +0 -1
- package/dist/src/middleware/builderOrAdmin.js +0 -33
- package/dist/src/middleware/builderOrAdmin.js.map +0 -1
- package/dist/src/middleware/contentSecurityPolicy.js +0 -124
- package/dist/src/middleware/contentSecurityPolicy.js.map +0 -1
- package/dist/src/middleware/csrf.js +0 -81
- package/dist/src/middleware/csrf.js.map +0 -1
- package/dist/src/middleware/errorHandling.js +0 -88
- package/dist/src/middleware/errorHandling.js.map +0 -1
- package/dist/src/middleware/index.js +0 -79
- package/dist/src/middleware/index.js.map +0 -1
- package/dist/src/middleware/internalApi.js +0 -30
- package/dist/src/middleware/internalApi.js.map +0 -1
- package/dist/src/middleware/ip.js +0 -23
- package/dist/src/middleware/ip.js.map +0 -1
- package/dist/src/middleware/joi-validator.js +0 -53
- package/dist/src/middleware/joi-validator.js.map +0 -1
- package/dist/src/middleware/matchers.js +0 -36
- package/dist/src/middleware/matchers.js.map +0 -1
- package/dist/src/middleware/passport/datasource/google.js +0 -107
- package/dist/src/middleware/passport/datasource/google.js.map +0 -1
- package/dist/src/middleware/passport/local.js +0 -91
- package/dist/src/middleware/passport/local.js.map +0 -1
- package/dist/src/middleware/passport/sso/google.js +0 -98
- package/dist/src/middleware/passport/sso/google.js.map +0 -1
- package/dist/src/middleware/passport/sso/oidc.js +0 -158
- package/dist/src/middleware/passport/sso/oidc.js.map +0 -1
- package/dist/src/middleware/passport/sso/sso.js +0 -150
- package/dist/src/middleware/passport/sso/sso.js.map +0 -1
- package/dist/src/middleware/passport/utils.js +0 -75
- package/dist/src/middleware/passport/utils.js.map +0 -1
- package/dist/src/middleware/querystringToBody.js +0 -29
- package/dist/src/middleware/querystringToBody.js.map +0 -1
- package/dist/src/middleware/tenancy.js +0 -37
- package/dist/src/middleware/tenancy.js.map +0 -1
- package/dist/src/migrations/definitions.js +0 -39
- package/dist/src/migrations/definitions.js.map +0 -1
- package/dist/src/migrations/index.js +0 -19
- package/dist/src/migrations/index.js.map +0 -1
- package/dist/src/migrations/migrations.js +0 -203
- package/dist/src/migrations/migrations.js.map +0 -1
- package/dist/src/objectStore/buckets/app.js +0 -95
- package/dist/src/objectStore/buckets/app.js.map +0 -1
- package/dist/src/objectStore/buckets/global.js +0 -68
- package/dist/src/objectStore/buckets/global.js.map +0 -1
- package/dist/src/objectStore/buckets/index.js +0 -20
- package/dist/src/objectStore/buckets/index.js.map +0 -1
- package/dist/src/objectStore/buckets/plugins.js +0 -104
- package/dist/src/objectStore/buckets/plugins.js.map +0 -1
- package/dist/src/objectStore/cloudfront.js +0 -73
- package/dist/src/objectStore/cloudfront.js.map +0 -1
- package/dist/src/objectStore/index.js +0 -20
- package/dist/src/objectStore/index.js.map +0 -1
- package/dist/src/objectStore/objectStore.js +0 -509
- package/dist/src/objectStore/objectStore.js.map +0 -1
- package/dist/src/objectStore/utils.js +0 -148
- package/dist/src/objectStore/utils.js.map +0 -1
- package/dist/src/platform/index.js +0 -43
- package/dist/src/platform/index.js.map +0 -1
- package/dist/src/platform/platformDb.js +0 -9
- package/dist/src/platform/platformDb.js.map +0 -1
- package/dist/src/platform/tenants.js +0 -149
- package/dist/src/platform/tenants.js.map +0 -1
- package/dist/src/platform/users.js +0 -118
- package/dist/src/platform/users.js.map +0 -1
- package/dist/src/plugin/index.js +0 -18
- package/dist/src/plugin/index.js.map +0 -1
- package/dist/src/plugin/utils.js +0 -158
- package/dist/src/plugin/utils.js.map +0 -1
- package/dist/src/queue/constants.js +0 -13
- package/dist/src/queue/constants.js.map +0 -1
- package/dist/src/queue/inMemoryQueue.js +0 -192
- package/dist/src/queue/inMemoryQueue.js.map +0 -1
- package/dist/src/queue/index.js +0 -19
- package/dist/src/queue/index.js.map +0 -1
- package/dist/src/queue/listeners.js +0 -199
- package/dist/src/queue/listeners.js.map +0 -1
- package/dist/src/queue/queue.js +0 -124
- package/dist/src/queue/queue.js.map +0 -1
- package/dist/src/redis/index.js +0 -47
- package/dist/src/redis/index.js.map +0 -1
- package/dist/src/redis/init.js +0 -184
- package/dist/src/redis/init.js.map +0 -1
- package/dist/src/redis/redis.js +0 -396
- package/dist/src/redis/redis.js.map +0 -1
- package/dist/src/redis/redlockImpl.js +0 -181
- package/dist/src/redis/redlockImpl.js.map +0 -1
- package/dist/src/redis/utils.js +0 -131
- package/dist/src/redis/utils.js.map +0 -1
- package/dist/src/security/auth.js +0 -26
- package/dist/src/security/auth.js.map +0 -1
- package/dist/src/security/encryption.js +0 -169
- package/dist/src/security/encryption.js.map +0 -1
- package/dist/src/security/index.js +0 -18
- package/dist/src/security/index.js.map +0 -1
- package/dist/src/security/permissions.js +0 -147
- package/dist/src/security/permissions.js.map +0 -1
- package/dist/src/security/roles.js +0 -566
- package/dist/src/security/roles.js.map +0 -1
- package/dist/src/security/secrets.js +0 -53
- package/dist/src/security/secrets.js.map +0 -1
- package/dist/src/security/sessions.js +0 -156
- package/dist/src/security/sessions.js.map +0 -1
- package/dist/src/sql/designDoc.js +0 -19
- package/dist/src/sql/designDoc.js.map +0 -1
- package/dist/src/sql/index.js +0 -47
- package/dist/src/sql/index.js.map +0 -1
- package/dist/src/sql/sql.js +0 -1536
- package/dist/src/sql/sql.js.map +0 -1
- package/dist/src/sql/sqlTable.js +0 -256
- package/dist/src/sql/sqlTable.js.map +0 -1
- package/dist/src/sql/utils.js +0 -179
- package/dist/src/sql/utils.js.map +0 -1
- package/dist/src/tenancy/db.js +0 -9
- package/dist/src/tenancy/db.js.map +0 -1
- package/dist/src/tenancy/index.js +0 -19
- package/dist/src/tenancy/index.js.map +0 -1
- package/dist/src/tenancy/tenancy.js +0 -125
- package/dist/src/tenancy/tenancy.js.map +0 -1
- package/dist/src/timers/index.js +0 -18
- package/dist/src/timers/index.js.map +0 -1
- package/dist/src/timers/timers.js +0 -25
- package/dist/src/timers/timers.js.map +0 -1
- package/dist/src/users/db.js +0 -489
- package/dist/src/users/db.js.map +0 -1
- package/dist/src/users/events.js +0 -179
- package/dist/src/users/events.js.map +0 -1
- package/dist/src/users/index.js +0 -23
- package/dist/src/users/index.js.map +0 -1
- package/dist/src/users/lookup.js +0 -126
- package/dist/src/users/lookup.js.map +0 -1
- package/dist/src/users/users.js +0 -376
- package/dist/src/users/users.js.map +0 -1
- package/dist/src/users/utils.js +0 -127
- package/dist/src/users/utils.js.map +0 -1
- package/dist/src/utils/Duration.js +0 -54
- package/dist/src/utils/Duration.js.map +0 -1
- package/dist/src/utils/hashing.js +0 -46
- package/dist/src/utils/hashing.js.map +0 -1
- package/dist/src/utils/index.js +0 -21
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/stringUtils.js +0 -8
- package/dist/src/utils/stringUtils.js.map +0 -1
- package/dist/src/utils/utils.js +0 -267
- package/dist/src/utils/utils.js.map +0 -1
- package/dist/tests/core/logging.js +0 -33
- package/dist/tests/core/logging.js.map +0 -1
- package/dist/tests/core/utilities/index.js +0 -48
- package/dist/tests/core/utilities/index.js.map +0 -1
- package/dist/tests/core/utilities/jestUtils.js +0 -21
- package/dist/tests/core/utilities/jestUtils.js.map +0 -1
- package/dist/tests/core/utilities/mocks/alerts.js +0 -40
- package/dist/tests/core/utilities/mocks/alerts.js.map +0 -1
- package/dist/tests/core/utilities/mocks/date.js +0 -6
- package/dist/tests/core/utilities/mocks/date.js.map +0 -1
- package/dist/tests/core/utilities/mocks/events.js +0 -154
- package/dist/tests/core/utilities/mocks/events.js.map +0 -1
- package/dist/tests/core/utilities/mocks/index.js +0 -47
- package/dist/tests/core/utilities/mocks/index.js.map +0 -1
- package/dist/tests/core/utilities/mocks/licenses.js +0 -109
- package/dist/tests/core/utilities/mocks/licenses.js.map +0 -1
- package/dist/tests/core/utilities/queue.js +0 -21
- package/dist/tests/core/utilities/queue.js.map +0 -1
- package/dist/tests/core/utilities/structures/Chance.js +0 -21
- package/dist/tests/core/utilities/structures/Chance.js.map +0 -1
- package/dist/tests/core/utilities/structures/accounts.js +0 -43
- package/dist/tests/core/utilities/structures/accounts.js.map +0 -1
- package/dist/tests/core/utilities/structures/apps.js +0 -23
- package/dist/tests/core/utilities/structures/apps.js.map +0 -1
- package/dist/tests/core/utilities/structures/common.js +0 -11
- package/dist/tests/core/utilities/structures/common.js.map +0 -1
- package/dist/tests/core/utilities/structures/db.js +0 -15
- package/dist/tests/core/utilities/structures/db.js.map +0 -1
- package/dist/tests/core/utilities/structures/documents/index.js +0 -18
- package/dist/tests/core/utilities/structures/documents/index.js.map +0 -1
- package/dist/tests/core/utilities/structures/documents/platform/index.js +0 -38
- package/dist/tests/core/utilities/structures/documents/platform/index.js.map +0 -1
- package/dist/tests/core/utilities/structures/documents/platform/installation.js +0 -47
- package/dist/tests/core/utilities/structures/documents/platform/installation.js.map +0 -1
- package/dist/tests/core/utilities/structures/generator.js +0 -9
- package/dist/tests/core/utilities/structures/generator.js.map +0 -1
- package/dist/tests/core/utilities/structures/index.js +0 -56
- package/dist/tests/core/utilities/structures/index.js.map +0 -1
- package/dist/tests/core/utilities/structures/koa.js +0 -10
- package/dist/tests/core/utilities/structures/koa.js.map +0 -1
- package/dist/tests/core/utilities/structures/licenses.js +0 -157
- package/dist/tests/core/utilities/structures/licenses.js.map +0 -1
- package/dist/tests/core/utilities/structures/plugins.js +0 -22
- package/dist/tests/core/utilities/structures/plugins.js.map +0 -1
- package/dist/tests/core/utilities/structures/quotas.js +0 -73
- package/dist/tests/core/utilities/structures/quotas.js.map +0 -1
- package/dist/tests/core/utilities/structures/scim.js +0 -62
- package/dist/tests/core/utilities/structures/scim.js.map +0 -1
- package/dist/tests/core/utilities/structures/sso.js +0 -140
- package/dist/tests/core/utilities/structures/sso.js.map +0 -1
- package/dist/tests/core/utilities/structures/tenants.js +0 -8
- package/dist/tests/core/utilities/structures/tenants.js.map +0 -1
- package/dist/tests/core/utilities/structures/userGroups.js +0 -12
- package/dist/tests/core/utilities/structures/userGroups.js.map +0 -1
- package/dist/tests/core/utilities/structures/users.js +0 -53
- package/dist/tests/core/utilities/structures/users.js.map +0 -1
- package/dist/tests/core/utilities/testContainerUtils.js +0 -161
- package/dist/tests/core/utilities/testContainerUtils.js.map +0 -1
- package/dist/tests/core/utilities/utils/index.js +0 -39
- package/dist/tests/core/utilities/utils/index.js.map +0 -1
- package/dist/tests/core/utilities/utils/queue.js +0 -37
- package/dist/tests/core/utilities/utils/queue.js.map +0 -1
- package/dist/tests/core/utilities/utils/time.js +0 -7
- package/dist/tests/core/utilities/utils/time.js.map +0 -1
- package/dist/tests/extra/DBTestConfiguration.js +0 -65
- package/dist/tests/extra/DBTestConfiguration.js.map +0 -1
- package/dist/tests/extra/index.js +0 -43
- package/dist/tests/extra/index.js.map +0 -1
- package/dist/tests/extra/testEnv.js +0 -136
- package/dist/tests/extra/testEnv.js.map +0 -1
- package/dist/tests/index.js +0 -19
- package/dist/tests/index.js.map +0 -1
- package/dist/tests/jestEnv.js +0 -12
- package/dist/tests/jestEnv.js.map +0 -1
- package/dist/tests/jestSetup.js +0 -33
- package/dist/tests/jestSetup.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
class Processor {
|
|
13
|
-
constructor(processors) {
|
|
14
|
-
this.initialised = false;
|
|
15
|
-
this.processors = [];
|
|
16
|
-
this.processors = processors;
|
|
17
|
-
}
|
|
18
|
-
processEvent(event, identity, properties, timestamp) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
for (const eventProcessor of this.processors) {
|
|
21
|
-
yield eventProcessor.processEvent(event, identity, properties, timestamp);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
identify(identity, timestamp) {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
for (const eventProcessor of this.processors) {
|
|
28
|
-
if (eventProcessor.identify) {
|
|
29
|
-
yield eventProcessor.identify(identity, timestamp);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
identifyGroup(identity, timestamp) {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
for (const eventProcessor of this.processors) {
|
|
37
|
-
if (eventProcessor.identifyGroup) {
|
|
38
|
-
yield eventProcessor.identifyGroup(identity, timestamp);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
shutdown() {
|
|
44
|
-
for (const eventProcessor of this.processors) {
|
|
45
|
-
if (eventProcessor.shutdown) {
|
|
46
|
-
eventProcessor.shutdown();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.default = Processor;
|
|
52
|
-
//# sourceMappingURL=Processors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Processors.js","sourceRoot":"","sources":["../../../../src/events/processors/Processors.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,MAAqB,SAAS;IAI5B,YAAY,UAA4B;QAHxC,gBAAW,GAAY,KAAK,CAAA;QAC5B,eAAU,GAAqB,EAAE,CAAA;QAG/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAEK,YAAY,CAChB,KAAY,EACZ,QAAkB,EAClB,UAAe,EACf,SAA2B;;YAE3B,KAAK,MAAM,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC7C,MAAM,cAAc,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA;YAC3E,CAAC;QACH,CAAC;KAAA;IAEK,QAAQ,CACZ,QAAkB,EAClB,SAA2B;;YAE3B,KAAK,MAAM,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC7C,IAAI,cAAc,CAAC,QAAQ,EAAE,CAAC;oBAC5B,MAAM,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;gBACpD,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAEK,aAAa,CACjB,QAAe,EACf,SAA2B;;YAE3B,KAAK,MAAM,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC7C,IAAI,cAAc,CAAC,aAAa,EAAE,CAAC;oBACjC,MAAM,cAAc,CAAC,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;gBACzD,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAED,QAAQ;QACN,KAAK,MAAM,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAC7C,IAAI,cAAc,CAAC,QAAQ,EAAE,CAAC;gBAC5B,cAAc,CAAC,QAAQ,EAAE,CAAA;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAhDD,4BAgDC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const context_1 = require("../../../context");
|
|
13
|
-
const documentId_1 = require("../../documentId");
|
|
14
|
-
const asyncEvents_1 = require("../../asyncEvents");
|
|
15
|
-
class DocumentUpdateProcessor {
|
|
16
|
-
constructor(processors) {
|
|
17
|
-
this.processors = [];
|
|
18
|
-
this.processors = processors;
|
|
19
|
-
}
|
|
20
|
-
processEvent(event, identity, properties) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const tenantId = identity.realTenantId;
|
|
23
|
-
const docId = (0, documentId_1.getDocumentId)(event, properties);
|
|
24
|
-
if (!tenantId || !docId) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
for (let { events, processor } of this.processors) {
|
|
28
|
-
if (events.includes(event)) {
|
|
29
|
-
yield (0, context_1.doInTenant)(tenantId, () => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield processor({
|
|
31
|
-
id: docId,
|
|
32
|
-
tenantId,
|
|
33
|
-
});
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
shutdown() {
|
|
40
|
-
return (0, asyncEvents_1.shutdown)();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.default = DocumentUpdateProcessor;
|
|
44
|
-
//# sourceMappingURL=DocumentUpdateProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentUpdateProcessor.js","sourceRoot":"","sources":["../../../../../src/events/processors/async/DocumentUpdateProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,8CAA6C;AAC7C,iDAAgD;AAChD,mDAA4C;AAK5C,MAAqB,uBAAuB;IAG1C,YAAY,UAAwB;QAFpC,eAAU,GAAiB,EAAE,CAAA;QAG3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAEK,YAAY,CAAC,KAAY,EAAE,QAAkB,EAAE,UAAe;;YAClE,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAA;YACtC,MAAM,KAAK,GAAG,IAAA,0BAAa,EAAC,KAAK,EAAE,UAAU,CAAC,CAAA;YAC9C,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;gBACxB,OAAM;YACR,CAAC;YACD,KAAK,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC3B,MAAM,IAAA,oBAAU,EAAC,QAAQ,EAAE,GAAS,EAAE;wBACpC,MAAM,SAAS,CAAC;4BACd,EAAE,EAAE,KAAK;4BACT,QAAQ;yBACT,CAAC,CAAA;oBACJ,CAAC,CAAA,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAED,QAAQ;QACN,OAAO,IAAA,sBAAQ,GAAE,CAAA;IACnB,CAAC;CACF;AA5BD,0CA4BC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.processors = exports.analyticsProcessor = void 0;
|
|
7
|
-
exports.init = init;
|
|
8
|
-
const AnalyticsProcessor_1 = __importDefault(require("./AnalyticsProcessor"));
|
|
9
|
-
const LoggingProcessor_1 = __importDefault(require("./LoggingProcessor"));
|
|
10
|
-
const AuditLogsProcessor_1 = __importDefault(require("./AuditLogsProcessor"));
|
|
11
|
-
const Processors_1 = __importDefault(require("./Processors"));
|
|
12
|
-
exports.analyticsProcessor = new AnalyticsProcessor_1.default();
|
|
13
|
-
const loggingProcessor = new LoggingProcessor_1.default();
|
|
14
|
-
const auditLogsProcessor = new AuditLogsProcessor_1.default();
|
|
15
|
-
function init(auditingFn) {
|
|
16
|
-
return AuditLogsProcessor_1.default.init(auditingFn);
|
|
17
|
-
}
|
|
18
|
-
exports.processors = new Processors_1.default([
|
|
19
|
-
exports.analyticsProcessor,
|
|
20
|
-
loggingProcessor,
|
|
21
|
-
auditLogsProcessor,
|
|
22
|
-
]);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/processors/index.ts"],"names":[],"mappings":";;;;;;AAUA,oBAEC;AAZD,8EAAqD;AACrD,0EAAiD;AACjD,8EAAqD;AACrD,8DAAqC;AAGxB,QAAA,kBAAkB,GAAG,IAAI,4BAAkB,EAAE,CAAA;AAC1D,MAAM,gBAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAA;AAC/C,MAAM,kBAAkB,GAAG,IAAI,4BAAkB,EAAE,CAAA;AAEnD,SAAgB,IAAI,CAAC,UAAsB;IACzC,OAAO,4BAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAC5C,CAAC;AAEY,QAAA,UAAU,GAAG,IAAI,oBAAU,CAAC;IACvC,0BAAkB;IAClB,gBAAgB;IAChB,kBAAkB;CACnB,CAAC,CAAA"}
|
|
@@ -1,149 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
const posthog_node_1 = require("posthog-node");
|
|
49
|
-
const types_1 = require("@budibase/types");
|
|
50
|
-
const environment_1 = __importDefault(require("../../../environment"));
|
|
51
|
-
const context = __importStar(require("../../../context"));
|
|
52
|
-
const rateLimiting = __importStar(require("./rateLimiting"));
|
|
53
|
-
const EXCLUDED_EVENTS = [
|
|
54
|
-
types_1.Event.USER_UPDATED,
|
|
55
|
-
types_1.Event.EMAIL_SMTP_UPDATED,
|
|
56
|
-
types_1.Event.AUTH_SSO_UPDATED,
|
|
57
|
-
types_1.Event.APP_UPDATED,
|
|
58
|
-
types_1.Event.ROLE_UPDATED,
|
|
59
|
-
types_1.Event.DATASOURCE_UPDATED,
|
|
60
|
-
types_1.Event.QUERY_UPDATED,
|
|
61
|
-
types_1.Event.TABLE_UPDATED,
|
|
62
|
-
types_1.Event.VIEW_UPDATED,
|
|
63
|
-
types_1.Event.VIEW_FILTER_UPDATED,
|
|
64
|
-
types_1.Event.VIEW_CALCULATION_UPDATED,
|
|
65
|
-
types_1.Event.AUTOMATION_TRIGGER_UPDATED,
|
|
66
|
-
types_1.Event.USER_GROUP_UPDATED,
|
|
67
|
-
];
|
|
68
|
-
class PosthogProcessor {
|
|
69
|
-
constructor(token) {
|
|
70
|
-
if (!token) {
|
|
71
|
-
throw new Error("Posthog token is not defined");
|
|
72
|
-
}
|
|
73
|
-
this.posthog = new posthog_node_1.PostHog(token);
|
|
74
|
-
}
|
|
75
|
-
processEvent(event, identity, properties, timestamp) {
|
|
76
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
// don't send excluded events
|
|
78
|
-
if (EXCLUDED_EVENTS.includes(event)) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (yield rateLimiting.limited(event)) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
properties = this.clearPIIProperties(properties);
|
|
85
|
-
properties.version = environment_1.default.VERSION;
|
|
86
|
-
properties.service = environment_1.default.SERVICE;
|
|
87
|
-
properties.environment = identity.environment;
|
|
88
|
-
properties.hosting = identity.hosting;
|
|
89
|
-
const appId = context.getAppId();
|
|
90
|
-
if (appId) {
|
|
91
|
-
properties.appId = appId;
|
|
92
|
-
}
|
|
93
|
-
const payload = { distinctId: identity.id, event, properties };
|
|
94
|
-
if (timestamp) {
|
|
95
|
-
payload.timestamp = new Date(timestamp);
|
|
96
|
-
}
|
|
97
|
-
// add groups to the event
|
|
98
|
-
if (identity.installationId || identity.tenantId) {
|
|
99
|
-
payload.groups = {};
|
|
100
|
-
if (identity.installationId) {
|
|
101
|
-
payload.groups.installation = identity.installationId;
|
|
102
|
-
payload.properties.installationId = identity.installationId;
|
|
103
|
-
}
|
|
104
|
-
if (identity.tenantId) {
|
|
105
|
-
payload.groups.tenant = identity.tenantId;
|
|
106
|
-
payload.properties.tenantId = identity.tenantId;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
this.posthog.capture(payload);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
clearPIIProperties(properties) {
|
|
113
|
-
if (properties.email) {
|
|
114
|
-
delete properties.email;
|
|
115
|
-
}
|
|
116
|
-
if (properties.audited) {
|
|
117
|
-
delete properties.audited;
|
|
118
|
-
}
|
|
119
|
-
return properties;
|
|
120
|
-
}
|
|
121
|
-
identify(identity, timestamp) {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
const payload = { distinctId: identity.id, properties: identity };
|
|
124
|
-
if (timestamp) {
|
|
125
|
-
payload.timestamp = new Date(timestamp);
|
|
126
|
-
}
|
|
127
|
-
this.posthog.identify(payload);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
identifyGroup(group, timestamp) {
|
|
131
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
const payload = {
|
|
133
|
-
distinctId: group.id,
|
|
134
|
-
groupType: group.type,
|
|
135
|
-
groupKey: group.id,
|
|
136
|
-
properties: group,
|
|
137
|
-
};
|
|
138
|
-
if (timestamp) {
|
|
139
|
-
payload.timestamp = new Date(timestamp);
|
|
140
|
-
}
|
|
141
|
-
this.posthog.groupIdentify(payload);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
shutdown() {
|
|
145
|
-
this.posthog.shutdown();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
exports.default = PosthogProcessor;
|
|
149
|
-
//# sourceMappingURL=PosthogProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PosthogProcessor.js","sourceRoot":"","sources":["../../../../../src/events/processors/posthog/PosthogProcessor.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const PosthogProcessor_1 = __importDefault(require("./PosthogProcessor"));
|
|
7
|
-
exports.default = PosthogProcessor_1.default;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/events/processors/posthog/index.ts"],"names":[],"mappings":";;;;;AAAA,0EAAiD;AAEjD,kBAAe,0BAAgB,CAAA"}
|
|
@@ -1,129 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.limited = void 0;
|
|
46
|
-
const types_1 = require("@budibase/types");
|
|
47
|
-
const generic_1 = require("../../../cache/generic");
|
|
48
|
-
const cache = __importStar(require("../../../cache/generic"));
|
|
49
|
-
const context = __importStar(require("../../../context"));
|
|
50
|
-
const isRateLimited = (event) => {
|
|
51
|
-
return (event === types_1.Event.SERVED_BUILDER ||
|
|
52
|
-
event === types_1.Event.SERVED_APP_PREVIEW ||
|
|
53
|
-
event === types_1.Event.SERVED_APP);
|
|
54
|
-
};
|
|
55
|
-
const isPerApp = (event) => {
|
|
56
|
-
return event === types_1.Event.SERVED_APP_PREVIEW || event === types_1.Event.SERVED_APP;
|
|
57
|
-
};
|
|
58
|
-
var RateLimit;
|
|
59
|
-
(function (RateLimit) {
|
|
60
|
-
RateLimit["CALENDAR_DAY"] = "calendarDay";
|
|
61
|
-
})(RateLimit || (RateLimit = {}));
|
|
62
|
-
const RATE_LIMITS = {
|
|
63
|
-
[types_1.Event.SERVED_APP]: RateLimit.CALENDAR_DAY,
|
|
64
|
-
[types_1.Event.SERVED_APP_PREVIEW]: RateLimit.CALENDAR_DAY,
|
|
65
|
-
[types_1.Event.SERVED_BUILDER]: RateLimit.CALENDAR_DAY,
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Check if this event should be sent right now
|
|
69
|
-
* Return false to signal the event SHOULD be sent
|
|
70
|
-
* Return true to signal the event should NOT be sent
|
|
71
|
-
*/
|
|
72
|
-
const limited = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
|
-
// not a rate limited event -- send
|
|
74
|
-
if (!isRateLimited(event)) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
const cachedEvent = yield readEvent(event);
|
|
78
|
-
if (cachedEvent) {
|
|
79
|
-
const timestamp = new Date(cachedEvent.timestamp);
|
|
80
|
-
const limit = RATE_LIMITS[event];
|
|
81
|
-
switch (limit) {
|
|
82
|
-
case RateLimit.CALENDAR_DAY: {
|
|
83
|
-
// get midnight at the start of the next day for the timestamp
|
|
84
|
-
timestamp.setDate(timestamp.getDate() + 1);
|
|
85
|
-
timestamp.setHours(0, 0, 0, 0);
|
|
86
|
-
// if we have passed the threshold into the next day
|
|
87
|
-
if (Date.now() > timestamp.getTime()) {
|
|
88
|
-
// update the timestamp in the event -- send
|
|
89
|
-
yield recordEvent(event, { timestamp: Date.now() });
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
// still within the limited period -- don't send
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
// no event present i.e. expired -- send
|
|
101
|
-
yield recordEvent(event, { timestamp: Date.now() });
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
exports.limited = limited;
|
|
106
|
-
const eventKey = (event) => {
|
|
107
|
-
let key = `${generic_1.CacheKey.EVENTS_RATE_LIMIT}:${event}`;
|
|
108
|
-
if (isPerApp(event)) {
|
|
109
|
-
key = key + ":" + context.getAppId();
|
|
110
|
-
}
|
|
111
|
-
return key;
|
|
112
|
-
};
|
|
113
|
-
const readEvent = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
114
|
-
const key = eventKey(event);
|
|
115
|
-
const result = yield cache.get(key);
|
|
116
|
-
return result;
|
|
117
|
-
});
|
|
118
|
-
const recordEvent = (event, properties) => __awaiter(void 0, void 0, void 0, function* () {
|
|
119
|
-
const key = eventKey(event);
|
|
120
|
-
const limit = RATE_LIMITS[event];
|
|
121
|
-
let ttl;
|
|
122
|
-
switch (limit) {
|
|
123
|
-
case RateLimit.CALENDAR_DAY: {
|
|
124
|
-
ttl = generic_1.TTL.ONE_DAY;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
yield cache.store(key, properties, ttl);
|
|
128
|
-
});
|
|
129
|
-
//# sourceMappingURL=rateLimiting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rateLimiting.js","sourceRoot":"","sources":["../../../../../src/events/processors/posthog/rateLimiting.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/processors/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const events_1 = require("../events");
|
|
13
|
-
const types_1 = require("@budibase/types");
|
|
14
|
-
function created(account, identityOverride) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const properties = {
|
|
17
|
-
tenantId: account.tenantId,
|
|
18
|
-
};
|
|
19
|
-
yield (0, events_1.publishEvent)(types_1.Event.ACCOUNT_CREATED, properties, undefined, identityOverride);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function deleted(account) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const properties = {
|
|
25
|
-
tenantId: account.tenantId,
|
|
26
|
-
};
|
|
27
|
-
yield (0, events_1.publishEvent)(types_1.Event.ACCOUNT_DELETED, properties);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function verified(account) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const properties = {
|
|
33
|
-
tenantId: account.tenantId,
|
|
34
|
-
};
|
|
35
|
-
yield (0, events_1.publishEvent)(types_1.Event.ACCOUNT_VERIFIED, properties);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.default = {
|
|
39
|
-
created,
|
|
40
|
-
deleted,
|
|
41
|
-
verified,
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=account.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/events/publishers/account.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAwC;AACxC,2CAOwB;AAExB,SAAe,OAAO,CAAC,OAAgB,EAAE,gBAA2B;;QAClE,MAAM,UAAU,GAAwB;YACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,MAAM,IAAA,qBAAY,EAChB,aAAK,CAAC,eAAe,EACrB,UAAU,EACV,SAAS,EACT,gBAAgB,CACjB,CAAA;IACH,CAAC;CAAA;AAED,SAAe,OAAO,CAAC,OAAgB;;QACrC,MAAM,UAAU,GAAwB;YACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,MAAM,IAAA,qBAAY,EAAC,aAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;IACvD,CAAC;CAAA;AAED,SAAe,QAAQ,CAAC,OAAgB;;QACtC,MAAM,UAAU,GAAyB;YACvC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,MAAM,IAAA,qBAAY,EAAC,aAAK,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;IACxD,CAAC;CAAA;AAED,kBAAe;IACb,OAAO;IACP,OAAO;IACP,QAAQ;CACT,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const events_1 = require("../events");
|
|
13
|
-
const types_1 = require("@budibase/types");
|
|
14
|
-
function AIConfigCreated(timestamp) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const properties = {};
|
|
17
|
-
yield (0, events_1.publishEvent)(types_1.Event.AI_CONFIG_CREATED, properties, timestamp);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function AIConfigUpdated() {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const properties = {};
|
|
23
|
-
yield (0, events_1.publishEvent)(types_1.Event.AI_CONFIG_UPDATED, properties);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.default = {
|
|
27
|
-
AIConfigCreated,
|
|
28
|
-
AIConfigUpdated,
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=ai.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../../src/events/publishers/ai.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAwC;AACxC,2CAIwB;AAExB,SAAe,eAAe,CAAC,SAA2B;;QACxD,MAAM,UAAU,GAAyB,EAAE,CAAA;QAC3C,MAAM,IAAA,qBAAY,EAAC,aAAK,CAAC,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA;IACpE,CAAC;CAAA;AAED,SAAe,eAAe;;QAC5B,MAAM,UAAU,GAAyB,EAAE,CAAA;QAC3C,MAAM,IAAA,qBAAY,EAAC,aAAK,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAA;IACzD,CAAC;CAAA;AAED,kBAAe;IACb,eAAe;IACf,eAAe;CAChB,CAAA"}
|