@pc-nexus/core 0.5.0-next.7 → 0.5.0-next.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.
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { EnvironmentType, NexusCode, NexusError, NexusHttpStatusCode, NexusInnerError, NexusInnerErrorType, Resolver, type Extension, type HandlerFunction, type HandlerFunctionEvent, type NexusAppContext, type ResolverFunction, type Team, type User, } from "@pc-nexus/internal";
1
+ export { EnvironmentType, NexusCode, NexusError, NexusHttpStatusCode, NexusInnerError, NexusInnerErrorType, Resolver, type Extension, type HandlerFunction, type HandlerFunctionEvent, type WebHookHandlerFunctionReturn, type NexusAppContext, type ResolverFunction, type Team, type User, } from "@pc-nexus/internal";
2
2
  export * from "./lib/common.js";
3
3
  export * from "./lib/i18n/index.js";
4
4
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,IAAI,GACZ,MAAM,oBAAoB,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,IAAI,GACZ,MAAM,oBAAoB,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
package/lib/common.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { NexusAppContext } from "@pc-nexus/internal";
2
- export declare const getAppContext: () => NexusAppContext;
2
+ export declare const app: {
3
+ getContext: () => NexusAppContext;
4
+ };
3
5
  export declare const I18nResourcesAccessor: {
4
6
  getI18nInfoConfig: () => any;
5
7
  getTranslationResource: (locale: string) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/lib/common.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,aAAa,QAAO,eAEhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;qCAEG,MAAM;CAC1C,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/lib/common.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,GAAG;sBACI,eAAe;CAGlC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;qCAEG,MAAM;CAC1C,CAAC"}
package/lib/common.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { GLOBAL_KEY_NEXUS_RUNTIME } from "@pc-nexus/internal";
2
- export const getAppContext = () => {
3
- return global[GLOBAL_KEY_NEXUS_RUNTIME].getAppContext();
2
+ export const app = {
3
+ getContext: () => {
4
+ return global[GLOBAL_KEY_NEXUS_RUNTIME].app.getContext();
5
+ },
4
6
  };
5
7
  export const I18nResourcesAccessor = {
6
8
  getI18nInfoConfig: () => global[GLOBAL_KEY_NEXUS_RUNTIME].i18n?.getI18nInfoConfig(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pc-nexus/core",
3
- "version": "0.5.0-next.7",
3
+ "version": "0.5.0-next.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "type": "module",
31
31
  "dependencies": {
32
- "@pc-nexus/internal": "0.5.0-next.7",
32
+ "@pc-nexus/internal": "0.5.0-next.8",
33
33
  "lodash": "^4.17.21"
34
34
  },
35
35
  "devDependencies": {},