mock-block-dock
Advanced tools
Comparing version 0.0.18-canary.1 to 0.0.18
@@ -64,2 +64,10 @@ "use strict"; | ||
var use_default_array_state_1 = require("./use-default-array-state"); | ||
var readonlyErrorReturn = { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in read-only mode", | ||
}, | ||
], | ||
}; | ||
var useMockDatastore = function (initialData, readonly) { | ||
@@ -98,10 +106,3 @@ if (initialData === void 0) { initialData = { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -167,10 +168,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -221,10 +215,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -275,10 +262,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -343,10 +323,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -397,10 +370,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -451,10 +417,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -512,10 +471,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -566,10 +518,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -620,10 +565,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -687,10 +625,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -741,10 +672,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -798,10 +722,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -808,0 +725,0 @@ if (!data) { |
@@ -61,2 +61,10 @@ var __assign = (this && this.__assign) || function () { | ||
import { useDefaultArrayState } from "./use-default-array-state"; | ||
var readonlyErrorReturn = { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in read-only mode", | ||
}, | ||
], | ||
}; | ||
export var useMockDatastore = function (initialData, readonly) { | ||
@@ -95,10 +103,3 @@ if (initialData === void 0) { initialData = { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -164,10 +165,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -218,10 +212,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -272,10 +259,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -340,10 +320,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -394,10 +367,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -448,10 +414,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -509,10 +468,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -563,10 +515,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -617,10 +562,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -684,10 +622,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -738,10 +669,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -795,10 +719,3 @@ if (!data) { | ||
if (readonly) { | ||
return [2 /*return*/, { | ||
errors: [ | ||
{ | ||
code: "FORBIDDEN", | ||
message: "Operation can't be carried out in readonly mode", | ||
}, | ||
], | ||
}]; | ||
return [2 /*return*/, readonlyErrorReturn]; | ||
} | ||
@@ -805,0 +722,0 @@ if (!data) { |
{ | ||
"name": "mock-block-dock", | ||
"version": "0.0.18-canary.1", | ||
"version": "0.0.18", | ||
"description": "A mock embedding application for Block Protocol blocks", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
243621
3458