@point-hub/papi 0.0.2 → 0.0.4

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,2 +1,2 @@
1
- import { URL } from "url";
2
- export const stubDir = new URL("../../stub", import.meta.url).pathname;
1
+ import { URL, fileURLToPath } from "url";
2
+ export const stubDir = fileURLToPath(new URL("../../stub", import.meta.url));
@@ -7,7 +7,7 @@ export declare class ConsoleKernel {
7
7
  * Register the commands for the application.
8
8
  *
9
9
  * @example
10
- * command.register(new ExampleCommand());
10
+ * this.command.register(new ExampleCommand());
11
11
  */
12
12
  register(): Promise<void>;
13
13
  }
@@ -1,15 +1,15 @@
1
- import { URL } from "url";
1
+ import { URL, fileURLToPath } from "url";
2
2
  import { fileSearch } from "@point-hub/express-utils";
3
3
  export class ConsoleKernel {
4
4
  constructor(command) {
5
- this.path = new URL(".", import.meta.url).pathname;
5
+ this.path = fileURLToPath(new URL(".", import.meta.url));
6
6
  this.command = command;
7
7
  }
8
8
  /**
9
9
  * Register the commands for the application.
10
10
  *
11
11
  * @example
12
- * command.register(new ExampleCommand());
12
+ * this.command.register(new ExampleCommand());
13
13
  */
14
14
  async register() {
15
15
  const result = await fileSearch("/*.command.(js|ts)", this.path, { maxDeep: 2, regExp: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@point-hub/papi",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Point API Framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "build": "shx rm -rf lib && npm run build:compile && npm run build:resolve-path",
18
18
  "lint": "eslint ./src/**/*.ts",
19
19
  "lint:fix": "npm run lint -- --fix",
20
- "test": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
20
+ "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
21
21
  "test:coverage": "shx rm -rf coverage && npm run test -- --coverage"
22
22
  },
23
23
  "keywords": [
@@ -47,6 +47,7 @@
47
47
  "@typescript-eslint/eslint-plugin": "^5.25.0",
48
48
  "babel-jest": "^28.1.2",
49
49
  "concurrently": "^7.2.2",
50
+ "cross-env": "^7.0.3",
50
51
  "eslint": "^8.15.0",
51
52
  "eslint-config-prettier": "^8.5.0",
52
53
  "eslint-import-resolver-typescript": "^3.2.4",