@arcaelas/dynamite 1.0.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/src/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { connect, default as Table } from "./core/table";
2
+
3
+ // Decoradores
4
+ export { default as Default } from "./decorators/default";
5
+ export { default as Index } from "./decorators/index";
6
+ export { default as IndexSort } from "./decorators/index_sort";
7
+ export { default as Mutate } from "./decorators/mutate";
8
+ export { default as Name } from "./decorators/name";
9
+ export { default as Validate } from "./decorators/validate";
10
+
11
+ export { default as CreatedAt } from "./decorators/created_at";
12
+ export { default as NotNull } from "./decorators/not_null";
13
+ export { default as PrimaryKey } from "./decorators/primary_key";
14
+ export { default as UpdatedAt } from "./decorators/updated_at";
@@ -0,0 +1,12 @@
1
+ /* src/utils/naming.ts
2
+ * -------------------------------------------------
3
+ * Convierte Camel/Pascal → snake_case y pluraliza.
4
+ * Se importa allí donde se necesite.
5
+ */
6
+ import pluralize from "pluralize";
7
+
8
+ export function toSnakePlural(input: string): string {
9
+ // camelCase / PascalCase → snake_case
10
+ const snake = input.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
11
+ return pluralize(snake); // “user” → “users”, “status” → “statuses”…
12
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "include": ["src/**/*", "__tests__/**/*"],
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "module": "commonjs",
6
+ "moduleResolution": "node",
7
+ "baseUrl": "./",
8
+ "paths": {
9
+ "@type/*": ["src/@types/*"],
10
+ "@controller/*": ["src/app/controllers/*"],
11
+ "@provider/*": ["src/app/providers/*"],
12
+ "@resource/*": ["src/resources/*"]
13
+ },
14
+ "esModuleInterop": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "strict": true,
17
+ "noImplicitAny": false,
18
+ "skipLibCheck": true,
19
+ "outDir": "./build",
20
+ "declaration": true,
21
+ "sourceMap": true,
22
+ "resolveJsonModule": true,
23
+ "experimentalDecorators": true,
24
+ "emitDecoratorMetadata": true,
25
+ "downlevelIteration": true,
26
+ "lib": ["ES2022", "DOM"],
27
+ "allowSyntheticDefaultImports": true,
28
+ "useDefineForClassFields": false,
29
+ "strictPropertyInitialization": false
30
+ },
31
+ "exclude": ["node_modules", "**/*.test.ts"]
32
+ }