hikoutei 0.3.0 → 0.3.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/README.ja.md +13 -21
- package/README.ko.md +14 -22
- package/README.md +25 -29
- package/dist/adapter/persistence/contracts/sql.d.ts +16 -2
- package/dist/adapter/persistence/contracts/sql.d.ts.map +1 -1
- package/dist/adapter/persistence/contracts/sql.js +11 -1
- package/dist/adapter/persistence/contracts/sql.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmScalarPersistenceProvider.d.ts +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmScalarPersistenceProvider.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmScalarPersistenceProvider.js +40 -14
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmScalarPersistenceProvider.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.d.ts +2 -0
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.js +23 -8
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts +13 -4
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.js +12 -2
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.d.ts +21 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.js +59 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.d.ts +14 -13
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.js +43 -64
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.js +4 -2
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.js +1 -2
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.js.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.d.ts +61 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js +186 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.d.ts +56 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.js +275 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.d.ts +11 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.js +345 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.d.ts +65 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.js +51 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingState.d.ts +36 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingState.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingState.js +126 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingState.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.d.ts +11 -2
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.d.ts.map +1 -1
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.js +39 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js +46 -35
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js +22 -4
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts +2 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js +47 -54
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js +6 -30
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js +79 -22
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts +2 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts +5 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js +19 -4
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js +5 -6
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts +2 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js +2 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts +2 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js +15 -19
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js +44 -30
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js.map +1 -1
- package/dist/adapter/sheets/providers/apps-script-gateway/validation.d.ts +3 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/validation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/validation.js +10 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/validation.js.map +1 -0
- package/dist/api/Hikoutei.d.ts +17 -50
- package/dist/api/Hikoutei.d.ts.map +1 -1
- package/dist/api/Hikoutei.js +46 -105
- package/dist/api/Hikoutei.js.map +1 -1
- package/dist/api/entity.d.ts +9 -10
- package/dist/api/entity.d.ts.map +1 -1
- package/dist/api/entity.js +20 -26
- package/dist/api/entity.js.map +1 -1
- package/dist/api/errors.d.ts +0 -6
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +0 -6
- package/dist/api/errors.js.map +1 -1
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/internalEntityManager.d.ts.map +1 -1
- package/dist/api/internalEntityManager.js +33 -19
- package/dist/api/internalEntityManager.js.map +1 -1
- package/dist/application/orm/mapping/contracts.d.ts +16 -6
- package/dist/application/orm/mapping/contracts.d.ts.map +1 -1
- package/dist/application/orm/mapping/definition.d.ts.map +1 -1
- package/dist/application/orm/mapping/definition.js +47 -8
- package/dist/application/orm/mapping/definition.js.map +1 -1
- package/dist/application/orm/mapping/identity.js +1 -1
- package/dist/application/orm/mapping/identity.js.map +1 -1
- package/dist/application/orm/mapping/projection.d.ts.map +1 -1
- package/dist/application/orm/mapping/projection.js +10 -2
- package/dist/application/orm/mapping/projection.js.map +1 -1
- package/dist/application/orm/mapping/values.d.ts.map +1 -1
- package/dist/application/orm/mapping/values.js +5 -35
- package/dist/application/orm/mapping/values.js.map +1 -1
- package/dist/application/orm/persistence/flush/flushCoordinator.d.ts +3 -1
- package/dist/application/orm/persistence/flush/flushCoordinator.d.ts.map +1 -1
- package/dist/application/orm/persistence/flush/flushCoordinator.js +4 -3
- package/dist/application/orm/persistence/flush/flushCoordinator.js.map +1 -1
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.js +2 -1
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.js.map +1 -1
- package/dist/application/orm/persistence/projection/projectionEffects.d.ts +3 -1
- package/dist/application/orm/persistence/projection/projectionEffects.d.ts.map +1 -1
- package/dist/application/orm/persistence/projection/projectionEffects.js +14 -16
- package/dist/application/orm/persistence/projection/projectionEffects.js.map +1 -1
- package/dist/application/orm/persistence/scalar/unitOfWork.d.ts +6 -6
- package/dist/application/orm/persistence/scalar/unitOfWork.d.ts.map +1 -1
- package/dist/application/orm/persistence/scalar/unitOfWork.js +28 -28
- package/dist/application/orm/persistence/scalar/unitOfWork.js.map +1 -1
- package/dist/application/orm/persistence/support/businessKeys.d.ts.map +1 -1
- package/dist/application/orm/persistence/support/businessKeys.js +6 -24
- package/dist/application/orm/persistence/support/businessKeys.js.map +1 -1
- package/dist/application/orm/persistence/support/canonicalState.d.ts.map +1 -1
- package/dist/application/orm/persistence/support/canonicalState.js +9 -25
- package/dist/application/orm/persistence/support/canonicalState.js.map +1 -1
- package/dist/application/orm/persistence/support/contracts.d.ts +0 -57
- package/dist/application/orm/persistence/support/contracts.d.ts.map +1 -1
- package/dist/application/orm/persistence/support/contracts.js +0 -68
- package/dist/application/orm/persistence/support/contracts.js.map +1 -1
- package/dist/application/orm/persistence/support/helpers.d.ts +1 -11
- package/dist/application/orm/persistence/support/helpers.d.ts.map +1 -1
- package/dist/application/orm/persistence/support/helpers.js +1 -21
- package/dist/application/orm/persistence/support/helpers.js.map +1 -1
- package/dist/application/sync/gateway/constants.d.ts +2 -1
- package/dist/application/sync/gateway/constants.d.ts.map +1 -1
- package/dist/application/sync/gateway/constants.js +4 -3
- package/dist/application/sync/gateway/constants.js.map +1 -1
- package/dist/application/sync/gateway/syncGateway.d.ts.map +1 -1
- package/dist/application/sync/gateway/syncGateway.js +9 -28
- package/dist/application/sync/gateway/syncGateway.js.map +1 -1
- package/dist/application/sync/gateway/validation.d.ts +5 -0
- package/dist/application/sync/gateway/validation.d.ts.map +1 -1
- package/dist/application/sync/gateway/validation.js +22 -3
- package/dist/application/sync/gateway/validation.js.map +1 -1
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.d.ts.map +1 -1
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.js +3 -23
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts +2 -0
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js +24 -6
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorker.js +35 -34
- package/dist/application/sync/outbound/effects/SyncEffectWorker.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts +0 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js +8 -37
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js +2 -2
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts +0 -5
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js +3 -10
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js +13 -21
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts.map +1 -1
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js +15 -3
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js.map +1 -1
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.d.ts.map +1 -1
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js +1 -10
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js.map +1 -1
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.d.ts.map +1 -1
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js +5 -9
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js.map +1 -1
- package/dist/application/sync/service/SyncPollingSupervisor.d.ts +45 -0
- package/dist/application/sync/service/SyncPollingSupervisor.d.ts.map +1 -0
- package/dist/application/sync/service/SyncPollingSupervisor.js +142 -0
- package/dist/application/sync/service/SyncPollingSupervisor.js.map +1 -0
- package/dist/application/sync/service/SyncServiceBootstrap.d.ts +63 -0
- package/dist/application/sync/service/SyncServiceBootstrap.d.ts.map +1 -0
- package/dist/application/sync/service/SyncServiceBootstrap.js +223 -0
- package/dist/application/sync/service/SyncServiceBootstrap.js.map +1 -0
- package/dist/application/sync/service/contracts.d.ts +25 -0
- package/dist/application/sync/service/contracts.d.ts.map +1 -0
- package/dist/application/sync/service/contracts.js +3 -0
- package/dist/application/sync/service/contracts.js.map +1 -0
- package/dist/application/sync/service/errors.d.ts +15 -0
- package/dist/application/sync/service/errors.d.ts.map +1 -0
- package/dist/application/sync/service/errors.js +16 -0
- package/dist/application/sync/service/errors.js.map +1 -0
- package/dist/domain/errors/types.d.ts +1 -1
- package/dist/domain/errors/types.d.ts.map +1 -1
- package/dist/domain/errors/types.js +2 -2
- package/dist/domain/errors/types.js.map +1 -1
- package/dist/domain/evaluate/constants.d.ts +1 -1
- package/dist/domain/evaluate/constants.d.ts.map +1 -1
- package/dist/domain/evaluate/constants.js.map +1 -1
- package/dist/domain/evaluate/preconditions.d.ts.map +1 -1
- package/dist/domain/evaluate/preconditions.js +25 -32
- package/dist/domain/evaluate/preconditions.js.map +1 -1
- package/dist/domain/evaluate/quarantine.js +4 -1
- package/dist/domain/evaluate/quarantine.js.map +1 -1
- package/dist/domain/model/constants.d.ts +48 -0
- package/dist/domain/model/constants.d.ts.map +1 -1
- package/dist/domain/model/constants.js +38 -0
- package/dist/domain/model/constants.js.map +1 -1
- package/dist/domain/model/index.d.ts +2 -2
- package/dist/domain/model/index.d.ts.map +1 -1
- package/dist/domain/model/index.js +1 -1
- package/dist/domain/model/index.js.map +1 -1
- package/dist/domain/model/types.d.ts +13 -10
- package/dist/domain/model/types.d.ts.map +1 -1
- package/dist/infrastructure/storage/constants.d.ts +1 -1
- package/dist/infrastructure/storage/constants.d.ts.map +1 -1
- package/dist/infrastructure/storage/constants.js.map +1 -1
- package/dist/infrastructure/storage/errors.d.ts +2 -2
- package/dist/infrastructure/storage/errors.d.ts.map +1 -1
- package/dist/infrastructure/storage/errors.js +3 -5
- package/dist/infrastructure/storage/errors.js.map +1 -1
- package/dist/infrastructure/storage/index.d.ts +9 -5
- package/dist/infrastructure/storage/index.d.ts.map +1 -1
- package/dist/infrastructure/storage/index.js +3 -1
- package/dist/infrastructure/storage/index.js.map +1 -1
- package/dist/infrastructure/storage/sqlite/migrateSchema.js +9 -4
- package/dist/infrastructure/storage/sqlite/migrateSchema.js.map +1 -1
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts +9 -0
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.js +35 -36
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.js.map +1 -1
- package/dist/infrastructure/storage/state/mapped/mappedPersistenceSql.d.ts +8 -1
- package/dist/infrastructure/storage/state/mapped/mappedPersistenceSql.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/mapped/mappedPersistenceSql.js +14 -0
- package/dist/infrastructure/storage/state/mapped/mappedPersistenceSql.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationAudit.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationAudit.js +4 -1
- package/dist/infrastructure/storage/state/observation/observationAudit.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts +11 -1
- package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationCanonical.js +108 -0
- package/dist/infrastructure/storage/state/observation/observationCanonical.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts +36 -1
- package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationQuarantine.js +55 -0
- package/dist/infrastructure/storage/state/observation/observationQuarantine.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationTypes.d.ts +22 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationTypes.js +5 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationValidation.d.ts +1 -1
- package/dist/infrastructure/storage/state/observation/observationValidation.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationValidation.js +26 -0
- package/dist/infrastructure/storage/state/observation/observationValidation.js.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationWriter.d.ts +1 -1
- package/dist/infrastructure/storage/state/observation/observationWriter.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/observation/observationWriter.js +5 -1
- package/dist/infrastructure/storage/state/observation/observationWriter.js.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.js +3 -2
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.js.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts +1 -5
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js +3 -43
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts.map +1 -1
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js +2 -4
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts +2 -2
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.js +20 -10
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.js.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts +33 -18
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js +2 -4
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts +6 -2
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js +157 -14
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/reconciliationSql.d.ts +1 -1
- package/dist/infrastructure/storage/sync/outbound/reconciliationSql.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/outbound/reconciliationSql.js +14 -1
- package/dist/infrastructure/storage/sync/outbound/reconciliationSql.js.map +1 -1
- package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts +2 -1
- package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/shared/syncRegistry.js +4 -1
- package/dist/infrastructure/storage/sync/shared/syncRegistry.js.map +1 -1
- package/dist/infrastructure/storage/sync/shared/writerLease.d.ts +4 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.d.ts.map +1 -1
- package/dist/infrastructure/storage/sync/shared/writerLease.js +9 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.js.map +1 -1
- package/dist/shared/constants.d.ts +4 -4
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/encoding/index.d.ts +1 -0
- package/dist/shared/encoding/index.d.ts.map +1 -1
- package/dist/shared/encoding/index.js +1 -0
- package/dist/shared/encoding/index.js.map +1 -1
- package/dist/shared/encoding/normalizedCell.d.ts +4 -0
- package/dist/shared/encoding/normalizedCell.d.ts.map +1 -0
- package/dist/shared/encoding/normalizedCell.js +29 -0
- package/dist/shared/encoding/normalizedCell.js.map +1 -0
- package/dist/shared/encoding/stableEncode.d.ts +2 -1
- package/dist/shared/encoding/stableEncode.d.ts.map +1 -1
- package/dist/shared/encoding/stableEncode.js +6 -12
- package/dist/shared/encoding/stableEncode.js.map +1 -1
- package/dist/shared/identity/index.d.ts +3 -0
- package/dist/shared/identity/index.d.ts.map +1 -0
- package/dist/shared/identity/index.js +2 -0
- package/dist/shared/identity/index.js.map +1 -0
- package/dist/shared/identity/types.d.ts +41 -0
- package/dist/shared/identity/types.d.ts.map +1 -0
- package/dist/shared/identity/types.js +34 -0
- package/dist/shared/identity/types.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/state/constructors.d.ts +10 -0
- package/dist/shared/state/constructors.d.ts.map +1 -0
- package/dist/shared/state/constructors.js +18 -0
- package/dist/shared/state/constructors.js.map +1 -0
- package/dist/shared/state/index.d.ts +1 -0
- package/dist/shared/state/index.d.ts.map +1 -1
- package/dist/shared/state/index.js +1 -0
- package/dist/shared/state/index.js.map +1 -1
- package/dist/shared/validation.d.ts +2 -0
- package/dist/shared/validation.d.ts.map +1 -1
- package/dist/shared/validation.js +9 -0
- package/dist/shared/validation.js.map +1 -1
- package/docs/architecture.md +108 -103
- package/docs/ci.md +184 -61
- package/docs/mikro-orm-adapter-spike.md +55 -214
- package/docs/quick-start.md +58 -96
- package/docs/write-and-synchronization-flow.md +70 -39
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isRecord } from "../../../../shared/encoding/typeGuards.js";
|
|
2
|
+
import { invalidOperationResponse } from "./errors.js";
|
|
3
|
+
/** Promotes an operation payload object while retaining the operation error context. */
|
|
4
|
+
export function requireOperationRecord(value, label, operationLabel) {
|
|
5
|
+
if (!isRecord(value)) {
|
|
6
|
+
return invalidOperationResponse(operationLabel, label + " must be an object");
|
|
7
|
+
}
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/apps-script-gateway/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,wFAAwF;AACxF,MAAM,UAAU,sBAAsB,CACpC,KAAc,EACd,KAAa,EACb,cAAsB;IAEtB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,wBAAwB,CAC7B,cAAc,EACd,KAAK,GAAG,oBAAoB,CAC7B,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/api/Hikoutei.d.ts
CHANGED
|
@@ -1,75 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public Hikoutei runtime and the `createTypedSheets()` factory.
|
|
2
|
+
* Public SQLite-authoritative Hikoutei runtime and the `createTypedSheets()` factory.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This module intentionally knows nothing about Sheet routes or gateway
|
|
5
|
+
* provisioning. The internal sync service builds a mapped runtime separately
|
|
6
|
+
* and can reuse the internal construction hook below without expanding the
|
|
7
|
+
* application-facing contract.
|
|
7
8
|
*/
|
|
9
|
+
import type { ScalarEntityPersistenceProvider } from "../adapter/persistence/contracts/scalar.js";
|
|
8
10
|
import type { EntityManager } from "./EntityManager.js";
|
|
9
|
-
import { HikouteiEntity } from "./entity.js";
|
|
10
|
-
/** One physical tab/range used by a scalar entity projection. */
|
|
11
|
-
export interface HikouteiSheetRoute {
|
|
12
|
-
readonly tabName: string;
|
|
13
|
-
readonly registeredRange: string;
|
|
14
|
-
}
|
|
15
|
-
/** System projection and optional human-editable projection routes for one entity. */
|
|
16
|
-
export interface HikouteiEntityRoutes {
|
|
17
|
-
readonly systemState: HikouteiSheetRoute;
|
|
18
|
-
readonly userInput?: HikouteiSheetRoute;
|
|
19
|
-
}
|
|
20
|
-
/** Environment-specific spreadsheet routes kept separate from entity metadata. */
|
|
21
|
-
export interface HikouteiSheetsOptions {
|
|
22
|
-
readonly spreadsheetId: string;
|
|
23
|
-
readonly routes: Readonly<Record<string, HikouteiEntityRoutes>>;
|
|
24
|
-
}
|
|
25
|
-
/** Route accepted by a provider-neutral Sheet provisioning client. */
|
|
26
|
-
export interface HikouteiProvisionRoute {
|
|
27
|
-
readonly sheetName: string;
|
|
28
|
-
readonly registeredRange: string;
|
|
29
|
-
readonly projection: "user_input" | "system_state";
|
|
30
|
-
readonly schemaVersion: number;
|
|
31
|
-
readonly headers: readonly string[];
|
|
32
|
-
readonly identityField?: string;
|
|
33
|
-
}
|
|
34
|
-
/** Result returned by one explicit Sheet setup call. */
|
|
35
|
-
export interface HikouteiSetupResult {
|
|
36
|
-
readonly registrations: readonly Omit<HikouteiProvisionRoute, "headers">[];
|
|
37
|
-
readonly createdSheets: readonly string[];
|
|
38
|
-
readonly initializedHeaders: readonly string[];
|
|
39
|
-
}
|
|
40
|
-
/** Provider-neutral boundary used by `setupSheets()`; Apps Script stays behind it. */
|
|
41
|
-
export interface HikouteiSheetProvisioner {
|
|
42
|
-
provisionRegistry(registrations: readonly HikouteiProvisionRoute[]): Promise<HikouteiSetupResult>;
|
|
43
|
-
}
|
|
11
|
+
import { HikouteiEntity, type ResolvedHikouteiEntityDescriptor } from "./entity.js";
|
|
44
12
|
/** Options for opening the local Hikoutei runtime. */
|
|
45
13
|
export interface CreateTypedSheetsOptions {
|
|
46
14
|
/** SQLite database path, URI, or `:memory:`. */
|
|
47
15
|
readonly dbName: string;
|
|
48
16
|
/** Entity tokens produced by `defineTypedSheetsEntity()`. */
|
|
49
17
|
readonly entities: readonly HikouteiEntity[];
|
|
50
|
-
/** Environment-specific Sheet routes; route setup remains explicit. */
|
|
51
|
-
readonly sheets: HikouteiSheetsOptions;
|
|
52
|
-
/** Optional provider-neutral provisioner retained for an explicit setup call. */
|
|
53
|
-
readonly provisioner?: HikouteiSheetProvisioner;
|
|
54
18
|
}
|
|
55
19
|
/**
|
|
56
20
|
* Root object for the local entity runtime.
|
|
57
21
|
*
|
|
58
|
-
* Use `hikoutei.em.fork()` to obtain a request-local manager.
|
|
59
|
-
*
|
|
60
|
-
* provisioning side effect.
|
|
22
|
+
* Use `hikoutei.em.fork()` to obtain a request-local manager. Sheet delivery
|
|
23
|
+
* and User_Input polling belong to the internal sync service, not this object.
|
|
61
24
|
*/
|
|
62
25
|
export interface Hikoutei {
|
|
63
26
|
/** Root entity manager; call `fork()` before request or job-local work. */
|
|
64
27
|
readonly em: EntityManager;
|
|
65
28
|
close(): Promise<void>;
|
|
66
|
-
setupSheets(provisioner?: HikouteiSheetProvisioner): Promise<HikouteiSetupResult>;
|
|
67
29
|
}
|
|
68
30
|
/**
|
|
69
|
-
*
|
|
31
|
+
* Internal construction hook used by the sync service to attach shutdown work
|
|
32
|
+
* without adding worker methods to the public `Hikoutei` contract.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createInternalHikoutei(provider: ScalarEntityPersistenceProvider, descriptors: ReadonlyMap<string, ResolvedHikouteiEntityDescriptor>, beforeClose?: () => Promise<void>): Hikoutei;
|
|
35
|
+
/**
|
|
36
|
+
* Opens the local SQLite runtime for the declared scalar entities.
|
|
70
37
|
*
|
|
71
|
-
* This call validates
|
|
72
|
-
*
|
|
38
|
+
* This call validates entity descriptors and initializes the local provider. It
|
|
39
|
+
* never contacts Google Sheets, creates projection tables, or starts a worker.
|
|
73
40
|
*/
|
|
74
41
|
export declare function createTypedSheets(options: CreateTypedSheetsOptions): Promise<Hikoutei>;
|
|
75
42
|
//# sourceMappingURL=Hikoutei.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hikoutei.d.ts","sourceRoot":"","sources":["../../src/api/Hikoutei.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Hikoutei.d.ts","sourceRoot":"","sources":["../../src/api/Hikoutei.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAEL,cAAc,EACd,KAAK,gCAAgC,EACtC,MAAM,aAAa,CAAC;AAErB,sDAAsD;AACtD,MAAM,WAAW,wBAAwB;IACvC,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CAC9C;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAC;IAC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA2CD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,+BAA+B,EACzC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,gCAAgC,CAAC,EAClE,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,QAAQ,CAEV;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,QAAQ,CAAC,CAoCnB"}
|
package/dist/api/Hikoutei.js
CHANGED
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public Hikoutei runtime and the `createTypedSheets()` factory.
|
|
2
|
+
* Public SQLite-authoritative Hikoutei runtime and the `createTypedSheets()` factory.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This module intentionally knows nothing about Sheet routes or gateway
|
|
5
|
+
* provisioning. The internal sync service builds a mapped runtime separately
|
|
6
|
+
* and can reuse the internal construction hook below without expanding the
|
|
7
|
+
* application-facing contract.
|
|
7
8
|
*/
|
|
8
|
-
import { provisionRegisteredSyncSheets } from "../application/sync/gateway/SyncGatewayBootstrap.js";
|
|
9
9
|
import { createEntityManager } from "./internalEntityManager.js";
|
|
10
10
|
import { HIKOUTEI_ERROR_CODES, HikouteiError } from "./errors.js";
|
|
11
11
|
import { getEntityDescriptor, HikouteiEntity, } from "./entity.js";
|
|
12
12
|
class HikouteiImpl {
|
|
13
13
|
provider;
|
|
14
|
-
|
|
15
|
-
configuredProvisioner;
|
|
14
|
+
beforeClose;
|
|
16
15
|
/** Root entity manager; call `fork()` before request or job-local work. */
|
|
17
16
|
em;
|
|
18
|
-
|
|
17
|
+
closed = false;
|
|
18
|
+
constructor(provider, descriptors, beforeClose) {
|
|
19
19
|
this.provider = provider;
|
|
20
|
-
this.
|
|
21
|
-
this.configuredProvisioner = configuredProvisioner;
|
|
20
|
+
this.beforeClose = beforeClose;
|
|
22
21
|
this.em = createEntityManager(provider, descriptors);
|
|
23
22
|
}
|
|
24
|
-
/**
|
|
23
|
+
/** Stops internal service work, then releases the local SQLite connection. */
|
|
25
24
|
async close() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|| typeof selectedProvisioner.provisionRegistry !== "function") {
|
|
39
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.SHEET_SETUP_UNAVAILABLE, "setupSheets() requires a provider-neutral Sheet provisioner.");
|
|
25
|
+
if (this.closed)
|
|
26
|
+
return;
|
|
27
|
+
this.closed = true;
|
|
28
|
+
let beforeCloseError;
|
|
29
|
+
try {
|
|
30
|
+
await this.beforeClose?.();
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
beforeCloseError = error;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
await this.provider.close();
|
|
40
37
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
catch (providerError) {
|
|
39
|
+
if (beforeCloseError !== undefined) {
|
|
40
|
+
throw new AggregateError([beforeCloseError, providerError], "Hikoutei failed to stop internal work and close SQLite.");
|
|
41
|
+
}
|
|
42
|
+
throw providerError;
|
|
43
|
+
}
|
|
44
|
+
if (beforeCloseError !== undefined)
|
|
45
|
+
throw beforeCloseError;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Internal construction hook used by the sync service to attach shutdown work
|
|
50
|
+
* without adding worker methods to the public `Hikoutei` contract.
|
|
51
|
+
*/
|
|
52
|
+
export function createInternalHikoutei(provider, descriptors, beforeClose) {
|
|
53
|
+
return new HikouteiImpl(provider, descriptors, beforeClose);
|
|
51
54
|
}
|
|
52
55
|
/**
|
|
53
|
-
* Opens the local
|
|
56
|
+
* Opens the local SQLite runtime for the declared scalar entities.
|
|
54
57
|
*
|
|
55
|
-
* This call validates
|
|
56
|
-
*
|
|
58
|
+
* This call validates entity descriptors and initializes the local provider. It
|
|
59
|
+
* never contacts Google Sheets, creates projection tables, or starts a worker.
|
|
57
60
|
*/
|
|
58
61
|
export async function createTypedSheets(options) {
|
|
59
62
|
if (options === null || typeof options !== "object") {
|
|
@@ -66,32 +69,21 @@ export async function createTypedSheets(options) {
|
|
|
66
69
|
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_ENTITY_DESCRIPTOR, "createTypedSheets() entities must be an array.");
|
|
67
70
|
}
|
|
68
71
|
const descriptors = resolveRuntimeDescriptors(options.entities);
|
|
69
|
-
const sheets = validateSheetsOptions(options.sheets, descriptors);
|
|
70
|
-
const routes = new Map(Object.entries(sheets.routes));
|
|
71
72
|
// Load the current provider only when a runtime is opened. Importing the
|
|
72
73
|
// root package alone must not require MikroORM or expose its module graph.
|
|
73
|
-
const [
|
|
74
|
-
import("../adapter/persistence/providers/mikro-orm/engine/
|
|
74
|
+
const [engineModule, providerModule, runtimeModule] = await Promise.all([
|
|
75
|
+
import("../adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.js"),
|
|
75
76
|
import("../adapter/persistence/providers/mikro-orm/api/MikroOrmScalarPersistenceProvider.js"),
|
|
76
|
-
import("../adapter/persistence/providers/mikro-orm/engine/
|
|
77
|
+
import("../adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.js"),
|
|
77
78
|
]);
|
|
78
|
-
const generated = runtimeModule.
|
|
79
|
-
|
|
80
|
-
const writerId = `hikoutei:${process.pid}`;
|
|
81
|
-
const orm = await mappedRuntime.initializeMappedTypedSheetsOrm({
|
|
79
|
+
const generated = runtimeModule.createMikroOrmScalarEntityRuntime(options.entities);
|
|
80
|
+
const orm = await engineModule.initializeTypedSheetsOrm({
|
|
82
81
|
dbName: options.dbName,
|
|
83
82
|
entities: generated.entities,
|
|
84
|
-
|
|
85
|
-
writer: { writerId },
|
|
86
|
-
onRegisteredProjections: async (definitions) => {
|
|
87
|
-
projectionDefinitions = definitions.map((definition) => ({
|
|
88
|
-
sheet: definition.sheet,
|
|
89
|
-
headers: definition.headers,
|
|
90
|
-
}));
|
|
91
|
-
},
|
|
83
|
+
flushCoordinator: { onFlush: async () => undefined },
|
|
92
84
|
});
|
|
93
85
|
const provider = new providerModule.MikroOrmScalarPersistenceProvider(orm, generated.bindings);
|
|
94
|
-
return
|
|
86
|
+
return createInternalHikoutei(provider, descriptors);
|
|
95
87
|
}
|
|
96
88
|
/** Validates name/table uniqueness and indexes descriptors by entity name. */
|
|
97
89
|
function resolveRuntimeDescriptors(entities) {
|
|
@@ -114,55 +106,4 @@ function resolveRuntimeDescriptors(entities) {
|
|
|
114
106
|
}
|
|
115
107
|
return descriptors;
|
|
116
108
|
}
|
|
117
|
-
function validateSheetsOptions(options, descriptors) {
|
|
118
|
-
if (options === null || typeof options !== "object") {
|
|
119
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, "sheets must be an object.");
|
|
120
|
-
}
|
|
121
|
-
if (typeof options.spreadsheetId !== "string" || options.spreadsheetId.trim() === "") {
|
|
122
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, "sheets.spreadsheetId must be a non-empty string.");
|
|
123
|
-
}
|
|
124
|
-
if (options.routes === null
|
|
125
|
-
|| typeof options.routes !== "object"
|
|
126
|
-
|| Array.isArray(options.routes)) {
|
|
127
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, "sheets.routes must be an object keyed by entity name.");
|
|
128
|
-
}
|
|
129
|
-
const routeNames = Object.keys(options.routes);
|
|
130
|
-
const physicalTabs = new Set();
|
|
131
|
-
for (const entityName of descriptors.keys()) {
|
|
132
|
-
if (options.routes[entityName] === undefined) {
|
|
133
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, `sheets.routes is missing an entry for entity "${entityName}".`);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
for (const routeName of routeNames) {
|
|
137
|
-
if (!descriptors.has(routeName)) {
|
|
138
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, `sheets.routes contains an unknown entity "${routeName}".`);
|
|
139
|
-
}
|
|
140
|
-
const route = options.routes[routeName];
|
|
141
|
-
if (route === undefined)
|
|
142
|
-
continue;
|
|
143
|
-
registerPhysicalTab(routeName, "systemState", route.systemState, physicalTabs, options.spreadsheetId);
|
|
144
|
-
if (route.userInput !== undefined) {
|
|
145
|
-
registerPhysicalTab(routeName, "userInput", route.userInput, physicalTabs, options.spreadsheetId);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return options;
|
|
149
|
-
}
|
|
150
|
-
function registerPhysicalTab(entityName, projection, route, physicalTabs, spreadsheetId) {
|
|
151
|
-
validateRoute(entityName, projection, route);
|
|
152
|
-
const key = JSON.stringify([spreadsheetId, route.tabName.trim()]);
|
|
153
|
-
if (physicalTabs.has(key)) {
|
|
154
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, `sheets.routes.${entityName}.${projection} reuses the Sheet tab "${route.tabName}".`);
|
|
155
|
-
}
|
|
156
|
-
physicalTabs.add(key);
|
|
157
|
-
}
|
|
158
|
-
function validateRoute(entityName, projection, route) {
|
|
159
|
-
if (route === null
|
|
160
|
-
|| typeof route !== "object"
|
|
161
|
-
|| typeof route.tabName !== "string"
|
|
162
|
-
|| route.tabName.trim() === ""
|
|
163
|
-
|| typeof route.registeredRange !== "string"
|
|
164
|
-
|| route.registeredRange.trim() === "") {
|
|
165
|
-
throw new HikouteiError(HIKOUTEI_ERROR_CODES.INVALID_SHEET_ROUTE, `sheets.routes.${entityName}.${projection} requires tabName and registeredRange.`);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
109
|
//# sourceMappingURL=Hikoutei.js.map
|
package/dist/api/Hikoutei.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hikoutei.js","sourceRoot":"","sources":["../../src/api/Hikoutei.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Hikoutei.js","sourceRoot":"","sources":["../../src/api/Hikoutei.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,mBAAmB,EAAE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U,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/dist/api/entity.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Public scalar entity descriptor and the `defineTypedSheetsEntity()` builder.
|
|
3
3
|
*
|
|
4
4
|
* The descriptor is intentionally scalar-only and provider-neutral: it describes
|
|
5
|
-
* a local
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* a local entity table without referencing any ORM, Sheet route, or storage-
|
|
6
|
+
* execution type. Remote projection configuration is an internal service concern,
|
|
7
|
+
* so descriptor validation never depends on it.
|
|
8
8
|
*
|
|
9
9
|
* The returned `HikouteiEntity` token carries the runtime descriptor and a
|
|
10
10
|
* phantom entity type so `em.create(User, { ... })` infers the entity shape.
|
|
@@ -30,8 +30,6 @@ export interface HikouteiPropertyOptions {
|
|
|
30
30
|
readonly nullable?: boolean;
|
|
31
31
|
/** Equivalent positive spelling for callers that prefer required fields. */
|
|
32
32
|
readonly required?: boolean;
|
|
33
|
-
/** Marks this field as the human-editable part of a User_Input projection. */
|
|
34
|
-
readonly editable?: boolean;
|
|
35
33
|
/** v1 permits uniqueness only on the primary/business key. */
|
|
36
34
|
readonly unique?: boolean;
|
|
37
35
|
}
|
|
@@ -39,7 +37,7 @@ export interface HikouteiPropertyOptions {
|
|
|
39
37
|
export type HikouteiPropertyDescriptorMap = Readonly<Record<string, HikouteiPropertyOptions>>;
|
|
40
38
|
/** User-facing entity descriptor accepted by `defineTypedSheetsEntity`. */
|
|
41
39
|
export interface HikouteiEntityDescriptorInput<Name extends string = string, Properties extends HikouteiPropertyDescriptorMap = HikouteiPropertyDescriptorMap> {
|
|
42
|
-
/** Stable entity name used by the manager and
|
|
40
|
+
/** Stable entity name used by the manager and internal service mappings. */
|
|
43
41
|
readonly name: Name;
|
|
44
42
|
/** SQLite table name that stores this entity's rows. */
|
|
45
43
|
readonly tableName: string;
|
|
@@ -53,7 +51,6 @@ export interface ResolvedHikouteiProperty {
|
|
|
53
51
|
readonly storageType: HikouteiScalarStorageType;
|
|
54
52
|
readonly primary: boolean;
|
|
55
53
|
readonly nullable: boolean;
|
|
56
|
-
readonly editable: boolean;
|
|
57
54
|
readonly unique: boolean;
|
|
58
55
|
}
|
|
59
56
|
/** Validated entity descriptor consumed by the local runtime. */
|
|
@@ -76,13 +73,15 @@ export type HikouteiPropertyValueType<Options extends HikouteiPropertyOptions> =
|
|
|
76
73
|
export type HikouteiEntityInstance<Properties extends HikouteiPropertyDescriptorMap> = {
|
|
77
74
|
-readonly [Property in keyof Properties]: HikouteiPropertyValueType<Properties[Property]>;
|
|
78
75
|
};
|
|
79
|
-
export declare class HikouteiEntity<Entity extends object = object> {
|
|
76
|
+
export declare class HikouteiEntity<Entity extends object = object, Name extends string = string> {
|
|
80
77
|
/** @internal phantom marker that carries the inferred entity type. */
|
|
81
78
|
private readonly __entityType;
|
|
79
|
+
/** @internal phantom marker that preserves the descriptor name. */
|
|
80
|
+
private readonly __entityName;
|
|
82
81
|
constructor(descriptor: ResolvedHikouteiEntityDescriptor);
|
|
83
82
|
}
|
|
84
83
|
/** Reads an opaque token's descriptor for internal runtime/provider wiring. */
|
|
85
|
-
export declare function getEntityDescriptor(entity: HikouteiEntity): ResolvedHikouteiEntityDescriptor;
|
|
84
|
+
export declare function getEntityDescriptor<Entity extends object, Name extends string>(entity: HikouteiEntity<Entity, Name>): ResolvedHikouteiEntityDescriptor;
|
|
86
85
|
/**
|
|
87
86
|
* Validates a scalar entity descriptor and returns a stable entity token.
|
|
88
87
|
*
|
|
@@ -91,7 +90,7 @@ export declare function getEntityDescriptor(entity: HikouteiEntity): ResolvedHik
|
|
|
91
90
|
* key, a non-scalar property type, or any unsupported relation/provider option.
|
|
92
91
|
* The returned token is safe to pass to `createTypedSheets({ entities })`.
|
|
93
92
|
*/
|
|
94
|
-
export declare function defineTypedSheetsEntity<Name extends string, Properties extends HikouteiPropertyDescriptorMap>(input: HikouteiEntityDescriptorInput<Name, Properties>): HikouteiEntity<HikouteiEntityInstance<Properties
|
|
93
|
+
export declare function defineTypedSheetsEntity<Name extends string, Properties extends HikouteiPropertyDescriptorMap>(input: HikouteiEntityDescriptorInput<Name, Properties>): HikouteiEntity<HikouteiEntityInstance<Properties>, Name>;
|
|
95
94
|
/**
|
|
96
95
|
* Validates and normalizes one entity descriptor input.
|
|
97
96
|
*
|
package/dist/api/entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/api/entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/api/entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,kEAAkE;AAClE,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE,qEAAqE;AACrE,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpE,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAA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sEntity()` builder.
|
|
3
3
|
*
|
|
4
4
|
* The descriptor is intentionally scalar-only and provider-neutral: it describes
|
|
5
|
-
* a local
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* a local entity table without referencing any ORM, Sheet route, or storage-
|
|
6
|
+
* execution type. Remote projection configuration is an internal service concern,
|
|
7
|
+
* so descriptor validation never depends on it.
|
|
8
8
|
*
|
|
9
9
|
* The returned `HikouteiEntity` token carries the runtime descriptor and a
|
|
10
10
|
* phantom entity type so `em.create(User, { ... })` infers the entity shape.
|
|
11
11
|
*/
|
|
12
12
|
import { EMPTY_STRING_LENGTH_ZERO } from "../shared/constants.js";
|
|
13
|
+
import { isRecord } from "../shared/encoding/typeGuards.js";
|
|
13
14
|
import { HIKOUTEI_ERROR_CODES, HikouteiError } from "./errors.js";
|
|
14
15
|
/** Runtime tags for the scalar property types supported in v1. */
|
|
15
16
|
export const HIKOUTEI_SCALAR_TYPES = {
|
|
@@ -46,7 +47,6 @@ const ALLOWED_PROPERTY_OPTION_KEYS = new Set([
|
|
|
46
47
|
"primary",
|
|
47
48
|
"nullable",
|
|
48
49
|
"required",
|
|
49
|
-
"editable",
|
|
50
50
|
"unique",
|
|
51
51
|
]);
|
|
52
52
|
/**
|
|
@@ -105,42 +105,37 @@ export function resolveEntityDescriptor(input) {
|
|
|
105
105
|
return { name, tableName, primaryKey, properties };
|
|
106
106
|
}
|
|
107
107
|
function resolveProperty(propertyName, options) {
|
|
108
|
-
if (
|
|
108
|
+
if (!isRecord(options)) {
|
|
109
109
|
throwInvalid(`property "${propertyName}" must declare a scalar descriptor object.`);
|
|
110
110
|
}
|
|
111
|
-
const
|
|
112
|
-
for (const optionKey of optionKeys) {
|
|
111
|
+
for (const optionKey of Object.keys(options)) {
|
|
113
112
|
if (!ALLOWED_PROPERTY_OPTION_KEYS.has(optionKey)) {
|
|
114
113
|
throwInvalid(`property "${propertyName}" has an unsupported option "${optionKey}"; v1 supports only scalar types (relations and provider options are not supported).`);
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
|
-
const
|
|
118
|
-
if (!isHikouteiScalarType(
|
|
116
|
+
const type = options.type;
|
|
117
|
+
if (!isHikouteiScalarType(type)) {
|
|
119
118
|
throwInvalid(`property "${propertyName}" has an unsupported type; v1 supports only "string", "number", "boolean", and "date" scalars.`);
|
|
120
119
|
}
|
|
121
|
-
const primary =
|
|
122
|
-
const nullable =
|
|
123
|
-
const
|
|
124
|
-
const unique = descriptor.unique === true || primary;
|
|
120
|
+
const primary = options.primary === true;
|
|
121
|
+
const nullable = options.nullable === true || options.required === false;
|
|
122
|
+
const unique = options.unique === true || primary;
|
|
125
123
|
if (primary && nullable) {
|
|
126
124
|
throwInvalid(`property "${propertyName}" cannot be both primary and nullable.`);
|
|
127
125
|
}
|
|
128
|
-
if (
|
|
126
|
+
if (options.required !== undefined && typeof options.required !== "boolean") {
|
|
129
127
|
throwInvalid(`property "${propertyName}" required must be a boolean.`);
|
|
130
128
|
}
|
|
131
|
-
if (
|
|
129
|
+
if (options.nullable !== undefined && typeof options.nullable !== "boolean") {
|
|
132
130
|
throwInvalid(`property "${propertyName}" nullable must be a boolean.`);
|
|
133
131
|
}
|
|
134
|
-
if (
|
|
132
|
+
if (options.primary !== undefined && typeof options.primary !== "boolean") {
|
|
135
133
|
throwInvalid(`property "${propertyName}" primary must be a boolean.`);
|
|
136
134
|
}
|
|
137
|
-
if (
|
|
138
|
-
throwInvalid(`property "${propertyName}" editable must be a boolean.`);
|
|
139
|
-
}
|
|
140
|
-
if (descriptor.unique !== undefined && typeof descriptor.unique !== "boolean") {
|
|
135
|
+
if (options.unique !== undefined && typeof options.unique !== "boolean") {
|
|
141
136
|
throwInvalid(`property "${propertyName}" unique must be a boolean.`);
|
|
142
137
|
}
|
|
143
|
-
if (
|
|
138
|
+
if (options.required === true && options.nullable === true) {
|
|
144
139
|
throwInvalid(`property "${propertyName}" cannot be both required and nullable.`);
|
|
145
140
|
}
|
|
146
141
|
if (unique && !primary) {
|
|
@@ -148,11 +143,10 @@ function resolveProperty(propertyName, options) {
|
|
|
148
143
|
}
|
|
149
144
|
return {
|
|
150
145
|
name: propertyName,
|
|
151
|
-
type
|
|
152
|
-
storageType: toStorageType(
|
|
146
|
+
type,
|
|
147
|
+
storageType: toStorageType(type),
|
|
153
148
|
primary,
|
|
154
149
|
nullable,
|
|
155
|
-
editable,
|
|
156
150
|
unique,
|
|
157
151
|
};
|
|
158
152
|
}
|
|
@@ -214,10 +208,10 @@ function requireIdentifier(value, label) {
|
|
|
214
208
|
if (typeof value !== "string" || !SQL_IDENTIFIER_PATTERN.test(value)) {
|
|
215
209
|
throwInvalid(`${label} must be a SQL identifier matching ${SQL_IDENTIFIER_PATTERN}.`);
|
|
216
210
|
}
|
|
211
|
+
return value;
|
|
217
212
|
}
|
|
218
213
|
function requireTableName(value) {
|
|
219
|
-
requireIdentifier(value, "table name");
|
|
220
|
-
const tableName = value;
|
|
214
|
+
const tableName = requireIdentifier(value, "table name");
|
|
221
215
|
if (RESERVED_TABLE_NAMES.has(tableName.toLowerCase()) ||
|
|
222
216
|
tableName.toLowerCase().startsWith("sqlite_")) {
|
|
223
217
|
throwInvalid(`table name "${tableName}" is reserved by Hikoutei or SQLite.`);
|
package/dist/api/entity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/api/entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,kEAAkE;AAClE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/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,sBAAsB,GAAG,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACzD,IACE,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QACjD,SAAS,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAC7C,CAAC;QACD,YAAY,CAAC,eAAe,SAAS,sCAAsC,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc,EAAE,KAAa;IAC1D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,wBAAwB,EAAE,CAAC;QAClF,YAAY,CAAC,GAAG,KAAK,8BAA8B,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,YAAY,CAAC,OAAe;IACnC,MAAM,IAAI,aAAa,CAAC,oBAAoB,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AACnF,CAAC"}
|
package/dist/api/errors.d.ts
CHANGED
|
@@ -24,12 +24,6 @@ export declare const HIKOUTEI_ERROR_CODES: {
|
|
|
24
24
|
readonly INVALID_SCALAR_VALUE: "invalid_scalar_value";
|
|
25
25
|
/** A provider transaction could not find the row targeted by a managed change. */
|
|
26
26
|
readonly ENTITY_NOT_FOUND: "entity_not_found";
|
|
27
|
-
/** Sheet route configuration is missing or inconsistent with the entities. */
|
|
28
|
-
readonly INVALID_SHEET_ROUTE: "invalid_sheet_route";
|
|
29
|
-
/** A remote setup call was requested without a configured provisioner. */
|
|
30
|
-
readonly SHEET_SETUP_UNAVAILABLE: "sheet_setup_unavailable";
|
|
31
|
-
/** An internal entity-to-sync mapping is inconsistent with the runtime. */
|
|
32
|
-
readonly INVALID_ENTITY_MAPPING: "invalid_entity_mapping";
|
|
33
27
|
};
|
|
34
28
|
/** Closed set of Hikoutei API error codes. */
|
|
35
29
|
export type HikouteiErrorCode = (typeof HIKOUTEI_ERROR_CODES)[keyof typeof HIKOUTEI_ERROR_CODES];
|
package/dist/api/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;IAC/B,kFAAkF;;IAElF,4DAA4D;;IAE5D,+EAA+E;;IAE/E,+EAA+E;;IAE/E,iFAAiF;;IAEjF,qEAAqE;;IAErE,+EAA+E;;IAE/E,kFAAkF;;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;IAC/B,kFAAkF;;IAElF,4DAA4D;;IAE5D,+EAA+E;;IAE/E,+EAA+E;;IAE/E,iFAAiF;;IAEjF,qEAAqE;;IAErE,+EAA+E;;IAE/E,kFAAkF;;CAE1E,CAAC;AAEX,8CAA8C;AAC9C,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,kBAAkB,CAAC,UAAU,EAAE,iBAAiB,CAAC;gBACtE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;CAGrD"}
|
package/dist/api/errors.js
CHANGED
|
@@ -24,12 +24,6 @@ export const HIKOUTEI_ERROR_CODES = {
|
|
|
24
24
|
INVALID_SCALAR_VALUE: "invalid_scalar_value",
|
|
25
25
|
/** A provider transaction could not find the row targeted by a managed change. */
|
|
26
26
|
ENTITY_NOT_FOUND: "entity_not_found",
|
|
27
|
-
/** Sheet route configuration is missing or inconsistent with the entities. */
|
|
28
|
-
INVALID_SHEET_ROUTE: "invalid_sheet_route",
|
|
29
|
-
/** A remote setup call was requested without a configured provisioner. */
|
|
30
|
-
SHEET_SETUP_UNAVAILABLE: "sheet_setup_unavailable",
|
|
31
|
-
/** An internal entity-to-sync mapping is inconsistent with the runtime. */
|
|
32
|
-
INVALID_ENTITY_MAPPING: "invalid_entity_mapping",
|
|
33
27
|
};
|
|
34
28
|
/**
|
|
35
29
|
* Error raised by the public Hikoutei lifecycle or descriptor validation.
|
package/dist/api/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,uEAAuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kFAAkF;IAClF,yBAAyB,EAAE,2BAA2B;IACtD,4DAA4D;IAC5D,gBAAgB,EAAE,kBAAkB;IACpC,+EAA+E;IAC/E,mBAAmB,EAAE,qBAAqB;IAC1C,+EAA+E;IAC/E,8BAA8B,EAAE,gCAAgC;IAChE,iFAAiF;IACjF,2BAA2B,EAAE,6BAA6B;IAC1D,qEAAqE;IACrE,gBAAgB,EAAE,kBAAkB;IACpC,+EAA+E;IAC/E,oBAAoB,EAAE,sBAAsB;IAC5C,kFAAkF;IAClF,gBAAgB,EAAE,kBAAkB;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,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