@powerhousedao/shared 6.2.0-dev.2 → 6.2.0-dev.4
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/clis/args/{common-DxMY8vx1.d.mts → common-BQ2pvhCr.d.mts} +3 -3
- package/dist/clis/args/{common-DxMY8vx1.d.mts.map → common-BQ2pvhCr.d.mts.map} +1 -1
- package/dist/clis/args/common.d.mts +1 -1
- package/dist/clis/args/connect.d.mts +5 -5
- package/dist/clis/args/index.d.mts +2 -2
- package/dist/clis/args/{service-DbbCQSks.d.mts → service-Bzt4_WtZ.d.mts} +2 -2
- package/dist/clis/args/{service-DbbCQSks.d.mts.map → service-Bzt4_WtZ.d.mts.map} +1 -1
- package/dist/clis/args/service.d.mts +1 -1
- package/dist/clis/args/vetra.d.mts +1 -1
- package/dist/clis/constants.d.mts +1 -1
- package/dist/clis/constants.d.mts.map +1 -1
- package/dist/clis/index.d.mts +1 -1
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/document-drive/index.d.ts +2 -2
- package/dist/document-model/index.d.ts +3 -3
- package/dist/document-model/index.js +5 -16
- package/dist/document-model/index.js.map +1 -1
- package/dist/{index-DalC_-i7.d.ts → index-CxGZy8_i.d.ts} +2 -2
- package/dist/{index-DalC_-i7.d.ts.map → index-CxGZy8_i.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/processors/index.d.ts +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/{types-CVqmv94G.d.ts → types-CdiI9CJ9.d.ts} +2 -2
- package/dist/{types-CVqmv94G.d.ts.map → types-CdiI9CJ9.d.ts.map} +1 -1
- package/dist/{types-CC6ib3_2.d.ts → types-DFeAUtLQ.d.ts} +9 -54
- package/dist/{types-CC6ib3_2.d.ts.map → types-DFeAUtLQ.d.ts.map} +1 -1
- package/package.json +1 -1
|
@@ -73,15 +73,6 @@ function DocumentActionSchema() {
|
|
|
73
73
|
UndoActionSchema()
|
|
74
74
|
]);
|
|
75
75
|
}
|
|
76
|
-
function DocumentFileSchema() {
|
|
77
|
-
return z.object({
|
|
78
|
-
__typename: z.literal("DocumentFile").optional(),
|
|
79
|
-
data: z.string(),
|
|
80
|
-
extension: z.string().nullable(),
|
|
81
|
-
fileName: z.string().nullable(),
|
|
82
|
-
mimeType: z.string()
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
76
|
function LoadStateActionSchema() {
|
|
86
77
|
return z.object({
|
|
87
78
|
id: z.string(),
|
|
@@ -616,16 +607,16 @@ const noop = (scope = "global") => createAction("NOOP", {}, void 0, void 0, scop
|
|
|
616
607
|
*
|
|
617
608
|
* @param type - The type of the action.
|
|
618
609
|
* @param input - The input properties of the action.
|
|
619
|
-
* @param
|
|
610
|
+
* @param _attachments - Deprecated and ignored. Retained so action creators
|
|
611
|
+
* generated before the attachment-system removal keep their 5-argument shape.
|
|
620
612
|
* @param validator - The validator to use for the input properties.
|
|
621
613
|
* @param scope - The scope of the action, can either be 'global' or 'local'.
|
|
622
|
-
* @param skip - The number of operations to skip before this new action is applied.
|
|
623
614
|
*
|
|
624
615
|
* @throws Error if the type is empty or not a string.
|
|
625
616
|
*
|
|
626
617
|
* @returns The new action.
|
|
627
618
|
*/
|
|
628
|
-
function createAction(type, input,
|
|
619
|
+
function createAction(type, input, _attachments, validator, scope = "global") {
|
|
629
620
|
if (!type) throw new Error("Empty action type");
|
|
630
621
|
if (typeof type !== "string") throw new Error(`Invalid action type: ${JSON.stringify(type)}`);
|
|
631
622
|
const action = {
|
|
@@ -635,7 +626,6 @@ function createAction(type, input, attachments, validator, scope = "global") {
|
|
|
635
626
|
input,
|
|
636
627
|
scope
|
|
637
628
|
};
|
|
638
|
-
if (attachments) action.attachments = attachments;
|
|
639
629
|
try {
|
|
640
630
|
validator?.().parse(action.input);
|
|
641
631
|
} catch (error) {
|
|
@@ -655,8 +645,7 @@ const actionFromAction = (action) => {
|
|
|
655
645
|
type: action.type,
|
|
656
646
|
input: action.input,
|
|
657
647
|
scope: action.scope,
|
|
658
|
-
context: action.context
|
|
659
|
-
attachments: action.attachments
|
|
648
|
+
context: action.context
|
|
660
649
|
};
|
|
661
650
|
};
|
|
662
651
|
const operationFromAction = (action, index, skip, context) => {
|
|
@@ -3633,6 +3622,6 @@ function createState(baseState, globalState, localState) {
|
|
|
3633
3622
|
};
|
|
3634
3623
|
}
|
|
3635
3624
|
//#endregion
|
|
3636
|
-
export { AddChangeLogItemInputSchema, AddModuleInputSchema, AddOperationErrorInputSchema, AddOperationExampleInputSchema, AddOperationInputSchema, AddStateExampleInputSchema, AuthorSchema, BaseDocumentHeaderSchema, BaseDocumentStateSchema, CodeExampleSchema, ConfigEntrySchema, ConfigEntryTypeSchema, DeleteChangeLogItemInputSchema, DeleteModuleInputSchema, DeleteOperationErrorInputSchema, DeleteOperationExampleInputSchema, DeleteOperationInputSchema, DeleteStateExampleInputSchema, DocumentActionSchema,
|
|
3625
|
+
export { AddChangeLogItemInputSchema, AddModuleInputSchema, AddOperationErrorInputSchema, AddOperationExampleInputSchema, AddOperationInputSchema, AddStateExampleInputSchema, AuthorSchema, BaseDocumentHeaderSchema, BaseDocumentStateSchema, CodeExampleSchema, ConfigEntrySchema, ConfigEntryTypeSchema, DeleteChangeLogItemInputSchema, DeleteModuleInputSchema, DeleteOperationErrorInputSchema, DeleteOperationExampleInputSchema, DeleteOperationInputSchema, DeleteStateExampleInputSchema, DocumentActionSchema, DocumentModelGlobalStateSchema, DocumentModelHeaderSchema, DocumentModelInputSchema, DocumentModelPHStateSchema, DocumentModelSchema, DocumentSpecificationSchema, FileSystemError, HASH_ALGORITHM_SHA1, HASH_ALGORITHM_SHA256, HASH_ALGORITHM_SHA512, HASH_ENCODING_BASE64, HASH_ENCODING_HEX, HashMismatchError, IntegrityIssueSubType, IntegrityIssueType, InvalidActionInputError, InvalidActionInputZodError, LoadStateActionInputSchema, LoadStateActionSchema, LoadStateActionStateInputSchema, Load_StateSchema, ManifestSchema, ModuleSchema, MoveOperationInputSchema, OPERATION_NAME_PATTERN, OperationErrorSchema, OperationScopeSchema, OperationSpecificationSchema, PowerhouseModuleSchema, PowerhouseModulesSchema, PruneActionInputSchema, PruneActionSchema, PruneSchema, PublisherSchema, RESERVED_OPERATION_NAMES, RedoActionInputSchema, RedoActionSchema, RedoSchema, ReorderChangeLogItemsInputSchema, ReorderModuleOperationsInputSchema, ReorderModulesInputSchema, ReorderOperationErrorsInputSchema, ReorderOperationExamplesInputSchema, ReorderStateExamplesInputSchema, ScopeStateSchema, SetAuthorNameInputSchema, SetAuthorWebsiteInputSchema, SetInitialStateInputSchema, SetModelDescriptionInputSchema, SetModelExtensionInputSchema, SetModelIdInputSchema, SetModelNameInputSchema, SetModuleDescriptionInputSchema, SetModuleNameInputSchema, SetNameActionInputSchema, SetNameActionSchema, SetOperationDescriptionInputSchema, SetOperationErrorCodeInputSchema, SetOperationErrorDescriptionInputSchema, SetOperationErrorNameInputSchema, SetOperationErrorTemplateInputSchema, SetOperationNameInputSchema, SetOperationReducerInputSchema, SetOperationSchemaInputSchema, SetOperationScopeInputSchema, SetOperationTemplateInputSchema, SetPreferredEditorActionInputSchema, SetPreferredEditorActionSchema, SetStateSchemaInputSchema, Set_NameSchema, Set_PreferredEditorSchema, StateSchema, UndoActionInputSchema, UndoActionSchema, UndoSchema, UpdateChangeLogItemInputSchema, UpdateOperationExampleInputSchema, UpdateStateExampleInputSchema, ab2hex, actionContext, actionFromAction, actionSigner, actions, addChangeLogItem, addModule, addOperation, addOperationError, addOperationExample, addStateExample, addUndo, assertIsDocumentModelDocument, assertIsDocumentModelState, assertModuleIdUnique, assertOperationErrorIdUnique, assertOperationExampleIdUnique, assertOperationIdUnique, attachBranch, baseActions, baseCreateDocument, baseLoadFromInput, baseReducer, baseSaveToFileHandle, buildOperationSignature, buildOperationSignatureMessage, buildOperationSignatureParams, buildSignedAction, checkCleanedOperationsIntegrity, checkOperationsIntegrity, createAction, createAuthState, createBaseState, createDocumentState, createGlobalState, createLocalState, createMinimalZip, createPresignedHeader, createReducer, createSignedHeader, createSignedHeaderForSigner, createState, createVerificationSigner, createZip, defaultAuthState, defaultBaseState, defaultDocumentState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, deleteChangeLogItem, deleteModule, deleteOperation, deleteOperationError, deleteOperationExample, deleteStateExample, deriveOperationId, diffOperations, documentModelActions, documentModelDocumentType, documentModelFileExtension, documentModelGlobalState, documentModelHeaderReducer, documentModelInitialGlobalState, documentModelInitialLocalState, documentModelLoadFromInput, documentModelModuleReducer, documentModelOperationErrorReducer, documentModelOperationExampleReducer, documentModelOperationReducer, documentModelReducer, documentModelSaveToFileHandle, documentModelStateReducer, documentModelStateSchemaReducer, documentModelVersioningReducer, fetchFileBrowser, filterDocumentOperationsResultingState, filterDuplicatedOperations, findModuleOrThrow, findOperationErrorOrThrow, findOperationExampleOrThrow, findOperationOrThrow, garbageCollect, garbageCollectDocumentOperations, garbageCollectV2, generateId, generateMock, getAllOperationNames, getDocumentLastModified, getFileBrowser, getUnixTimestamp, groupOperationsByScope, hashBrowser, hashDocumentStateForScope, hex2ab, isDefinedNonNullAny, isDocumentAction, isDocumentModelDocument, isDocumentModelState, isNoopOperation, isReservedOperationName, isUndo, isUndoRedo, isValidOperationNameFormat, loadState, loadStateOperation, mapSkippedOperations, mapSkippedOperationsV2, merge, moveOperation, nextSkipNumber, noop, operationExampleCreators, operationFromAction, operationFromOperation, operationWithContext, operationsAreEqual, parseResultingState, precedes, prepareOperations, processUndoRedo, prune, pruneOperation, readFileBrowser, readOnly, redo, redoOperation, releaseNewVersion, removeExistingOperations, reorderChangeLogItems, reorderModuleOperations, reorderModules, reorderOperationErrors, reorderOperationExamples, reorderStateExamples, replayDocument, replayOperations, reshuffleByTimestamp, reshuffleByTimestampAndIndex, setAuthorName, setAuthorWebsite, setInitialState, setModelDescription, setModelExtension, setModelId, setModelName, setModuleDescription, setModuleName, setName, setNameOperation, setOperationDescription, setOperationErrorCode, setOperationErrorDescription, setOperationErrorName, setOperationErrorTemplate, setOperationName, setOperationReducer, setOperationSchema, setOperationScope, setOperationTemplate, setPreferredEditor, setPreferredEditorOperation, setStateSchema, sign, skipHeaderOperations, sortMappedOperations, sortOperations, split, undo, undoOperation, undoOperationV2, updateChangeLogItem, updateDocument, updateHeaderRevision, updateOperationExample, updateStateExample, validateHeader, validateInitialState, validateModule, validateModuleOperation, validateModules, validateOperationName, validateOperations, validateStateSchemaName, verify, verifyOperationSignature, writeFileBrowser };
|
|
3637
3626
|
|
|
3638
3627
|
//# sourceMappingURL=index.js.map
|