phecda-web 3.0.0 → 3.0.1

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/index.d.mts CHANGED
@@ -16,7 +16,6 @@ type DeepPartial<T> = {
16
16
  declare const emitter: PhecdaEmitter;
17
17
  declare function defaultWebInject(): void;
18
18
 
19
- declare function wait(...instances: InstanceType<Construct>[]): Promise<any[]>;
20
19
  declare function getParamtypes(Model: Construct): any;
21
20
  declare const phecdaNamespace: Map<string, WebPhecda>;
22
21
  declare function setDefaultPhecda(namespace: string, phecda: WebPhecda): void;
@@ -89,4 +88,4 @@ declare class WebBase extends Base {
89
88
  emitter: PhecdaEmitter;
90
89
  }
91
90
 
92
- export { type DeepPartial, type PhecdaEmitter, WebBase, WebPhecda, bindMethod, defaultWebInject, delDefaultPhecda, emitter, getDefaultPhecda, getParamtypes, phecdaNamespace, setDefaultPhecda, wait };
91
+ export { type DeepPartial, type PhecdaEmitter, WebBase, WebPhecda, bindMethod, defaultWebInject, delDefaultPhecda, emitter, getDefaultPhecda, getParamtypes, phecdaNamespace, setDefaultPhecda };
package/dist/index.d.ts CHANGED
@@ -16,7 +16,6 @@ type DeepPartial<T> = {
16
16
  declare const emitter: PhecdaEmitter;
17
17
  declare function defaultWebInject(): void;
18
18
 
19
- declare function wait(...instances: InstanceType<Construct>[]): Promise<any[]>;
20
19
  declare function getParamtypes(Model: Construct): any;
21
20
  declare const phecdaNamespace: Map<string, WebPhecda>;
22
21
  declare function setDefaultPhecda(namespace: string, phecda: WebPhecda): void;
@@ -89,4 +88,4 @@ declare class WebBase extends Base {
89
88
  emitter: PhecdaEmitter;
90
89
  }
91
90
 
92
- export { type DeepPartial, type PhecdaEmitter, WebBase, WebPhecda, bindMethod, defaultWebInject, delDefaultPhecda, emitter, getDefaultPhecda, getParamtypes, phecdaNamespace, setDefaultPhecda, wait };
91
+ export { type DeepPartial, type PhecdaEmitter, WebBase, WebPhecda, bindMethod, defaultWebInject, delDefaultPhecda, emitter, getDefaultPhecda, getParamtypes, phecdaNamespace, setDefaultPhecda };
package/dist/index.js CHANGED
@@ -42,8 +42,7 @@ __export(src_exports, {
42
42
  getDefaultPhecda: () => getDefaultPhecda,
43
43
  getParamtypes: () => getParamtypes,
44
44
  phecdaNamespace: () => phecdaNamespace,
45
- setDefaultPhecda: () => setDefaultPhecda,
46
- wait: () => wait
45
+ setDefaultPhecda: () => setDefaultPhecda
47
46
  });
48
47
  module.exports = __toCommonJS(src_exports);
49
48
  __reExport(src_exports, require("phecda-core"), module.exports);
@@ -117,10 +116,6 @@ function deepMerge(target, patchToApply) {
117
116
  __name(deepMerge, "deepMerge");
118
117
 
119
118
  // src/core.ts
120
- function wait(...instances) {
121
- return Promise.all(instances.map((i) => i.__PROMISE_SYMBOL__));
122
- }
123
- __name(wait, "wait");
124
119
  function getParamtypes(Model) {
125
120
  return Reflect.getMetadata("design:paramtypes", Model);
126
121
  }
@@ -184,7 +179,7 @@ var WebPhecda = class {
184
179
  then(onfulfilled, onrejected) {
185
180
  const then = this.then;
186
181
  this.then = void 0;
187
- wait(...Object.values(this.state)).then(() => onfulfilled?.(this), onrejected).then(() => {
182
+ (0, import_phecda_core2.wait)(...Object.values(this.state)).then(() => onfulfilled?.(this), onrejected).then(() => {
188
183
  this.then = then;
189
184
  });
190
185
  return this;
@@ -345,6 +340,5 @@ var import_ts_mixer = require("ts-mixer");
345
340
  getParamtypes,
346
341
  phecdaNamespace,
347
342
  setDefaultPhecda,
348
- wait,
349
343
  ...require("phecda-core")
350
344
  });
package/dist/index.mjs CHANGED
@@ -48,7 +48,7 @@ function defaultWebInject() {
48
48
  __name(defaultWebInject, "defaultWebInject");
49
49
 
50
50
  // src/core.ts
51
- import { get, getTag, invokeInit, invokeUnmount } from "phecda-core";
51
+ import { get, getTag, invokeInit, invokeUnmount, wait } from "phecda-core";
52
52
  import "reflect-metadata";
53
53
  import mitt2 from "mitt";
54
54
 
@@ -73,10 +73,6 @@ function deepMerge(target, patchToApply) {
73
73
  __name(deepMerge, "deepMerge");
74
74
 
75
75
  // src/core.ts
76
- function wait(...instances) {
77
- return Promise.all(instances.map((i) => i.__PROMISE_SYMBOL__));
78
- }
79
- __name(wait, "wait");
80
76
  function getParamtypes(Model) {
81
77
  return Reflect.getMetadata("design:paramtypes", Model);
82
78
  }
@@ -299,6 +295,5 @@ export {
299
295
  getDefaultPhecda,
300
296
  getParamtypes,
301
297
  phecdaNamespace,
302
- setDefaultPhecda,
303
- wait
298
+ setDefaultPhecda
304
299
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-web",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "using proxy, provide phecda function to web app",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "mitt": "^3.0.0",
20
20
  "reflect-metadata": "^0.1.13",
21
21
  "ts-mixer": "^6.0.4",
22
- "phecda-core": "4.0.0"
22
+ "phecda-core": "4.0.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "tsup": "^8.1.0"