@venizia/ignis 0.4.8-9 → 0.5.0-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.
- package/dist/esm/base/applications/base.js +5 -2
- package/dist/esm/base/applications/base.js.map +1 -1
- package/dist/esm/base/middlewares/request-spy/request-spy.middleware.js +1 -1
- package/dist/esm/base/middlewares/request-spy/request-spy.middleware.js.map +1 -1
- package/dist/esm/components/api-reference/common/keys.d.ts +2 -1
- package/dist/esm/components/api-reference/common/keys.js +4 -1
- package/dist/esm/components/api-reference/common/keys.js.map +1 -1
- package/dist/esm/components/api-reference/common/types.d.ts +7 -4
- package/dist/esm/components/api-reference/common/types.js.map +1 -1
- package/dist/esm/components/api-reference/component.js +8 -3
- package/dist/esm/components/api-reference/component.js.map +1 -1
- package/dist/esm/components/auth/authenticate/component.js +13 -18
- package/dist/esm/components/auth/authenticate/component.js.map +1 -1
- package/dist/esm/components/auth/authenticate/controllers/factory.d.ts +3 -3
- package/dist/esm/components/auth/authenticate/controllers/factory.js +1 -1
- package/dist/esm/components/auth/authenticate/controllers/factory.js.map +1 -1
- package/dist/esm/components/auth/authenticate/controllers/jwks/controller.js.map +1 -1
- package/dist/esm/components/auth/authenticate/controllers/jwks/definitions.d.ts +2 -2
- package/dist/esm/components/auth/authenticate/controllers/service-certs/controller.js.map +1 -1
- package/dist/esm/components/auth/authenticate/controllers/service-certs/definitions.d.ts +2 -2
- package/dist/esm/components/auth/authenticate/services/basic/service.js +1 -1
- package/dist/esm/components/auth/authenticate/services/basic/service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.d.ts +5 -3
- package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.js +19 -2
- package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.d.ts +3 -3
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.js +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.d.ts +3 -3
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.js +2 -2
- package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/jws.service.d.ts +3 -3
- package/dist/esm/components/auth/authenticate/services/bearer/jws.service.js +1 -1
- package/dist/esm/components/auth/authenticate/services/bearer/jws.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/jwks-url-policy.d.ts +10 -22
- package/dist/esm/components/auth/authenticate/services/jwks-url-policy.js +16 -112
- package/dist/esm/components/auth/authenticate/services/jwks-url-policy.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/service/signer.service.d.ts +11 -0
- package/dist/esm/components/auth/authenticate/services/service/signer.service.js +18 -0
- package/dist/esm/components/auth/authenticate/services/service/signer.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/services/service/verifier.service.js +1 -1
- package/dist/esm/components/auth/authenticate/services/service/verifier.service.js.map +1 -1
- package/dist/esm/components/auth/authenticate/strategies/basic.strategy.js.map +1 -1
- package/dist/esm/components/auth/authenticate/strategies/jwks/issuer.js.map +1 -1
- package/dist/esm/components/auth/authenticate/strategies/jwks/verifier.js.map +1 -1
- package/dist/esm/components/auth/authenticate/strategies/jws.strategy.js.map +1 -1
- package/dist/esm/components/auth/authenticate/strategies/service.strategy.js.map +1 -1
- package/dist/esm/components/auth/authorize/adapters/common/types.d.ts +1 -2
- package/dist/esm/components/auth/authorize/adapters/common/types.js.map +1 -1
- package/dist/esm/components/auth/authorize/component.js.map +1 -1
- package/dist/esm/components/controller/grpc/common/types.d.ts +1 -1
- package/dist/esm/components/controller/grpc/common/types.js +4 -1
- package/dist/esm/components/controller/grpc/common/types.js.map +1 -1
- package/dist/esm/components/controller/grpc/grpc.component.js.map +1 -1
- package/dist/esm/components/health-check/common/keys.d.ts +4 -2
- package/dist/esm/components/health-check/common/keys.js +7 -2
- package/dist/esm/components/health-check/common/keys.js.map +1 -1
- package/dist/esm/components/health-check/common/types.d.ts +1 -1
- package/dist/esm/components/health-check/common/types.js.map +1 -1
- package/dist/esm/components/health-check/component.js +1 -3
- package/dist/esm/components/health-check/component.js.map +1 -1
- package/dist/esm/components/mail/common/constants.d.ts +32 -14
- package/dist/esm/components/mail/common/constants.js +25 -32
- package/dist/esm/components/mail/common/constants.js.map +1 -1
- package/dist/esm/components/mail/common/errors.d.ts +19 -1
- package/dist/esm/components/mail/common/errors.js +13 -1
- package/dist/esm/components/mail/common/errors.js.map +1 -1
- package/dist/esm/components/mail/common/keys.d.ts +14 -11
- package/dist/esm/components/mail/common/keys.js +34 -11
- package/dist/esm/components/mail/common/keys.js.map +1 -1
- package/dist/esm/components/mail/common/types/message.d.ts +7 -4
- package/dist/esm/components/mail/common/types/message.js.map +1 -1
- package/dist/esm/components/mail/common/types/options.d.ts +54 -10
- package/dist/esm/components/mail/common/types/options.js.map +1 -1
- package/dist/esm/components/mail/common/types/queue.d.ts +25 -12
- package/dist/esm/components/mail/common/types/queue.js.map +1 -1
- package/dist/esm/components/mail/common/types/template.d.ts +8 -4
- package/dist/esm/components/mail/common/types/template.js.map +1 -1
- package/dist/esm/components/mail/common/types/verification.d.ts +1 -0
- package/dist/esm/components/mail/common/types/verification.js.map +1 -1
- package/dist/esm/components/mail/component.js +11 -2
- package/dist/esm/components/mail/component.js.map +1 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts +3 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js +27 -33
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js.map +1 -1
- package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.d.ts +2 -0
- package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js +17 -10
- package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js.map +1 -1
- package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js +11 -6
- package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js.map +1 -1
- package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.d.ts +2 -3
- package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js +15 -6
- package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js.map +1 -1
- package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.d.ts +2 -3
- package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js +2 -2
- package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js.map +1 -1
- package/dist/esm/components/mail/providers/mail-queue-executor.provider.d.ts +2 -2
- package/dist/esm/components/mail/providers/mail-queue-executor.provider.js +7 -9
- package/dist/esm/components/mail/providers/mail-queue-executor.provider.js.map +1 -1
- package/dist/esm/components/mail/providers/mail-transporter.provider.js +7 -7
- package/dist/esm/components/mail/providers/mail-transporter.provider.js.map +1 -1
- package/dist/esm/components/mail/services/generators/numeric-code.d.ts +1 -6
- package/dist/esm/components/mail/services/generators/numeric-code.js +3 -31
- package/dist/esm/components/mail/services/generators/numeric-code.js.map +1 -1
- package/dist/esm/components/mail/services/generators/random-token.d.ts +4 -1
- package/dist/esm/components/mail/services/generators/random-token.js +9 -6
- package/dist/esm/components/mail/services/generators/random-token.js.map +1 -1
- package/dist/esm/components/mail/services/mail.service.d.ts +1 -2
- package/dist/esm/components/mail/services/mail.service.js +22 -19
- package/dist/esm/components/mail/services/mail.service.js.map +1 -1
- package/dist/esm/components/mail/services/template.service.d.ts +8 -6
- package/dist/esm/components/mail/services/template.service.js +34 -33
- package/dist/esm/components/mail/services/template.service.js.map +1 -1
- package/dist/esm/components/mail/utilities/attachment.utility.js +8 -6
- package/dist/esm/components/mail/utilities/attachment.utility.js.map +1 -1
- package/dist/esm/components/mail/utilities/header.utility.d.ts +14 -0
- package/dist/esm/components/mail/utilities/header.utility.js +44 -0
- package/dist/esm/components/mail/utilities/header.utility.js.map +1 -0
- package/dist/esm/components/mail/utilities/index.d.ts +2 -0
- package/dist/esm/components/mail/utilities/index.js +2 -0
- package/dist/esm/components/mail/utilities/index.js.map +1 -1
- package/dist/esm/components/mail/utilities/mime.utility.d.ts +5 -1
- package/dist/esm/components/mail/utilities/mime.utility.js +12 -58
- package/dist/esm/components/mail/utilities/mime.utility.js.map +1 -1
- package/dist/esm/components/mail/utilities/template-renderer.utility.d.ts +31 -0
- package/dist/esm/components/mail/utilities/template-renderer.utility.js +184 -0
- package/dist/esm/components/mail/utilities/template-renderer.utility.js.map +1 -0
- package/dist/esm/components/mail/utilities/type.utility.d.ts +2 -3
- package/dist/esm/components/mail/utilities/type.utility.js +6 -7
- package/dist/esm/components/mail/utilities/type.utility.js.map +1 -1
- package/dist/esm/components/request-tracker/component.d.ts +2 -1
- package/dist/esm/components/request-tracker/component.js +5 -5
- package/dist/esm/components/request-tracker/component.js.map +1 -1
- package/dist/esm/components/server-info/common/keys.d.ts +2 -1
- package/dist/esm/components/server-info/common/keys.js +4 -1
- package/dist/esm/components/server-info/common/keys.js.map +1 -1
- package/dist/esm/components/server-info/common/types.d.ts +1 -1
- package/dist/esm/components/server-info/common/types.js.map +1 -1
- package/dist/esm/components/server-info/component.js +1 -3
- package/dist/esm/components/server-info/component.js.map +1 -1
- package/dist/esm/components/socket-io/common/keys.d.ts +9 -6
- package/dist/esm/components/socket-io/common/keys.js +19 -6
- package/dist/esm/components/socket-io/common/keys.js.map +1 -1
- package/dist/esm/components/socket-io/component.js +1 -1
- package/dist/esm/components/socket-io/component.js.map +1 -1
- package/dist/esm/components/socket-io/handlers/bun.handler.d.ts +13 -3
- package/dist/esm/components/socket-io/handlers/bun.handler.js.map +1 -1
- package/dist/esm/components/static-asset/common/constants.d.ts +51 -24
- package/dist/esm/components/static-asset/common/constants.js +75 -47
- package/dist/esm/components/static-asset/common/constants.js.map +1 -1
- package/dist/esm/components/static-asset/common/errors.d.ts +30 -35
- package/dist/esm/components/static-asset/common/errors.js +31 -33
- package/dist/esm/components/static-asset/common/errors.js.map +1 -1
- package/dist/esm/components/static-asset/common/index.d.ts +1 -1
- package/dist/esm/components/static-asset/common/index.js +1 -1
- package/dist/esm/components/static-asset/common/index.js.map +1 -1
- package/dist/esm/components/static-asset/common/keys.d.ts +14 -2
- package/dist/esm/components/static-asset/common/keys.js +17 -2
- package/dist/esm/components/static-asset/common/keys.js.map +1 -1
- package/dist/esm/components/static-asset/common/types.d.ts +267 -147
- package/dist/esm/components/static-asset/common/types.js.map +1 -1
- package/dist/esm/components/static-asset/common/validation.d.ts +10 -0
- package/dist/esm/components/static-asset/common/validation.js +8 -0
- package/dist/esm/components/static-asset/common/validation.js.map +1 -0
- package/dist/esm/components/static-asset/component.d.ts +4 -2
- package/dist/esm/components/static-asset/component.js +27 -31
- package/dist/esm/components/static-asset/component.js.map +1 -1
- package/dist/esm/components/static-asset/controller/factory.d.ts +37 -79
- package/dist/esm/components/static-asset/controller/factory.js +26 -917
- package/dist/esm/components/static-asset/controller/factory.js.map +1 -1
- package/dist/esm/components/static-asset/controller/index.d.ts +1 -0
- package/dist/esm/components/static-asset/controller/index.js +1 -0
- package/dist/esm/components/static-asset/controller/index.js.map +1 -1
- package/dist/esm/components/static-asset/controller/routes/context.d.ts +62 -0
- package/dist/esm/components/static-asset/controller/routes/context.js +45 -0
- package/dist/esm/components/static-asset/controller/routes/context.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/definition.d.ts +40 -0
- package/dist/esm/components/static-asset/controller/routes/definition.js +83 -0
- package/dist/esm/components/static-asset/controller/routes/definition.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.d.ts +3 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.js +153 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/labels.d.ts +16 -0
- package/dist/esm/components/static-asset/controller/routes/labels.js +19 -0
- package/dist/esm/components/static-asset/controller/routes/labels.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/objects.d.ts +7 -0
- package/dist/esm/components/static-asset/controller/routes/objects.js +193 -0
- package/dist/esm/components/static-asset/controller/routes/objects.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/serve.d.ts +29 -0
- package/dist/esm/components/static-asset/controller/routes/serve.js +152 -0
- package/dist/esm/components/static-asset/controller/routes/serve.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/table.d.ts +12 -0
- package/dist/esm/components/static-asset/controller/routes/table.js +52 -0
- package/dist/esm/components/static-asset/controller/routes/table.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/upload.d.ts +10 -0
- package/dist/esm/components/static-asset/controller/routes/upload.js +175 -0
- package/dist/esm/components/static-asset/controller/routes/upload.js.map +1 -0
- package/dist/esm/components/static-asset/index.d.ts +2 -1
- package/dist/esm/components/static-asset/index.js +2 -1
- package/dist/esm/components/static-asset/index.js.map +1 -1
- package/dist/esm/components/static-asset/models/base.model.d.ts +4 -4
- package/dist/esm/components/static-asset/models/base.model.js.map +1 -1
- package/dist/esm/components/static-asset/services/commitment.service.d.ts +103 -0
- package/dist/esm/components/static-asset/services/commitment.service.js +252 -0
- package/dist/esm/components/static-asset/services/commitment.service.js.map +1 -0
- package/dist/esm/components/static-asset/services/index.d.ts +3 -0
- package/dist/esm/components/static-asset/services/index.js +3 -0
- package/dist/esm/components/static-asset/services/index.js.map +1 -0
- package/dist/esm/components/static-asset/services/policy.service.d.ts +45 -0
- package/dist/esm/components/static-asset/services/policy.service.js +104 -0
- package/dist/esm/components/static-asset/services/policy.service.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/commit-token.utility.d.ts +28 -0
- package/dist/esm/components/static-asset/utilities/commit-token.utility.js +112 -0
- package/dist/esm/components/static-asset/utilities/commit-token.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.d.ts +69 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.js +160 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/index.d.ts +6 -0
- package/dist/esm/components/static-asset/utilities/index.js +6 -0
- package/dist/esm/components/static-asset/utilities/index.js.map +1 -0
- package/dist/esm/components/static-asset/{ingest.d.ts → utilities/ingest.utility.d.ts} +8 -8
- package/dist/esm/components/static-asset/{ingest.js → utilities/ingest.utility.js} +21 -23
- package/dist/esm/components/static-asset/utilities/ingest.utility.js.map +1 -0
- package/dist/esm/components/static-asset/{controller/key-scope.d.ts → utilities/key-scope.utility.d.ts} +21 -2
- package/dist/esm/components/static-asset/utilities/key-scope.utility.js +74 -0
- package/dist/esm/components/static-asset/utilities/key-scope.utility.js.map +1 -0
- package/dist/esm/components/static-asset/{controller/meta-link.d.ts → utilities/meta-link.utility.d.ts} +9 -9
- package/dist/esm/components/static-asset/{controller/meta-link.js → utilities/meta-link.utility.js} +10 -10
- package/dist/esm/components/static-asset/utilities/meta-link.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/object-link.utility.d.ts +16 -0
- package/dist/esm/components/static-asset/utilities/object-link.utility.js +20 -0
- package/dist/esm/components/static-asset/utilities/object-link.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.d.ts +39 -0
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.js +53 -0
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/route-options.utility.d.ts +43 -0
- package/dist/esm/components/static-asset/utilities/route-options.utility.js +71 -0
- package/dist/esm/components/static-asset/utilities/route-options.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.d.ts +5 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js +5 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js.map +1 -0
- package/dist/esm/components/websocket/common/keys.d.ts +12 -10
- package/dist/esm/components/websocket/common/keys.js +31 -10
- package/dist/esm/components/websocket/common/keys.js.map +1 -1
- package/dist/esm/components/websocket/component.js.map +1 -1
- package/dist/esm/testing/assert-application-boots.d.ts +2 -2
- package/dist/esm/testing/assert-application-boots.js +6 -2
- package/dist/esm/testing/assert-application-boots.js.map +1 -1
- package/dist/presets/app/preset.json +4 -4
- package/dist/presets/lib/preset.json +3 -3
- package/dist/presets/shared/preset.json +1 -1
- package/package.json +8 -8
- package/dist/esm/components/static-asset/common/commit-token.d.ts +0 -28
- package/dist/esm/components/static-asset/common/commit-token.js +0 -48
- package/dist/esm/components/static-asset/common/commit-token.js.map +0 -1
- package/dist/esm/components/static-asset/controller/base.definition.d.ts +0 -30
- package/dist/esm/components/static-asset/controller/base.definition.js +0 -307
- package/dist/esm/components/static-asset/controller/base.definition.js.map +0 -1
- package/dist/esm/components/static-asset/controller/key-scope.js +0 -41
- package/dist/esm/components/static-asset/controller/key-scope.js.map +0 -1
- package/dist/esm/components/static-asset/controller/meta-link.js.map +0 -1
- package/dist/esm/components/static-asset/controller/route-options.d.ts +0 -29
- package/dist/esm/components/static-asset/controller/route-options.js +0 -47
- package/dist/esm/components/static-asset/controller/route-options.js.map +0 -1
- package/dist/esm/components/static-asset/ingest.js.map +0 -1
|
@@ -3,7 +3,7 @@ import type { TRegisterErrors } from '@venizia/ignis-helpers/core';
|
|
|
3
3
|
export declare const StaticAssetErrors: {
|
|
4
4
|
readonly UPLOAD_NOT_AUTHORIZED: {
|
|
5
5
|
readonly message: {
|
|
6
|
-
readonly text: "Not allowed to
|
|
6
|
+
readonly text: "Not allowed to upload";
|
|
7
7
|
readonly code: "core.static_asset.upload_not_authorized";
|
|
8
8
|
};
|
|
9
9
|
readonly statusCode: 403;
|
|
@@ -35,60 +35,63 @@ export declare const StaticAssetErrors: {
|
|
|
35
35
|
readonly statusCode: 400;
|
|
36
36
|
readonly category: "validation";
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
39
|
-
readonly
|
|
38
|
+
/** The pending object is not the one that was read: it was overwritten or removed after the pin. Raised by a pinned read and by the commit copy. */
|
|
39
|
+
readonly UPLOAD_CHANGED: {
|
|
40
40
|
readonly message: {
|
|
41
|
-
readonly text: "
|
|
42
|
-
readonly code: "core.static_asset.
|
|
41
|
+
readonly text: "The uploaded file changed after it was validated";
|
|
42
|
+
readonly code: "core.static_asset.upload_changed";
|
|
43
43
|
};
|
|
44
|
-
readonly statusCode:
|
|
44
|
+
readonly statusCode: 409;
|
|
45
45
|
readonly category: "validation";
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
/** The destination already holds an object: the token was committed once, and a second commit would overwrite it. */
|
|
48
|
+
readonly UPLOAD_ALREADY_COMMITTED: {
|
|
48
49
|
readonly message: {
|
|
49
|
-
readonly text: "
|
|
50
|
-
readonly code: "core.static_asset.
|
|
50
|
+
readonly text: "The upload was already committed";
|
|
51
|
+
readonly code: "core.static_asset.upload_already_committed";
|
|
51
52
|
};
|
|
52
|
-
readonly statusCode:
|
|
53
|
+
readonly statusCode: 409;
|
|
53
54
|
readonly category: "validation";
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
+
/** The metadata a policy would sign is not allowed: oversized, or sent by a client with no `resolvers.metadata` to read it. */
|
|
57
|
+
readonly UPLOAD_METADATA_INVALID: {
|
|
56
58
|
readonly message: {
|
|
57
|
-
readonly text: "Invalid
|
|
58
|
-
readonly code: "core.static_asset.
|
|
59
|
+
readonly text: "Invalid upload metadata";
|
|
60
|
+
readonly code: "core.static_asset.upload_metadata_invalid";
|
|
59
61
|
};
|
|
60
62
|
readonly statusCode: 400;
|
|
61
63
|
readonly category: "validation";
|
|
62
64
|
};
|
|
63
|
-
/**
|
|
64
|
-
readonly
|
|
65
|
+
/** With a `validation` on, `commit` takes the token `upload-validate` returned, not the one the policy issued. */
|
|
66
|
+
readonly UPLOAD_NOT_VALIDATED: {
|
|
65
67
|
readonly message: {
|
|
66
|
-
readonly text: "
|
|
67
|
-
readonly code: "core.static_asset.
|
|
68
|
+
readonly text: "The upload has not been validated";
|
|
69
|
+
readonly code: "core.static_asset.upload_not_validated";
|
|
68
70
|
};
|
|
69
|
-
readonly statusCode:
|
|
71
|
+
readonly statusCode: 422;
|
|
70
72
|
readonly category: "validation";
|
|
71
73
|
};
|
|
72
|
-
readonly
|
|
74
|
+
readonly BUCKET_NAME_INVALID: {
|
|
73
75
|
readonly message: {
|
|
74
|
-
readonly text: "Invalid
|
|
75
|
-
readonly code: "core.static_asset.
|
|
76
|
+
readonly text: "Invalid bucket name";
|
|
77
|
+
readonly code: "core.static_asset.bucket_name_invalid";
|
|
76
78
|
};
|
|
77
79
|
readonly statusCode: 400;
|
|
78
80
|
readonly category: "validation";
|
|
79
81
|
};
|
|
80
|
-
readonly
|
|
82
|
+
readonly OBJECT_NAME_INVALID: {
|
|
81
83
|
readonly message: {
|
|
82
|
-
readonly text: "Invalid
|
|
83
|
-
readonly code: "core.static_asset.
|
|
84
|
+
readonly text: "Invalid object name or path";
|
|
85
|
+
readonly code: "core.static_asset.object_name_invalid";
|
|
84
86
|
};
|
|
85
87
|
readonly statusCode: 400;
|
|
86
88
|
readonly category: "validation";
|
|
87
89
|
};
|
|
88
|
-
|
|
90
|
+
/** The application's naming hook produced a key outside the entry's `keyPrefix`; nothing is written. */
|
|
91
|
+
readonly OBJECT_KEY_OUT_OF_SCOPE: {
|
|
89
92
|
readonly message: {
|
|
90
|
-
readonly text: "
|
|
91
|
-
readonly code: "core.static_asset.
|
|
93
|
+
readonly text: "Object key is outside the key prefix of this controller";
|
|
94
|
+
readonly code: "core.static_asset.object_key_out_of_scope";
|
|
92
95
|
};
|
|
93
96
|
readonly statusCode: 400;
|
|
94
97
|
readonly category: "validation";
|
|
@@ -101,14 +104,6 @@ export declare const StaticAssetErrors: {
|
|
|
101
104
|
readonly statusCode: 400;
|
|
102
105
|
readonly category: "validation";
|
|
103
106
|
};
|
|
104
|
-
readonly MAX_KEYS_INVALID: {
|
|
105
|
-
readonly message: {
|
|
106
|
-
readonly text: "Invalid maxKeys - expected a positive integer";
|
|
107
|
-
readonly code: "core.static_asset.max_keys_invalid";
|
|
108
|
-
};
|
|
109
|
-
readonly statusCode: 400;
|
|
110
|
-
readonly category: "validation";
|
|
111
|
-
};
|
|
112
107
|
};
|
|
113
108
|
/** Registers these codes with the shared key registry so a consumer gets autocomplete on `messageCode`. */
|
|
114
109
|
declare module '@venizia/ignis-helpers' {
|
|
@@ -4,7 +4,7 @@ import { HTTP } from '@venizia/ignis-helpers/common';
|
|
|
4
4
|
export const StaticAssetErrors = {
|
|
5
5
|
UPLOAD_NOT_AUTHORIZED: {
|
|
6
6
|
message: {
|
|
7
|
-
text: 'Not allowed to
|
|
7
|
+
text: 'Not allowed to upload',
|
|
8
8
|
code: 'core.static_asset.upload_not_authorized',
|
|
9
9
|
},
|
|
10
10
|
statusCode: HTTP.ResultCodes.RS_4.Forbidden,
|
|
@@ -30,54 +30,60 @@ export const StaticAssetErrors = {
|
|
|
30
30
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
31
31
|
category: ErrorScopes.VALIDATION,
|
|
32
32
|
},
|
|
33
|
-
/**
|
|
34
|
-
|
|
33
|
+
/** The pending object is not the one that was read: it was overwritten or removed after the pin. Raised by a pinned read and by the commit copy. */
|
|
34
|
+
UPLOAD_CHANGED: {
|
|
35
35
|
message: {
|
|
36
|
-
text: '
|
|
37
|
-
code: 'core.static_asset.
|
|
36
|
+
text: 'The uploaded file changed after it was validated',
|
|
37
|
+
code: 'core.static_asset.upload_changed',
|
|
38
38
|
},
|
|
39
|
-
statusCode: HTTP.ResultCodes.RS_4.
|
|
39
|
+
statusCode: HTTP.ResultCodes.RS_4.Conflict,
|
|
40
40
|
category: ErrorScopes.VALIDATION,
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
/** The destination already holds an object: the token was committed once, and a second commit would overwrite it. */
|
|
43
|
+
UPLOAD_ALREADY_COMMITTED: {
|
|
44
|
+
message: {
|
|
45
|
+
text: 'The upload was already committed',
|
|
46
|
+
code: 'core.static_asset.upload_already_committed',
|
|
47
|
+
},
|
|
48
|
+
statusCode: HTTP.ResultCodes.RS_4.Conflict,
|
|
45
49
|
category: ErrorScopes.VALIDATION,
|
|
46
50
|
},
|
|
47
|
-
|
|
51
|
+
/** The metadata a policy would sign is not allowed: oversized, or sent by a client with no `resolvers.metadata` to read it. */
|
|
52
|
+
UPLOAD_METADATA_INVALID: {
|
|
48
53
|
message: {
|
|
49
|
-
text: 'Invalid
|
|
50
|
-
code: 'core.static_asset.
|
|
54
|
+
text: 'Invalid upload metadata',
|
|
55
|
+
code: 'core.static_asset.upload_metadata_invalid',
|
|
51
56
|
},
|
|
52
57
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
53
58
|
category: ErrorScopes.VALIDATION,
|
|
54
59
|
},
|
|
55
|
-
/**
|
|
56
|
-
|
|
60
|
+
/** With a `validation` on, `commit` takes the token `upload-validate` returned, not the one the policy issued. */
|
|
61
|
+
UPLOAD_NOT_VALIDATED: {
|
|
57
62
|
message: {
|
|
58
|
-
text: '
|
|
59
|
-
code: 'core.static_asset.
|
|
63
|
+
text: 'The upload has not been validated',
|
|
64
|
+
code: 'core.static_asset.upload_not_validated',
|
|
60
65
|
},
|
|
61
|
-
statusCode: HTTP.ResultCodes.RS_4.
|
|
66
|
+
statusCode: HTTP.ResultCodes.RS_4.UnprocessableEntity,
|
|
62
67
|
category: ErrorScopes.VALIDATION,
|
|
63
68
|
},
|
|
64
|
-
|
|
65
|
-
message: { text: 'Invalid
|
|
69
|
+
BUCKET_NAME_INVALID: {
|
|
70
|
+
message: { text: 'Invalid bucket name', code: 'core.static_asset.bucket_name_invalid' },
|
|
66
71
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
67
72
|
category: ErrorScopes.VALIDATION,
|
|
68
73
|
},
|
|
69
|
-
|
|
74
|
+
OBJECT_NAME_INVALID: {
|
|
70
75
|
message: {
|
|
71
|
-
text: 'Invalid
|
|
72
|
-
code: 'core.static_asset.
|
|
76
|
+
text: 'Invalid object name or path',
|
|
77
|
+
code: 'core.static_asset.object_name_invalid',
|
|
73
78
|
},
|
|
74
79
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
75
80
|
category: ErrorScopes.VALIDATION,
|
|
76
81
|
},
|
|
77
|
-
|
|
82
|
+
/** The application's naming hook produced a key outside the entry's `keyPrefix`; nothing is written. */
|
|
83
|
+
OBJECT_KEY_OUT_OF_SCOPE: {
|
|
78
84
|
message: {
|
|
79
|
-
text: '
|
|
80
|
-
code: 'core.static_asset.
|
|
85
|
+
text: 'Object key is outside the key prefix of this controller',
|
|
86
|
+
code: 'core.static_asset.object_key_out_of_scope',
|
|
81
87
|
},
|
|
82
88
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
83
89
|
category: ErrorScopes.VALIDATION,
|
|
@@ -87,13 +93,5 @@ export const StaticAssetErrors = {
|
|
|
87
93
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
88
94
|
category: ErrorScopes.VALIDATION,
|
|
89
95
|
},
|
|
90
|
-
MAX_KEYS_INVALID: {
|
|
91
|
-
message: {
|
|
92
|
-
text: 'Invalid maxKeys - expected a positive integer',
|
|
93
|
-
code: 'core.static_asset.max_keys_invalid',
|
|
94
|
-
},
|
|
95
|
-
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
96
|
-
category: ErrorScopes.VALIDATION,
|
|
97
|
-
},
|
|
98
96
|
};
|
|
99
97
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,uIAAuI;AACvI,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,qBAAqB,EAAE;QACrB,OAAO,EAAE;YACP,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/errors.ts"],"names":[],"mappings":"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","sourcesContent":["import type { TErrorDefinition, TRegisterErrors } from '@venizia/ignis-helpers/core';\nimport { ErrorScopes } from '@venizia/ignis-helpers/core';\nimport { HTTP } from '@venizia/ignis-helpers/common';\n\n/** Codes a client branches on for a rejected static-asset request. A throw site may override `message` to name the offending value. */\nexport const StaticAssetErrors = {\n UPLOAD_NOT_AUTHORIZED: {\n message: {\n text: 'Not allowed to upload',\n code: 'core.static_asset.upload_not_authorized',\n },\n statusCode: HTTP.ResultCodes.RS_4.Forbidden,\n category: ErrorScopes.VALIDATION,\n },\n /** Both upload paths - one condition, one code to branch on. */\n UPLOAD_TOO_LARGE: {\n message: {\n text: 'File is larger than the maximum allowed',\n code: 'core.static_asset.upload_too_large',\n },\n statusCode: HTTP.ResultCodes.RS_4.ContentTooLarge,\n category: ErrorScopes.VALIDATION,\n },\n /** Deliberately not 404 and deliberately not \"expired\": a caller learns only that the token is no good, never whether the key it names exists. */\n INVALID_COMMIT_TOKEN: {\n message: { text: 'Invalid commit token', code: 'core.static_asset.invalid_commit_token' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n EXPIRED_COMMIT_TOKEN: {\n message: { text: 'Commit token has expired', code: 'core.static_asset.expired_commit_token' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n /** The pending object is not the one that was read: it was overwritten or removed after the pin. Raised by a pinned read and by the commit copy. */\n UPLOAD_CHANGED: {\n message: {\n text: 'The uploaded file changed after it was validated',\n code: 'core.static_asset.upload_changed',\n },\n statusCode: HTTP.ResultCodes.RS_4.Conflict,\n category: ErrorScopes.VALIDATION,\n },\n /** The destination already holds an object: the token was committed once, and a second commit would overwrite it. */\n UPLOAD_ALREADY_COMMITTED: {\n message: {\n text: 'The upload was already committed',\n code: 'core.static_asset.upload_already_committed',\n },\n statusCode: HTTP.ResultCodes.RS_4.Conflict,\n category: ErrorScopes.VALIDATION,\n },\n /** The metadata a policy would sign is not allowed: oversized, or sent by a client with no `resolvers.metadata` to read it. */\n UPLOAD_METADATA_INVALID: {\n message: {\n text: 'Invalid upload metadata',\n code: 'core.static_asset.upload_metadata_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n /** With a `validation` on, `commit` takes the token `upload-validate` returned, not the one the policy issued. */\n UPLOAD_NOT_VALIDATED: {\n message: {\n text: 'The upload has not been validated',\n code: 'core.static_asset.upload_not_validated',\n },\n statusCode: HTTP.ResultCodes.RS_4.UnprocessableEntity,\n category: ErrorScopes.VALIDATION,\n },\n BUCKET_NAME_INVALID: {\n message: { text: 'Invalid bucket name', code: 'core.static_asset.bucket_name_invalid' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n OBJECT_NAME_INVALID: {\n message: {\n text: 'Invalid object name or path',\n code: 'core.static_asset.object_name_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n /** The application's naming hook produced a key outside the entry's `keyPrefix`; nothing is written. */\n OBJECT_KEY_OUT_OF_SCOPE: {\n message: {\n text: 'Object key is outside the key prefix of this controller',\n code: 'core.static_asset.object_key_out_of_scope',\n },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n FILE_EMPTY: {\n message: { text: 'Empty file content', code: 'core.static_asset.file_empty' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n} as const satisfies Record<string, TErrorDefinition>;\n\n/** Registers these codes with the shared key registry so a consumer gets autocomplete on `messageCode`. */\ndeclare module '@venizia/ignis-helpers' {\n interface IErrorKeyRegistry extends TRegisterErrors<typeof StaticAssetErrors> {}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC","sourcesContent":["export * from './errors';\nexport * from './constants';\nexport * from './keys';\nexport * from './types';\nexport * from './validation';\n"]}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import type { TBindingKey } from '@venizia/ignis-inversion';
|
|
2
|
+
import type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from '../models/index.js';
|
|
3
|
+
import type { StaticAssetUploadCommitService, StaticAssetUploadPolicyService } from '../services/index.js';
|
|
4
|
+
import type { TStaticAssetComponentOptions } from './types.js';
|
|
1
5
|
/** Container keys of the static asset component. */
|
|
2
|
-
export declare class
|
|
6
|
+
export declare class StaticAssetBindingKeys {
|
|
3
7
|
/** The options an application registers through `configs.artifacts` land here, because an artifact index carries classes and no options. `application.component(StaticAssetComponent, { options })` passes them directly and wins over this key. */
|
|
4
|
-
static readonly
|
|
8
|
+
static readonly STATIC_ASSET_OPTIONS: TBindingKey<TStaticAssetComponentOptions<TMetaLinkCompatibleSchema>>;
|
|
9
|
+
/** The `StaticAssetUploadPolicyService` of one options entry, bound only for an entry that turns `directUpload` on. `name` is the entry's KEY in the options object, not the controller name. */
|
|
10
|
+
static policyService(opts: {
|
|
11
|
+
name: string;
|
|
12
|
+
}): TBindingKey<StaticAssetUploadPolicyService>;
|
|
13
|
+
/** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */
|
|
14
|
+
static commitService<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema>(opts: {
|
|
15
|
+
name: string;
|
|
16
|
+
}): TBindingKey<StaticAssetUploadCommitService<Schema>>;
|
|
5
17
|
}
|
|
6
18
|
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
import { BindingKeys } from '@venizia/ignis-inversion';
|
|
1
2
|
/** Container keys of the static asset component. */
|
|
2
|
-
export class
|
|
3
|
+
export class StaticAssetBindingKeys {
|
|
3
4
|
/** The options an application registers through `configs.artifacts` land here, because an artifact index carries classes and no options. `application.component(StaticAssetComponent, { options })` passes them directly and wins over this key. */
|
|
4
|
-
static { this.
|
|
5
|
+
static { this.STATIC_ASSET_OPTIONS = BindingKeys.build({
|
|
6
|
+
key: '@app/static-asset/options',
|
|
7
|
+
}); }
|
|
8
|
+
/** The `StaticAssetUploadPolicyService` of one options entry, bound only for an entry that turns `directUpload` on. `name` is the entry's KEY in the options object, not the controller name. */
|
|
9
|
+
static policyService(opts) {
|
|
10
|
+
return BindingKeys.build({
|
|
11
|
+
key: `@app/static-asset/policy-service/${opts.name}`,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */
|
|
15
|
+
static commitService(opts) {
|
|
16
|
+
return BindingKeys.build({
|
|
17
|
+
key: `@app/static-asset/commit-service/${opts.name}`,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
5
20
|
}
|
|
6
21
|
//# sourceMappingURL=keys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/keys.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMvD,oDAAoD;AACpD,MAAM,OAAO,sBAAsB;IACjC,oPAAoP;aACpO,yBAAoB,GAAG,WAAW,CAAC,KAAK,CAEtD;QACA,GAAG,EAAE,2BAA2B;KACjC,CAAC,CAAC;IAEH,iMAAiM;IACjM,MAAM,CAAC,aAAa,CAAC,IAAsB;QACzC,OAAO,WAAW,CAAC,KAAK,CAAiC;YACvD,GAAG,EAAE,oCAAoC,IAAI,CAAC,IAAI,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAED,gGAAgG;IAChG,MAAM,CAAC,aAAa,CAA6D,IAEhF;QACC,OAAO,WAAW,CAAC,KAAK,CAAyC;YAC/D,GAAG,EAAE,oCAAoC,IAAI,CAAC,IAAI,EAAE;SACrD,CAAC,CAAC;IACL,CAAC","sourcesContent":["import { BindingKeys } from '@venizia/ignis-inversion';\nimport type { TBindingKey } from '@venizia/ignis-inversion';\nimport type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from '../models';\nimport type { StaticAssetUploadCommitService, StaticAssetUploadPolicyService } from '../services';\nimport type { TStaticAssetComponentOptions } from './types';\n\n/** Container keys of the static asset component. */\nexport class StaticAssetBindingKeys {\n /** The options an application registers through `configs.artifacts` land here, because an artifact index carries classes and no options. `application.component(StaticAssetComponent, { options })` passes them directly and wins over this key. */\n static readonly STATIC_ASSET_OPTIONS = BindingKeys.build<\n TStaticAssetComponentOptions<TMetaLinkCompatibleSchema>\n >({\n key: '@app/static-asset/options',\n });\n\n /** The `StaticAssetUploadPolicyService` of one options entry, bound only for an entry that turns `directUpload` on. `name` is the entry's KEY in the options object, not the controller name. */\n static policyService(opts: { name: string }): TBindingKey<StaticAssetUploadPolicyService> {\n return BindingKeys.build<StaticAssetUploadPolicyService>({\n key: `@app/static-asset/policy-service/${opts.name}`,\n });\n }\n\n /** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */\n static commitService<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema>(opts: {\n name: string;\n }): TBindingKey<StaticAssetUploadCommitService<Schema>> {\n return BindingKeys.build<StaticAssetUploadCommitService<Schema>>({\n key: `@app/static-asset/commit-service/${opts.name}`,\n });\n }\n}\n"]}
|