@oak-digital/types-4-strapi-2 0.3.4 → 0.3.6

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.
@@ -128,7 +128,7 @@ var Attributes = /** @class */ (function () {
128
128
  case 'date':
129
129
  case 'datetime':
130
130
  case 'time':
131
- str += 'Date';
131
+ str += 'string';
132
132
  str += requiredString;
133
133
  break;
134
134
  case 'boolean':
@@ -18,9 +18,9 @@ export default class InterfaceManager {
18
18
  prettierFile: any;
19
19
  fileCaseType: "pascal" | "camel" | "capital" | "dot" | "snake" | "constant" | "kebab";
20
20
  folderCaseType: "pascal" | "camel" | "capital" | "dot" | "snake" | "constant" | "kebab";
21
- enabledPlugins: any[];
21
+ enabledPlugins: "url-alias"[];
22
22
  };
23
- constructor(outRoot: string, strapiSrcRoot: string, options?: any);
23
+ constructor(outRoot: string, strapiSrcRoot: string, options?: Partial<typeof InterfaceManager['BaseOptions']>);
24
24
  registerPlugins(): void;
25
25
  validateOptions(): void;
26
26
  loadPrettierConfig(): Promise<void>;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -65,11 +76,18 @@ var types_1 = require("../plugins/types");
65
76
  var InterfaceManager = /** @class */ (function () {
66
77
  function InterfaceManager(outRoot, strapiSrcRoot, options) {
67
78
  if (options === void 0) { options = {}; }
79
+ var _this = this;
68
80
  this.Interfaces = {}; // string = strapi name
69
81
  this.eventEmitter = new events_1.default();
70
82
  this.OutRoot = outRoot;
71
83
  this.StrapiSrcRoot = strapiSrcRoot;
72
- this.Options = Object.assign({}, InterfaceManager.BaseOptions, options);
84
+ this.Options = __assign(__assign({}, InterfaceManager.BaseOptions), options);
85
+ // Make sure all options are set
86
+ Object.keys(this.Options).map(function (name) {
87
+ if (_this.Options[name] === undefined) {
88
+ _this.Options[name] = InterfaceManager.BaseOptions[name];
89
+ }
90
+ });
73
91
  this.validateOptions();
74
92
  this.registerPlugins();
75
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oak-digital/types-4-strapi-2",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Typescript interface generator for Strapi 4 models",
5
5
  "bin": {
6
6
  "t4s": "./bin/index.js"