manyfest 1.0.41 → 1.0.43
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/manyfest.compatible.js +498 -182
- package/dist/manyfest.compatible.js.map +1 -0
- package/dist/manyfest.compatible.min.js +1 -1
- package/dist/manyfest.compatible.min.js.map +1 -1
- package/dist/manyfest.js +487 -173
- package/dist/manyfest.js.map +1 -0
- package/dist/manyfest.min.js +1 -1
- package/dist/manyfest.min.js.map +1 -1
- package/package.json +3 -3
- package/source/Manyfest-CleanWrapCharacters.js +7 -1
- package/source/Manyfest-HashTranslation.js +29 -8
- package/source/Manyfest-ObjectAddress-CheckAddressExists.js +28 -13
- package/source/Manyfest-ObjectAddress-DeleteValue.js +20 -2
- package/source/Manyfest-ObjectAddress-GetValue.js +23 -4
- package/source/Manyfest-ObjectAddress-Parser.js +39 -32
- package/source/Manyfest-ObjectAddress-SetValue.js +14 -2
- package/source/Manyfest-ObjectAddressGeneration.js +23 -12
- package/source/Manyfest-ParseConditionals.js +3 -3
- package/source/Manyfest-SchemaManipulation.js +44 -21
- package/source/Manyfest.js +69 -9
- package/test/Manyfest_Object_Read_tests.js +13 -0
- package/test/Manyfest_Performance_tests.js +48 -0
- package/types/Manyfest-CleanWrapCharacters.d.ts +7 -1
- package/types/Manyfest-CleanWrapCharacters.d.ts.map +1 -1
- package/types/Manyfest-HashTranslation.d.ts +34 -7
- package/types/Manyfest-HashTranslation.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddress-CheckAddressExists.d.ts +23 -4
- package/types/Manyfest-ObjectAddress-CheckAddressExists.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddress-DeleteValue.d.ts +25 -6
- package/types/Manyfest-ObjectAddress-DeleteValue.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddress-GetValue.d.ts +26 -6
- package/types/Manyfest-ObjectAddress-GetValue.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddress-Parser.d.ts +5 -5
- package/types/Manyfest-ObjectAddress-Parser.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddress-SetValue.d.ts +18 -5
- package/types/Manyfest-ObjectAddress-SetValue.d.ts.map +1 -1
- package/types/Manyfest-ObjectAddressGeneration.d.ts +25 -4
- package/types/Manyfest-ObjectAddressGeneration.d.ts.map +1 -1
- package/types/Manyfest-SchemaManipulation.d.ts +47 -6
- package/types/Manyfest-SchemaManipulation.d.ts.map +1 -1
- package/types/Manyfest.d.ts +36 -12
- package/types/Manyfest.d.ts.map +1 -1
|
@@ -5,11 +5,52 @@ export = ManyfestSchemaManipulation;
|
|
|
5
5
|
* @class ManyfestSchemaManipulation
|
|
6
6
|
*/
|
|
7
7
|
declare class ManyfestSchemaManipulation {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {function} [pInfoLog] - (optional) A logging function for info messages
|
|
10
|
+
* @param {function} [pErrorLog] - (optional) A logging function for error messages
|
|
11
|
+
*/
|
|
12
|
+
constructor(pInfoLog?: Function, pErrorLog?: Function);
|
|
13
|
+
logInfo: Function;
|
|
14
|
+
logError: Function;
|
|
15
|
+
/**
|
|
16
|
+
* This translates the default address mappings to something different.
|
|
17
|
+
*
|
|
18
|
+
* For instance you can pass in manyfest schema descriptor object:
|
|
19
|
+
* {
|
|
20
|
+
* "Address.Of.a": { "Hash": "a", "Type": "Number" },
|
|
21
|
+
* "Address.Of.b": { "Hash": "b", "Type": "Number" }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* And then an address mapping (basically a Hash->Address map)
|
|
26
|
+
* {
|
|
27
|
+
* "a": "New.Address.Of.a",
|
|
28
|
+
* "b": "New.Address.Of.b"
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* NOTE: This mutates the schema object permanently, altering the base hash.
|
|
32
|
+
* If there is a collision with an existing address, it can lead to overwrites.
|
|
33
|
+
* TODO: Discuss what should happen on collisions.
|
|
34
|
+
*
|
|
35
|
+
* @param {object} pManyfestSchemaDescriptors - The manyfest schema descriptors to resolve address mappings for
|
|
36
|
+
* @param {object} pAddressMapping - The address mapping object to use for remapping
|
|
37
|
+
*
|
|
38
|
+
* @return {boolean} True if successful, false if there was an error
|
|
39
|
+
*/
|
|
40
|
+
resolveAddressMappings(pManyfestSchemaDescriptors: object, pAddressMapping: object): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @param {object} pManyfestSchemaDescriptors - The manyfest schema descriptors to resolve address mappings for
|
|
43
|
+
* @param {object} pAddressMapping - The address mapping object to use for remapping
|
|
44
|
+
*
|
|
45
|
+
* @return {object} A new object containing the remapped schema descriptors
|
|
46
|
+
*/
|
|
47
|
+
safeResolveAddressMappings(pManyfestSchemaDescriptors: object, pAddressMapping: object): object;
|
|
48
|
+
/**
|
|
49
|
+
* @param {object} pManyfestSchemaDescriptorsDestination - The destination manyfest schema descriptors
|
|
50
|
+
* @param {object} pManyfestSchemaDescriptorsSource - The source manyfest schema descriptors
|
|
51
|
+
*
|
|
52
|
+
* @return {object} A new object containing the merged schema descriptors
|
|
53
|
+
*/
|
|
54
|
+
mergeAddressMappings(pManyfestSchemaDescriptorsDestination: object, pManyfestSchemaDescriptorsSource: object): object;
|
|
14
55
|
}
|
|
15
56
|
//# sourceMappingURL=Manyfest-SchemaManipulation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manyfest-SchemaManipulation.d.ts","sourceRoot":"","sources":["../source/Manyfest-SchemaManipulation.js"],"names":[],"mappings":";AAKA;;;;EAIE;AACF;IAEC,
|
|
1
|
+
{"version":3,"file":"Manyfest-SchemaManipulation.d.ts","sourceRoot":"","sources":["../source/Manyfest-SchemaManipulation.js"],"names":[],"mappings":";AAKA;;;;EAIE;AACF;IAEC;;;OAGG;IACH,uDAKC;IAFA,kBAA0E;IAC1E,mBAA6E;IAG9E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,mDALW,MAAM,mBACN,MAAM,GAEL,OAAO,CAgElB;IAED;;;;;OAKG;IACH,uDALW,MAAM,mBACN,MAAM,GAEL,MAAM,CAQjB;IAED;;;;;OAKG;IACH,4DALW,MAAM,oCACN,MAAM,GAEL,MAAM,CA0BjB;CACD"}
|
package/types/Manyfest.d.ts
CHANGED
|
@@ -17,8 +17,14 @@ export = Manyfest;
|
|
|
17
17
|
*/
|
|
18
18
|
declare class Manyfest {
|
|
19
19
|
constructor(pFable: any, pManifest: any, pServiceHash: any);
|
|
20
|
+
/** @type {import('fable')} */
|
|
21
|
+
fable: any;
|
|
20
22
|
/** @type {Record<string, any>} */
|
|
21
23
|
options: Record<string, any>;
|
|
24
|
+
/** @type {string} */
|
|
25
|
+
Hash: string;
|
|
26
|
+
/** @type {string} */
|
|
27
|
+
UUID: string;
|
|
22
28
|
serviceType: string;
|
|
23
29
|
logInfo: (pLogLine: any, pLogObject: any) => void;
|
|
24
30
|
logError: (pLogLine: any, pLogObject: any) => void;
|
|
@@ -26,10 +32,14 @@ declare class Manyfest {
|
|
|
26
32
|
objectAddressGetValue: libObjectAddressGetValue;
|
|
27
33
|
objectAddressSetValue: libObjectAddressSetValue;
|
|
28
34
|
objectAddressDeleteValue: libObjectAddressDeleteValue;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
/** @type {string} */
|
|
36
|
+
scope: string;
|
|
37
|
+
/** @type {Array<string>} */
|
|
38
|
+
elementAddresses: Array<string>;
|
|
39
|
+
/** @type {Record<string, string>} */
|
|
40
|
+
elementHashes: Record<string, string>;
|
|
41
|
+
/** @type {Record<string, ManifestDescriptor>} */
|
|
42
|
+
elementDescriptors: Record<string, ManifestDescriptor>;
|
|
33
43
|
schemaManipulations: libSchemaManipulation;
|
|
34
44
|
objectAddressGeneration: libObjectAddressGeneration;
|
|
35
45
|
hashTranslations: libHashTranslation;
|
|
@@ -39,13 +49,26 @@ declare class Manyfest {
|
|
|
39
49
|
*/
|
|
40
50
|
reset(): void;
|
|
41
51
|
clone(): import("./Manyfest.js");
|
|
42
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} pManifestString - The manifest string to deserialize
|
|
54
|
+
*
|
|
55
|
+
* @return {Manyfest} The deserialized manifest
|
|
56
|
+
*/
|
|
57
|
+
deserialize(pManifestString: string): Manyfest;
|
|
43
58
|
loadManifest(pManifest: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* Serialize the Manifest to a string
|
|
61
|
+
*
|
|
62
|
+
* @return {string} - The serialized manifest
|
|
63
|
+
*/
|
|
44
64
|
serialize(): string;
|
|
65
|
+
/**
|
|
66
|
+
* @return {{ Scope: string, Descriptors: Record<string, ManifestDescriptor>, HashTranslations: Record<string, string> }} - A copy of the manifest state.
|
|
67
|
+
*/
|
|
45
68
|
getManifest(): {
|
|
46
|
-
Scope:
|
|
47
|
-
Descriptors:
|
|
48
|
-
HashTranslations:
|
|
69
|
+
Scope: string;
|
|
70
|
+
Descriptors: Record<string, ManifestDescriptor>;
|
|
71
|
+
HashTranslations: Record<string, string>;
|
|
49
72
|
};
|
|
50
73
|
/**
|
|
51
74
|
* Add a descriptor to the manifest
|
|
@@ -74,13 +97,14 @@ declare class Manyfest {
|
|
|
74
97
|
/*************************************************************************
|
|
75
98
|
* Beginning of Object Manipulation (read & write) Functions
|
|
76
99
|
*/
|
|
77
|
-
checkAddressExistsByHash(pObject: any, pHash: any):
|
|
78
|
-
checkAddressExists(pObject: any, pAddress: any):
|
|
100
|
+
checkAddressExistsByHash(pObject: any, pHash: any): boolean;
|
|
101
|
+
checkAddressExists(pObject: any, pAddress: any): boolean;
|
|
79
102
|
resolveHashAddress(pHash: any): any;
|
|
80
103
|
getValueByHash(pObject: any, pHash: any): any;
|
|
104
|
+
lintAddress(pAddress: any): any;
|
|
81
105
|
getValueAtAddress(pObject: any, pAddress: any): any;
|
|
82
|
-
setValueByHash(pObject: any, pHash: any, pValue: any):
|
|
83
|
-
setValueAtAddress(pObject: any, pAddress: any, pValue: any):
|
|
106
|
+
setValueByHash(pObject: any, pHash: any, pValue: any): boolean;
|
|
107
|
+
setValueAtAddress(pObject: any, pAddress: any, pValue: any): boolean;
|
|
84
108
|
deleteValueByHash(pObject: any, pHash: any, pValue: any): any;
|
|
85
109
|
deleteValueAtAddress(pObject: any, pAddress: any, pValue: any): any;
|
|
86
110
|
validate(pObject: any): {
|
package/types/Manyfest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manyfest.d.ts","sourceRoot":"","sources":["../source/Manyfest.js"],"names":[],"mappings":";AAiBA;;;;;;;;;;GAUG;AAEH;;;;EAIE;AACF;IAEC,
|
|
1
|
+
{"version":3,"file":"Manyfest.d.ts","sourceRoot":"","sources":["../source/Manyfest.js"],"names":[],"mappings":";AAiBA;;;;;;;;;;GAUG;AAEH;;;;EAIE;AACF;IAEC,4DA4EC;IAjEA,8BAA8B;IAC9B,WAAU;IACV,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAClB;IACZ,qBAAqB;IACrB,MADW,MAAM,CACR;IACT,qBAAqB;IACrB,MADW,MAAM,CACR;IAEH,oBAA6B;IAGnC,kDAA2B;IAC3B,mDAA4B;IAG5B,oEAA0G;IAC1G,gDAAsF;IACtF,gDAAsF;IACtF,sDAA4F;IAwB5F,qBAAqB;IACrB,OADW,MAAM,CACK;IACtB,4BAA4B;IAC5B,kBADW,KAAK,CAAC,MAAM,CAAC,CACS;IACjC,qCAAqC;IACrC,eADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACH;IAC9B,iDAAiD;IACjD,oBADW,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CACV;IASnC,2CAAiF;IACjF,oDAA0F;IAE1F,qCAA2E;IAE3E,oBAA8D;IAG/D;;OAEG;IAGH,cAMC;IAED,iCA6BC;IAGD;;;;OAIG;IACH,6BAJW,MAAM,GAEL,QAAQ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