@servicelabsco/nestjs-utility-services 3.0.19 → 4.0.1
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/CHANGELOG.md +275 -1
- package/README.md +3 -1
- package/dist/app.module.js +10 -43
- package/dist/app.module.js.map +1 -1
- package/dist/auth/auth.module.js +1 -4
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/middlewares/internal.middleware.js +4 -36
- package/dist/auth/middlewares/internal.middleware.js.map +1 -1
- package/dist/auth/services/auth.service.js.map +1 -1
- package/dist/auth/services/device.token.service.js +4 -3
- package/dist/auth/services/device.token.service.js.map +1 -1
- package/dist/auth/services/refresh.token.service.js +1 -34
- package/dist/auth/services/refresh.token.service.js.map +1 -1
- package/dist/common/adapters/redis.io.adapter.d.ts +1 -3
- package/dist/common/adapters/redis.io.adapter.js +3 -7
- package/dist/common/adapters/redis.io.adapter.js.map +1 -1
- package/dist/common/libraries/auth.js +1 -34
- package/dist/common/libraries/auth.js.map +1 -1
- package/dist/common/libraries/common.subscriber.js +15 -15
- package/dist/common/libraries/common.subscriber.js.map +1 -1
- package/dist/common/libraries/custom.crypt.js +13 -46
- package/dist/common/libraries/custom.crypt.js.map +1 -1
- package/dist/common/libraries/custom.logger.js +1 -1
- package/dist/common/libraries/custom.logger.js.map +1 -1
- package/dist/common/libraries/date.util.js +3 -3
- package/dist/common/libraries/date.util.js.map +1 -1
- package/dist/common/libraries/hash.js +3 -36
- package/dist/common/libraries/hash.js.map +1 -1
- package/dist/common/libraries/json.evaluator.js +26 -26
- package/dist/common/libraries/json.evaluator.js.map +1 -1
- package/dist/common/libraries/log.redactor.js +14 -14
- package/dist/common/libraries/log.redactor.js.map +1 -1
- package/dist/common/libraries/money.js +4 -4
- package/dist/common/libraries/money.js.map +1 -1
- package/dist/common/libraries/platform.utility.js +1 -4
- package/dist/common/libraries/platform.utility.js.map +1 -1
- package/dist/common/libraries/record.manager.js.map +1 -1
- package/dist/common/libraries/sentry.sdk.d.ts +1 -1
- package/dist/common/libraries/sentry.sdk.js +1 -1
- package/dist/common/libraries/sentry.sdk.js.map +1 -1
- package/dist/config/jwt.config.js.map +1 -1
- package/dist/config/orm.config.js +0 -3
- package/dist/config/orm.config.js.map +1 -1
- package/dist/config/read.typeorm.config.js +6 -35
- package/dist/config/read.typeorm.config.js.map +1 -1
- package/dist/config/sentry.options.js +14 -1
- package/dist/config/sentry.options.js.map +1 -1
- package/dist/config/typeorm.config.js +6 -37
- package/dist/config/typeorm.config.js.map +1 -1
- package/dist/health.check.controller.js +18 -0
- package/dist/health.check.controller.js.map +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +6 -45
- package/dist/main.js.map +1 -1
- package/dist/migrations/1619296224563-AddMasterSeedersDataSeederTable.js +2 -35
- package/dist/migrations/1619296224563-AddMasterSeedersDataSeederTable.js.map +1 -1
- package/dist/migrations/1779607111923-AddUniqueIndexSysPropertiesName.js +2 -2
- package/dist/migrations/1779607111923-AddUniqueIndexSysPropertiesName.js.map +1 -1
- package/dist/migrations/1779607111924-AddUniqueIndexSysDocumentsFileHash.js +2 -2
- package/dist/migrations/1779607111924-AddUniqueIndexSysDocumentsFileHash.js.map +1 -1
- package/dist/migrations/1779690975270-AddUniqueIndexSysSessionIdentifiers.js +1 -1
- package/dist/migrations/1779690975270-AddUniqueIndexSysSessionIdentifiers.js.map +1 -1
- package/dist/migrations/1779773659655-AddIdempotencyIndexesForJobs.js +3 -3
- package/dist/migrations/1779773659655-AddIdempotencyIndexesForJobs.js.map +1 -1
- package/dist/migrations/1780002352495-MigrateJsonColumnsToJsonb.js +20 -20
- package/dist/migrations/1780002352495-MigrateJsonColumnsToJsonb.js.map +1 -1
- package/dist/migrations/1788287350858-ReplaceUniqueIndexesWithSoftDeleteAware.js +4 -4
- package/dist/migrations/1788287350858-ReplaceUniqueIndexesWithSoftDeleteAware.js.map +1 -1
- package/dist/migrations/1788287350859-NormalizeSocialIdentitiesUuidDefault.js +1 -1
- package/dist/migrations/1788287350859-NormalizeSocialIdentitiesUuidDefault.js.map +1 -1
- package/dist/migrations/1793302598724-CreateUploadSessionTable.d.ts +5 -0
- package/dist/migrations/1793302598724-CreateUploadSessionTable.js +33 -0
- package/dist/migrations/1793302598724-CreateUploadSessionTable.js.map +1 -0
- package/dist/migrations/1793726866264-CreateSourceVersionTable.d.ts +5 -0
- package/dist/migrations/1793726866264-CreateSourceVersionTable.js +22 -0
- package/dist/migrations/1793726866264-CreateSourceVersionTable.js.map +1 -0
- package/dist/migrations/1793732831136-AddLastViewedAtSysMaterialViewsTable.d.ts +5 -0
- package/dist/migrations/1793732831136-AddLastViewedAtSysMaterialViewsTable.js +15 -0
- package/dist/migrations/1793732831136-AddLastViewedAtSysMaterialViewsTable.js.map +1 -0
- package/dist/platformUtility/constants/index.d.ts +1 -0
- package/dist/platformUtility/constants/index.js +1 -0
- package/dist/platformUtility/constants/index.js.map +1 -1
- package/dist/platformUtility/constants/servicelabs.constants.d.ts +30 -0
- package/dist/platformUtility/constants/servicelabs.constants.js +34 -0
- package/dist/platformUtility/constants/servicelabs.constants.js.map +1 -0
- package/dist/platformUtility/consumers/job.consumer.d.ts +2 -1
- package/dist/platformUtility/consumers/job.consumer.js +8 -8
- package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
- package/dist/platformUtility/es6.classes.d.ts +36 -4
- package/dist/platformUtility/es6.classes.js +8 -1
- package/dist/platformUtility/es6.classes.js.map +1 -1
- package/dist/platformUtility/filters/sentry.reporting.filter.js +2 -1
- package/dist/platformUtility/filters/sentry.reporting.filter.js.map +1 -1
- package/dist/platformUtility/interfaces/index.d.ts +19 -0
- package/dist/platformUtility/interfaces/index.js +19 -0
- package/dist/platformUtility/interfaces/index.js.map +1 -1
- package/dist/platformUtility/interfaces/servicelabs.call.options.interface.d.ts +8 -0
- package/dist/platformUtility/interfaces/servicelabs.call.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.call.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.callback.event.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/servicelabs.callback.event.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.callback.event.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.error.interface.d.ts +10 -0
- package/dist/platformUtility/interfaces/servicelabs.error.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.error.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.html.pdf.input.interface.d.ts +5 -0
- package/dist/platformUtility/interfaces/servicelabs.html.pdf.input.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.html.pdf.input.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.job.file.interface.d.ts +10 -0
- package/dist/platformUtility/interfaces/servicelabs.job.file.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.job.file.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.job.interface.d.ts +31 -0
- package/dist/platformUtility/interfaces/servicelabs.job.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.job.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.interface.d.ts +5 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.options.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.job.list.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.job.summary.interface.d.ts +15 -0
- package/dist/platformUtility/interfaces/servicelabs.job.summary.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.job.summary.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.request.interface.d.ts +5 -0
- package/dist/platformUtility/interfaces/servicelabs.request.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.request.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.response.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/servicelabs.response.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.response.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.run.options.interface.d.ts +8 -0
- package/dist/platformUtility/interfaces/servicelabs.run.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.run.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.store.options.interface.d.ts +5 -0
- package/dist/platformUtility/interfaces/servicelabs.store.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.store.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.stored.file.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/servicelabs.stored.file.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.stored.file.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.url.input.interface.d.ts +3 -0
- package/dist/platformUtility/interfaces/servicelabs.url.input.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.url.input.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.utility.interface.d.ts +12 -0
- package/dist/platformUtility/interfaces/servicelabs.utility.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.utility.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.entry.interface.d.ts +4 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.entry.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.entry.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.files.input.interface.d.ts +4 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.files.input.interface.js +3 -0
- package/dist/platformUtility/interfaces/servicelabs.zip.files.input.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/unzip.file.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/unzip.file.interface.js +3 -0
- package/dist/platformUtility/interfaces/unzip.file.interface.js.map +1 -0
- package/dist/platformUtility/libraries/common.servicelabs.callback.controller.d.ts +11 -0
- package/dist/platformUtility/libraries/common.servicelabs.callback.controller.js +43 -0
- package/dist/platformUtility/libraries/common.servicelabs.callback.controller.js.map +1 -0
- package/dist/platformUtility/libraries/create.entity.constants.file.js +1 -34
- package/dist/platformUtility/libraries/create.entity.constants.file.js.map +1 -1
- package/dist/platformUtility/libraries/create.es6.classes.file.js +1 -34
- package/dist/platformUtility/libraries/create.es6.classes.file.js.map +1 -1
- package/dist/platformUtility/libraries/create.es6.jobs.file.js +1 -34
- package/dist/platformUtility/libraries/create.es6.jobs.file.js.map +1 -1
- package/dist/platformUtility/libraries/create.es6.service.file.js +1 -34
- package/dist/platformUtility/libraries/create.es6.service.file.js.map +1 -1
- package/dist/platformUtility/libraries/create.index.file.js +1 -34
- package/dist/platformUtility/libraries/create.index.file.js.map +1 -1
- package/dist/platformUtility/libraries/file.system.utility.js +1 -34
- package/dist/platformUtility/libraries/file.system.utility.js.map +1 -1
- package/dist/platformUtility/libraries/index.d.ts +1 -0
- package/dist/platformUtility/libraries/index.js +1 -0
- package/dist/platformUtility/libraries/index.js.map +1 -1
- package/dist/platformUtility/libraries/process.common.mail.js +4 -7
- package/dist/platformUtility/libraries/process.common.mail.js.map +1 -1
- package/dist/platformUtility/libraries/process.kaleyra.sms.d.ts +1 -0
- package/dist/platformUtility/libraries/process.kaleyra.sms.js +11 -37
- package/dist/platformUtility/libraries/process.kaleyra.sms.js.map +1 -1
- package/dist/platformUtility/libraries/process.smtp.mail.js +1 -34
- package/dist/platformUtility/libraries/process.smtp.mail.js.map +1 -1
- package/dist/platformUtility/libraries/sentry.bootstrap.js +5 -5
- package/dist/platformUtility/libraries/sentry.bootstrap.js.map +1 -1
- package/dist/platformUtility/libraries/sentry.context.d.ts +1 -1
- package/dist/platformUtility/libraries/sentry.context.js +1 -2
- package/dist/platformUtility/libraries/sentry.context.js.map +1 -1
- package/dist/platformUtility/middlewares/trim.pipe.js +13 -12
- package/dist/platformUtility/middlewares/trim.pipe.js.map +1 -1
- package/dist/platformUtility/platform.utility.module.js +9 -5
- package/dist/platformUtility/platform.utility.module.js.map +1 -1
- package/dist/platformUtility/services/aws.client.factory.js +3 -2
- package/dist/platformUtility/services/aws.client.factory.js.map +1 -1
- package/dist/platformUtility/services/aws.config.service.js +3 -2
- package/dist/platformUtility/services/aws.config.service.js.map +1 -1
- package/dist/platformUtility/services/cache.service.js +4 -2
- package/dist/platformUtility/services/cache.service.js.map +1 -1
- package/dist/platformUtility/services/dynamo.service.js +4 -3
- package/dist/platformUtility/services/dynamo.service.js.map +1 -1
- package/dist/platformUtility/services/index.d.ts +2 -0
- package/dist/platformUtility/services/index.js +2 -0
- package/dist/platformUtility/services/index.js.map +1 -1
- package/dist/platformUtility/services/local.property.service.js +1 -4
- package/dist/platformUtility/services/local.property.service.js.map +1 -1
- package/dist/platformUtility/services/maintenance.service.js +2 -35
- package/dist/platformUtility/services/maintenance.service.js.map +1 -1
- package/dist/platformUtility/services/pdf.service.d.ts +4 -1
- package/dist/platformUtility/services/pdf.service.js +16 -2
- package/dist/platformUtility/services/pdf.service.js.map +1 -1
- package/dist/platformUtility/services/queue.service.d.ts +5 -3
- package/dist/platformUtility/services/queue.service.js +14 -3
- package/dist/platformUtility/services/queue.service.js.map +1 -1
- package/dist/platformUtility/services/redis.service.d.ts +1 -0
- package/dist/platformUtility/services/redis.service.js +10 -8
- package/dist/platformUtility/services/redis.service.js.map +1 -1
- package/dist/platformUtility/services/remote.request.service.js +1 -4
- package/dist/platformUtility/services/remote.request.service.js.map +1 -1
- package/dist/platformUtility/services/s3.service.js +1 -34
- package/dist/platformUtility/services/s3.service.js.map +1 -1
- package/dist/platformUtility/services/servicelabs.dev.service.d.ts +49 -0
- package/dist/platformUtility/services/servicelabs.dev.service.js +181 -0
- package/dist/platformUtility/services/servicelabs.dev.service.js.map +1 -0
- package/dist/platformUtility/services/servicelabs.utility.service.d.ts +51 -0
- package/dist/platformUtility/services/servicelabs.utility.service.js +193 -0
- package/dist/platformUtility/services/servicelabs.utility.service.js.map +1 -0
- package/dist/platformUtility/services/shutdown.service.js.map +1 -1
- package/dist/platformUtility/services/split.pdf.service.d.ts +3 -1
- package/dist/platformUtility/services/split.pdf.service.js +9 -2
- package/dist/platformUtility/services/split.pdf.service.js.map +1 -1
- package/dist/platformUtility/services/sql.service.d.ts +13 -0
- package/dist/platformUtility/services/sql.service.js +51 -0
- package/dist/platformUtility/services/sql.service.js.map +1 -1
- package/dist/platformUtility/services/zip.service.d.ts +7 -2
- package/dist/platformUtility/services/zip.service.js +41 -5
- package/dist/platformUtility/services/zip.service.js.map +1 -1
- package/dist/security/security.module.js +1 -4
- package/dist/security/security.module.js.map +1 -1
- package/dist/system/constants/index.d.ts +1 -0
- package/dist/system/constants/index.js +1 -0
- package/dist/system/constants/index.js.map +1 -1
- package/dist/system/constants/upload.session.constants.d.ts +21 -0
- package/dist/system/constants/upload.session.constants.js +25 -0
- package/dist/system/constants/upload.session.constants.js.map +1 -0
- package/dist/system/controllers/upload.controller.js +2 -2
- package/dist/system/controllers/upload.controller.js.map +1 -1
- package/dist/system/dtos/direct.upload.file.dto.d.ts +5 -0
- package/dist/system/dtos/direct.upload.file.dto.js +37 -0
- package/dist/system/dtos/direct.upload.file.dto.js.map +1 -0
- package/dist/system/dtos/direct.upload.initiate.dto.d.ts +4 -0
- package/dist/system/dtos/direct.upload.initiate.dto.js +27 -0
- package/dist/system/dtos/direct.upload.initiate.dto.js.map +1 -0
- package/dist/system/dtos/direct.upload.options.dto.d.ts +8 -0
- package/dist/system/dtos/direct.upload.options.dto.js +54 -0
- package/dist/system/dtos/direct.upload.options.dto.js.map +1 -0
- package/dist/system/dtos/direct.upload.parts.dto.d.ts +3 -0
- package/dist/system/dtos/direct.upload.parts.dto.js +26 -0
- package/dist/system/dtos/direct.upload.parts.dto.js.map +1 -0
- package/dist/system/dtos/index.d.ts +5 -0
- package/dist/system/dtos/index.js +5 -0
- package/dist/system/dtos/index.js.map +1 -1
- package/dist/system/dtos/local.file.s3.upload.dto.d.ts +1 -0
- package/dist/system/dtos/local.file.s3.upload.dto.js +4 -0
- package/dist/system/dtos/local.file.s3.upload.dto.js.map +1 -1
- package/dist/system/dtos/material.view.attributes.dto.d.ts +4 -0
- package/dist/system/dtos/material.view.attributes.dto.js.map +1 -1
- package/dist/system/dtos/upload.session.attributes.dto.d.ts +5 -0
- package/dist/system/dtos/upload.session.attributes.dto.js +7 -0
- package/dist/system/dtos/upload.session.attributes.dto.js.map +1 -0
- package/dist/system/entities/index.d.ts +2 -0
- package/dist/system/entities/index.js +2 -0
- package/dist/system/entities/index.js.map +1 -1
- package/dist/system/entities/material.view.entity.d.ts +1 -0
- package/dist/system/entities/material.view.entity.js +4 -0
- package/dist/system/entities/material.view.entity.js.map +1 -1
- package/dist/system/entities/source.version.entity.d.ts +9 -0
- package/dist/system/entities/source.version.entity.js +45 -0
- package/dist/system/entities/source.version.entity.js.map +1 -0
- package/dist/system/entities/upload.session.entity.d.ts +20 -0
- package/dist/system/entities/upload.session.entity.js +86 -0
- package/dist/system/entities/upload.session.entity.js.map +1 -0
- package/dist/system/es6.classes.d.ts +38 -6
- package/dist/system/es6.classes.js +26 -1
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/interfaces/direct.upload.part.url.interface.d.ts +6 -0
- package/dist/system/interfaces/direct.upload.part.url.interface.js +3 -0
- package/dist/system/interfaces/direct.upload.part.url.interface.js.map +1 -0
- package/dist/system/interfaces/direct.upload.result.interface.d.ts +10 -0
- package/dist/system/interfaces/direct.upload.result.interface.js +3 -0
- package/dist/system/interfaces/direct.upload.result.interface.js.map +1 -0
- package/dist/system/interfaces/direct.upload.session.interface.d.ts +16 -0
- package/dist/system/interfaces/direct.upload.session.interface.js +3 -0
- package/dist/system/interfaces/direct.upload.session.interface.js.map +1 -0
- package/dist/system/interfaces/direct.upload.status.interface.d.ts +12 -0
- package/dist/system/interfaces/direct.upload.status.interface.js +3 -0
- package/dist/system/interfaces/direct.upload.status.interface.js.map +1 -0
- package/dist/system/interfaces/index.d.ts +6 -0
- package/dist/system/interfaces/index.js +6 -0
- package/dist/system/interfaces/index.js.map +1 -1
- package/dist/system/interfaces/source.version.options.interface.d.ts +7 -0
- package/dist/system/interfaces/source.version.options.interface.js +3 -0
- package/dist/system/interfaces/source.version.options.interface.js.map +1 -0
- package/dist/system/interfaces/uploaded.part.interface.d.ts +5 -0
- package/dist/system/interfaces/uploaded.part.interface.js +3 -0
- package/dist/system/interfaces/uploaded.part.interface.js.map +1 -0
- package/dist/system/jobs/execute.material.view.job.js +2 -0
- package/dist/system/jobs/execute.material.view.job.js.map +1 -1
- package/dist/system/jobs/expire.upload.session.job.d.ts +13 -0
- package/dist/system/jobs/expire.upload.session.job.js +38 -0
- package/dist/system/jobs/expire.upload.session.job.js.map +1 -0
- package/dist/system/jobs/index.d.ts +1 -0
- package/dist/system/jobs/index.js +1 -0
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/orphan.sweeper.job.js +3 -2
- package/dist/system/jobs/orphan.sweeper.job.js.map +1 -1
- package/dist/system/jobs/set.event.queue.job.js +3 -2
- package/dist/system/jobs/set.event.queue.job.js.map +1 -1
- package/dist/system/jobs/sqs.polling.job.js.map +1 -1
- package/dist/system/jobs/sync.all.code.job.d.ts +9 -0
- package/dist/system/jobs/sync.all.code.job.js +106 -28
- package/dist/system/jobs/sync.all.code.job.js.map +1 -1
- package/dist/system/libraries/code.evaluator.d.ts +13 -0
- package/dist/system/libraries/code.evaluator.js +41 -1
- package/dist/system/libraries/code.evaluator.js.map +1 -1
- package/dist/system/libraries/common.direct.upload.controller.d.ts +19 -0
- package/dist/system/libraries/common.direct.upload.controller.js +84 -0
- package/dist/system/libraries/common.direct.upload.controller.js.map +1 -0
- package/dist/system/libraries/common.storage.service.d.ts +13 -0
- package/dist/system/libraries/common.storage.service.js +78 -1
- package/dist/system/libraries/common.storage.service.js.map +1 -1
- package/dist/system/libraries/crypt.re.encrypt.processor.js +2 -2
- package/dist/system/libraries/crypt.re.encrypt.processor.js.map +1 -1
- package/dist/system/libraries/file.type.detector.d.ts +2 -0
- package/dist/system/libraries/file.type.detector.js +88 -75
- package/dist/system/libraries/file.type.detector.js.map +1 -1
- package/dist/system/libraries/generate.downloadable.report.file.d.ts +1 -0
- package/dist/system/libraries/generate.downloadable.report.file.js +14 -36
- package/dist/system/libraries/generate.downloadable.report.file.js.map +1 -1
- package/dist/system/libraries/index.d.ts +1 -0
- package/dist/system/libraries/index.js +1 -0
- package/dist/system/libraries/index.js.map +1 -1
- package/dist/system/libraries/model.sync.js +2 -2
- package/dist/system/libraries/model.sync.js.map +1 -1
- package/dist/system/libraries/sandboxed.script.executor.js +17 -17
- package/dist/system/libraries/sandboxed.script.executor.js.map +1 -1
- package/dist/system/services/aws.s3.service.js +6 -5
- package/dist/system/services/aws.s3.service.js.map +1 -1
- package/dist/system/services/base.service.js.map +1 -1
- package/dist/system/services/direct.upload.service.d.ts +41 -0
- package/dist/system/services/direct.upload.service.js +385 -0
- package/dist/system/services/direct.upload.service.js.map +1 -0
- package/dist/system/services/document.service.js +2 -38
- package/dist/system/services/document.service.js.map +1 -1
- package/dist/system/services/event.detail.service.js.map +1 -1
- package/dist/system/services/event.queue.service.js +3 -2
- package/dist/system/services/event.queue.service.js.map +1 -1
- package/dist/system/services/index.d.ts +2 -0
- package/dist/system/services/index.js +2 -0
- package/dist/system/services/index.js.map +1 -1
- package/dist/system/services/source.version.service.d.ts +17 -0
- package/dist/system/services/source.version.service.js +86 -0
- package/dist/system/services/source.version.service.js.map +1 -0
- package/dist/system/services/storage.service.d.ts +20 -0
- package/dist/system/services/storage.service.js +62 -7
- package/dist/system/services/storage.service.js.map +1 -1
- package/dist/system/services/upload.service.d.ts +4 -1
- package/dist/system/services/upload.service.js +18 -6
- package/dist/system/services/upload.service.js.map +1 -1
- package/dist/system/subscribers/index.d.ts +1 -0
- package/dist/system/subscribers/index.js +1 -0
- package/dist/system/subscribers/index.js.map +1 -1
- package/dist/system/subscribers/system.script.subscriber.d.ts +13 -0
- package/dist/system/subscribers/system.script.subscriber.js +61 -0
- package/dist/system/subscribers/system.script.subscriber.js.map +1 -0
- package/dist/system/system.module.js +1 -4
- package/dist/system/system.module.js.map +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js +2 -1
- package/dist/worker.js.map +1 -1
- package/docs/sentry-reporting.md +26 -20
- package/docs/servicelabs-utilities.md +174 -0
- package/docs/upgrade-4.0.md +215 -0
- package/package.json +70 -74
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,280 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 4.1.0 — 2026-11-04
|
|
4
|
+
|
|
5
|
+
No breaking changes. **Two migrations** run in every consuming app (both additive):
|
|
6
|
+
`1793726866264-CreateSourceVersionTable` (new `sys_source_versions` table) and
|
|
7
|
+
`1793732831136-AddLastViewedAtSysMaterialViewsTable` (nullable `sys_material_views.last_viewed_at`).
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Version history for any record — `sys_source_versions` + `SourceVersionService`.** One row per saved
|
|
12
|
+
iteration, keyed by `(source_type, source_id)`, with a per-source `version` number, a `name` (defaults to
|
|
13
|
+
`v<n>`), a jsonb `value` snapshot and the creator (`created_by` / `creator`). `createVersion(source, value,
|
|
14
|
+
{ name, attributes, manager, skipIfUnchanged })` writes nothing when the value equals the latest version;
|
|
15
|
+
`getVersions` / `getVersion` / `getLatestVersion` read them with the creator. Exposed to scripts as
|
|
16
|
+
`md5('system:SourceVersionService')` = `3e9b9675ed7cd4d3f15c8047b2ff2b1f`. It applies **no visibility
|
|
17
|
+
rules** — restricting who reads or writes a source's versions is the consuming service's job.
|
|
18
|
+
- **System scripts are versioned automatically.** `SystemScriptSubscriber` records a version of every insert
|
|
19
|
+
/ update of `sys_system_scripts` (name, type, source, script, attributes) in the same transaction; a save
|
|
20
|
+
with unchanged content adds none. Existing scripts get their first version on their next save.
|
|
21
|
+
- **`SyncAllCodeJob` covers views and materialized views.** Every db relation now gets a model + columns:
|
|
22
|
+
tables, views and materialized views. View models are read-only (`'r---'`) and carry
|
|
23
|
+
`attributes.sync.kind` (`table` / `view` / `materialized_view`).
|
|
24
|
+
- **Materialized views are registered in `sys_material_views` by the sync**, inactive and without a timing,
|
|
25
|
+
so nothing refreshes them until someone schedules them.
|
|
26
|
+
- **`sys_material_views.last_viewed_at`** — when the view was last read, from Postgres' scan statistics
|
|
27
|
+
(`pg_stat_user_tables.last_seq_scan` / `last_idx_scan`, Postgres 16+), as of the last sync. It only moves
|
|
28
|
+
forward and ignores nu's own refresh (`ExecuteMaterialViewJob` now records
|
|
29
|
+
`attributes.last_refresh_started_at`; reads stamped up to 60 s after `last_run_time` are discounted because
|
|
30
|
+
Postgres stamps a scan when it flushes stats). Stats are per server (replica reads are not counted) and
|
|
31
|
+
are cleared by a crash or a stats reset.
|
|
32
|
+
- **`SqlService`**: `getAllRelations()`, `getMaterializedViewColumns(name)`, `getMaterializedViewUsage()` and
|
|
33
|
+
`getQueryColumns(query)` (a query's result column names without fetching rows).
|
|
34
|
+
- **Forcing the storage engine** on `UploadService.uploadFile(params, engine?)` and
|
|
35
|
+
`UploadService.saveLocalFileOnS3({ ..., engine })`, like `upload()` / `uploadWithStats()` already allowed.
|
|
36
|
+
Omitted, the engine is `STORAGE_ENGINE` as before.
|
|
37
|
+
- **`UploadService.getFileStats(urlOrRef)`** — a stored file's `size`, `contentType`, `etag`, `lastModified` and
|
|
38
|
+
custom `metadata` as S3 / R2 report them, without downloading it (`StorageService.head`). Takes a storage URL
|
|
39
|
+
(engine from its host) or `{ engine?, bucket?, key }`. `UploadService` is exposed to scripts, so they can use it
|
|
40
|
+
too. A failure raises `OperationException` naming the HTTP status (403 / 404).
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **`SyncAllCodeJob` synced db columns for `sys_users` only.** A guard left over from the
|
|
45
|
+
`DbScannerCommand` → job move skipped every other table, so models created for tables without an entity
|
|
46
|
+
never got columns.
|
|
47
|
+
- **One failure aborted the whole `SyncAllCodeJob` run.** Each entity, job, service, relation and column is
|
|
48
|
+
now synced on its own; failures are logged (`console.error` + `CustomLogger`) and listed at the end.
|
|
49
|
+
- **Model names for singular relation names lost their last letter** (`view_expense_detail` →
|
|
50
|
+
`ExpenseDetaiEntity`); only a trailing `s` is dropped now. Models created earlier keep their name.
|
|
51
|
+
- **A downloadable report sheet with no records came out blank.** Sheets without configured columns took
|
|
52
|
+
their header from the first record; with no records the header now comes from the query's own columns.
|
|
53
|
+
|
|
54
|
+
### Note
|
|
55
|
+
|
|
56
|
+
- `SyncAllCodeJob` now processes every relation's columns, so a run takes longer (over 10 minutes on a
|
|
57
|
+
~550-relation database). It runs as a queued job.
|
|
58
|
+
|
|
59
|
+
## 4.0.0 (NestJS 12) — 2026-10-30
|
|
60
|
+
|
|
61
|
+
Upgrades the whole stack to NestJS 12 and the latest compatible packages. **Major release:**
|
|
62
|
+
`@nestjs/*` are hard dependencies of this package, so consuming apps must move to NestJS 12 (and
|
|
63
|
+
Sentry 11) in the same release, or they end up with two Nest copies (broken DI tokens and
|
|
64
|
+
`instanceof HttpException`).
|
|
65
|
+
|
|
66
|
+
**Upgrading an app: follow [docs/upgrade-4.0.md](docs/upgrade-4.0.md)** — upgrade order, the changes each
|
|
67
|
+
app must make, and a per-repo checklist.
|
|
68
|
+
|
|
69
|
+
### Breaking — what consuming apps must do
|
|
70
|
+
|
|
71
|
+
- **NestJS 12** — bump every `@nestjs/*` to `^12` (`@nestjs/config` `^12`, `@nestjs/terminus` `^12.1`,
|
|
72
|
+
`@nestjs/typeorm` / `@nestjs/jwt` / `@nestjs/bullmq` `^12`). Nest 12 packages are ESM-only; CommonJS
|
|
73
|
+
apps keep working through Node's `require(esm)`. Drop any deep `@nestjs/*/dist/...` or
|
|
74
|
+
`@nestjs/common/interfaces`-style imports (no longer resolvable through the exports maps).
|
|
75
|
+
- **Node `^24.15`** (`engines`). `@nestjs/schematics` 12 requires it and yarn v1 enforces it.
|
|
76
|
+
- **Jest needs `--experimental-vm-modules`** to load the ESM-only Nest packages
|
|
77
|
+
(`node --experimental-vm-modules node_modules/jest/bin/jest.js`) — this is also what the Nest 12
|
|
78
|
+
CommonJS app template does. Without it every suite importing `@nestjs/*` fails with
|
|
79
|
+
`Must use import to load ES Module`.
|
|
80
|
+
- **Sentry 11** — `@sentry/nestjs` `^11.6` (v10 does not support Nest 12). `@sentry/node` /
|
|
81
|
+
`@sentry/core` are no longer direct dependencies; `@sentry/nestjs` pins them. Do not preload with
|
|
82
|
+
`--require` (unsupported in v11). See `docs/sentry-reporting.md`: initialise with
|
|
83
|
+
`import '@servicelabsco/nestjs-utility-services/dist/instrument'` as the first line of `main.ts` /
|
|
84
|
+
`worker.ts` — importing `initSentry` from the package barrel loads Nest, pg, ioredis and BullMQ
|
|
85
|
+
before Sentry initialises, so none of them were being instrumented.
|
|
86
|
+
- **bullmq 6** — `Queue#client` is gone (use `queue.getBackend().client`); `Worker#resume()` is async;
|
|
87
|
+
`QueueService.getQueueStats()` (`getJobCounts()`) no longer returns a `paused` key (paused jobs count
|
|
88
|
+
as `waiting`). Legacy repeatable jobs (`repeat`, `getRepeatableJobs`) are removed upstream — use job
|
|
89
|
+
schedulers.
|
|
90
|
+
- **ioredis 6** (RESP3 by default, reply shapes unchanged) and **nodemailer 10**, **dotenv 18**.
|
|
91
|
+
- **`redis` (node-redis) and `source-map-support` are no longer dependencies.** `RedisIoAdapter` now uses
|
|
92
|
+
ioredis; run node with `--enable-source-maps` (as `start:prod` now does) instead of
|
|
93
|
+
`source-map-support`.
|
|
94
|
+
- **Health responses** carry Terminus 12's per-indicator `responseTime` field.
|
|
95
|
+
- **Nest 12 behaviour changes** to be aware of: lifecycle hooks inside one module now run serially by
|
|
96
|
+
dependency level (previously concurrently); a thrown plain `Error` carrying a `statusCode` is mapped
|
|
97
|
+
to 500; `ConsoleLogger` folds plain-object arguments into one structured entry.
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
|
|
101
|
+
- **Sentry data collection is pinned explicitly.** Sentry 11 removed `sendDefaultPii` and its new
|
|
102
|
+
default collects user info, cookies, all HTTP bodies, DB query data and queue payloads. `initSentry()`
|
|
103
|
+
now sets `dataCollection` to the documented v10 `sendDefaultPii: false` baseline, so nothing new is
|
|
104
|
+
sent. Apps that call `Sentry.init` themselves must do the same.
|
|
105
|
+
- **TypeScript compiles with `module` / `moduleResolution: nodenext`** (TS 6 deprecates and TS 7 removes
|
|
106
|
+
`node`; dotenv 18 only resolves under it), target ES2023 with `useDefineForClassFields: false` (keeps
|
|
107
|
+
decorator-property semantics for TypeORM / DI). Emit is still CommonJS. TypeScript is pinned to
|
|
108
|
+
`~6.0` — TS 7 ships no compiler API yet, so `nest build`, ts-jest and typescript-eslint cannot run on it.
|
|
109
|
+
- **Postgres pools** (`typeorm.config.ts`, `read.typeorm.config.ts`): a request now fails after
|
|
110
|
+
`PG_DB_CONNECT_TIMEOUT_MS` (default 10s) waiting for a pooled connection instead of waiting forever;
|
|
111
|
+
pool size via `PG_DB_POOL_SIZE` / `PG_DB_READ_POOL_SIZE` (default 10, unchanged), idle timeout
|
|
112
|
+
`PG_DB_IDLE_TIMEOUT_MS` (30s), TCP keepalive on, `application_name` from `APP_NAME`. Removed the
|
|
113
|
+
MySQL-only `charset` / `supportBigNumbers` / `bigNumberStrings` options, which pg ignored.
|
|
114
|
+
- **Redis cache client** (`RedisModule`): auto-pipelining on; `maxRetriesPerRequest` defaults to 3
|
|
115
|
+
(`REDIS_MAX_RETRIES_PER_REQUEST`) instead of ioredis' 20, so cache calls fail fast during a Redis
|
|
116
|
+
outage instead of stalling HTTP requests.
|
|
117
|
+
- **`CacheService.set` is one atomic `SET … EX`** (new `RedisService.setex`) instead of `SET` then
|
|
118
|
+
`EXPIRE` — one round trip, and no window where the key exists without a TTL.
|
|
119
|
+
- **Body parsing** (`main.ts`): `app.useBodyParser` replaces Nest's default JSON / urlencoded parsers
|
|
120
|
+
instead of stacking a second pair on top.
|
|
121
|
+
- Middleware routes use the Express 5 `{*path}` wildcard (Nest 12 logged a deprecation per legacy path).
|
|
122
|
+
- `SentryContext.enrichHttpScope` no longer builds a redacted request snapshot on every request — it was
|
|
123
|
+
stored under `sdkProcessingMetadata.request`, which the SDK has not read since v9.
|
|
124
|
+
- Tests transpile with `isolatedModules` (`tsconfig.spec.json`): the suite runs in ~4s instead of ~35s.
|
|
125
|
+
Type checking moved to `yarn typecheck`, which CI now runs.
|
|
126
|
+
- **No undeclared (phantom) dependencies.** `jwt.config.ts` / `AuthService` took their option types from
|
|
127
|
+
`jsonwebtoken`, which only arrived transitively via `@nestjs/jwt`; they now use `JwtSignOptions` /
|
|
128
|
+
`JwtVerifyOptions` from `@nestjs/jwt`. `ProcessKaleyraSms` encoded its body with `qs`, which only
|
|
129
|
+
arrived via `express`; it now uses the built-in `URLSearchParams` (absent fields are still dropped).
|
|
130
|
+
- `socket.io-adapter` is declared — it is a required peer of `@socket.io/redis-adapter` and was only
|
|
131
|
+
satisfied by accident through `socket.io`'s own dependency.
|
|
132
|
+
|
|
133
|
+
### Added
|
|
134
|
+
|
|
135
|
+
- `BULL_QUEUE_CONCURRENCY` — jobs processed in parallel per worker (default 1, unchanged behaviour).
|
|
136
|
+
- `RedisService.setex(key, seconds, value)`; `QueueService.attachWorker(worker)`.
|
|
137
|
+
|
|
138
|
+
### Fixed
|
|
139
|
+
|
|
140
|
+
- **Health checks reported a failed / timed-out Postgres ping as `up`.** Terminus resolves (never
|
|
141
|
+
throws) with `status: 'down'`; the controller only handled a throw, so when the 1s ping timed out but
|
|
142
|
+
the follow-up `SELECT 1` succeeded it returned `up` — and passed the raw driver / timeout message to
|
|
143
|
+
the anonymous `/health` body. Now reported `down` with the sanitised message.
|
|
144
|
+
- **Maintenance pause at boot never reached the worker.** `QueueService.workerInstance` was only set when
|
|
145
|
+
the first job was processed, so `pause()` from `WorkerService` / `StartupService` during boot silently
|
|
146
|
+
did nothing. The consumer now attaches its worker at bootstrap and `QueueService` applies a pause that
|
|
147
|
+
was requested before then. `resume()` no longer throws when no worker is attached.
|
|
148
|
+
- **`worker.ts` never initialised Sentry**, so `SENTRY_ENABLE_WORKER=true` had no effect in the
|
|
149
|
+
standalone worker.
|
|
150
|
+
- `RedisIoAdapter` failed to compile against Nest 12 (`socket.io` `ServerOptions` mismatch); its types
|
|
151
|
+
now derive from `IoAdapter`.
|
|
152
|
+
|
|
153
|
+
### Removed
|
|
154
|
+
|
|
155
|
+
- `tslint.json` (tslint was not installed); the stale tracked `tsconfig.build.tsbuildinfo`.
|
|
156
|
+
- `js-yaml` devDependency and its `resolutions` override — nothing imports it, and after the upgrade the
|
|
157
|
+
only transitive copy resolves to the patched 3.15.x.
|
|
158
|
+
- Unused devDependencies `supertest`, `@types/supertest` (there are no e2e specs), `tsconfig-paths`
|
|
159
|
+
(no `paths` mapping; only `test:debug` loaded it) and `@types/multer` (no `Express.Multer` types used).
|
|
160
|
+
- Unused `platformConstants` imports in `RecordManager`, `BaseService`, `EventDetailService`,
|
|
161
|
+
`ModelSync` and `SqsPollingJob`.
|
|
162
|
+
|
|
163
|
+
### Not in this release
|
|
164
|
+
|
|
165
|
+
- **TypeORM stays on 0.3.x (`^0.3.31`).** `@nestjs/typeorm` 12 supports both 0.3 and 1.x. TypeORM 1.x
|
|
166
|
+
removes string-array `relations` and throws on `null` / `undefined` in `where` — 52 compile errors
|
|
167
|
+
here and ~2,000 `relations: [...]` call sites across consuming apps — so it ships separately.
|
|
168
|
+
- **`exceljs` stays on 4.4.0**, its latest release. It is the source of every deprecated package left in
|
|
169
|
+
the tree (`fstream`, `rimraf@2`, `glob@7`, `inflight`, `lodash.isequal`, `uuid@8`); replacing it means
|
|
170
|
+
rewriting the streaming report writer, so it is tracked separately. The other deprecated copy,
|
|
171
|
+
`glob@10`, comes from TypeORM 0.3 and jest's coverage tooling.
|
|
172
|
+
|
|
173
|
+
### Also in 4.0.0 — merged to main during the upgrade
|
|
174
|
+
|
|
175
|
+
#### Added
|
|
176
|
+
|
|
177
|
+
- **Direct-to-storage uploads (`DirectUploadService`)** for files too large, or too many, for a multer
|
|
178
|
+
upload. The client sends the bytes straight to S3 / R2 through presigned URLs: a single `PUT` up to
|
|
179
|
+
`UPLOAD_DIRECT_SINGLE_PUT_THRESHOLD` (100 MiB), S3 multipart above it (equal parts, so R2 works too).
|
|
180
|
+
`initiate()` validates size and content type (`UploadAllowList` by visibility, or the caller's list) and
|
|
181
|
+
returns the URLs; `signParts()` signs more parts, `status()` lists stored parts for resuming,
|
|
182
|
+
`complete()` checks every part, the stored size and the leading bytes (a signature mismatch or markup
|
|
183
|
+
posing as another type is deleted and rejected), `abort()` cancels. Sessions belong to the user who
|
|
184
|
+
started them. **Service only — no route is exposed**; consuming apps wire it into their own controller.
|
|
185
|
+
- `CommonDirectUploadController` — an abstract base with the five handlers (`POST /`, `POST /:uuid/parts`,
|
|
186
|
+
`GET /:uuid`, `POST /:uuid/complete`, `DELETE /:uuid`) and no path of its own. nu does not register it;
|
|
187
|
+
an app extends it under its own `@Controller(path)` and overrides `uploadOptions(files)` to choose
|
|
188
|
+
visibility, folder, engine and limits. Request DTOs `DirectUploadInitiateDto` and `DirectUploadPartsDto`.
|
|
189
|
+
- `sys_upload_sessions` table (migration `CreateUploadSessionTable1793302598724`) and `UploadSessionEntity`.
|
|
190
|
+
- `ExpireUploadSessionJob` — expires sessions past `UPLOAD_DIRECT_SESSION_TTL` (24h) and aborts their
|
|
191
|
+
multipart uploads. Schedule it through a scheduled event (e.g. hourly).
|
|
192
|
+
- Engine and `StorageService` methods: `createMultipartUpload`, `getSignedPartUploadUrl`, `listParts`,
|
|
193
|
+
`completeMultipartUpload`, `abortMultipartUpload`, `getRange` / `getObjectRange`, `getUploadTarget`,
|
|
194
|
+
`buildObjectKey`, `tryPublicUrl`. `FileTypeDetector.detectBySignature` / `matchesSignature`.
|
|
195
|
+
- Env vars: `UPLOAD_DIRECT_MAX_FILE_SIZE` (10 GiB), `UPLOAD_DIRECT_SINGLE_PUT_THRESHOLD`,
|
|
196
|
+
`UPLOAD_DIRECT_PART_SIZE` (8 MiB), `UPLOAD_DIRECT_MAX_FILES` (50), `UPLOAD_DIRECT_URL_TTL` (900s),
|
|
197
|
+
`UPLOAD_DIRECT_SESSION_TTL` (86400s).
|
|
198
|
+
- **`CodeEvaluator.run(script, context, { timeoutMs })`** — runs a stored script like `execute()` but
|
|
199
|
+
reports the outcome instead of logging or throwing: `{ ok: true, value }` with the script's return
|
|
200
|
+
value, or `{ ok: false, error, timedOut? }`, in legacy and sandbox mode. The deadline (default 5000ms)
|
|
201
|
+
covers awaited work; synchronous work that never yields is not interrupted (sandbox mode: only before
|
|
202
|
+
the first `await`). `execute()` is unchanged.
|
|
203
|
+
- Bucket setup the browser flow needs: CORS allowing `PUT` (and the `Content-Type` header) from the app
|
|
204
|
+
origins, and a lifecycle rule `AbortIncompleteMultipartUpload` after 1 day as a backstop.
|
|
205
|
+
- **ServiceLabs utilities (`ServicelabsUtilityService`)**, a client for https://servicelabs.dev — HTML → PDF,
|
|
206
|
+
split PDF, zip, unzip and XLS → XLSX behind one API key. Each utility runs **sync** (`htmlToPdf`,
|
|
207
|
+
`splitPdf`, `zipFiles`, `unzipFiles`, `xlsToXlsx`: run, wait past the 90 s sync budget if needed, copy
|
|
208
|
+
the output into the default storage engine, return the stored files) or **async** (`createHtmlPdfJob`
|
|
209
|
+
and siblings: return the queued job; collect it by callback or `waitForJob`, then copy with
|
|
210
|
+
`storeFiles`). Also `run` / `createJob` for any slug, `getJob` (long-poll), `listJobs`, `cancelJob`,
|
|
211
|
+
`listUtilities`, `getUtility`, `Idempotency-Key`, and `verifyCallback` for Standard Webhooks signatures.
|
|
212
|
+
Output is copied because ServiceLabs deletes its own after 30 days. Properties: `servicelabs.api.key`,
|
|
213
|
+
`servicelabs.api.url`, `servicelabs.webhook.secret`. Guide: [docs/servicelabs-utilities.md](docs/servicelabs-utilities.md).
|
|
214
|
+
- `ServicelabsDevService` — the bare ServiceLabs client `ServicelabsUtilityService` is built on, for apps
|
|
215
|
+
that want the API as it is: one method per operation (`runHtmlPdf` / `createHtmlPdfJob` … for each
|
|
216
|
+
utility, `runUtility` / `createUtilityJob`, `getJob`, `listJobs`, `cancelJob`, `listUtilities`,
|
|
217
|
+
`getUtility`, `getOpenApi`, `verifyCallback`), the native request body and headers (`Idempotency-Key`,
|
|
218
|
+
`Prefer: respond-async`, `X-Request-Id`), and the raw `{ success, status, data, headers }` answer, with
|
|
219
|
+
no waiting, no throwing on API errors and no copy into storage.
|
|
220
|
+
- Both ServiceLabs services are `@PublicExposed` for stored scripts and code evaluation:
|
|
221
|
+
`fn.getService('f7943f26e51e694f1338906b2770bd45')` (`ServicelabsUtilityService`) and
|
|
222
|
+
`fn.getService('f04986ac567c8b0c4c5f8af2161be73d')` (`ServicelabsDevService`), i.e.
|
|
223
|
+
`md5('platformUtility:<ClassName>')`.
|
|
224
|
+
- `CommonServicelabsCallbackController` — an abstract base that receives async-job callbacks
|
|
225
|
+
(`POST /`, signature verified against the raw body, `204`), with no path of its own. An app extends it
|
|
226
|
+
under its own `@Controller(path)`, implements `onJobFinished(event)` and creates the app with
|
|
227
|
+
`{ rawBody: true }`.
|
|
228
|
+
|
|
229
|
+
#### Changed
|
|
230
|
+
|
|
231
|
+
- **Upload size, content type and ETag now come from S3 / R2.** `StorageService.put()` sends a HEAD
|
|
232
|
+
request after the upload and returns `size`, `contentType` and `etag` as the engine stored them,
|
|
233
|
+
instead of the buffer length and the requested type. This costs one extra request per upload. If
|
|
234
|
+
the HEAD fails, the upload still succeeds: a warning is logged and the request values are returned.
|
|
235
|
+
- **`POST api/admin/uploads` returns the stored `size` and `contentType`.** It previously returned the
|
|
236
|
+
multipart upload's size and no type.
|
|
237
|
+
- **`UploadService.uploadWithStats()` sets the content type from the file extension, like `upload()`.**
|
|
238
|
+
It previously stored the object untyped when the caller passed no `contentType`.
|
|
239
|
+
- **`QueueService.pause()` no longer waits for running jobs.** The worker stops picking up new jobs
|
|
240
|
+
and the call returns at once. It used BullMQ's default, which waits for every running job with no
|
|
241
|
+
time limit (BullMQ 5 and 6 alike). That held up a maintenance request or boot until all jobs had
|
|
242
|
+
finished, and shutdown's `SERVER_COOL_DOWN_PERIOD` drain never ran. Pass `pause(true)` to wait;
|
|
243
|
+
never do so from inside a job, which would then wait on itself. The pause applied when the worker
|
|
244
|
+
attaches never waits, because it can run inside `JobConsumer.process()`. Shutdown still lets
|
|
245
|
+
running jobs finish: the worker's `close()` waits for them.
|
|
246
|
+
- **`PdfService.convert`, `SplitPdfService.split` and `ZipService.zip` / `unzip` run on ServiceLabs once
|
|
247
|
+
`servicelabs.api.key` is set**, and on the Lambda URLs (`lambda.*` properties) until then, so each
|
|
248
|
+
environment switches with one property. Return shapes are unchanged and links still point at our own
|
|
249
|
+
storage (the default engine, under `servicelabs/`). Differences on ServiceLabs: inputs are validated
|
|
250
|
+
strictly (unknown `pdfOptions` keys, `format` with `width` / `height`, more than 500 zip entries are a
|
|
251
|
+
`400`); zip entries without a `fileName` are named after their URL and repeated names get ` (n)`.
|
|
252
|
+
`PdfService`, `SplitPdfService` and `ZipService` take `ServicelabsUtilityService` as a new last
|
|
253
|
+
constructor argument.
|
|
254
|
+
- **`ZipService.unzip()` is typed as `UnzipFileInterface[]`** (`https_url`, `original_path`, `s3_key`,
|
|
255
|
+
`size`) — what the unzip Lambda always returned; it was declared `string[]`.
|
|
256
|
+
- Dependencies upgraded to their latest version within each major (NestJS 12.3, BullMQ 6.5, Sentry
|
|
257
|
+
11.10, AWS SDK 3.1160, nodemailer 10.3). TypeORM 1.x, TypeScript 7 and `@types/node` 26 are held back.
|
|
258
|
+
|
|
259
|
+
#### Fixed
|
|
260
|
+
|
|
261
|
+
- **`getSignedUploadUrl` URLs could not be used.** The SDK's default checksums signed a CRC32 of the empty
|
|
262
|
+
body into the URL, so a real upload failed the checksum. Presigned PUT and part URLs no longer carry it.
|
|
263
|
+
`Content-Type` is now signed too (it was not, so any type could be stored), and an `acl` option is
|
|
264
|
+
accepted (hoisted into the URL; dropped on R2).
|
|
265
|
+
|
|
266
|
+
## 3.0.20
|
|
267
|
+
|
|
268
|
+
Never published to npm; this fix ships in 4.0.0.
|
|
269
|
+
|
|
270
|
+
### Fixed
|
|
271
|
+
|
|
272
|
+
- **`SyncAllCodeJob` no longer crashes on a column with no resolved type.** `ModelSync` read
|
|
273
|
+
`column.type.name` and threw `Cannot read properties of undefined (reading 'name')` when TypeORM left a
|
|
274
|
+
column's type `undefined` (no `design:type` metadata, or an unresolved join column), aborting the sync
|
|
275
|
+
for every model. Such columns now get the default column type id (`1`), as unmapped types already did.
|
|
276
|
+
|
|
277
|
+
## 3.0.19
|
|
4
278
|
|
|
5
279
|
### Fixed
|
|
6
280
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ infra wiring stay consistent across products instead of being copied per repo.
|
|
|
9
9
|
| --- | --- |
|
|
10
10
|
| **Package** | [`@servicelabsco/nestjs-utility-services`](https://www.npmjs.com/package/@servicelabsco/nestjs-utility-services) |
|
|
11
11
|
| **Repo** | [servicelabsco/nestjs-utility-services](https://github.com/servicelabsco/nestjs-utility-services) |
|
|
12
|
-
| **Node** | `^24.
|
|
12
|
+
| **Node** | `^24.15.0` (required from **4.x**; 3.x needs `^24.11.0`) |
|
|
13
13
|
| **Runtime entry** | `dist/index.js` · types `dist/index.d.ts` |
|
|
14
14
|
| **License** | MIT |
|
|
15
15
|
|
|
@@ -164,8 +164,10 @@ CLI + wait output is written under **`logs/publish/`** (gitignored); open
|
|
|
164
164
|
| Doc | Contents |
|
|
165
165
|
| --- | --- |
|
|
166
166
|
| [CHANGELOG.md](CHANGELOG.md) | Version history and breaking changes |
|
|
167
|
+
| [docs/upgrade-4.0.md](docs/upgrade-4.0.md) | 4.x upgrade guide (NestJS 12): upgrade order, required app changes, per-repo checklist |
|
|
167
168
|
| [docs/upgrade-3.0-backward-compatibility.md](docs/upgrade-3.0-backward-compatibility.md) | 3.x upgrade runbook (auth, SSRF, PDF, scripts, sessions, SES, migrations) |
|
|
168
169
|
| [docs/sentry-reporting.md](docs/sentry-reporting.md) | Sentry init + `SentryReportingModule` for consumers |
|
|
170
|
+
| [docs/servicelabs-utilities.md](docs/servicelabs-utilities.md) | ServiceLabs utilities (HTML → PDF, split PDF, zip, unzip, XLS → XLSX): sync and async calls, callbacks, storage |
|
|
169
171
|
| [docs/subscribe-for.md](docs/subscribe-for.md) | **Jobs & subscribers for consuming apps** — when to use `@SubscribeFor` vs a standalone subscriber, wiring, anti-patterns |
|
|
170
172
|
| [docs/migrations.md](docs/migrations.md) | Safe TypeORM migration playbook |
|
|
171
173
|
| [docs/refresh-token-security.md](docs/refresh-token-security.md) | Refresh-token hardening notes |
|
package/dist/app.module.js
CHANGED
|
@@ -1,43 +1,10 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
9
|
exports.AppModule = void 0;
|
|
43
10
|
const bullmq_1 = require("@nestjs/bullmq");
|
|
@@ -54,10 +21,10 @@ const internal_middleware_1 = require("./auth/middlewares/internal.middleware");
|
|
|
54
21
|
const jwt_middleware_1 = require("./auth/middlewares/jwt.middleware");
|
|
55
22
|
const restricted_middleware_1 = require("./auth/middlewares/restricted.middleware");
|
|
56
23
|
const common_module_1 = require("./common/common.module");
|
|
57
|
-
const mongoOrmconfig =
|
|
58
|
-
const queueConfig =
|
|
59
|
-
const readOrmconfig =
|
|
60
|
-
const ormconfig =
|
|
24
|
+
const mongoOrmconfig = require("./config/mongo.config");
|
|
25
|
+
const queueConfig = require("./config/queue.config");
|
|
26
|
+
const readOrmconfig = require("./config/read.typeorm.config");
|
|
27
|
+
const ormconfig = require("./config/typeorm.config");
|
|
61
28
|
const health_check_controller_1 = require("./health.check.controller");
|
|
62
29
|
const maintenance_middleware_1 = require("./platformUtility/middlewares/maintenance.middleware");
|
|
63
30
|
const platform_utility_module_1 = require("./platformUtility/platform.utility.module");
|
|
@@ -71,14 +38,14 @@ let AppModule = class AppModule {
|
|
|
71
38
|
configure(consumer) {
|
|
72
39
|
consumer
|
|
73
40
|
.apply(maintenance_middleware_1.MaintenanceMiddleware)
|
|
74
|
-
.exclude({ path: 'health', method: common_1.RequestMethod.ALL }, { path: 'health/
|
|
75
|
-
.forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
|
|
76
|
-
consumer.apply(jwt_middleware_1.JwtMiddleware).forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
|
|
77
|
-
consumer.apply(basic_auth_middleware_1.BasicAuthMiddleware).forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
|
|
78
|
-
consumer.apply(restricted_middleware_1.RestrictedMiddleware).forRoutes({ path: 'api
|
|
41
|
+
.exclude({ path: 'health', method: common_1.RequestMethod.ALL }, { path: 'health/{*path}', method: common_1.RequestMethod.ALL })
|
|
42
|
+
.forRoutes({ path: '{*path}', method: common_1.RequestMethod.ALL });
|
|
43
|
+
consumer.apply(jwt_middleware_1.JwtMiddleware).forRoutes({ path: '{*path}', method: common_1.RequestMethod.ALL });
|
|
44
|
+
consumer.apply(basic_auth_middleware_1.BasicAuthMiddleware).forRoutes({ path: '{*path}', method: common_1.RequestMethod.ALL });
|
|
45
|
+
consumer.apply(restricted_middleware_1.RestrictedMiddleware).forRoutes({ path: 'api/{*path}', method: common_1.RequestMethod.ALL });
|
|
79
46
|
consumer
|
|
80
47
|
.apply(internal_middleware_1.InternalMiddleware)
|
|
81
|
-
.forRoutes({ path: 'internal
|
|
48
|
+
.forRoutes({ path: 'internal/{*path}', method: common_1.RequestMethod.ALL }, { path: 'health/detailed', method: common_1.RequestMethod.GET });
|
|
82
49
|
}
|
|
83
50
|
};
|
|
84
51
|
exports.AppModule = AppModule;
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA2E;AAC3E,2CAA8C;AAC9C,+CAAkD;AAClD,6CAAgD;AAChD,qDAAiD;AACjD,+CAA2C;AAC3C,oDAAgD;AAChD,oFAA+E;AAC/E,oFAA+E;AAC/E,gFAA4E;AAC5E,sEAAkE;AAClE,oFAAgF;AAChF,0DAAsD;AACtD,wDAAwD;AACxD,qDAAqD;AACrD,8DAA8D;AAC9D,qDAAqD;AACrD,uEAAkE;AAClE,iGAA6F;AAC7F,uFAAkF;AAClF,uFAAkF;AAClF,kFAA8E;AAC9E,gEAA4D;AAC5D,0EAAsE;AACtE,0DAAsD;AACtD,qDAAiD;AAuB1C,IAAM,SAAS,GAAf,MAAM,SAAS;IAGlB,SAAS,CAAC,QAA4B;QAMlC,QAAQ;aACH,KAAK,CAAC,8CAAqB,CAAC;aAC5B,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;aAC7G,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/D,QAAQ,CAAC,KAAK,CAAC,8BAAa,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG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BrB"}
|
package/dist/auth/auth.module.js
CHANGED
|
@@ -5,15 +5,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.AuthModule = void 0;
|
|
13
10
|
const common_1 = require("@nestjs/common");
|
|
14
11
|
const jwt_1 = require("@nestjs/jwt");
|
|
15
12
|
const platform_utility_module_1 = require("../platformUtility/platform.utility.module");
|
|
16
|
-
const es6_classes_1 =
|
|
13
|
+
const es6_classes_1 = require("./es6.classes");
|
|
17
14
|
const jwtConfig = require("../config/jwt.config");
|
|
18
15
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
16
|
let AuthModule = class AuthModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,qCAAwC;AACxC,wFAAmF;AACnF,+CAAuC;AACvC,kDAAmD;AACnD,6CAAgD;AAOzC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IALtB,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,qBAAU,CAAC,QAAQ,CAAC,EAAE,eAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAqB,CAAC,CAAC;QAChI,SAAS,EAAE,qBAAU,CAAC,QAAQ;QAC9B,OAAO,EAAE,qBAAU,CAAC,QAAQ;KAC/B,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -1,43 +1,10 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
10
|
};
|
|
@@ -45,7 +12,7 @@ var InternalMiddleware_1;
|
|
|
45
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
13
|
exports.InternalMiddleware = void 0;
|
|
47
14
|
const common_1 = require("@nestjs/common");
|
|
48
|
-
const crypto =
|
|
15
|
+
const crypto = require("crypto");
|
|
49
16
|
const access_exception_1 = require("../../common/exceptions/access.exception");
|
|
50
17
|
const no_logged_user_exception_1 = require("../../common/exceptions/no.logged.user.exception");
|
|
51
18
|
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
|
@@ -53,7 +20,9 @@ const auth_1 = require("../../common/libraries/auth");
|
|
|
53
20
|
const user_constants_1 = require("../../common/constants/user.constants");
|
|
54
21
|
const property_service_1 = require("../../system/services/property.service");
|
|
55
22
|
const auth_service_1 = require("../services/auth.service");
|
|
56
|
-
let InternalMiddleware =
|
|
23
|
+
let InternalMiddleware = class InternalMiddleware {
|
|
24
|
+
static { InternalMiddleware_1 = this; }
|
|
25
|
+
static { this.dbFallbackWarned = false; }
|
|
57
26
|
constructor(authService, propertyService) {
|
|
58
27
|
this.authService = authService;
|
|
59
28
|
this.propertyService = propertyService;
|
|
@@ -95,7 +64,6 @@ let InternalMiddleware = InternalMiddleware_1 = class InternalMiddleware {
|
|
|
95
64
|
}
|
|
96
65
|
};
|
|
97
66
|
exports.InternalMiddleware = InternalMiddleware;
|
|
98
|
-
InternalMiddleware.dbFallbackWarned = false;
|
|
99
67
|
exports.InternalMiddleware = InternalMiddleware = InternalMiddleware_1 = __decorate([
|
|
100
68
|
(0, common_1.Injectable)(),
|
|
101
69
|
__metadata("design:paramtypes", [auth_service_1.AuthService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.middleware.js","sourceRoot":"","sources":["../../../src/auth/middlewares/internal.middleware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.middleware.js","sourceRoot":"","sources":["../../../src/auth/middlewares/internal.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,iCAAiC;AAEjC,+EAA2E;AAC3E,+FAAyF;AACzF,qFAAiF;AACjF,sDAAmD;AACnD,0EAAsE;AACtE,6EAAyE;AACzE,2DAAuD;AAShD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;;aAOZ,qBAAgB,GAAG,KAAK,AAAR,CAAS;IAOxC,YACqB,WAAwB,EACxB,eAAgC;QADhC,gBAAW,GAAX,WAAW,CAAa;QACxB,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAWJ,KAAK,CAAC,GAAG,CAAC,GAAQ,EAAE,GAAa,EAAE,IAAc;QAC7C,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACnD,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,gDAAqB,EAAE,CAAC;QAEnD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QACtC,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,wCAAkB,CAAC,8BAA8B,CAAC,CAAC;QAEvE,IAAI,CAAC,IAAI,CAAC,kBAAkB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IAAA,mBAAU,GAAE;qCAgByB,0BAAW;QACP,kCAAe;GAhB5C,kBAAkB,CAmF9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../src/auth/services/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../src/auth/services/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAA2E;AAC3E,mCAAoC;AACpC,sDAAmD;AAEnD,qFAAgF;AAChF,yDAAqD;AACrD,mEAA8D;AAC9D,iDAA6C;AAC7C,0EAAsE;AACtE,+FAAiF;AAYjF,MAAM,kBAAkB,GAAqB,CAAC,GAAG,EAAE;IAC/C,MAAM,SAAS,GAAI,OAAO,CAAC,GAAG,CAAC,aAA6C,IAAI,OAAO,CAAC;IACxF,MAAM,OAAO,GAAqB,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;IAE9D,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU;QAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACpE,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY;QAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAE1E,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC;AAUE,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,8BAAa;IAO1C,YACqB,UAAsB,EACtB,mBAAwC,EACxC,WAAwB;QAEzC,KAAK,EAAE,CAAC;QAJS,eAAU,GAAV,UAAU,CAAY;QACtB,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,gBAAW,GAAX,WAAW,CAAa;IAG7C,CAAC;IASD,KAAK,CAAC,gBAAgB,CAAC,IAAS,EAAE,GAAQ,EAAE,O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pB,CAAC;CACJ,CAAA;AAhOY,kCAAW;sBAAX,WAAW;IAFvB,IAAA,wCAAa,EAAC,kCAAkC,CAAC;IACjD,IAAA,mBAAU,GAAE;qCASwB,gBAAU;QACD,2CAAmB;QAC3B,0BAAW;GAVpC,WAAW,CAgOvB"}
|
|
@@ -16,7 +16,10 @@ const operation_exception_1 = require("../../common/exceptions/operation.excepti
|
|
|
16
16
|
const date_util_1 = require("../../common/libraries/date.util");
|
|
17
17
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
|
18
18
|
const device_token_entity_1 = require("../entities/device.token.entity");
|
|
19
|
-
let DeviceTokenService =
|
|
19
|
+
let DeviceTokenService = class DeviceTokenService {
|
|
20
|
+
static { DeviceTokenService_1 = this; }
|
|
21
|
+
static { this.MAX_SAVE_ATTEMPTS = 3; }
|
|
22
|
+
static { this.SAVE_BACKOFF_BASE_MS = 50; }
|
|
20
23
|
async setDeviceToken(req, body) {
|
|
21
24
|
let lastError;
|
|
22
25
|
for (let attempt = 0; attempt < DeviceTokenService_1.MAX_SAVE_ATTEMPTS; attempt++) {
|
|
@@ -80,8 +83,6 @@ let DeviceTokenService = DeviceTokenService_1 = class DeviceTokenService {
|
|
|
80
83
|
}
|
|
81
84
|
};
|
|
82
85
|
exports.DeviceTokenService = DeviceTokenService;
|
|
83
|
-
DeviceTokenService.MAX_SAVE_ATTEMPTS = 3;
|
|
84
|
-
DeviceTokenService.SAVE_BACKOFF_BASE_MS = 50;
|
|
85
86
|
exports.DeviceTokenService = DeviceTokenService = DeviceTokenService_1 = __decorate([
|
|
86
87
|
(0, common_1.Injectable)()
|
|
87
88
|
], DeviceTokenService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.token.service.js","sourceRoot":"","sources":["../../../src/auth/services/device.token.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,yDAA0D;AAC1D,sDAAmD;AACnD,qFAAiF;AACjF,gEAA4D;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AAO,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC;IAOD,KAAK,CAAC,gBAAgB,CAAC,OAAY;QAC/B,MAAM,IAAI,GAAG,WAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,gBAAgB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACxD,IAAI,CAAC,gBAAgB;YAAE,OAAO;QAE9B,MAAM,aAAa,GAAQ,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAGvD,MAAM,MAAM,GAAG,MAAM,uCAAiB,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;SACpC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,OAAO,GAAG,aAAa,IAAI,IAAI,CAAC;QACvC,MAAM,CAAC,oBAAoB,GAAG,oBAAQ,CAAC,WAAW,EAAE,CAAC;QAErD,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEpB,OAAO,MAAM,CAAC;IAClB,CAAC;;AAtHQ,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAuH9B"}
|
|
@@ -1,43 +1,10 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
10
|
};
|
|
@@ -45,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
12
|
exports.RefreshTokenService = void 0;
|
|
46
13
|
const common_1 = require("@nestjs/common");
|
|
47
14
|
const jwt_1 = require("@nestjs/jwt");
|
|
48
|
-
const crypto =
|
|
15
|
+
const crypto = require("crypto");
|
|
49
16
|
const access_exception_1 = require("../../common/exceptions/access.exception");
|
|
50
17
|
const date_util_1 = require("../../common/libraries/date.util");
|
|
51
18
|
const device_token_entity_1 = require("../entities/device.token.entity");
|