@decaf-ts/for-fabric 0.13.33 → 0.14.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.
Files changed (49) hide show
  1. package/dist/for-fabric.cjs +1 -1
  2. package/dist/for-fabric.cjs.map +1 -1
  3. package/dist/for-fabric.js +1 -1
  4. package/dist/for-fabric.js.map +1 -1
  5. package/lib/cjs/client/FabricClientAdapter.cjs +1 -1
  6. package/lib/cjs/client/FabricClientAdapter.cjs.map +1 -1
  7. package/lib/cjs/client/FabricClientContext.cjs +1 -0
  8. package/lib/cjs/client/FabricClientContext.cjs.map +1 -1
  9. package/lib/cjs/client/FabricClientRepository.cjs +2 -0
  10. package/lib/cjs/client/FabricClientRepository.cjs.map +1 -1
  11. package/lib/cjs/client/constants.cjs +1 -0
  12. package/lib/cjs/client/constants.cjs.map +1 -1
  13. package/lib/cjs/client/fabric-hsm.cjs +9 -5
  14. package/lib/cjs/client/fabric-hsm.cjs.map +1 -1
  15. package/lib/cjs/contracts/ContractAdapter.cjs +28 -9
  16. package/lib/cjs/contracts/ContractAdapter.cjs.map +1 -1
  17. package/lib/cjs/contracts/crud/crud-contract.cjs +1 -1
  18. package/lib/cjs/contracts/crud/crud-contract.cjs.map +1 -1
  19. package/lib/cjs/shared/decorators.cjs +12 -0
  20. package/lib/cjs/shared/decorators.cjs.map +1 -1
  21. package/lib/cjs/version.cjs +3 -3
  22. package/lib/esm/client/FabricClientAdapter.js +1 -1
  23. package/lib/esm/client/FabricClientAdapter.js.map +1 -1
  24. package/lib/esm/client/FabricClientContext.js +1 -0
  25. package/lib/esm/client/FabricClientContext.js.map +1 -1
  26. package/lib/esm/client/FabricClientRepository.js +2 -0
  27. package/lib/esm/client/FabricClientRepository.js.map +1 -1
  28. package/lib/esm/client/constants.js +1 -0
  29. package/lib/esm/client/constants.js.map +1 -1
  30. package/lib/esm/client/fabric-hsm.js +8 -4
  31. package/lib/esm/client/fabric-hsm.js.map +1 -1
  32. package/lib/esm/contracts/ContractAdapter.js +28 -9
  33. package/lib/esm/contracts/ContractAdapter.js.map +1 -1
  34. package/lib/esm/contracts/crud/crud-contract.js +1 -1
  35. package/lib/esm/contracts/crud/crud-contract.js.map +1 -1
  36. package/lib/esm/shared/decorators.js +12 -0
  37. package/lib/esm/shared/decorators.js.map +1 -1
  38. package/lib/esm/version.js +3 -3
  39. package/lib/types/client/fabric-hsm.d.cts +1 -1
  40. package/lib/types/client/fabric-hsm.d.mts +1 -1
  41. package/lib/types/client/types.d.cts +1 -0
  42. package/lib/types/client/types.d.mts +1 -0
  43. package/lib/types/contracts/ContractAdapter.d.cts +1 -0
  44. package/lib/types/contracts/ContractAdapter.d.mts +1 -0
  45. package/lib/types/shared/types.d.cts +2 -0
  46. package/lib/types/shared/types.d.mts +2 -0
  47. package/lib/types/version.d.cts +3 -3
  48. package/lib/types/version.d.mts +3 -3
  49. package/package.json +5 -2
@@ -293,6 +293,7 @@ export declare class FabricContractAdapter extends CouchDBAdapter<any, void, Fab
293
293
  revert<M extends Model>(obj: Record<string, any>, clazz: Constructor<M>, id: PrimaryKeyType, transient?: Record<string, any>, ...args: ContextualArgs<FabricContractContext>): M;
294
294
  private shouldRebuildWithTransient;
295
295
  private getContextMsp;
296
+ private shouldAllowMirroring;
296
297
  private enforceMirrorAuthorization;
297
298
  createPrefix<M extends Model>(tableName: Constructor<M>, id: PrimaryKeyType, model: Record<string, any>, ...args: MaybeContextualArg<FabricContractContext>): [Constructor<M>, PrimaryKeyType, Record<string, any>, ...any[], FabricContractContext];
298
299
  updatePrefix<M extends Model>(tableName: Constructor<M>, id: PrimaryKeyType, model: Record<string, any>, ...args: MaybeContextualArg<FabricContractContext>): any[];
@@ -293,6 +293,7 @@ export declare class FabricContractAdapter extends CouchDBAdapter<any, void, Fab
293
293
  revert<M extends Model>(obj: Record<string, any>, clazz: Constructor<M>, id: PrimaryKeyType, transient?: Record<string, any>, ...args: ContextualArgs<FabricContractContext>): M;
294
294
  private shouldRebuildWithTransient;
295
295
  private getContextMsp;
296
+ private shouldAllowMirroring;
296
297
  private enforceMirrorAuthorization;
