@h3ravel/arquebus 0.1.5 → 0.2.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.
Files changed (37) hide show
  1. package/bin/.gitkeep +0 -0
  2. package/{dist/index.cjs → bin/cli.cjs} +1161 -803
  3. package/bin/cli.d.cts +18 -0
  4. package/bin/cli.d.ts +18 -0
  5. package/bin/cli.js +4887 -183
  6. package/bin/index.cjs +4948 -0
  7. package/bin/index.d.cts +2 -0
  8. package/bin/index.d.ts +2 -0
  9. package/bin/index.js +4923 -0
  10. package/bin/migrations/stubs/migration-js.stub +21 -0
  11. package/bin/migrations/stubs/migration-ts.stub +18 -0
  12. package/bin/migrations/stubs/migration.create-js.stub +24 -0
  13. package/bin/migrations/stubs/migration.create-ts.stub +21 -0
  14. package/bin/migrations/stubs/migration.update-js.stub +25 -0
  15. package/bin/migrations/stubs/migration.update-ts.stub +22 -0
  16. package/bin/stubs/arquebus.config-js.stub +25 -0
  17. package/bin/stubs/arquebus.config-ts.stub +24 -0
  18. package/bin/stubs/model-js.stub +5 -0
  19. package/bin/stubs/model-ts.stub +5 -0
  20. package/dist/browser/index.cjs +117 -97
  21. package/dist/browser/index.d.cts +1205 -165
  22. package/dist/browser/index.d.ts +1205 -165
  23. package/dist/browser/index.js +115 -96
  24. package/dist/index.d.ts +1279 -347
  25. package/dist/index.js +3758 -3547
  26. package/package.json +24 -9
  27. package/src/migrations/stubs/migration-js.stub +21 -0
  28. package/src/migrations/stubs/migration-ts.stub +18 -0
  29. package/src/migrations/stubs/migration.create-js.stub +24 -0
  30. package/src/migrations/stubs/migration.create-ts.stub +21 -0
  31. package/src/migrations/stubs/migration.update-js.stub +25 -0
  32. package/src/migrations/stubs/migration.update-ts.stub +22 -0
  33. package/src/stubs/arquebus.config-js.stub +25 -0
  34. package/src/stubs/arquebus.config-ts.stub +24 -0
  35. package/src/stubs/model-js.stub +5 -0
  36. package/src/stubs/model-ts.stub +5 -0
  37. package/dist/index.d.cts +0 -457
@@ -0,0 +1,21 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+
3
+ export default class extends Migration {
4
+ /**
5
+ * Run the migrations.
6
+ *
7
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
8
+ */
9
+ async up(schema) {
10
+ //
11
+ }
12
+
13
+ /**
14
+ * Reverse the migrations.
15
+ *
16
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
17
+ */
18
+ async down(schema) {
19
+ //
20
+ }
21
+ };
@@ -0,0 +1,18 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+ import { SchemaBuilder } from '@h3ravel/arquebus/types/query-builder';
3
+
4
+ export default class extends Migration {
5
+ /**
6
+ * Run the migrations.
7
+ */
8
+ async up (schema: SchemaBuilder) {
9
+ //
10
+ }
11
+
12
+ /**
13
+ * Reverse the migrations.
14
+ */
15
+ async down (schema: SchemaBuilder) {
16
+ //
17
+ }
18
+ };
@@ -0,0 +1,24 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+
3
+ export default class extends Migration {
4
+ /**
5
+ * Run the migrations.
6
+ *
7
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
8
+ */
9
+ async up(schema) {
10
+ await schema.createTable('{{ table }}', (table) => {
11
+ table.increments('id');
12
+ table.timestamps();
13
+ });
14
+ }
15
+
16
+ /**
17
+ * Reverse the migrations.
18
+ *
19
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
20
+ */
21
+ async down(schema) {
22
+ await schema.dropTableIfExists('{{ table }}');
23
+ }
24
+ };
@@ -0,0 +1,21 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+ import { SchemaBuilder } from '@h3ravel/arquebus/types/query-builder';
3
+
4
+ export default class extends Migration {
5
+ /**
6
+ * Run the migrations.
7
+ */
8
+ async up(schema: SchemaBuilder) {
9
+ await schema.createTable('{{ table }}', (table) => {
10
+ table.increments('id');
11
+ table.timestamps();
12
+ });
13
+ }
14
+
15
+ /**
16
+ * Reverse the migrations.
17
+ */
18
+ async down(schema: SchemaBuilder) {
19
+ await schema.dropTableIfExists('{{ table }}');
20
+ }
21
+ };
@@ -0,0 +1,25 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+
3
+ export default class extends Migration {
4
+ /**
5
+ * Run the migrations.
6
+ *
7
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
8
+ */
9
+ async up(schema) {
10
+ await schema.table('{{ table }}', (table) => {
11
+ //
12
+ });
13
+ }
14
+
15
+ /**
16
+ * Reverse the migrations.
17
+ *
18
+ * @param {(import('@h3ravel/arquebus/types/query-builder').SchemaBuilder)} schema
19
+ */
20
+ async down(schema) {
21
+ await schema.table('{{ table }}', (table) => {
22
+ //
23
+ });
24
+ }
25
+ };
@@ -0,0 +1,22 @@
1
+ import { Migration } from '@h3ravel/arquebus'
2
+ import { SchemaBuilder } from '@h3ravel/arquebus/types/query-builder';
3
+
4
+ export default class extends Migration {
5
+ /**
6
+ * Run the migrations.
7
+ */
8
+ async up(schema: SchemaBuilder) {
9
+ await schema.table('{{ table }}', (table) => {
10
+ //
11
+ });
12
+ }
13
+
14
+ /**
15
+ * Reverse the migrations.
16
+ */
17
+ async down(schema: SchemaBuilder) {
18
+ await schema.table('{{ table }}', (table) => {
19
+ //
20
+ });
21
+ }
22
+ };
@@ -0,0 +1,25 @@
1
+ import { defineConfig } from '@h3ravel/arquebus'
2
+
3
+ export default defineConfig({
4
+ client: 'mysql2',
5
+ connection: {
6
+ host: 'localhost',
7
+ database: 'database',
8
+ user: 'user',
9
+ password: 'password'
10
+ },
11
+ migrations: {
12
+ table: 'migrations',
13
+ path: './migrations',
14
+ },
15
+ factories: {
16
+ path: './factories',
17
+ },
18
+ seeders: {
19
+ path: './seeders',
20
+ },
21
+ models: {
22
+ path: './models'
23
+ }
24
+ })
25
+
@@ -0,0 +1,24 @@
1
+ import { defineConfig } from '@h3ravel/arquebus'
2
+
3
+ export default defineConfig({
4
+ client: 'mysql2',
5
+ connection: {
6
+ host: 'localhost',
7
+ database: 'database',
8
+ user: 'user',
9
+ password: 'password'
10
+ },
11
+ migrations: {
12
+ table: 'migrations',
13
+ path: './migrations',
14
+ },
15
+ factories: {
16
+ path: './factories',
17
+ },
18
+ seeders: {
19
+ path: './seeders',
20
+ },
21
+ models: {
22
+ path: './models'
23
+ }
24
+ })
@@ -0,0 +1,5 @@
1
+ import { Model } from '@h3ravel/arquebus'
2
+
3
+ export default class {{ name }} extends Model {
4
+ //
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Model } from '@h3ravel/arquebus'
2
+
3
+ export default class {{ name }} extends Model {
4
+ //
5
+ }