@venizia/ignis 0.4.8-8 → 0.4.8

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.
Files changed (225) hide show
  1. package/README.md +1 -0
  2. package/dist/esm/base/applications/base.js.map +1 -1
  3. package/dist/esm/components/api-reference/common/types.d.ts +6 -3
  4. package/dist/esm/components/api-reference/common/types.js.map +1 -1
  5. package/dist/esm/components/api-reference/component.js +8 -3
  6. package/dist/esm/components/api-reference/component.js.map +1 -1
  7. package/dist/esm/components/auth/authenticate/component.js +3 -2
  8. package/dist/esm/components/auth/authenticate/component.js.map +1 -1
  9. package/dist/esm/components/auth/authenticate/controllers/factory.d.ts +3 -3
  10. package/dist/esm/components/auth/authenticate/controllers/factory.js +1 -1
  11. package/dist/esm/components/auth/authenticate/controllers/factory.js.map +1 -1
  12. package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.d.ts +5 -3
  13. package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.js +18 -1
  14. package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.js.map +1 -1
  15. package/dist/esm/components/auth/authorize/adapters/common/types.d.ts +1 -2
  16. package/dist/esm/components/auth/authorize/adapters/common/types.js.map +1 -1
  17. package/dist/esm/components/index.d.ts +1 -0
  18. package/dist/esm/components/index.js +1 -0
  19. package/dist/esm/components/index.js.map +1 -1
  20. package/dist/esm/components/mail/common/constants.d.ts +24 -14
  21. package/dist/esm/components/mail/common/constants.js +19 -32
  22. package/dist/esm/components/mail/common/constants.js.map +1 -1
  23. package/dist/esm/components/mail/common/errors.d.ts +10 -1
  24. package/dist/esm/components/mail/common/errors.js +7 -1
  25. package/dist/esm/components/mail/common/errors.js.map +1 -1
  26. package/dist/esm/components/mail/common/types/message.d.ts +4 -4
  27. package/dist/esm/components/mail/common/types/message.js.map +1 -1
  28. package/dist/esm/components/mail/common/types/options.d.ts +54 -10
  29. package/dist/esm/components/mail/common/types/options.js.map +1 -1
  30. package/dist/esm/components/mail/common/types/queue.d.ts +23 -12
  31. package/dist/esm/components/mail/common/types/queue.js.map +1 -1
  32. package/dist/esm/components/mail/common/types/template.d.ts +5 -4
  33. package/dist/esm/components/mail/common/types/template.js.map +1 -1
  34. package/dist/esm/components/mail/common/types/verification.d.ts +1 -0
  35. package/dist/esm/components/mail/common/types/verification.js.map +1 -1
  36. package/dist/esm/components/mail/component.js +11 -2
  37. package/dist/esm/components/mail/component.js.map +1 -1
  38. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts +1 -1
  39. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js +15 -28
  40. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js.map +1 -1
  41. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.d.ts +2 -0
  42. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js +17 -10
  43. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js.map +1 -1
  44. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js +11 -6
  45. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js.map +1 -1
  46. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.d.ts +2 -3
  47. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js +15 -6
  48. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js.map +1 -1
  49. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.d.ts +2 -3
  50. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js +2 -2
  51. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js.map +1 -1
  52. package/dist/esm/components/mail/providers/mail-queue-executor.provider.d.ts +2 -2
  53. package/dist/esm/components/mail/providers/mail-queue-executor.provider.js +7 -9
  54. package/dist/esm/components/mail/providers/mail-queue-executor.provider.js.map +1 -1
  55. package/dist/esm/components/mail/providers/mail-transporter.provider.js +7 -7
  56. package/dist/esm/components/mail/providers/mail-transporter.provider.js.map +1 -1
  57. package/dist/esm/components/mail/services/generators/numeric-code.d.ts +1 -6
  58. package/dist/esm/components/mail/services/generators/numeric-code.js +3 -31
  59. package/dist/esm/components/mail/services/generators/numeric-code.js.map +1 -1
  60. package/dist/esm/components/mail/services/generators/random-token.d.ts +4 -1
  61. package/dist/esm/components/mail/services/generators/random-token.js +9 -6
  62. package/dist/esm/components/mail/services/generators/random-token.js.map +1 -1
  63. package/dist/esm/components/mail/services/mail.service.d.ts +1 -2
  64. package/dist/esm/components/mail/services/mail.service.js +21 -19
  65. package/dist/esm/components/mail/services/mail.service.js.map +1 -1
  66. package/dist/esm/components/mail/services/template.service.d.ts +7 -5
  67. package/dist/esm/components/mail/services/template.service.js +24 -16
  68. package/dist/esm/components/mail/services/template.service.js.map +1 -1
  69. package/dist/esm/components/mail/utilities/attachment.utility.js +8 -6
  70. package/dist/esm/components/mail/utilities/attachment.utility.js.map +1 -1
  71. package/dist/esm/components/mail/utilities/header.utility.d.ts +14 -0
  72. package/dist/esm/components/mail/utilities/header.utility.js +44 -0
  73. package/dist/esm/components/mail/utilities/header.utility.js.map +1 -0
  74. package/dist/esm/components/mail/utilities/index.d.ts +1 -0
  75. package/dist/esm/components/mail/utilities/index.js +1 -0
  76. package/dist/esm/components/mail/utilities/index.js.map +1 -1
  77. package/dist/esm/components/mail/utilities/mime.utility.d.ts +5 -1
  78. package/dist/esm/components/mail/utilities/mime.utility.js +12 -58
  79. package/dist/esm/components/mail/utilities/mime.utility.js.map +1 -1
  80. package/dist/esm/components/mail/utilities/type.utility.d.ts +2 -3
  81. package/dist/esm/components/mail/utilities/type.utility.js +6 -7
  82. package/dist/esm/components/mail/utilities/type.utility.js.map +1 -1
  83. package/dist/esm/components/server-info/common/constants.d.ts +6 -0
  84. package/dist/esm/components/server-info/common/constants.js +6 -0
  85. package/dist/esm/components/server-info/common/constants.js.map +1 -0
  86. package/dist/esm/components/server-info/common/index.d.ts +5 -0
  87. package/dist/esm/components/server-info/common/index.js +5 -0
  88. package/dist/esm/components/server-info/common/index.js.map +1 -0
  89. package/dist/esm/components/server-info/common/keys.d.ts +5 -0
  90. package/dist/esm/components/server-info/common/keys.js +5 -0
  91. package/dist/esm/components/server-info/common/keys.js.map +1 -0
  92. package/dist/esm/components/server-info/common/rest-paths.d.ts +5 -0
  93. package/dist/esm/components/server-info/common/rest-paths.js +5 -0
  94. package/dist/esm/components/server-info/common/rest-paths.js.map +1 -0
  95. package/dist/esm/components/server-info/common/types.d.ts +68 -0
  96. package/dist/esm/components/server-info/common/types.js +2 -0
  97. package/dist/esm/components/server-info/common/types.js.map +1 -0
  98. package/dist/esm/components/server-info/component.d.ts +31 -0
  99. package/dist/esm/components/server-info/component.js +87 -0
  100. package/dist/esm/components/server-info/component.js.map +1 -0
  101. package/dist/esm/components/server-info/controller.d.ts +14 -0
  102. package/dist/esm/components/server-info/controller.js +68 -0
  103. package/dist/esm/components/server-info/controller.js.map +1 -0
  104. package/dist/esm/components/server-info/index.d.ts +5 -0
  105. package/dist/esm/components/server-info/index.js +5 -0
  106. package/dist/esm/components/server-info/index.js.map +1 -0
  107. package/dist/esm/components/server-info/reporter.d.ts +25 -0
  108. package/dist/esm/components/server-info/reporter.js +68 -0
  109. package/dist/esm/components/server-info/reporter.js.map +1 -0
  110. package/dist/esm/components/socket-io/handlers/bun.handler.d.ts +13 -3
  111. package/dist/esm/components/socket-io/handlers/bun.handler.js.map +1 -1
  112. package/dist/esm/components/static-asset/common/constants.d.ts +51 -24
  113. package/dist/esm/components/static-asset/common/constants.js +75 -47
  114. package/dist/esm/components/static-asset/common/constants.js.map +1 -1
  115. package/dist/esm/components/static-asset/common/errors.d.ts +30 -35
  116. package/dist/esm/components/static-asset/common/errors.js +31 -33
  117. package/dist/esm/components/static-asset/common/errors.js.map +1 -1
  118. package/dist/esm/components/static-asset/common/index.d.ts +1 -1
  119. package/dist/esm/components/static-asset/common/index.js +1 -1
  120. package/dist/esm/components/static-asset/common/index.js.map +1 -1
  121. package/dist/esm/components/static-asset/common/keys.d.ts +10 -2
  122. package/dist/esm/components/static-asset/common/keys.js +10 -2
  123. package/dist/esm/components/static-asset/common/keys.js.map +1 -1
  124. package/dist/esm/components/static-asset/common/types.d.ts +267 -147
  125. package/dist/esm/components/static-asset/common/types.js.map +1 -1
  126. package/dist/esm/components/static-asset/common/validation.d.ts +10 -0
  127. package/dist/esm/components/static-asset/common/validation.js +8 -0
  128. package/dist/esm/components/static-asset/common/validation.js.map +1 -0
  129. package/dist/esm/components/static-asset/component.d.ts +4 -2
  130. package/dist/esm/components/static-asset/component.js +26 -31
  131. package/dist/esm/components/static-asset/component.js.map +1 -1
  132. package/dist/esm/components/static-asset/controller/factory.d.ts +37 -79
  133. package/dist/esm/components/static-asset/controller/factory.js +26 -917
  134. package/dist/esm/components/static-asset/controller/factory.js.map +1 -1
  135. package/dist/esm/components/static-asset/controller/index.d.ts +1 -0
  136. package/dist/esm/components/static-asset/controller/index.js +1 -0
  137. package/dist/esm/components/static-asset/controller/index.js.map +1 -1
  138. package/dist/esm/components/static-asset/controller/routes/context.d.ts +62 -0
  139. package/dist/esm/components/static-asset/controller/routes/context.js +45 -0
  140. package/dist/esm/components/static-asset/controller/routes/context.js.map +1 -0
  141. package/dist/esm/components/static-asset/controller/routes/definition.d.ts +40 -0
  142. package/dist/esm/components/static-asset/controller/routes/definition.js +83 -0
  143. package/dist/esm/components/static-asset/controller/routes/definition.js.map +1 -0
  144. package/dist/esm/components/static-asset/controller/routes/direct-upload.d.ts +3 -0
  145. package/dist/esm/components/static-asset/controller/routes/direct-upload.js +153 -0
  146. package/dist/esm/components/static-asset/controller/routes/direct-upload.js.map +1 -0
  147. package/dist/esm/components/static-asset/controller/routes/labels.d.ts +16 -0
  148. package/dist/esm/components/static-asset/controller/routes/labels.js +19 -0
  149. package/dist/esm/components/static-asset/controller/routes/labels.js.map +1 -0
  150. package/dist/esm/components/static-asset/controller/routes/objects.d.ts +7 -0
  151. package/dist/esm/components/static-asset/controller/routes/objects.js +193 -0
  152. package/dist/esm/components/static-asset/controller/routes/objects.js.map +1 -0
  153. package/dist/esm/components/static-asset/controller/routes/serve.d.ts +29 -0
  154. package/dist/esm/components/static-asset/controller/routes/serve.js +152 -0
  155. package/dist/esm/components/static-asset/controller/routes/serve.js.map +1 -0
  156. package/dist/esm/components/static-asset/controller/routes/table.d.ts +12 -0
  157. package/dist/esm/components/static-asset/controller/routes/table.js +52 -0
  158. package/dist/esm/components/static-asset/controller/routes/table.js.map +1 -0
  159. package/dist/esm/components/static-asset/controller/routes/upload.d.ts +10 -0
  160. package/dist/esm/components/static-asset/controller/routes/upload.js +175 -0
  161. package/dist/esm/components/static-asset/controller/routes/upload.js.map +1 -0
  162. package/dist/esm/components/static-asset/index.d.ts +2 -1
  163. package/dist/esm/components/static-asset/index.js +2 -1
  164. package/dist/esm/components/static-asset/index.js.map +1 -1
  165. package/dist/esm/components/static-asset/models/base.model.d.ts +4 -4
  166. package/dist/esm/components/static-asset/models/base.model.js.map +1 -1
  167. package/dist/esm/components/static-asset/services/commitment.service.d.ts +103 -0
  168. package/dist/esm/components/static-asset/services/commitment.service.js +252 -0
  169. package/dist/esm/components/static-asset/services/commitment.service.js.map +1 -0
  170. package/dist/esm/components/static-asset/services/index.d.ts +3 -0
  171. package/dist/esm/components/static-asset/services/index.js +3 -0
  172. package/dist/esm/components/static-asset/services/index.js.map +1 -0
  173. package/dist/esm/components/static-asset/services/policy.service.d.ts +45 -0
  174. package/dist/esm/components/static-asset/services/policy.service.js +104 -0
  175. package/dist/esm/components/static-asset/services/policy.service.js.map +1 -0
  176. package/dist/esm/components/static-asset/utilities/commit-token.utility.d.ts +28 -0
  177. package/dist/esm/components/static-asset/utilities/commit-token.utility.js +112 -0
  178. package/dist/esm/components/static-asset/utilities/commit-token.utility.js.map +1 -0
  179. package/dist/esm/components/static-asset/utilities/entry.utility.d.ts +69 -0
  180. package/dist/esm/components/static-asset/utilities/entry.utility.js +160 -0
  181. package/dist/esm/components/static-asset/utilities/entry.utility.js.map +1 -0
  182. package/dist/esm/components/static-asset/utilities/index.d.ts +6 -0
  183. package/dist/esm/components/static-asset/utilities/index.js +6 -0
  184. package/dist/esm/components/static-asset/utilities/index.js.map +1 -0
  185. package/dist/esm/components/static-asset/{ingest.d.ts → utilities/ingest.utility.d.ts} +5 -5
  186. package/dist/esm/components/static-asset/{ingest.js → utilities/ingest.utility.js} +12 -10
  187. package/dist/esm/components/static-asset/utilities/ingest.utility.js.map +1 -0
  188. package/dist/esm/components/static-asset/{controller/key-scope.d.ts → utilities/key-scope.utility.d.ts} +21 -2
  189. package/dist/esm/components/static-asset/utilities/key-scope.utility.js +74 -0
  190. package/dist/esm/components/static-asset/utilities/key-scope.utility.js.map +1 -0
  191. package/dist/esm/components/static-asset/{controller/meta-link.d.ts → utilities/meta-link.utility.d.ts} +9 -9
  192. package/dist/esm/components/static-asset/{controller/meta-link.js → utilities/meta-link.utility.js} +10 -10
  193. package/dist/esm/components/static-asset/utilities/meta-link.utility.js.map +1 -0
  194. package/dist/esm/components/static-asset/utilities/object-link.utility.d.ts +16 -0
  195. package/dist/esm/components/static-asset/utilities/object-link.utility.js +20 -0
  196. package/dist/esm/components/static-asset/utilities/object-link.utility.js.map +1 -0
  197. package/dist/esm/components/static-asset/utilities/pinned-file.utility.d.ts +39 -0
  198. package/dist/esm/components/static-asset/utilities/pinned-file.utility.js +53 -0
  199. package/dist/esm/components/static-asset/utilities/pinned-file.utility.js.map +1 -0
  200. package/dist/esm/components/static-asset/utilities/route-options.utility.d.ts +43 -0
  201. package/dist/esm/components/static-asset/utilities/route-options.utility.js +71 -0
  202. package/dist/esm/components/static-asset/utilities/route-options.utility.js.map +1 -0
  203. package/dist/esm/components/static-asset/utilities/toggle.utility.d.ts +5 -0
  204. package/dist/esm/components/static-asset/utilities/toggle.utility.js +5 -0
  205. package/dist/esm/components/static-asset/utilities/toggle.utility.js.map +1 -0
  206. package/dist/esm/testing/assert-application-boots.d.ts +2 -2
  207. package/dist/esm/testing/assert-application-boots.js +6 -2
  208. package/dist/esm/testing/assert-application-boots.js.map +1 -1
  209. package/dist/presets/app/preset.json +4 -4
  210. package/dist/presets/lib/preset.json +3 -3
  211. package/dist/presets/shared/preset.json +1 -1
  212. package/package.json +8 -8
  213. package/dist/esm/components/static-asset/common/commit-token.d.ts +0 -28
  214. package/dist/esm/components/static-asset/common/commit-token.js +0 -48
  215. package/dist/esm/components/static-asset/common/commit-token.js.map +0 -1
  216. package/dist/esm/components/static-asset/controller/base.definition.d.ts +0 -30
  217. package/dist/esm/components/static-asset/controller/base.definition.js +0 -307
  218. package/dist/esm/components/static-asset/controller/base.definition.js.map +0 -1
  219. package/dist/esm/components/static-asset/controller/key-scope.js +0 -41
  220. package/dist/esm/components/static-asset/controller/key-scope.js.map +0 -1
  221. package/dist/esm/components/static-asset/controller/meta-link.js.map +0 -1
  222. package/dist/esm/components/static-asset/controller/route-options.d.ts +0 -29
  223. package/dist/esm/components/static-asset/controller/route-options.js +0 -47
  224. package/dist/esm/components/static-asset/controller/route-options.js.map +0 -1
  225. package/dist/esm/components/static-asset/ingest.js.map +0 -1