297
298
  createPrefix<M extends Model>(tableName: Constructor<M>, id: PrimaryKeyType, model: Record<string, any>, ...args: MaybeContextualArg<FabricContractContext>): [Constructor<M>, PrimaryKeyType, Record<string, any>, ...any[], FabricContractContext];
298
299
  updatePrefix<M extends Model>(tableName: Constructor<M>, id: PrimaryKeyType, model: Record<string, any>, ...args: MaybeContextualArg<FabricContractContext>): any[];
@@ -43,6 +43,7 @@ export type PeerConfig = {
43
43
  certCertOrDirectoryPath: string | Buffer;
44
44
  tlsCert: string | Buffer;
45
45
  allowGatewayOverride?: boolean;
46
+ allowMirroring?: boolean;
46
47
  mspMap?: Record<string, MspDetails[]>;
47
48
  legacyMspCount?: number;
48
49
  peerEndpoint: string;
@@ -120,6 +121,7 @@ export type FabricFlags<LOG extends Logger = Logger> = AdapterFlags<LOG> & {
120
121
  segregated?: string;
121
122
  mirror?: boolean;
122
123
  mirrorCollection?: string;
124
+ allowMirroring?: boolean;
123
125
  identity?: string | ClientIdentity;
124
126
  ownerOverride?: string;
125
127
  /**
@@ -43,6 +43,7 @@ export type PeerConfig = {
43
43
  certCertOrDirectoryPath: string | Buffer;
44
44
  tlsCert: string | Buffer;
45
45
  allowGatewayOverride?: boolean;
46
+ allowMirroring?: boolean;
46
47
  mspMap?: Record<string, MspDetails[]>;
47
48
  legacyMspCount?: number;
48
49
  peerEndpoint: string;
@@ -120,6 +121,7 @@ export type FabricFlags<LOG extends Logger = Logger> = AdapterFlags<LOG> & {
120
121
  segregated?: string;
121
122
  mirror?: boolean;
122
123
  mirrorCollection?: string;
124
+ allowMirroring?: boolean;
123
125
  identity?: string | ClientIdentity;
124
126
  ownerOverride?: string;
125
127
  /**
@@ -1,16 +1,16 @@
1
- export declare const VERSION = "0.13.32";
1
+ export declare const VERSION = "0.13.33";
2
2
  /**
3
3
  * @description Represents the current commit hash of the module build.
4
4
  * @summary Stores the current git commit hash for the package. The build replaces
5
5
  * the placeholder with the actual commit hash at publish time.
6
6
  * @const COMMIT
7
7
  */
8
- export declare const COMMIT = "7778dfd";
8
+ export declare const COMMIT = "eefddc9";
9
9
  /**
10
10
  * @description Represents the full version string of the module.
11
11
  * @summary Stores the semver version and commit hash for the package.
12
12
  * The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
13
13
  * @const FULL_VERSION
14
14
  */
15
- export declare const FULL_VERSION = "0.13.32-7778dfd";
15
+ export declare const FULL_VERSION = "0.13.33-eefddc9";
16
16
  export declare const PACKAGE_NAME = "@decaf-ts/for-fabric";
@@ -1,16 +1,16 @@
1
- export declare const VERSION = "0.13.32";
1
+ export declare const VERSION = "0.13.33";
2
2
  /**
3
3
  * @description Represents the current commit hash of the module build.
4
4
  * @summary Stores the current git commit hash for the package. The build replaces
5
5
  * the placeholder with the actual commit hash at publish time.
6
6
  * @const COMMIT
7
7
  */
8
- export declare const COMMIT = "7778dfd";
8
+ export declare const COMMIT = "eefddc9";
9
9
  /**
10
10
  * @description Represents the full version string of the module.
11
11
  * @summary Stores the semver version and commit hash for the package.
12
12
  * The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
13
13
  * @const FULL_VERSION
14
14
  */
15
- export declare const FULL_VERSION = "0.13.32-7778dfd";
15
+ export declare const FULL_VERSION = "0.13.33-eefddc9";
16
16
  export declare const PACKAGE_NAME = "@decaf-ts/for-fabric";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-fabric",
3
- "version": "0.13.33",
3
+ "version": "0.14.0",
4
4
  "packageManager": "npm@11.13.0",
5
5
  "description": "Abstracts fabric logic",
6
6
  "type": "module",
@@ -191,6 +191,7 @@
191
191
  "peerDependencies": {
192
192
  "@grpc/grpc-js": "^1.13.3",
193
193
  "@hyperledger/fabric-gateway": "^1.7.1",
194
+ "@noble/curves": "^2.2.0",
194
195
  "@peculiar/webcrypto": "^1.5.0",
195
196
  "fabric-ca-client": "^2.2.20",
196
197
  "fabric-common": "^2.2.20",
@@ -204,7 +205,9 @@
204
205
  },
205
206
  "fabric-ca-client": {
206
207
  "jsrsasign": "^11.1.0"
207
- }
208
+ },
209
+ "test-exclude": "^7.0.2",
210
+ "brace-expansion": "^5.0.8"
208
211
  },
209
212
  "optionalDependencies": {
210
213
  "pkcs11js": "^2.1.6"