@haatlabs-core/storage 0.11.3 → 0.12.1
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/README.md +3 -0
- package/dist/cjs/contracts.d.ts +1 -0
- package/dist/cjs/contracts.js +21 -0
- package/dist/contracts.d.ts +1 -0
- package/dist/contracts.js +6 -0
- package/dist/contracts.js.map +1 -0
- package/package.json +19 -4
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ outside that organization. A project builds its own keys on `organizationPrefix`
|
|
|
6
6
|
`storePrefix` and `uuidSegment`. It throws `STORAGE_*` codes; a project spreads
|
|
7
7
|
`STORAGE_ERRORS` into `defineErrors`.
|
|
8
8
|
|
|
9
|
+
**`@haatlabs-core/storage/contracts`** (0.12.1): `STORAGE_ERRORS` and `StorageErrorCode`, with
|
|
10
|
+
nothing of Node: a project's contracts, which its pages load, import from here and never the root, which is for Node.
|
|
11
|
+
|
|
9
12
|
## Install
|
|
10
13
|
|
|
11
14
|
pnpm add @haatlabs-core/storage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './codes.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var contracts_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(contracts_exports);
|
|
17
|
+
__reExport(contracts_exports, require("./codes.js"), module.exports);
|
|
18
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
19
|
+
0 && (module.exports = {
|
|
20
|
+
...require("./codes.js")
|
|
21
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './codes.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// What a project's contracts, which its browser code also loads, may take from this package:
|
|
2
|
+
// its error codes.
|
|
3
|
+
// Nothing here loads a Node built-in or a server client: scripts/check-browser.mjs bundles
|
|
4
|
+
// it for a browser and runs it.
|
|
5
|
+
export * from './codes.js';
|
|
6
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,mBAAmB;AACnB,2FAA2F;AAC3F,gCAAgC;AAChC,cAAc,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haatlabs-core/storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "S3-compatible object storage with every key scoped to its organization.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"haatlabs",
|
|
@@ -34,17 +34,32 @@
|
|
|
34
34
|
"types": "./dist/cjs/index.d.ts",
|
|
35
35
|
"default": "./dist/cjs/index.js"
|
|
36
36
|
}
|
|
37
|
+
},
|
|
38
|
+
"./contracts": {
|
|
39
|
+
"import": {
|
|
40
|
+
"types": "./dist/contracts.d.ts",
|
|
41
|
+
"default": "./dist/contracts.js"
|
|
42
|
+
},
|
|
43
|
+
"require": {
|
|
44
|
+
"types": "./dist/cjs/contracts.d.ts",
|
|
45
|
+
"default": "./dist/cjs/contracts.js"
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
},
|
|
49
|
+
"haatlabs": {
|
|
50
|
+
"browser": [
|
|
51
|
+
"./contracts"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
39
54
|
"devDependencies": {
|
|
40
55
|
"testcontainers": "^12.2.0",
|
|
41
|
-
"@haatlabs-core/
|
|
42
|
-
"@haatlabs-core/
|
|
56
|
+
"@haatlabs-core/vitest-config": "0.12.1",
|
|
57
|
+
"@haatlabs-core/tsconfig": "0.12.1"
|
|
43
58
|
},
|
|
44
59
|
"dependencies": {
|
|
45
60
|
"@aws-sdk/client-s3": "^3.1146.0",
|
|
46
61
|
"@aws-sdk/s3-request-presigner": "^3.1147.0",
|
|
47
|
-
"@haatlabs-core/errors": "0.
|
|
62
|
+
"@haatlabs-core/errors": "0.12.1"
|
|
48
63
|
},
|
|
49
64
|
"scripts": {
|
|
50
65
|
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/build-cjs.mjs",
|