@@ -15,8 +15,9 @@ import { BaseComponent } from '@venizia/ignis-kernel';
15
15
  import { inject } from '../../base/metadata/index.js';
16
16
  import { CoreBindings } from '@venizia/ignis-kernel';
17
17
  import { Binding } from '@venizia/ignis-kernel';
18
- import { StaticAssetComponentBindingKeys } from './common/index.js';
19
- import { AssetControllerFactory } from './controller/index.js';
18
+ import { StaticAssetBindingKeys } from './common/index.js';
19
+ import { StaticAssetControllerFactory } from './controller/index.js';
20
+ import { StaticAssetEntryUtility } from './utilities/entry.utility.js';
20
21
  /** `Schema` is the MetaLink table the application binds. It has to live on the CLASS, not only on the options: `component(Ctor, { options })` infers the options from the class, so a class pinned to the shipped table can only carry options for that table. */
21
22
  let StaticAssetComponent = StaticAssetComponent_1 = class StaticAssetComponent extends BaseComponent {
22
23
  constructor(application) {
@@ -24,8 +25,8 @@ let StaticAssetComponent = StaticAssetComponent_1 = class StaticAssetComponent e
24
25
  scope: StaticAssetComponent_1.name,
25
26
  initDefault: { enable: true, container: application },
26
27
  bindings: {
27
- [StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS]: Binding.bind({
28
- key: StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS,
28
+ [StaticAssetBindingKeys.STATIC_ASSET_OPTIONS]: Binding.bind({
29
+ key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,
29
30
  }).toValue({}),
30
31
  },
31
32
  });
@@ -36,36 +37,30 @@ let StaticAssetComponent = StaticAssetComponent_1 = class StaticAssetComponent e
36
37
  // through `configs.artifacts`, where an index carries classes and no options.
37
38
  const componentOptions = this.options ??
38
39
  this.application.get({
39
- key: StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS,
40
+ key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,
40
41
  });
41
- const componentOptionsEntries = Object.entries(componentOptions);
42
- for (const [key, opt] of componentOptionsEntries) {
43
- const { storage, controller, helper, extra, resolveObjectName, defineRoutesBefore, defineExtraRoutes, } = opt;
44
- this.application.controller(AssetControllerFactory.defineAssetController({
45
- controller,
46
- storage,
47
- helper,
48
- useMetaLink: opt.useMetaLink,
49
- metaLink: opt.useMetaLink ? opt.metaLink : undefined,
50
- resolveObjectName,
51
- defineRoutesBefore,
52
- defineExtraRoutes,
53
- options: {
54
- ...extra,
55
- normalizeLinkFn: extra?.normalizeLinkFn ??
56
- // The link follows the URL shape the controller serves: `{objectName}` is one Hono path segment unless `rawObjectPath` widens it, and a configured bucket leaves the path.
57
- ((linkOptions) => AssetControllerFactory.buildObjectLink({
58
- basePath: controller.basePath,
59
- bucket: linkOptions.bucket,
60
- object: linkOptions.object,
61
- hasConfiguredBucket: controller.bucket !== undefined,
62
- rawObjectPath: controller.rawObjectPath,
63
- })),
64
- },
65
- }));
66
- this.application.logger.info(`[binding] Asset storage is bound | Key: %s | Storage type: %s | UseMetaLink: %s`, key, storage, Boolean(opt.useMetaLink));
42
+ for (const [key, entry] of Object.entries(componentOptions)) {
43
+ const resolved = StaticAssetEntryUtility.resolve({ key, entry });
44
+ const services = this.bindDirectUploadServices({ key, resolved });
45
+ this.application.controller(StaticAssetControllerFactory.build({ key, entry, ...services }));
46
+ this.application.logger.info(`[binding] Asset storage is bound | Key: %s | Mount: %s | Storage type: %s | Direct upload: %s | MetaLink: %s`, key, resolved.basePath, resolved.storage, resolved.directUpload !== undefined, resolved.metaLink !== undefined);
67
47
  }
68
48
  }
49
+ /** One pair of services per entry that turns direct upload on. The routes run the very objects an application's service resolves from the keys. */
50
+ bindDirectUploadServices(opts) {
51
+ const { key, resolved } = opts;
52
+ const services = StaticAssetEntryUtility.buildDirectUploadServices({ resolved });
53
+ if (!services) {
54
+ return undefined;
55
+ }
56
+ this.application
57
+ .bind({ key: StaticAssetBindingKeys.policyService({ name: key }) })
58
+ .toValue(services.policyService);
59
+ this.application
60
+ .bind({ key: StaticAssetBindingKeys.commitService({ name: key }) })
61
+ .toValue(services.commitService);
62
+ return services;
63
+ }
69
64
  };
70
65
  StaticAssetComponent = StaticAssetComponent_1 = __decorate([
71
66
  __param(0, inject({ key: CoreBindings.APPLICATION_INSTANCE })),
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/static-asset/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,+BAA+B,EAAsC,MAAM,UAAU,CAAC;AAE/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,kQAAkQ;AAClQ,IAAa,oBAAoB,4BAAjC,MAA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KAAK,EAAE,eAAe;wBACtB,2KAA2K;wBAC3K,CAAC,CAAC,WAAW,EAAE,EAAE,CACf,sBAAsB,CAAC,eAAe,CAAC;4BACrC,QAAQ,EAAE,UAAU,CAAC,QAAQ;4BAC7B,MAAM,EAAE,WAAW,CAAC,MAAM;4BAC1B,MAAM,EAAE,WAAW,CAAC,MAAM;4BAC1B,mBAAmB,EAAE,UAAU,CAAC,MAAM,KAAK,SAAS;4BACpD,aAAa,EAAE,UAAU,CAAC,aAAa;yBACxC,CAAC,CAAC;iBACR;aACF,CAAC,CACH,CAAC;YAEF,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAC1B,iFAAiF,EACjF,GAAG,EACH,OAAO,EACP,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA3EY,oBAAoB;IAI5B,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,CAAC,CAAA;;GAJ1C,oBAAoB,CA2EhC","sourcesContent":["import { type BaseApplication } from '@/base/applications';\nimport { BaseComponent } from '@venizia/ignis-kernel';\nimport { inject } from '@/base/metadata';\nimport { CoreBindings } from '@venizia/ignis-kernel';\nimport { Binding } from '@venizia/ignis-kernel';\nimport { type ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport { StaticAssetComponentBindingKeys, type TStaticAssetsComponentOptions } from './common';\nimport type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from './models';\nimport { AssetControllerFactory } from './controller';\n\n/** `Schema` is the MetaLink table the application binds. It has to live on the CLASS, not only on the options: `component(Ctor, { options })` infers the options from the class, so a class pinned to the shipped table can only carry options for that table. */\nexport class StaticAssetComponent<\n Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema,\n> extends BaseComponent<TStaticAssetsComponentOptions<Schema>> {\n constructor(\n @inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,\n ) {\n super({\n scope: StaticAssetComponent.name,\n initDefault: { enable: true, container: application },\n bindings: {\n [StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS]:\n Binding.bind<TStaticAssetsComponentOptions>({\n key: StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS,\n }).toValue({}),\n },\n });\n }\n\n override binding(): ValueOrPromise<void> {\n // Direct options win. The key is the path for an application that registers this component\n // through `configs.artifacts`, where an index carries classes and no options.\n const componentOptions =\n this.options ??\n this.application.get<TStaticAssetsComponentOptions<Schema>>({\n key: StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONS,\n });\n\n const componentOptionsEntries = Object.entries(componentOptions);\n\n for (const [key, opt] of componentOptionsEntries) {\n const {\n storage,\n controller,\n helper,\n extra,\n resolveObjectName,\n defineRoutesBefore,\n defineExtraRoutes,\n } = opt;\n\n this.application.controller(\n AssetControllerFactory.defineAssetController({\n controller,\n storage,\n helper,\n useMetaLink: opt.useMetaLink,\n metaLink: opt.useMetaLink ? opt.metaLink : undefined,\n resolveObjectName,\n defineRoutesBefore,\n defineExtraRoutes,\n options: {\n ...extra,\n normalizeLinkFn:\n extra?.normalizeLinkFn ??\n // The link follows the URL shape the controller serves: `{objectName}` is one Hono path segment unless `rawObjectPath` widens it, and a configured bucket leaves the path.\n ((linkOptions) =>\n AssetControllerFactory.buildObjectLink({\n basePath: controller.basePath,\n bucket: linkOptions.bucket,\n object: linkOptions.object,\n hasConfiguredBucket: controller.bucket !== undefined,\n rawObjectPath: controller.rawObjectPath,\n })),\n },\n }),\n );\n\n this.application.logger.info(\n `[binding] Asset storage is bound | Key: %s | Storage type: %s | UseMetaLink: %s`,\n key,\n storage,\n Boolean(opt.useMetaLink),\n );\n }\n }\n}\n"]}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/static-asset/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD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base/applications';\nimport { BaseComponent } from '@venizia/ignis-kernel';\nimport { inject } from '@/base/metadata';\nimport { CoreBindings } from '@venizia/ignis-kernel';\nimport { Binding } from '@venizia/ignis-kernel';\nimport { type ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport { StaticAssetBindingKeys, type TStaticAssetComponentOptions } from './common';\nimport type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from './models';\nimport { StaticAssetControllerFactory } from './controller';\nimport { StaticAssetEntryUtility, type IStaticAssetResolvedEntry } from './utilities/entry.utility';\n\n/** `Schema` is the MetaLink table the application binds. It has to live on the CLASS, not only on the options: `component(Ctor, { options })` infers the options from the class, so a class pinned to the shipped table can only carry options for that table. */\nexport class StaticAssetComponent<\n Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema,\n> extends BaseComponent<TStaticAssetComponentOptions<Schema>> {\n constructor(\n @inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,\n ) {\n super({\n scope: StaticAssetComponent.name,\n initDefault: { enable: true, container: application },\n bindings: {\n [StaticAssetBindingKeys.STATIC_ASSET_OPTIONS]: Binding.bind<TStaticAssetComponentOptions>({\n key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,\n }).toValue({}),\n },\n });\n }\n\n override binding(): ValueOrPromise<void> {\n // Direct options win. The key is the path for an application that registers this component\n // through `configs.artifacts`, where an index carries classes and no options.\n const componentOptions =\n this.options ??\n this.application.get<TStaticAssetComponentOptions<Schema>>({\n key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,\n });\n\n for (const [key, entry] of Object.entries(componentOptions)) {\n const resolved = StaticAssetEntryUtility.resolve({ key, entry });\n const services = this.bindDirectUploadServices({ key, resolved });\n\n this.application.controller(\n StaticAssetControllerFactory.build<Schema>({ key, entry, ...services }),\n );\n\n this.application.logger.info(\n `[binding] Asset storage is bound | Key: %s | Mount: %s | Storage type: %s | Direct upload: %s | MetaLink: %s`,\n key,\n resolved.basePath,\n resolved.storage,\n resolved.directUpload !== undefined,\n resolved.metaLink !== undefined,\n );\n }\n }\n\n /** One pair of services per entry that turns direct upload on. The routes run the very objects an application's service resolves from the keys. */\n private bindDirectUploadServices(opts: {\n key: string;\n resolved: IStaticAssetResolvedEntry<Schema>;\n }) {\n const { key, resolved } = opts;\n const services = StaticAssetEntryUtility.buildDirectUploadServices({ resolved });\n\n if (!services) {\n return undefined;\n }\n\n this.application\n .bind({ key: StaticAssetBindingKeys.policyService({ name: key }) })\n .toValue(services.policyService);\n this.application\n .bind({ key: StaticAssetBindingKeys.commitService({ name: key }) })\n .toValue(services.commitService);\n\n return services;\n }\n}\n"]}
@@ -1,69 +1,28 @@
1
- import { type TRouteContext } from '../../../base/controllers/index.js';
2
- import { type IObjectLocation, type IObjectRef, type IStorageHelper } from '@venizia/ignis-helpers';
3
- import { type ValueOrPromise } from '@venizia/ignis-helpers/common';
4
- import type { AnyType } from '@venizia/ignis-helpers/common';
5
- import { BaseHelper } from '@venizia/ignis-helpers/core';
6
- import { type Env } from 'hono';
7
- import { type TDefineExtraRoutes, type TMetaLinkConfig, type TObjectNameResolver, type TStaticAssetExtraOptions, type TStaticAssetsComponentOptions, type TStaticAssetStorageType } from '../common/index.js';
8
- /** Input of `AssetControllerFactory.defineAssetController`: one entry of `TStaticAssetsComponentOptions` with its storage type and helper. */
9
- export interface IAssetControllerOptions {
10
- controller: TStaticAssetsComponentOptions[string]['controller'];
11
- storage: TStaticAssetStorageType;
12
- helper: IStorageHelper;
13
- useMetaLink?: boolean;
14
- /** The table is erased at this seam on purpose. The public option types carry the real `Schema` and check it; inside the controller every read and write is on MetaLink COLUMNS, and threading a table type nobody here constrains through 700 lines of handler buys nothing. */
15
- metaLink?: TMetaLinkConfig<AnyType>;
16
- options?: TStaticAssetExtraOptions;
17
- /** Decides the stored object name of each uploaded file. Absent leaves the storage helper's own naming untouched. */
18
- resolveObjectName?: TObjectNameResolver;
19
- /** Registers the application's own routes on the generated controller, after every built-in one. */
20
- /** Registers the application's own routes BEFORE every built-in one, so a literal path wins over the catch-all `rawObjectPath` produces. */
21
- defineRoutesBefore?: TDefineExtraRoutes;
22
- defineExtraRoutes?: TDefineExtraRoutes;
1
+ import type { ValueOrPromise } from '@venizia/ignis-helpers/common';
2
+ import type { TStaticAssetEntry } from '../common/index.js';
3
+ import type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from '../models/index.js';
4
+ import type { StaticAssetUploadCommitService, StaticAssetUploadPolicyService } from '../services/index.js';
5
+ /** Input of `StaticAssetControllerFactory.build`: one entry of `TStaticAssetComponentOptions` and its key. */
6
+ export interface IStaticAssetControllerOptions<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema> {
7
+ /** The entry's key in the options object: the controller's name is derived from it. */
8
+ key: string;
9
+ entry: TStaticAssetEntry<Schema>;
10
+ /** What the direct upload routes run: the instances the component bound, so an application service resolving them from the container and the routes share them. Required when the entry turns `directUpload` on. */
11
+ policyService?: Pick<StaticAssetUploadPolicyService, 'issuePolicies'>;
12
+ commitService?: Pick<StaticAssetUploadCommitService<Schema>, 'commit' | 'validate'>;
23
13
  }
24
- /** Hono ALREADY percent-decodes path params - a second decodeURIComponent throws on `report_100%.pdf` and turns `a%2Fb.png` into a DIFFERENT object; `isValidName`/`isValidPath` still run on this value, so traversal is still rejected. */
25
- /** The upload labels, read off the multipart form. Every value arrives as text, so `sequence` is the one that needs converting. */
26
- /** One list: the reader below and the stale-caller warning must agree. */
27
- declare const UPLOAD_LABEL_NAMES: readonly ["principalType", "principalId", "variant", "sequence", "folderPath"];
28
- /** Builds the REST controller class for a static asset entry. Static helpers also expose label checking, object link building and served content type resolution. */
29
- export declare class AssetControllerFactory extends BaseHelper {
30
- constructor();
31
- /** Names any label a caller put in the query - where the upload routes refuse it. */
32
- static findLabelsInQuery(opts: {
33
- query: Record<string, string>;
34
- names?: ReadonlyArray<(typeof UPLOAD_LABEL_NAMES)[number]>;
35
- }): string[];
36
- /** The URL of one object, in the shape its controller serves: no `/buckets/<name>` with a configured bucket, and a raw path with `rawObjectPath`. */
37
- static buildObjectLink(opts: IObjectLocation & {
38
- basePath: string;
39
- hasConfiguredBucket?: boolean;
40
- rawObjectPath?: boolean;
41
- }): string;
42
- /**
43
- * The served type comes from the object NAME, never the backend or the uploader: a renderable type on
44
- * the API origin is stored XSS. Public so a hand-written route makes the same decision - the
45
- * backend's own content-type is dropped by `WHITELIST_HEADERS`.
46
- */
47
- static resolveServedContentType(opts: {
48
- helper: IStorageHelper;
49
- object: IObjectRef;
50
- }): {
51
- contentType: string;
52
- isRenderable: boolean;
53
- };
54
- static defineAssetController(opts: IAssetControllerOptions): {
14
+ /** Builds the REST controller class for a static asset entry. */
15
+ export declare class StaticAssetControllerFactory {
16
+ /** Resolves the entry, then builds its controller. */
17
+ static build<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema>(opts: IStaticAssetControllerOptions<Schema>): {
55
18
  new (): {
56
- /** Clears the multipart spool files written by `parseMultipartBody({ storage: 'disk' })`. */
57
- removeSpoolFiles(spoolOptions: {
58
- paths: string[];
59
- }): void;
60
19
  binding(): ValueOrPromise<void>;
61
20
  measure<R>(opts: {
62
21
  scope: string;
63
22
  args: unknown;
64
23
  task: () => Promise<R>;
65
- }): Promise<any>;
66
- normalizeCountData<ResponseSchema extends unknown, RequestContext extends TRouteContext<Env> = TRouteContext<Env>, ResponseData extends {
24
+ }): Promise<R>;
25
+ normalizeCountData<ResponseSchema, RequestContext extends import("@venizia/ignis-kernel").TRouteContext<import("hono").Env> = import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>, ResponseData extends {
67
26
  count: number;
68
27
  data?: import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
69
28
  } = {
@@ -74,10 +33,10 @@ export declare class AssetControllerFactory extends BaseHelper {
74
33
  payload: ResponseData;
75
34
  }): ResponseData | import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
76
35
  getRequestedExtras(opts: {
77
- context: TRouteContext<Env>;
36
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
78
37
  }): Array<import("@venizia/ignis-kernel").IRequestedExtra>;
79
38
  respond<R>(opts: {
80
- context: TRouteContext<Env>;
39
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
81
40
  format: import("@venizia/ignis-kernel").TResponseFormat;
82
41
  payload: {
83
42
  count: number;
@@ -90,7 +49,7 @@ export declare class AssetControllerFactory extends BaseHelper {
90
49
  data?: import("@venizia/ignis-helpers").TNullable<R>;
91
50
  } | null | undefined;
92
51
  respond<R, Extra extends Record<string, import("@venizia/ignis-kernel").TResponseExtra>>(opts: {
93
- context: TRouteContext<Env>;
52
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
94
53
  format: import("@venizia/ignis-kernel").TResponseFormat;
95
54
  payload: {
96
55
  count: number;
@@ -107,7 +66,7 @@ export declare class AssetControllerFactory extends BaseHelper {
107
66
  extra: Partial<Record<keyof Extra, unknown>>;
108
67
  } | null | undefined>;
109
68
  respond<R>(opts: {
110
- context: TRouteContext<Env>;
69
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
111
70
  format: import("@venizia/ignis-kernel").TResponseFormat;
112
71
  payload: {
113
72
  count: number;
@@ -121,7 +80,7 @@ export declare class AssetControllerFactory extends BaseHelper {
121
80
  extra?: Record<string, unknown>;
122
81
  } | null | undefined>;
123
82
  respondWithExtra<R>(opts: {
124
- context: TRouteContext<Env>;
83
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
125
84
  payload: {
126
85
  count: number;
127
86
  data?: import("@venizia/ignis-helpers").TNullable<R>;
@@ -140,7 +99,7 @@ export declare class AssetControllerFactory extends BaseHelper {
140
99
  count?: undefined;
141
100
  } | null | undefined>;
142
101
  setListHeaders(opts: {
143
- context: TRouteContext<Env>;
102
+ context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
144
103
  count: number;
145
104
  } & ({
146
105
  range: import("@venizia/ignis-kernel").TDataRange;
@@ -149,30 +108,30 @@ export declare class AssetControllerFactory extends BaseHelper {
149
108
  total: number;
150
109
  })): void;
151
110
  toHonoHandler<ResponseType = unknown>(opts: {
152
- handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
153
- }): import("hono").Handler<Env, string, import("hono").Input, (Response | Promise<Response>) | (import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig> | Promise<import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig>>)>;
111
+ handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
112
+ }): import("hono").Handler<import("hono").Env, string, import("hono").Input, (Response | Promise<Response>) | (import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig> | Promise<import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig>>)>;
154
113
  bindRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
155
114
  configs: RouteConfig;
156
- }): import("@venizia/ignis-kernel").IBindRouteOptions<RouteConfig, Env, {}, "/">;
115
+ }): import("@venizia/ignis-kernel").IBindRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
157
116
  defineRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
158
117
  configs: RouteConfig;
159
- handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
160
- hook?: import("@hono/zod-openapi").Hook<any, Env, string, any> | undefined;
161
- }): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, Env, {}, "/">;
118
+ handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
119
+ hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
120
+ }): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
162
121
  defineJSXRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
163
122
  configs: RouteConfig;
164
- handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
165
- hook?: import("@hono/zod-openapi").Hook<any, Env, string, any> | undefined;
166
- }): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, Env, {}, "/">;
123
+ handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
124
+ hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
125
+ }): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
167
126
  isConfigured: boolean;
168
- router: import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">;
127
+ router: import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
169
128
  path: string;
170
129
  definitions: Record<string, import("@venizia/ignis-kernel").IAuthRouteConfig>;
171
- getRouter(): import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">;
130
+ getRouter(): import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
172
131
  registerRoutesFromRegistry(opts?: {
173
132
  paths?: import("@venizia/ignis-kernel").TRoutePathScope;
174
133
  }): void;
175
- configure(opts?: {} | undefined): Promise<import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">>;
134
+ configure(opts?: {} | undefined): Promise<import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">>;
176
135
  buildRouteMiddlewares<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
177
136
  configs: RouteConfig;
178
137
  }): {
@@ -180,7 +139,7 @@ export declare class AssetControllerFactory extends BaseHelper {
180
139
  security: {
181
140
  [x: string]: never[];
182
141
  }[];
183
- mws: import("hono").MiddlewareHandler<Env>[];
142
+ mws: import("hono").MiddlewareHandler<import("hono").Env>[];
184
143
  };
185
144
  getRouteConfigs<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
186
145
  configs: RouteConfig;
@@ -202,5 +161,4 @@ export declare class AssetControllerFactory extends BaseHelper {
202
161
  };
203
162
  };
204
163
  }
205
- export {};
206
164
  //# sourceMappingURL=factory.d.ts.map