@point-hub/papi 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.
@@ -40,5 +40,7 @@ export default class MakeCommand extends BaseCommand {
40
40
  .replace(/NewCommand/g, `${pascalCase(this.args.name)}Command`)
41
41
  .replace(/newCommand/g, `${camelCase(this.args.name)}Command`);
42
42
  fs.writeFileSync(`${process.cwd()}/src/console/commands/${kebabCase(this.args.name)}/index.spec.ts`, stubTest);
43
+ console.info(`src/console/commands/${kebabCase(this.args.name)}/index.command.ts`, "has been created");
44
+ console.info(`src/console/commands/${kebabCase(this.args.name)}/index.spec.ts`, "has been created");
43
45
  }
44
46
  }
@@ -54,6 +54,8 @@ export default class MakeMiddleware extends BaseCommand {
54
54
  .toString()
55
55
  .replace("new.middleware.js", `index.middleware.js`);
56
56
  fs.writeFileSync(`${process.cwd()}/src/middleware/${kebabCase(this.args.name)}/index.spec.ts`, stubTest);
57
+ console.info(`src/middleware/${kebabCase(this.args.name)}/index.middleware.ts`, "has been created");
58
+ console.info(`src/middleware/${kebabCase(this.args.name)}/index.spec.ts`, "has been created");
57
59
  }
58
60
  copyConfigureableMiddleware() {
59
61
  // Copy middleware file
@@ -68,5 +70,7 @@ export default class MakeMiddleware extends BaseCommand {
68
70
  .toString()
69
71
  .replace("configurable.middleware.js", `index.middleware.js`);
70
72
  fs.writeFileSync(`${process.cwd()}/src/middleware/${kebabCase(this.args.name)}/index.spec.ts`, stubTest);
73
+ console.info(`src/middleware/${kebabCase(this.args.name)}/index.middleware.ts`, "has been created");
74
+ console.info(`src/middleware/${kebabCase(this.args.name)}/index.spec.ts`, "has been created");
71
75
  }
72
76
  }
@@ -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.1",
3
+ "version": "0.0.3",
4
4
  "description": "Point API Framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -62,7 +62,7 @@
62
62
  "dependencies": {
63
63
  "@point-hub/express-cli": "^0.2.2",
64
64
  "@point-hub/express-error-handler": "^0.0.1",
65
- "@point-hub/express-utils": "^0.0.14",
65
+ "@point-hub/express-utils": "^0.1.1",
66
66
  "shelljs": "^0.8.5"
67
67
  },
68
68
  "peerDependencies": {