@venizia/ignis 0.4.8-10 → 0.4.8-12
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/components/auth/authenticate/component.js +1 -1
- package/dist/esm/components/auth/authenticate/component.js.map +1 -1
- package/dist/esm/components/auth/authenticate/controllers/factory.d.ts +1 -1
- 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/mail/common/types/queue.d.ts +8 -4
- package/dist/esm/components/mail/common/types/queue.js.map +1 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts +1 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js +2 -16
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js.map +1 -1
- package/dist/esm/components/static-asset/common/constants.d.ts +43 -24
- package/dist/esm/components/static-asset/common/constants.js +74 -47
- package/dist/esm/components/static-asset/common/constants.js.map +1 -1
- package/dist/esm/components/static-asset/common/errors.d.ts +11 -43
- package/dist/esm/components/static-asset/common/errors.js +11 -40
- 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 +10 -2
- package/dist/esm/components/static-asset/common/keys.js +10 -2
- package/dist/esm/components/static-asset/common/keys.js.map +1 -1
- package/dist/esm/components/static-asset/common/types.d.ts +196 -141
- 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 +26 -31
- package/dist/esm/components/static-asset/component.js.map +1 -1
- package/dist/esm/components/static-asset/controller/factory.d.ts +188 -66
- package/dist/esm/components/static-asset/controller/factory.js +34 -912
- package/dist/esm/components/static-asset/controller/factory.js.map +1 -1
- package/dist/esm/components/static-asset/controller/routes/context.d.ts +61 -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 +74 -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 +125 -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 +17 -0
- package/dist/esm/components/static-asset/controller/routes/serve.js +127 -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 +174 -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 +73 -0
- package/dist/esm/components/static-asset/services/commitment.service.js +141 -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 +41 -0
- package/dist/esm/components/static-asset/services/policy.service.js +84 -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 +26 -0
- package/dist/esm/components/static-asset/utilities/commit-token.utility.js +78 -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 +153 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/index.d.ts +5 -0
- package/dist/esm/components/static-asset/utilities/index.js +5 -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} +5 -5
- package/dist/esm/components/static-asset/{ingest.js → utilities/ingest.utility.js} +12 -10
- 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} +4 -4
- 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/route-options.utility.d.ts +44 -0
- package/dist/esm/components/static-asset/utilities/route-options.utility.js +85 -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 +13 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js +16 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js.map +1 -0
- 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 +6 -6
- 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
|
@@ -1,55 +1,82 @@
|
|
|
1
1
|
import { HTTP } from '@venizia/ignis-helpers/common';
|
|
2
|
-
/**
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
2
|
+
/** The response headers a controller echoes from the backend's metadata. */
|
|
3
|
+
export class StaticAssetHeaders {
|
|
4
|
+
/** `content-type` is absent on purpose: it is decided from the object name, never from the backend. */
|
|
5
|
+
static { this.ALLOWED = [
|
|
6
|
+
HTTP.Headers.CONTENT_ENCODING,
|
|
7
|
+
HTTP.Headers.CACHE_CONTROL,
|
|
8
|
+
HTTP.Headers.ETAG,
|
|
9
|
+
HTTP.Headers.LAST_MODIFIED,
|
|
10
|
+
]; }
|
|
11
|
+
/** Of what a controller sends with every object. */
|
|
12
|
+
static { this.NOSNIFF = 'nosniff'; }
|
|
13
|
+
static { this.CSP_SANDBOX = 'sandbox'; }
|
|
14
|
+
static { this.RANGE_UNIT = 'bytes'; }
|
|
15
|
+
}
|
|
16
|
+
/** Content types the controller serves. */
|
|
17
|
+
export class StaticAssetContentTypes {
|
|
18
|
+
/**
|
|
19
|
+
* Types the controller will let a browser render, keyed off the object name. Anything absent here is
|
|
20
|
+
* served as an attachment, because a renderable upload on the API origin is stored XSS - and `nosniff`
|
|
21
|
+
* cannot stop a type we declared ourselves. `image/svg+xml` is deliberately excluded: SVG carries script.
|
|
22
|
+
*/
|
|
23
|
+
static { this.RENDERABLE = new Set([
|
|
24
|
+
HTTP.HeaderValues.IMAGE_PNG,
|
|
25
|
+
HTTP.HeaderValues.IMAGE_JPEG,
|
|
26
|
+
HTTP.HeaderValues.IMAGE_GIF,
|
|
27
|
+
HTTP.HeaderValues.IMAGE_WEBP,
|
|
28
|
+
'image/avif',
|
|
29
|
+
'image/bmp',
|
|
30
|
+
'image/x-icon',
|
|
31
|
+
'video/mp4',
|
|
32
|
+
'video/webm',
|
|
33
|
+
'audio/mpeg',
|
|
34
|
+
'audio/wav',
|
|
35
|
+
'audio/ogg',
|
|
36
|
+
HTTP.HeaderValues.APPLICATION_PDF,
|
|
37
|
+
HTTP.HeaderValues.TEXT_PLAIN,
|
|
38
|
+
HTTP.HeaderValues.TEXT_CSV,
|
|
39
|
+
]); }
|
|
40
|
+
}
|
|
41
|
+
/** The built-in routes of a generated controller, the keys of `routes`. */
|
|
42
|
+
export class StaticAssetRouteKeys {
|
|
43
|
+
static { this.UPLOAD = 'upload'; }
|
|
44
|
+
static { this.LIST_OBJECTS = 'listObjects'; }
|
|
45
|
+
static { this.DELETE_OBJECT = 'deleteObject'; }
|
|
46
|
+
static { this.GET_OBJECT_BY_NAME = 'getObjectByName'; }
|
|
47
|
+
static { this.DOWNLOAD_OBJECT_BY_NAME = 'downloadObjectByName'; }
|
|
48
|
+
static { this.UPLOAD_POLICY = 'uploadPolicy'; }
|
|
49
|
+
static { this.UPLOAD_COMMIT = 'uploadCommit'; }
|
|
50
|
+
static { this.UPLOAD_VALIDATE = 'uploadValidate'; }
|
|
51
|
+
static { this.RECREATE_META_LINK = 'recreateMetaLink'; }
|
|
52
|
+
/** Every key, in registration order. */
|
|
53
|
+
static { this.ALL = [
|
|
54
|
+
StaticAssetRouteKeys.GET_OBJECT_BY_NAME,
|
|
55
|
+
StaticAssetRouteKeys.DOWNLOAD_OBJECT_BY_NAME,
|
|
56
|
+
StaticAssetRouteKeys.UPLOAD,
|
|
57
|
+
StaticAssetRouteKeys.DELETE_OBJECT,
|
|
58
|
+
StaticAssetRouteKeys.LIST_OBJECTS,
|
|
59
|
+
StaticAssetRouteKeys.UPLOAD_POLICY,
|
|
60
|
+
StaticAssetRouteKeys.UPLOAD_COMMIT,
|
|
61
|
+
StaticAssetRouteKeys.UPLOAD_VALIDATE,
|
|
62
|
+
StaticAssetRouteKeys.RECREATE_META_LINK,
|
|
63
|
+
]; }
|
|
39
64
|
}
|
|
40
65
|
/** What `recreate-metalink` did: refreshed the rows of an object, or created its first one. */
|
|
41
66
|
export class MetaLinkRecreateActions {
|
|
42
67
|
static { this.CREATED = 'created'; }
|
|
43
68
|
static { this.REFRESHED = 'refreshed'; }
|
|
44
|
-
static { this.SCHEME_SET = new Set([this.CREATED, this.REFRESHED]); }
|
|
45
|
-
static isValid(value) {
|
|
46
|
-
return this.SCHEME_SET.has(value);
|
|
47
|
-
}
|
|
48
69
|
}
|
|
49
|
-
/**
|
|
50
|
-
export
|
|
51
|
-
/** The
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
|
|
70
|
+
/** Defaults of the static asset component. */
|
|
71
|
+
export class StaticAssetDefaults {
|
|
72
|
+
/** Where a signed policy may write. The final key is never inside it, so content cannot be replaced after the commit. */
|
|
73
|
+
static { this.PENDING_PREFIX = 'pending/'; }
|
|
74
|
+
/** The most file parts one upload request may carry unless `serverUpload.maxFiles` says otherwise. */
|
|
75
|
+
static { this.MAX_UPLOAD_FILES = 20; }
|
|
76
|
+
}
|
|
77
|
+
/** Codes the component reports in a body instead of throwing. */
|
|
78
|
+
export class StaticAssetMetaLinkCodes {
|
|
79
|
+
/** Reported in the body, never thrown: the bytes are stored, only the row is not. A CODE, because a 200 bypasses the middleware that strips the driver's `detail`/`table`/`constraint`. */
|
|
80
|
+
static { this.CREATE_FAILED = 'META_LINK_CREATE_FAILED'; }
|
|
81
|
+
}
|
|
55
82
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/static-asset/common/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,4EAA4E;AAC5E,MAAM,OAAO,kBAAkB;IAC7B,uGAAuG;aACvF,YAAO,GAAG;QACxB,IAAI,CAAC,OAAO,CAAC,gBAAgB;QAC7B,IAAI,CAAC,OAAO,CAAC,aAAa;QAC1B,IAAI,CAAC,OAAO,CAAC,IAAI;QACjB,IAAI,CAAC,OAAO,CAAC,aAAa;KAClB,CAAC;IAEX,oDAAoD;aACpC,YAAO,GAAG,SAAS,CAAC;aACpB,gBAAW,GAAG,SAAS,CAAC;aACxB,eAAU,GAAG,OAAO,CAAC;;AAGvC,2CAA2C;AAC3C,MAAM,OAAO,uBAAuB;IAClC;;;;OAIG;aACa,eAAU,GAAG,IAAI,GAAG,CAAS;QAC3C,IAAI,CAAC,YAAY,CAAC,SAAS;QAC3B,IAAI,CAAC,YAAY,CAAC,UAAU;QAC5B,IAAI,CAAC,YAAY,CAAC,SAAS;QAC3B,IAAI,CAAC,YAAY,CAAC,UAAU;QAC5B,YAAY;QACZ,WAAW;QACX,cAAc;QACd,WAAW;QACX,YAAY;QACZ,YAAY;QACZ,WAAW;QACX,WAAW;QACX,IAAI,CAAC,YAAY,CAAC,eAAe;QACjC,IAAI,CAAC,YAAY,CAAC,UAAU;QAC5B,IAAI,CAAC,YAAY,CAAC,QAAQ;KAC3B,CAAC,CAAC;;AAGL,2EAA2E;AAC3E,MAAM,OAAO,oBAAoB;aACf,WAAM,GAAG,QAAQ,CAAC;aAClB,iBAAY,GAAG,aAAa,CAAC;aAC7B,kBAAa,GAAG,cAAc,CAAC;aAC/B,uBAAkB,GAAG,iBAAiB,CAAC;aACvC,4BAAuB,GAAG,sBAAsB,CAAC;aAEjD,kBAAa,GAAG,cAAc,CAAC;aAC/B,kBAAa,GAAG,cAAc,CAAC;aAC/B,oBAAe,GAAG,gBAAgB,CAAC;aAEnC,uBAAkB,GAAG,kBAAkB,CAAC;IAExD,wCAAwC;aACxB,QAAG,GAAG;QACpB,oBAAoB,CAAC,kBAAkB;QACvC,oBAAoB,CAAC,uBAAuB;QAC5C,oBAAoB,CAAC,MAAM;QAC3B,oBAAoB,CAAC,aAAa;QAClC,oBAAoB,CAAC,YAAY;QACjC,oBAAoB,CAAC,aAAa;QAClC,oBAAoB,CAAC,aAAa;QAClC,oBAAoB,CAAC,eAAe;QACpC,oBAAoB,CAAC,kBAAkB;KAC/B,CAAC;;AAGb,+FAA+F;AAC/F,MAAM,OAAO,uBAAuB;aAClB,YAAO,GAAG,SAAS,CAAC;aACpB,cAAS,GAAG,WAAW,CAAC;;AAM1C,8CAA8C;AAC9C,MAAM,OAAO,mBAAmB;IAC9B,yHAAyH;aACzG,mBAAc,GAAG,UAAU,CAAC;IAE5C,sGAAsG;aACtF,qBAAgB,GAAG,EAAE,CAAC;;AAGxC,iEAAiE;AACjE,MAAM,OAAO,wBAAwB;IACnC,2LAA2L;aAC3K,kBAAa,GAAG,yBAAyB,CAAC","sourcesContent":["import type { TConstValue } from '@venizia/ignis-helpers/common';\nimport { HTTP } from '@venizia/ignis-helpers/common';\n\n/** The response headers a controller echoes from the backend's metadata. */\nexport class StaticAssetHeaders {\n /** `content-type` is absent on purpose: it is decided from the object name, never from the backend. */\n static readonly ALLOWED = [\n HTTP.Headers.CONTENT_ENCODING,\n HTTP.Headers.CACHE_CONTROL,\n HTTP.Headers.ETAG,\n HTTP.Headers.LAST_MODIFIED,\n ] as const;\n\n /** Of what a controller sends with every object. */\n static readonly NOSNIFF = 'nosniff';\n static readonly CSP_SANDBOX = 'sandbox';\n static readonly RANGE_UNIT = 'bytes';\n}\n\n/** Content types the controller serves. */\nexport class StaticAssetContentTypes {\n /**\n * Types the controller will let a browser render, keyed off the object name. Anything absent here is\n * served as an attachment, because a renderable upload on the API origin is stored XSS - and `nosniff`\n * cannot stop a type we declared ourselves. `image/svg+xml` is deliberately excluded: SVG carries script.\n */\n static readonly RENDERABLE = new Set<string>([\n HTTP.HeaderValues.IMAGE_PNG,\n HTTP.HeaderValues.IMAGE_JPEG,\n HTTP.HeaderValues.IMAGE_GIF,\n HTTP.HeaderValues.IMAGE_WEBP,\n 'image/avif',\n 'image/bmp',\n 'image/x-icon',\n 'video/mp4',\n 'video/webm',\n 'audio/mpeg',\n 'audio/wav',\n 'audio/ogg',\n HTTP.HeaderValues.APPLICATION_PDF,\n HTTP.HeaderValues.TEXT_PLAIN,\n HTTP.HeaderValues.TEXT_CSV,\n ]);\n}\n\n/** The built-in routes of a generated controller, the keys of `routes`. */\nexport class StaticAssetRouteKeys {\n static readonly UPLOAD = 'upload';\n static readonly LIST_OBJECTS = 'listObjects';\n static readonly DELETE_OBJECT = 'deleteObject';\n static readonly GET_OBJECT_BY_NAME = 'getObjectByName';\n static readonly DOWNLOAD_OBJECT_BY_NAME = 'downloadObjectByName';\n\n static readonly UPLOAD_POLICY = 'uploadPolicy';\n static readonly UPLOAD_COMMIT = 'uploadCommit';\n static readonly UPLOAD_VALIDATE = 'uploadValidate';\n\n static readonly RECREATE_META_LINK = 'recreateMetaLink';\n\n /** Every key, in registration order. */\n static readonly ALL = [\n StaticAssetRouteKeys.GET_OBJECT_BY_NAME,\n StaticAssetRouteKeys.DOWNLOAD_OBJECT_BY_NAME,\n StaticAssetRouteKeys.UPLOAD,\n StaticAssetRouteKeys.DELETE_OBJECT,\n StaticAssetRouteKeys.LIST_OBJECTS,\n StaticAssetRouteKeys.UPLOAD_POLICY,\n StaticAssetRouteKeys.UPLOAD_COMMIT,\n StaticAssetRouteKeys.UPLOAD_VALIDATE,\n StaticAssetRouteKeys.RECREATE_META_LINK,\n ] as const;\n}\n\n/** What `recreate-metalink` did: refreshed the rows of an object, or created its first one. */\nexport class MetaLinkRecreateActions {\n static readonly CREATED = 'created';\n static readonly REFRESHED = 'refreshed';\n}\n\n/** One of the `MetaLinkRecreateActions` values. */\nexport type TMetaLinkRecreateAction = TConstValue<typeof MetaLinkRecreateActions>;\n\n/** Defaults of the static asset component. */\nexport class StaticAssetDefaults {\n /** Where a signed policy may write. The final key is never inside it, so content cannot be replaced after the commit. */\n static readonly PENDING_PREFIX = 'pending/';\n\n /** The most file parts one upload request may carry unless `serverUpload.maxFiles` says otherwise. */\n static readonly MAX_UPLOAD_FILES = 20;\n}\n\n/** Codes the component reports in a body instead of throwing. */\nexport class StaticAssetMetaLinkCodes {\n /** Reported in the body, never thrown: the bytes are stored, only the row is not. A CODE, because a 200 bypasses the middleware that strips the driver's `detail`/`table`/`constraint`. */\n static readonly CREATE_FAILED = 'META_LINK_CREATE_FAILED';\n}\n"]}
|
|
@@ -3,12 +3,21 @@ 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;
|
|
10
10
|
readonly category: "validation";
|
|
11
11
|
};
|
|
12
|
+
/** Raised by `commit`, never by the validate route: the route answers `{ isValid: false, issues }`, and an invalid file simply cannot be committed. */
|
|
13
|
+
readonly UPLOAD_INVALID: {
|
|
14
|
+
readonly message: {
|
|
15
|
+
readonly text: "The uploaded file did not pass validation";
|
|
16
|
+
readonly code: "core.static_asset.upload_invalid";
|
|
17
|
+
};
|
|
18
|
+
readonly statusCode: 422;
|
|
19
|
+
readonly category: "validation";
|
|
20
|
+
};
|
|
12
21
|
/** Both upload paths - one condition, one code to branch on. */
|
|
13
22
|
readonly UPLOAD_TOO_LARGE: {
|
|
14
23
|
readonly message: {
|
|
@@ -35,15 +44,6 @@ export declare const StaticAssetErrors: {
|
|
|
35
44
|
readonly statusCode: 400;
|
|
36
45
|
readonly category: "validation";
|
|
37
46
|
};
|
|
38
|
-
/** Labels ride the body; one in the URL would otherwise leave the row unlabelled without a word. */
|
|
39
|
-
readonly LABELS_IN_QUERY: {
|
|
40
|
-
readonly message: {
|
|
41
|
-
readonly text: "Upload labels belong in the request body, not the query";
|
|
42
|
-
readonly code: "core.static_asset.labels_in_query";
|
|
43
|
-
};
|
|
44
|
-
readonly statusCode: 400;
|
|
45
|
-
readonly category: "validation";
|
|
46
|
-
};
|
|
47
47
|
readonly BUCKET_NAME_INVALID: {
|
|
48
48
|
readonly message: {
|
|
49
49
|
readonly text: "Invalid bucket name";
|
|
@@ -60,7 +60,7 @@ export declare const StaticAssetErrors: {
|
|
|
60
60
|
readonly statusCode: 400;
|
|
61
61
|
readonly category: "validation";
|
|
62
62
|
};
|
|
63
|
-
/** The application's naming hook produced a key outside `
|
|
63
|
+
/** The application's naming hook produced a key outside the entry's `keyPrefix`; nothing is written. */
|
|
64
64
|
readonly OBJECT_KEY_OUT_OF_SCOPE: {
|
|
65
65
|
readonly message: {
|
|
66
66
|
readonly text: "Object key is outside the key prefix of this controller";
|
|
@@ -69,30 +69,6 @@ export declare const StaticAssetErrors: {
|
|
|
69
69
|
readonly statusCode: 400;
|
|
70
70
|
readonly category: "validation";
|
|
71
71
|
};
|
|
72
|
-
readonly FOLDER_PATH_INVALID: {
|
|
73
|
-
readonly message: {
|
|
74
|
-
readonly text: "Invalid folder path";
|
|
75
|
-
readonly code: "core.static_asset.folder_path_invalid";
|
|
76
|
-
};
|
|
77
|
-
readonly statusCode: 400;
|
|
78
|
-
readonly category: "validation";
|
|
79
|
-
};
|
|
80
|
-
readonly FOLDER_SEGMENT_INVALID: {
|
|
81
|
-
readonly message: {
|
|
82
|
-
readonly text: "Invalid folder path segment";
|
|
83
|
-
readonly code: "core.static_asset.folder_segment_invalid";
|
|
84
|
-
};
|
|
85
|
-
readonly statusCode: 400;
|
|
86
|
-
readonly category: "validation";
|
|
87
|
-
};
|
|
88
|
-
readonly FOLDER_DEPTH_EXCEEDED: {
|
|
89
|
-
readonly message: {
|
|
90
|
-
readonly text: "Folder path exceeds the maximum depth";
|
|
91
|
-
readonly code: "core.static_asset.folder_depth_exceeded";
|
|
92
|
-
};
|
|
93
|
-
readonly statusCode: 400;
|
|
94
|
-
readonly category: "validation";
|
|
95
|
-
};
|
|
96
72
|
readonly FILE_EMPTY: {
|
|
97
73
|
readonly message: {
|
|
98
74
|
readonly text: "Empty file content";
|
|
@@ -101,14 +77,6 @@ export declare const StaticAssetErrors: {
|
|
|
101
77
|
readonly statusCode: 400;
|
|
102
78
|
readonly category: "validation";
|
|
103
79
|
};
|
|
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
80
|
};
|
|
113
81
|
/** Registers these codes with the shared key registry so a consumer gets autocomplete on `messageCode`. */
|
|
114
82
|
declare module '@venizia/ignis-helpers' {
|
|
@@ -4,12 +4,21 @@ 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,
|
|
11
11
|
category: ErrorScopes.VALIDATION,
|
|
12
12
|
},
|
|
13
|
+
/** Raised by `commit`, never by the validate route: the route answers `{ isValid: false, issues }`, and an invalid file simply cannot be committed. */
|
|
14
|
+
UPLOAD_INVALID: {
|
|
15
|
+
message: {
|
|
16
|
+
text: 'The uploaded file did not pass validation',
|
|
17
|
+
code: 'core.static_asset.upload_invalid',
|
|
18
|
+
},
|
|
19
|
+
statusCode: HTTP.ResultCodes.RS_4.UnprocessableEntity,
|
|
20
|
+
category: ErrorScopes.VALIDATION,
|
|
21
|
+
},
|
|
13
22
|
/** Both upload paths - one condition, one code to branch on. */
|
|
14
23
|
UPLOAD_TOO_LARGE: {
|
|
15
24
|
message: {
|
|
@@ -30,15 +39,6 @@ export const StaticAssetErrors = {
|
|
|
30
39
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
31
40
|
category: ErrorScopes.VALIDATION,
|
|
32
41
|
},
|
|
33
|
-
/** Labels ride the body; one in the URL would otherwise leave the row unlabelled without a word. */
|
|
34
|
-
LABELS_IN_QUERY: {
|
|
35
|
-
message: {
|
|
36
|
-
text: 'Upload labels belong in the request body, not the query',
|
|
37
|
-
code: 'core.static_asset.labels_in_query',
|
|
38
|
-
},
|
|
39
|
-
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
40
|
-
category: ErrorScopes.VALIDATION,
|
|
41
|
-
},
|
|
42
42
|
BUCKET_NAME_INVALID: {
|
|
43
43
|
message: { text: 'Invalid bucket name', code: 'core.static_asset.bucket_name_invalid' },
|
|
44
44
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
@@ -52,7 +52,7 @@ export const StaticAssetErrors = {
|
|
|
52
52
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
53
53
|
category: ErrorScopes.VALIDATION,
|
|
54
54
|
},
|
|
55
|
-
/** The application's naming hook produced a key outside `
|
|
55
|
+
/** The application's naming hook produced a key outside the entry's `keyPrefix`; nothing is written. */
|
|
56
56
|
OBJECT_KEY_OUT_OF_SCOPE: {
|
|
57
57
|
message: {
|
|
58
58
|
text: 'Object key is outside the key prefix of this controller',
|
|
@@ -61,39 +61,10 @@ export const StaticAssetErrors = {
|
|
|
61
61
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
62
62
|
category: ErrorScopes.VALIDATION,
|
|
63
63
|
},
|
|
64
|
-
FOLDER_PATH_INVALID: {
|
|
65
|
-
message: { text: 'Invalid folder path', code: 'core.static_asset.folder_path_invalid' },
|
|
66
|
-
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
67
|
-
category: ErrorScopes.VALIDATION,
|
|
68
|
-
},
|
|
69
|
-
FOLDER_SEGMENT_INVALID: {
|
|
70
|
-
message: {
|
|
71
|
-
text: 'Invalid folder path segment',
|
|
72
|
-
code: 'core.static_asset.folder_segment_invalid',
|
|
73
|
-
},
|
|
74
|
-
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
75
|
-
category: ErrorScopes.VALIDATION,
|
|
76
|
-
},
|
|
77
|
-
FOLDER_DEPTH_EXCEEDED: {
|
|
78
|
-
message: {
|
|
79
|
-
text: 'Folder path exceeds the maximum depth',
|
|
80
|
-
code: 'core.static_asset.folder_depth_exceeded',
|
|
81
|
-
},
|
|
82
|
-
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
83
|
-
category: ErrorScopes.VALIDATION,
|
|
84
|
-
},
|
|
85
64
|
FILE_EMPTY: {
|
|
86
65
|
message: { text: 'Empty file content', code: 'core.static_asset.file_empty' },
|
|
87
66
|
statusCode: HTTP.ResultCodes.RS_4.BadRequest,
|
|
88
67
|
category: ErrorScopes.VALIDATION,
|
|
89
68
|
},
|
|
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
69
|
};
|
|
99
70
|
//# 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":"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,uBAAuB;YAC7B,IAAI,EAAE,yCAAyC;SAChD;QACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS;QAC3C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,uJAAuJ;IACvJ,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,2CAA2C;YACjD,IAAI,EAAE,kCAAkC;SACzC;QACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB;QACrD,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,gEAAgE;IAChE,gBAAgB,EAAE;QAChB,OAAO,EAAE;YACP,IAAI,EAAE,yCAAyC;YAC/C,IAAI,EAAE,oCAAoC;SAC3C;QACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe;QACjD,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,kJAAkJ;IAClJ,oBAAoB,EAAE;QACpB,OAAO,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,wCAAwC,EAAE;QACzF,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,oBAAoB,EAAE;QACpB,OAAO,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,IAAI,EAAE,wCAAwC,EAAE;QAC7F,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,uCAAuC,EAAE;QACvF,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE;YACP,IAAI,EAAE,6BAA6B;YACnC,IAAI,EAAE,uCAAuC;SAC9C;QACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,wGAAwG;IACxG,uBAAuB,EAAE;QACvB,OAAO,EAAE;YACP,IAAI,EAAE,yDAAyD;YAC/D,IAAI,EAAE,2CAA2C;SAClD;QACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;IACD,UAAU,EAAE;QACV,OAAO,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,8BAA8B,EAAE;QAC7E,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;CACkD,CAAC","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 /** Raised by `commit`, never by the validate route: the route answers `{ isValid: false, issues }`, and an invalid file simply cannot be committed. */\n UPLOAD_INVALID: {\n message: {\n text: 'The uploaded file did not pass validation',\n code: 'core.static_asset.upload_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.UnprocessableEntity,\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 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,14 @@
|
|
|
1
1
|
/** Container keys of the static asset component. */
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class StaticAssetBindingKeys {
|
|
3
3
|
/** 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
|
|
4
|
+
static readonly STATIC_ASSET_OPTIONS = "@app/static-asset/options";
|
|
5
|
+
/** 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. */
|
|
6
|
+
static policyService(opts: {
|
|
7
|
+
name: string;
|
|
8
|
+
}): string;
|
|
9
|
+
/** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */
|
|
10
|
+
static commitService(opts: {
|
|
11
|
+
name: string;
|
|
12
|
+
}): string;
|
|
5
13
|
}
|
|
6
14
|
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/** Container keys of the static asset component. */
|
|
2
|
-
export class
|
|
2
|
+
export class StaticAssetBindingKeys {
|
|
3
3
|
/** 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.
|
|
4
|
+
static { this.STATIC_ASSET_OPTIONS = '@app/static-asset/options'; }
|
|
5
|
+
/** 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. */
|
|
6
|
+
static policyService(opts) {
|
|
7
|
+
return `@app/static-asset/policy-service/${opts.name}`;
|
|
8
|
+
}
|
|
9
|
+
/** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */
|
|
10
|
+
static commitService(opts) {
|
|
11
|
+
return `@app/static-asset/commit-service/${opts.name}`;
|
|
12
|
+
}
|
|
5
13
|
}
|
|
6
14
|
//# 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,oDAAoD;AACpD,MAAM,OAAO,sBAAsB;IACjC,oPAAoP;aACpO,yBAAoB,GAAG,2BAA2B,CAAC;IAEnE,iMAAiM;IACjM,MAAM,CAAC,aAAa,CAAC,IAAsB;QACzC,OAAO,oCAAoC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;IAED,gGAAgG;IAChG,MAAM,CAAC,aAAa,CAAC,IAAsB;QACzC,OAAO,oCAAoC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC","sourcesContent":["/** 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 = '@app/static-asset/options';\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 }): string {\n return `@app/static-asset/policy-service/${opts.name}`;\n }\n\n /** The `StaticAssetUploadCommitService` of one options entry, bound with its policy service. */\n static commitService(opts: { name: string }): string {\n return `@app/static-asset/commit-service/${opts.name}`;\n }\n}\n"]}
|