@kadirgun/lucid-bravo 0.0.2 → 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.
@@ -1 +1 @@
1
- {"commands":[],"version":1}
1
+ {"commands":[{"commandName":"make:bravo","description":"Create a new Bravo class for a given model","help":"","namespace":"make","aliases":[],"flags":[],"args":[{"name":"name","argumentName":"name","required":true,"description":"Name of the bravo class model","type":"string"}],"options":{},"filePath":"make_bravo.js"}],"version":1}
@@ -0,0 +1,21 @@
1
+ import { t as stubsRoot } from "../main-C9qVc2Ss.js";
2
+ import { BaseCommand, args } from "@adonisjs/core/ace";
3
+ //#region \0@oxc-project+runtime@0.122.0/helpers/decorate.js
4
+ function __decorate(decorators, target, key, desc) {
5
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
+ }
10
+ //#endregion
11
+ //#region commands/make_bravo.ts
12
+ var MakeBravo = class extends BaseCommand {
13
+ static commandName = "make:bravo";
14
+ static description = "Create a new Bravo class for a given model";
15
+ async run() {
16
+ return (await this.createCodemods()).makeUsingStub(stubsRoot, "make/bravos/main.stub", { entity: this.app.generators.createEntity(this.name) });
17
+ }
18
+ };
19
+ __decorate([args.string({ description: "Name of the bravo class model" })], MakeBravo.prototype, "name", void 0);
20
+ //#endregion
21
+ export { MakeBravo as default };
package/build/index.js CHANGED
@@ -1,13 +1,7 @@
1
1
  import { configure } from "./configure.js";
2
+ import { t as stubsRoot } from "./main-C9qVc2Ss.js";
2
3
  import stringHelpers from "@adonisjs/core/helpers/string";
3
4
  import { HttpContext } from "@adonisjs/core/http";
4
- //#region stubs/main.ts
5
- /**
6
- * Path to the root directory where the stubs are stored. We use
7
- * this path within commands and the configure hook
8
- */
9
- const stubsRoot = import.meta.dirname;
10
- //#endregion
11
5
  //#region src/lucid_bravo.ts
12
6
  var LucidBravo = class {
13
7
  $model;
@@ -0,0 +1,8 @@
1
+ //#region stubs/main.ts
2
+ /**
3
+ * Path to the root directory where the stubs are stored. We use
4
+ * this path within commands and the configure hook
5
+ */
6
+ const stubsRoot = import.meta.dirname;
7
+ //#endregion
8
+ export { stubsRoot as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kadirgun/lucid-bravo",
3
3
  "description": "A powerful, fluent query builder for AdonisJS Lucid to handle filtering, sorting and pagination in a single flow",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
7
7
  },
@@ -94,7 +94,8 @@
94
94
  "tsdown": {
95
95
  "entry": [
96
96
  "./index.ts",
97
- "./configure.ts"
97
+ "./configure.ts",
98
+ "./commands/make_bravo.ts"
98
99
  ],
99
100
  "outDir": "./build",
100
101
  "clean": true,