npm package diff
Package: @forge/cache
Versions: 1.0.3-next.0 - 1.0.3-next.0-experimental-ab129b0
File: package/out/kvs/kvs.js
Index: package/out/kvs/kvs.js
===================================================================
--- package/out/kvs/kvs.js
+++ package/out/kvs/kvs.js
@@ -0,0 +1,40 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.KvsImpl = void 0;
+const entity_1 = require("./entity");
+const query_1 = require("./query");
+const transaction_api_1 = require("./transaction-api");
+class KvsImpl {
+ storageApi;
+ constructor(storageApi) {
+ this.storageApi = storageApi;
+ }
+ get(key) {
+ return this.storageApi.get({ key });
+ }
+ set(key, value) {
+ return this.storageApi.set({ key, value });
+ }
+ delete(key) {
+ return this.storageApi.delete({ key });
+ }
+ query() {
+ return new query_1.KvsQueryBuilder(this.storageApi);
+ }
+ getSecret(key) {
+ return this.storageApi.getSecret({ key });
+ }
+ setSecret(key, value) {
+ return this.storageApi.setSecret({ key, value });
+ }
+ deleteSecret(key) {
+ return this.storageApi.deleteSecret({ key });
+ }
+ entity(entityName) {
+ return new entity_1.EntityImpl(entityName, this.storageApi);
+ }
+ transact() {
+ return new transaction_api_1.TransactionBuilderImpl(this.storageApi);
+ }
+}
+exports.KvsImpl = KvsImpl;