vona-module-a-static 5.0.11 → 5.0.13

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.
@@ -1,21 +1,7 @@
1
- import type { BeanScopeUtil } from 'vona';
2
- import type { EventOn } from 'vona-module-a-event';
3
- /** event: end */
4
- /** event: begin */
5
- import type { EventResolvePath } from '../bean/event.resolvePath.ts';
6
- /** event: end */
7
- /** event: begin */
8
- import type { TypeEventResolvePathData, TypeEventResolvePathResult } from '../bean/event.resolvePath.ts';
9
- /** middlewareSystem: end */
10
- /** event: begin */
1
+ /** middlewareSystem: begin */
2
+ export * from '../bean/middlewareSystem.static.ts';
11
3
  import type { IMiddlewareSystemOptionsStatic } from '../bean/middlewareSystem.static.ts';
12
- /** event: end */
13
- /** scope: begin */
14
- import { BeanScopeBase } from 'vona';
15
- import 'vona';
16
4
  import 'vona';
17
- import 'vona';
18
- export * from '../bean/event.resolvePath.ts';
19
5
  declare module 'vona-module-a-aspect' {
20
6
  interface IMiddlewareSystemRecord {
21
7
  'a-static:static': IMiddlewareSystemOptionsStatic;
@@ -24,29 +10,50 @@ declare module 'vona-module-a-aspect' {
24
10
  declare module 'vona-module-a-static' {
25
11
  interface MiddlewareSystemStatic {
26
12
  }
13
+ interface MiddlewareSystemStatic {
14
+ get $beanFullName(): 'a-static.middlewareSystem.static';
15
+ get $onionName(): 'a-static:static';
16
+ }
27
17
  }
28
- /** middlewareSystem: begin */
29
- export * from '../bean/middlewareSystem.static.ts';
18
+ /** middlewareSystem: end */
19
+ /** event: begin */
20
+ export * from '../bean/event.resolvePath.ts';
21
+ import 'vona';
30
22
  declare module 'vona' {
31
23
  }
32
24
  declare module 'vona-module-a-static' {
33
25
  interface EventResolvePath {
34
26
  }
27
+ interface EventResolvePath {
28
+ get $beanFullName(): 'a-static.event.resolvePath';
29
+ get $onionName(): 'a-static:resolvePath';
30
+ }
35
31
  }
32
+ /** event: end */
33
+ /** event: begin */
34
+ import type { EventResolvePath } from '../bean/event.resolvePath.ts';
36
35
  export interface IModuleEvent {
37
- resolvePath: EventResolvePath;
36
+ 'resolvePath': EventResolvePath;
38
37
  }
38
+ /** event: end */
39
+ /** event: begin */
40
+ import type { TypeEventResolvePathData, TypeEventResolvePathResult } from '../bean/event.resolvePath.ts';
41
+ import type { EventOn } from 'vona-module-a-event';
39
42
  declare module 'vona-module-a-event' {
40
43
  interface IEventRecord {
41
44
  'a-static:resolvePath': EventOn<TypeEventResolvePathData, TypeEventResolvePathResult>;
42
45
  }
43
46
  }
47
+ /** event: end */
48
+ /** scope: begin */
49
+ import { BeanScopeBase, type BeanScopeUtil } from 'vona';
44
50
  export declare class ScopeModuleAStatic extends BeanScopeBase {
45
51
  }
46
52
  export interface ScopeModuleAStatic {
47
53
  util: BeanScopeUtil;
48
54
  event: IModuleEvent;
49
55
  }
56
+ import 'vona';
50
57
  declare module 'vona' {
51
58
  interface IBeanScopeRecord {
52
59
  'a-static': ScopeModuleAStatic;
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import { BeanInfo, BeanBase, compose, BeanScopeBase, SymbolModuleBelong } from 'vona';
2
- import { Scope } from 'vona-module-a-bean';
3
- import { Event, BeanEventBase } from 'vona-module-a-event';
4
2
  import assert from 'node:assert';
5
3
  import { existsSync, mkdirSync } from 'node:fs';
6
4
  import path from 'node:path';
@@ -9,18 +7,15 @@ import { isObject, isString } from '@cabloy/utils';
9
7
  import range from 'koa-range';
10
8
  import { MiddlewareSystem } from 'vona-module-a-aspect';
11
9
  import { LRU } from 'ylru';
12
-
13
- var _dec$2, _dec2$2, _class$2;
14
- let EventResolvePath = (_dec$2 = Event(), _dec2$2 = BeanInfo({
15
- module: "a-static"
16
- }), _dec$2(_class$2 = _dec2$2(_class$2 = class EventResolvePath extends BeanEventBase {}) || _class$2) || _class$2);
10
+ import { Event, BeanEventBase } from 'vona-module-a-event';
11
+ import { Scope } from 'vona-module-a-bean';
17
12
 
18
13
  const __ThisModule__ = 'a-static';
19
14
 
20
15
  const SymbolStaticGetFullPathInner = Symbol('SymbolStaticGetFullPathInner');
21
16
 
22
- var _dec$1, _dec2$1, _class$1;
23
- let MiddlewareSystemStatic = (_dec$1 = MiddlewareSystem({
17
+ var _dec$2, _dec2$2, _class$2;
18
+ let MiddlewareSystemStatic = (_dec$2 = MiddlewareSystem({
24
19
  dependencies: 'a-instance:appReady',
25
20
  apiStaticPrefix: '/api/static/',
26
21
  dirs: [],
@@ -35,9 +30,9 @@ let MiddlewareSystemStatic = (_dec$1 = MiddlewareSystem({
35
30
  // buffer: false,
36
31
  // dir: '',
37
32
  // prefix: '/', // should be always '/', so as to support ssr site
38
- }), _dec2$1 = BeanInfo({
33
+ }), _dec2$2 = BeanInfo({
39
34
  module: "a-static"
40
- }), _dec$1(_class$1 = _dec2$1(_class$1 = class MiddlewareSystemStatic extends BeanBase {
35
+ }), _dec$2(_class$2 = _dec2$2(_class$2 = class MiddlewareSystemStatic extends BeanBase {
41
36
  constructor(...args) {
42
37
  super(...args);
43
38
  this._composer = void 0;
@@ -99,9 +94,9 @@ let MiddlewareSystemStatic = (_dec$1 = MiddlewareSystem({
99
94
  }
100
95
  return middlewares;
101
96
  }
102
- }) || _class$1) || _class$1);
97
+ }) || _class$2) || _class$2);
103
98
  async function getFullPath(ctx, dir, filename, options) {
104
- if (process.env.META_MODE === 'local') {
99
+ if (process.env.META_MODE === 'dev') {
105
100
  ctx[SymbolStaticGetFullPathInner] = () => {
106
101
  return _getFullPathInner(ctx, dir, filename, options);
107
102
  };
@@ -144,6 +139,11 @@ async function _getFullPathInner(ctx, dir, filename, options) {
144
139
  return fullPath;
145
140
  }
146
141
 
142
+ var _dec$1, _dec2$1, _class$1;
143
+ let EventResolvePath = (_dec$1 = Event(), _dec2$1 = BeanInfo({
144
+ module: "a-static"
145
+ }), _dec$1(_class$1 = _dec2$1(_class$1 = class EventResolvePath extends BeanEventBase {}) || _class$1) || _class$1);
146
+
147
147
  var _dec, _dec2, _class;
148
148
  let ScopeModuleAStatic = (_dec = Scope(), _dec2 = BeanInfo({
149
149
  module: "a-static"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-static",
3
3
  "type": "module",
4
- "version": "5.0.11",
4
+ "version": "5.0.13",
5
5
  "title": "a-static",
6
6
  "vonaModule": {
7
7
  "dependencies": {},