@pithy-sh/storage 0.1.3 → 0.1.5
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/capability.d.ts +2 -0
- package/dist/capability.js +2 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/data/share.d.ts +2 -0
- package/dist/data/share.js +2 -0
- package/dist/data/storageObject.d.ts +2 -0
- package/dist/data/storageObject.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/error/errors.d.ts +2 -0
- package/dist/error/errors.js +2 -0
- package/dist/http/guard.d.ts +2 -0
- package/dist/http/guard.js +2 -0
- package/dist/http/handlers.d.ts +2 -0
- package/dist/http/handlers.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/http/serve.d.ts +2 -0
- package/dist/http/serve.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/migrations/0001_objects.d.ts +2 -0
- package/dist/migrations/0001_objects.js +2 -0
- package/dist/object/cloudflare.d.ts +2 -0
- package/dist/object/cloudflare.js +2 -0
- package/dist/object/key.d.ts +2 -0
- package/dist/object/key.js +2 -0
- package/dist/object/multipart.d.ts +2 -0
- package/dist/object/multipart.js +2 -0
- package/dist/object/store.d.ts +2 -0
- package/dist/object/store.js +2 -0
- package/dist/provision/provisionStorage.d.ts +2 -0
- package/dist/provision/provisionStorage.js +2 -0
- package/dist/provision/resolveStorageConfig.d.ts +2 -0
- package/dist/provision/resolveStorageConfig.js +2 -0
- package/dist/quota/quota.d.ts +2 -0
- package/dist/quota/quota.js +2 -0
- package/dist/secret/registry.d.ts +2 -0
- package/dist/secret/registry.js +2 -0
- package/dist/seeds/example.d.ts +2 -0
- package/dist/seeds/example.js +2 -0
- package/dist/test-utils/liveStorage.d.ts +2 -0
- package/dist/test-utils/liveStorage.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/dist/workflows/retryPolicy.d.ts +2 -0
- package/dist/workflows/retryPolicy.js +2 -0
- package/dist/workflows/specs.d.ts +2 -0
- package/dist/workflows/specs.js +2 -0
- package/dist/workflows/sweep.d.ts +2 -0
- package/dist/workflows/sweep.js +2 -0
- package/dist/workflows/worker.d.ts +2 -0
- package/dist/workflows/worker.js +2 -0
- package/package.json +5 -5
- package/src/version.generated.ts +1 -1
package/dist/capability.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { type Capability } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { DatabaseSpecMap } from "@pithy-sh/core/src/data/databases";
|
|
3
5
|
import type { KvNamespaceSpecMap } from "@pithy-sh/core/src/kv/namespaces";
|
package/dist/capability.js
CHANGED
package/dist/config/config.d.ts
CHANGED
package/dist/config/config.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { StorageVisibility } from "../data/storageObject.js";
|
|
2
4
|
import { DEFAULT_MULTIPART_THRESHOLD_BYTES, DEFAULT_PART_SIZE_BYTES, MAX_PART_SIZE_BYTES, MAX_UPLOAD_PARTS, MIN_PART_SIZE_BYTES } from "../object/multipart.js";
|
|
3
5
|
import { z } from "zod";
|
package/dist/data/share.d.ts
CHANGED
package/dist/data/share.js
CHANGED
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
package/dist/error/errors.d.ts
CHANGED
package/dist/error/errors.js
CHANGED
package/dist/http/guard.d.ts
CHANGED
package/dist/http/guard.js
CHANGED
package/dist/http/handlers.d.ts
CHANGED
package/dist/http/handlers.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { StorageObject } from "../data/storageObject.js";
|
|
2
4
|
import { StorageForbiddenError, StorageNotFoundError, StorageShareExpiredError, StorageShareRevokedError, StorageUploadIncompleteError } from "../error/errors.js";
|
|
3
5
|
import { collectParts, needsMultipart, planMultipart } from "../object/multipart.js";
|
package/dist/http/routes.d.ts
CHANGED
package/dist/http/routes.js
CHANGED
package/dist/http/schemas.d.ts
CHANGED
package/dist/http/schemas.js
CHANGED
package/dist/http/serve.d.ts
CHANGED
package/dist/http/serve.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { StorageObject, StorageObjectStatus, StorageVisibility } from "./data/storageObject.js";
|
|
2
4
|
import { MultipartPlan, PartPlan, ReportedPart, collectParts, needsMultipart, planMultipart } from "./object/multipart.js";
|
|
3
5
|
import { StorageConfig, StorageQuota, maxObjectBytes } from "./config/config.js";
|
package/dist/object/key.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* Key **policy** for the storage capability. It lives here, apart from {@link ObjectStore}, because
|
|
3
5
|
* the store is *mechanism*: it takes an explicit key and moves bytes, and knows nothing about how
|
package/dist/object/key.js
CHANGED
package/dist/object/multipart.js
CHANGED
package/dist/object/store.d.ts
CHANGED
package/dist/object/store.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { STORAGE_CAPABILITY } from "../workflows/specs.js";
|
|
2
4
|
import { InternalError } from "@pithy-sh/core/src/error/pithyError";
|
|
3
5
|
import { resourceNames } from "@pithy-sh/core/src/naming/resourceNames";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { type WorkflowHostTemplate } from "@pithy-sh/core/src/workflow/host";
|
|
2
4
|
import type { ManagedEnvironment } from "@pithy-sh/secrets/src/scope";
|
|
3
5
|
import type { StorageConfig } from "../config/config";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { STORAGE_CAPABILITY, storageWorkflowRegistry } from "../workflows/specs.js";
|
|
2
4
|
import { hostWorkflowsFor, resolveWorkflowHost } from "@pithy-sh/core/src/workflow/host";
|
|
3
5
|
import { masterKeySecretName } from "@pithy-sh/secrets/src/provision/provisionSecrets";
|
package/dist/quota/quota.d.ts
CHANGED
package/dist/quota/quota.js
CHANGED
package/dist/secret/registry.js
CHANGED
package/dist/seeds/example.d.ts
CHANGED
package/dist/seeds/example.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { CloudflareR2Manager } from "@pithy-sh/cloudflare/src/r2/r2Manager";
|
|
2
4
|
import { type IntegrationCreds } from "@pithy-sh/cloudflare/src/test-utils/harness";
|
|
3
5
|
import { type StorageDatabase } from "../data/tables";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { storageDatabase } from "../data/tables.js";
|
|
2
4
|
import { STORAGE_R2_SECRET, storageSecretsRegistry } from "../secret/registry.js";
|
|
3
5
|
import { ObjectListing, ObjectMetadata, objectStore } from "../object/store.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/storage";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.1.5";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/storage";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.1.
|
|
7
|
+
const PACKAGE_VERSION = "0.1.5";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
package/dist/workflows/specs.js
CHANGED
package/dist/workflows/sweep.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from "cloudflare:workers";
|
|
2
4
|
import type { D1Database, R2Bucket } from "@cloudflare/workers-types";
|
|
3
5
|
import type { SecretsStoreEnv } from "@pithy-sh/secrets/src/env/bindings";
|
package/dist/workflows/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/storage",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
28
|
+
"build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
29
29
|
"typecheck": "tsc -p tsconfig.json",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:node": "vitest run --project=node",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@cloudflare/workers-types": "^5.20260729.1",
|
|
39
39
|
"@hono/zod-validator": "^0.9.0",
|
|
40
|
-
"@pithy-sh/cloudflare": "^0.1.
|
|
41
|
-
"@pithy-sh/core": "^0.
|
|
42
|
-
"@pithy-sh/secrets": "^0.1.
|
|
40
|
+
"@pithy-sh/cloudflare": "^0.1.5",
|
|
41
|
+
"@pithy-sh/core": "^0.2.0",
|
|
42
|
+
"@pithy-sh/secrets": "^0.1.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@cloudflare/vitest-plugin": "^1.0.0",
|
package/src/version.generated.ts
CHANGED