@pc-nexus/core 0.0.1-next.2 → 0.1.0

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/lib/common.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const NEXUS_CONTEXT_TOKEN_HEADER_KEY = "x-nexus-context-token";
2
- declare const hook: (name: string) => any;
3
- export { hook, NEXUS_CONTEXT_TOKEN_HEADER_KEY };
1
+ export declare const NEXUS_CONTEXT_TOKEN_HEADER_KEY = "x-nexus-context-token";
2
+ export declare const NEXUS_GATEWAY_ENDPOINT_HEADER_KEY = "x-nexus-gateway-endpoint";
3
+ export declare const invoke: (gateway: string, endpoint: string, payload: unknown) => Promise<Response>;
4
4
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/lib/common.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,8BAA8B,0BAA0B,CAAC;AAE/D,QAAA,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,GAA2C,CAAC;AAEzE,OAAO,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/lib/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,0BAA0B,CAAC;AACtE,eAAO,MAAM,iCAAiC,6BAA6B,CAAC;AAC5E,eAAO,MAAM,MAAM,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,EAAE,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAClB,CAAC"}
package/lib/common.js CHANGED
@@ -1,4 +1,5 @@
1
- const NEXUS_RUNTIME = "__nexus_runtime__";
2
- const NEXUS_CONTEXT_TOKEN_HEADER_KEY = "x-nexus-context-token";
3
- const hook = (name) => global[NEXUS_RUNTIME][name];
4
- export { hook, NEXUS_CONTEXT_TOKEN_HEADER_KEY };
1
+ export const NEXUS_CONTEXT_TOKEN_HEADER_KEY = "x-nexus-context-token";
2
+ export const NEXUS_GATEWAY_ENDPOINT_HEADER_KEY = "x-nexus-gateway-endpoint";
3
+ export const invoke = (gateway, endpoint, payload) => global["__nexus_runtime__"].invoke(gateway, endpoint, payload);
4
+ // const hook = (name: string): any => (global as any)[NEXUS_RUNTIME][name];
5
+ // export { invoke, NEXUS_CONTEXT_TOKEN_HEADER_KEY, NEXUS_GATEWAY_ENDPOINT_HEADER_KEY };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pc-nexus/core",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {