@xube/kit-destination 0.0.1 → 0.0.3

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/confirm.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ConfirmationRequest } from "./generated";
2
2
  import { XubeLog } from "@xube/kit-log";
3
3
  import { XubeResponse } from "@xube/kit-request";
4
- export declare const isConfirmation: (headers: Record<string, string>, body: Record<string, any>) => boolean;
4
+ export declare const isConfirmation: (headers: Record<string, any>, body: Record<string, any>) => boolean;
5
5
  export declare const confirmDestination: (confirmationRequest: ConfirmationRequest, log?: XubeLog) => Promise<XubeResponse<boolean>>;
package/dist/confirm.js CHANGED
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.confirmDestination = exports.isConfirmation = void 0;
4
4
  const generated_1 = require("./generated");
5
- // import { XubeResponse } from "@xube/common";
6
5
  const kit_constants_1 = require("@xube/kit-constants");
7
6
  const kit_log_1 = require("@xube/kit-log");
8
7
  const kit_request_1 = require("@xube/kit-request");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const kit_generator_1 = require("@xube/kit-generator");
4
+ const confirmation_request_1 = require("./schemas/confirmation-request");
5
+ const headers_1 = require("./schemas/headers");
6
+ const generatedFilePaths = [
7
+ ...(0, kit_generator_1.generateTypeSchemaFiles)("destinationHeaders", headers_1.DestinationHeadersSchema, __dirname),
8
+ ...(0, kit_generator_1.generateTypeSchemaFiles)("confirmationRequest", confirmation_request_1.ConfirmationRequestSchema, __dirname),
9
+ ];
10
+ (0, kit_generator_1.generateExportIndex)(generatedFilePaths, __dirname);
package/dist/index.d.ts CHANGED
@@ -0,0 +1,5 @@
1
+ export * from "./schemas/confirmation-request";
2
+ export * from "./schemas/headers";
3
+ export * from "./constants";
4
+ export * from "./confirm";
5
+ export * from "./generated";
package/dist/index.js CHANGED
@@ -1 +1,21 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./schemas/confirmation-request"), exports);
18
+ __exportStar(require("./schemas/headers"), exports);
19
+ __exportStar(require("./constants"), exports);
20
+ __exportStar(require("./confirm"), exports);
21
+ __exportStar(require("./generated"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-destination",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -19,13 +19,13 @@
19
19
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
20
20
  "devDependencies": {
21
21
  "@types/node": "^20.4.7",
22
- "@xube/kit-build": "^0.0.1",
22
+ "@xube/kit-build": "^0.0.3",
23
23
  "ts-node": "^10.9.1",
24
24
  "typescript": "^5.1.6"
25
25
  },
26
26
  "dependencies": {
27
- "@xube/kit-generator": "^0.0.1",
28
- "@xube/kit-log": "^0.0.1",
29
- "@xube/kit-request": "^0.0.1"
27
+ "@xube/kit-generator": "^0.0.3",
28
+ "@xube/kit-log": "^0.0.3",
29
+ "@xube/kit-request": "^0.0.3"
30
30
  }
31
31
  }
package/src/confirm.ts CHANGED
@@ -3,13 +3,12 @@ import {
3
3
  isConfirmationRequest,
4
4
  isDestinationHeaders,
5
5
  } from "./generated";
6
- // import { XubeResponse } from "@xube/common";
7
6
  import { StatusCode } from "@xube/kit-constants";
8
7
  import { XubeLog } from "@xube/kit-log";
9
8
  import { XubeResponse } from "@xube/kit-request";
10
9
 
11
10
  export const isConfirmation = (
12
- headers: Record<string, string>,
11
+ headers: Record<string, any>,
13
12
  body: Record<string, any>
14
13
  ): boolean =>
15
14
  isDestinationHeaders(headers) &&
package/src/index.ts CHANGED
@@ -0,0 +1,7 @@
1
+ export * from "./schemas/confirmation-request";
2
+ export * from "./schemas/headers";
3
+
4
+ export * from "./constants"
5
+ export * from "./confirm"
6
+
7
+ export * from "./generated"
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "rootDir": "./src",
5
5
  "outDir": "./dist"
6
6
  },
7
- "exclude": ["**/*.test.ts", "**/*.mock.ts", "dist", "./src/generator.ts"],
7
+ "exclude": ["**/*.test.ts", "**/*.mock.ts", "dist"],
8
8
  "references": [
9
9
  {
10
10
  "path": "../kit-generator"
@@ -12,6 +12,9 @@
12
12
  {
13
13
  "path": "../kit-constants"
14
14
  },
15
+ {
16
+ "path": "../kit-log"
17
+ },
15
18
  {
16
19
  "path": "../kit-request"
17
20
  }