generathor-laravel 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -339,7 +339,7 @@ const laravel = new LaravelGenerator({
339
339
  customParents: {
340
340
  users: 'App\\Models\\Jetstream\\User as Model',
341
341
  }
342
- };
342
+ }
343
343
  });
344
344
  const dbSource = new Source({
345
345
  type: 'mysql',
@@ -1,4 +1,4 @@
1
- export type ConfigurationType = {
1
+ export type ConfigurationAttributes = {
2
2
  createChildModel?: boolean;
3
3
  createEloquentModelsOnly?: boolean;
4
4
  reference?: string;
@@ -13,7 +13,7 @@ export type ConfigurationType = {
13
13
  };
14
14
  export declare class Configuration {
15
15
  private $attributes;
16
- constructor($attributes: ConfigurationType);
16
+ constructor($attributes: ConfigurationAttributes);
17
17
  directory(): string;
18
18
  reference(): string;
19
19
  source(): string;
@@ -1,11 +1,11 @@
1
1
  import { GeneratorForCollection, GeneratorForItem } from 'generathor';
2
- import { Configuration } from './configuration';
2
+ import { ConfigurationAttributes } from './configuration';
3
3
  import { Item } from 'generathor-db';
4
4
  type GeneratorType = GeneratorForItem | GeneratorForCollection;
5
5
  type Templates = Record<string, GeneratorType>;
6
6
  export declare class LaravelGenerator {
7
7
  private $configuration;
8
- constructor(configuration?: Configuration);
8
+ constructor(configuration?: ConfigurationAttributes);
9
9
  private templateKey;
10
10
  private templateFile;
11
11
  private directory;
package/dist/template.js CHANGED
@@ -19,9 +19,9 @@ const handlebars_1 = require("./helpers/handlebars");
19
19
  class LaravelGenerator {
20
20
  constructor(configuration) {
21
21
  if (!configuration) {
22
- configuration = new configuration_1.Configuration({});
22
+ configuration = {};
23
23
  }
24
- this.$configuration = configuration;
24
+ this.$configuration = new configuration_1.Configuration(configuration);
25
25
  handlebars_1.HandlebarsHelper.configure();
26
26
  }
27
27
  templateKey(key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generathor-laravel",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Use this to create Eloquent models and CRUDs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",