monorise 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +2 -2
- package/dist/core/index.d.ts +83 -2
- package/dist/core/index.js +580 -1
- package/dist/core/index.js.map +1 -1
- package/dist/react/chunk-5XIRNUBL.js +43 -0
- package/dist/react/chunk-5XIRNUBL.js.map +1 -0
- package/dist/react/chunk-7JDOKZGQ.js +172 -0
- package/dist/react/chunk-7JDOKZGQ.js.map +1 -0
- package/dist/react/chunk-A5TI2FW3.js +13 -0
- package/dist/react/chunk-A5TI2FW3.js.map +1 -0
- package/dist/react/chunk-AYQDOLYF.js +628 -0
- package/dist/react/chunk-AYQDOLYF.js.map +1 -0
- package/dist/react/chunk-BUTF5RJU.js +29 -0
- package/dist/react/chunk-BUTF5RJU.js.map +1 -0
- package/dist/react/chunk-EYG2DL3D.js +893 -0
- package/dist/react/chunk-EYG2DL3D.js.map +1 -0
- package/dist/react/chunk-GEN4TSCQ.js +5179 -0
- package/dist/react/chunk-GEN4TSCQ.js.map +1 -0
- package/dist/react/chunk-GFVCNWVT.js +54 -0
- package/dist/react/chunk-GFVCNWVT.js.map +1 -0
- package/dist/react/chunk-KJX5LOMN.js +43 -0
- package/dist/react/chunk-KJX5LOMN.js.map +1 -0
- package/dist/react/chunk-KLXK4V6G.js +65 -0
- package/dist/react/chunk-KLXK4V6G.js.map +1 -0
- package/dist/react/chunk-L6MAS3AX.js +482 -0
- package/dist/react/chunk-L6MAS3AX.js.map +1 -0
- package/dist/react/chunk-LPXR5V4J.js +582 -0
- package/dist/react/chunk-LPXR5V4J.js.map +1 -0
- package/dist/react/chunk-MIXAYX55.js +147 -0
- package/dist/react/chunk-MIXAYX55.js.map +1 -0
- package/dist/react/chunk-OEHQ546W.js +182 -0
- package/dist/react/chunk-OEHQ546W.js.map +1 -0
- package/dist/react/chunk-RPNCWADG.js +248 -0
- package/dist/react/chunk-RPNCWADG.js.map +1 -0
- package/dist/react/chunk-S6RDMHHH.js +47 -0
- package/dist/react/chunk-S6RDMHHH.js.map +1 -0
- package/dist/react/chunk-VVCM7N22.js +101 -0
- package/dist/react/chunk-VVCM7N22.js.map +1 -0
- package/dist/react/dist-es-5WYA7CWK.js +379 -0
- package/dist/react/dist-es-5WYA7CWK.js.map +1 -0
- package/dist/react/dist-es-DLWQXBOR.js +333 -0
- package/dist/react/dist-es-DLWQXBOR.js.map +1 -0
- package/dist/react/dist-es-EMJCB37T.js +71 -0
- package/dist/react/dist-es-EMJCB37T.js.map +1 -0
- package/dist/react/dist-es-Q7IAXWRB.js +494 -0
- package/dist/react/dist-es-Q7IAXWRB.js.map +1 -0
- package/dist/react/dist-es-QF65HH5Y.js +169 -0
- package/dist/react/dist-es-QF65HH5Y.js.map +1 -0
- package/dist/react/dist-es-R4TRTT45.js +22 -0
- package/dist/react/dist-es-R4TRTT45.js.map +1 -0
- package/dist/react/dist-es-XNAC47MK.js +90 -0
- package/dist/react/dist-es-XNAC47MK.js.map +1 -0
- package/dist/react/event-streams-6APKUBMC.js +270 -0
- package/dist/react/event-streams-6APKUBMC.js.map +1 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +8722 -159
- package/dist/react/index.js.map +1 -1
- package/dist/react/loadSso-WMS367NT.js +595 -0
- package/dist/react/loadSso-WMS367NT.js.map +1 -0
- package/dist/react/services/core.service.d.ts +8 -0
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/react/signin-2I7AG6XI.js +707 -0
- package/dist/react/signin-2I7AG6XI.js.map +1 -0
- package/dist/react/sso-oidc-OAJ7SALL.js +825 -0
- package/dist/react/sso-oidc-OAJ7SALL.js.map +1 -0
- package/dist/react/sts-LKM23TRV.js +3866 -0
- package/dist/react/sts-LKM23TRV.js.map +1 -0
- package/package.json +1 -1
package/dist/cli/cli.js
CHANGED
|
@@ -128,7 +128,7 @@ declare module '${moduleName}' {
|
|
|
128
128
|
${schemaMapEntries.join("\n ")}
|
|
129
129
|
}
|
|
130
130
|
}`;
|
|
131
|
-
const moduleAugmentations = usesCombinedPackage ? augmentationBlock("monorise/base") : augmentationBlock("
|
|
131
|
+
const moduleAugmentations = usesCombinedPackage ? augmentationBlock("monorise/base") : augmentationBlock("../base/index.js");
|
|
132
132
|
const configOutputContent = `
|
|
133
133
|
import type { z } from 'zod';
|
|
134
134
|
${imports.join("\n")}
|
|
@@ -227,7 +227,7 @@ async function generateHandleFile(monoriseConfig, projectRoot, monoriseOutputDir
|
|
|
227
227
|
appHandlerPayload = "{ routes }";
|
|
228
228
|
}
|
|
229
229
|
const usesCombinedPackage = detectCombinedPackage(projectRoot);
|
|
230
|
-
const coreImportPath = usesCombinedPackage ? "monorise/core" : "
|
|
230
|
+
const coreImportPath = usesCombinedPackage ? "monorise/core" : "../core/index.js";
|
|
231
231
|
const combinedContent = `
|
|
232
232
|
import CoreFactory from '${coreImportPath}';
|
|
233
233
|
import config from './config';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ declare class Entity$1<T extends Entity$2> extends Item$1 {
|
|
|
90
90
|
}
|
|
91
91
|
declare class EntityRepository extends Repository {
|
|
92
92
|
private EntityConfig;
|
|
93
|
-
|
|
93
|
+
readonly TABLE_NAME: string;
|
|
94
94
|
private readonly dynamodbClient;
|
|
95
95
|
private readonly EmailAuthEnabledEntities;
|
|
96
96
|
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, TABLE_NAME: string, dynamodbClient: DynamoDB, EmailAuthEnabledEntities: Entity$2[]);
|
|
@@ -4699,6 +4699,67 @@ declare class ListTagsController {
|
|
|
4699
4699
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4700
4700
|
}
|
|
4701
4701
|
|
|
4702
|
+
type TransactionCreateEntity<T extends Entity$2 = Entity$2> = {
|
|
4703
|
+
operation: 'createEntity';
|
|
4704
|
+
entityType: T;
|
|
4705
|
+
entityId?: string;
|
|
4706
|
+
payload: EntitySchemaMap[T];
|
|
4707
|
+
};
|
|
4708
|
+
type TransactionUpdateEntity<T extends Entity$2 = Entity$2> = {
|
|
4709
|
+
operation: 'updateEntity';
|
|
4710
|
+
entityType: T;
|
|
4711
|
+
entityId: string;
|
|
4712
|
+
payload: Partial<EntitySchemaMap[T]>;
|
|
4713
|
+
condition?: string;
|
|
4714
|
+
};
|
|
4715
|
+
type TransactionAdjustEntity<T extends Entity$2 = Entity$2> = {
|
|
4716
|
+
operation: 'adjustEntity';
|
|
4717
|
+
entityType: T;
|
|
4718
|
+
entityId: string;
|
|
4719
|
+
adjustments: Record<string, number>;
|
|
4720
|
+
condition?: string;
|
|
4721
|
+
};
|
|
4722
|
+
type TransactionDeleteEntity<T extends Entity$2 = Entity$2> = {
|
|
4723
|
+
operation: 'deleteEntity';
|
|
4724
|
+
entityType: T;
|
|
4725
|
+
entityId: string;
|
|
4726
|
+
};
|
|
4727
|
+
type TransactionOperation = TransactionCreateEntity | TransactionUpdateEntity | TransactionAdjustEntity | TransactionDeleteEntity;
|
|
4728
|
+
type TransactionResultEntry = {
|
|
4729
|
+
operation: string;
|
|
4730
|
+
entityType: Entity$2;
|
|
4731
|
+
entityId: string;
|
|
4732
|
+
data?: Record<string, unknown>;
|
|
4733
|
+
};
|
|
4734
|
+
type TransactionResult = {
|
|
4735
|
+
results: TransactionResultEntry[];
|
|
4736
|
+
};
|
|
4737
|
+
|
|
4738
|
+
declare class TransactionService {
|
|
4739
|
+
private EntityConfig;
|
|
4740
|
+
private EmailAuthEnabledEntities;
|
|
4741
|
+
private entityRepository;
|
|
4742
|
+
private dynamodbClient;
|
|
4743
|
+
private publishEvent;
|
|
4744
|
+
private entityServiceLifeCycle;
|
|
4745
|
+
private eventUtils;
|
|
4746
|
+
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, EmailAuthEnabledEntities: Entity$2[], entityRepository: EntityRepository, dynamodbClient: DynamoDB, publishEvent: typeof publishEvent, entityServiceLifeCycle: EntityServiceLifeCycle, eventUtils: EventUtils);
|
|
4747
|
+
executeTransaction: (operations: TransactionOperation[], accountId?: string) => Promise<TransactionResult>;
|
|
4748
|
+
private processOperation;
|
|
4749
|
+
private buildCreateItems;
|
|
4750
|
+
private buildUpdateItem;
|
|
4751
|
+
private buildAdjustItem;
|
|
4752
|
+
private buildDeleteItem;
|
|
4753
|
+
private collectCreateEvents;
|
|
4754
|
+
private collectUpdateEvents;
|
|
4755
|
+
}
|
|
4756
|
+
|
|
4757
|
+
declare class ExecuteTransactionController {
|
|
4758
|
+
private transactionService;
|
|
4759
|
+
constructor(transactionService: TransactionService);
|
|
4760
|
+
controller: hono.MiddlewareHandler<any, string, {}, any>;
|
|
4761
|
+
}
|
|
4762
|
+
|
|
4702
4763
|
declare class DependencyContainer {
|
|
4703
4764
|
config: {
|
|
4704
4765
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4741,6 +4802,8 @@ declare class DependencyContainer {
|
|
|
4741
4802
|
get updateMutualController(): UpdateMutualController;
|
|
4742
4803
|
get deleteMutualController(): DeleteMutualController;
|
|
4743
4804
|
get listTagsController(): ListTagsController;
|
|
4805
|
+
get transactionService(): TransactionService;
|
|
4806
|
+
get executeTransactionController(): ExecuteTransactionController;
|
|
4744
4807
|
}
|
|
4745
4808
|
|
|
4746
4809
|
declare const setupCommonRoutes: (container: DependencyContainer) => Hono;
|
|
@@ -4774,7 +4837,12 @@ declare const StandardErrorCode: {
|
|
|
4774
4837
|
readonly REPLICATION_ERROR: "REPLICATION_ERROR";
|
|
4775
4838
|
readonly RETRYABLE_MUTUAL_LOCK_CONFLICT: "RETRYABLE_MUTUAL_LOCK_CONFLICT";
|
|
4776
4839
|
readonly TAG_IS_UNDEFINED: "TAG_IS_UNDEFINED";
|
|
4840
|
+
readonly TRANSACTION_EMPTY: "TRANSACTION_EMPTY";
|
|
4777
4841
|
readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
|
|
4842
|
+
readonly TRANSACTION_INVALID_OPERATION: "TRANSACTION_INVALID_OPERATION";
|
|
4843
|
+
readonly TRANSACTION_ITEM_LIMIT_EXCEEDED: "TRANSACTION_ITEM_LIMIT_EXCEEDED";
|
|
4844
|
+
readonly TRANSACTION_UNIQUE_FIELD_UPDATE: "TRANSACTION_UNIQUE_FIELD_UPDATE";
|
|
4845
|
+
readonly TRANSACTION_VALIDATION_ERROR: "TRANSACTION_VALIDATION_ERROR";
|
|
4778
4846
|
readonly UNIQUE_VALUE_EXISTS: "UNIQUE_VALUE_EXISTS";
|
|
4779
4847
|
};
|
|
4780
4848
|
type StandardErrorCode = typeof StandardErrorCode[keyof typeof StandardErrorCode];
|
|
@@ -4814,6 +4882,19 @@ declare const handler: (container: DependencyContainer) => (ev: SQSEvent) => Pro
|
|
|
4814
4882
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4815
4883
|
}>;
|
|
4816
4884
|
|
|
4885
|
+
declare const transactional: {
|
|
4886
|
+
createEntity: <T extends Entity$2>(entityType: T, payload: EntitySchemaMap[T] & {
|
|
4887
|
+
entityId?: string;
|
|
4888
|
+
}) => TransactionCreateEntity<T>;
|
|
4889
|
+
updateEntity: <T extends Entity$2>(entityType: T, entityId: string, payload: Partial<EntitySchemaMap[T]> & {
|
|
4890
|
+
$condition?: string;
|
|
4891
|
+
}) => TransactionUpdateEntity<T>;
|
|
4892
|
+
adjustEntity: <T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number> & {
|
|
4893
|
+
$condition?: string;
|
|
4894
|
+
}) => TransactionAdjustEntity<T>;
|
|
4895
|
+
deleteEntity: <T extends Entity$2>(entityType: T, entityId: string) => TransactionDeleteEntity<T>;
|
|
4896
|
+
};
|
|
4897
|
+
|
|
4817
4898
|
declare class CoreFactory {
|
|
4818
4899
|
private config;
|
|
4819
4900
|
setupCommonRoutes: ReturnType<typeof setupCommonRoutes>;
|
|
@@ -4831,4 +4912,4 @@ declare class CoreFactory {
|
|
|
4831
4912
|
});
|
|
4832
4913
|
}
|
|
4833
4914
|
|
|
4834
|
-
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor };
|
|
4915
|
+
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, TransactionService, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor, transactional };
|