expresso-macchiato 0.4.9 → 0.4.10-dev.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/dist/index.js +14 -15
- package/dist/index.mjs +14 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -627,8 +627,8 @@ var RouterWrapper = class {
|
|
|
627
627
|
constructor(data) {
|
|
628
628
|
this.createExpressRouter = () => {
|
|
629
629
|
const newRouter = _express.Router.call(void 0, );
|
|
630
|
+
const avoidOptionsForDefinedApis = [];
|
|
630
631
|
if (this.data.dbRouting) {
|
|
631
|
-
const avoidOptionsForDefinedApis = [];
|
|
632
632
|
if (_optionalChain([this, 'access', _17 => _17.data, 'access', _18 => _18.apis, 'optionalAccess', _19 => _19["/"], 'optionalAccess', _20 => _20.GET])) avoidOptionsForDefinedApis.push("LIST");
|
|
633
633
|
if (_optionalChain([this, 'access', _21 => _21.data, 'access', _22 => _22.apis, 'optionalAccess', _23 => _23["/:id"], 'optionalAccess', _24 => _24.GET])) avoidOptionsForDefinedApis.push("GET");
|
|
634
634
|
if (_optionalChain([this, 'access', _25 => _25.data, 'access', _26 => _26.apis, 'optionalAccess', _27 => _27["/"], 'optionalAccess', _28 => _28.POST])) avoidOptionsForDefinedApis.push("POST");
|
|
@@ -637,19 +637,6 @@ var RouterWrapper = class {
|
|
|
637
637
|
for (const avoid of _nullishCoalesce(this.data.dbRouting.avoid, () => ( []))) {
|
|
638
638
|
if (!avoidOptionsForDefinedApis.includes(avoid)) avoidOptionsForDefinedApis.push(avoid);
|
|
639
639
|
}
|
|
640
|
-
const { entity, bodyParameters, getParameters, primaryKey, secure, returningProps } = this.data.dbRouting;
|
|
641
|
-
DynamicDbRouter.createDbRouter({
|
|
642
|
-
entity,
|
|
643
|
-
bodyParameters,
|
|
644
|
-
getParameters,
|
|
645
|
-
primaryKey,
|
|
646
|
-
router: newRouter,
|
|
647
|
-
basePath: this.data.basePath,
|
|
648
|
-
tag: this.data.tag,
|
|
649
|
-
avoid: avoidOptionsForDefinedApis,
|
|
650
|
-
secure,
|
|
651
|
-
returningProps
|
|
652
|
-
});
|
|
653
640
|
}
|
|
654
641
|
if (this.data.swaggerNewSchemas) {
|
|
655
642
|
for (const schema in this.data.swaggerNewSchemas) Swagger.addSchema(schema, this.data.swaggerNewSchemas[schema].properties);
|
|
@@ -690,7 +677,19 @@ var RouterWrapper = class {
|
|
|
690
677
|
}
|
|
691
678
|
}
|
|
692
679
|
if (this.data.dbRouting) {
|
|
693
|
-
const { entity, bodyParameters, getParameters, primaryKey } = this.data.dbRouting;
|
|
680
|
+
const { entity, bodyParameters, getParameters, primaryKey, secure, returningProps } = this.data.dbRouting;
|
|
681
|
+
DynamicDbRouter.createDbRouter({
|
|
682
|
+
entity,
|
|
683
|
+
bodyParameters,
|
|
684
|
+
getParameters,
|
|
685
|
+
primaryKey,
|
|
686
|
+
router: newRouter,
|
|
687
|
+
basePath: this.data.basePath,
|
|
688
|
+
tag: this.data.tag,
|
|
689
|
+
avoid: avoidOptionsForDefinedApis,
|
|
690
|
+
secure,
|
|
691
|
+
returningProps
|
|
692
|
+
});
|
|
694
693
|
DynamicDbRouter.addDbRouterSwagger({
|
|
695
694
|
entity,
|
|
696
695
|
bodyParameters,
|
package/dist/index.mjs
CHANGED
|
@@ -627,8 +627,8 @@ var RouterWrapper = class {
|
|
|
627
627
|
constructor(data) {
|
|
628
628
|
this.createExpressRouter = () => {
|
|
629
629
|
const newRouter = Router();
|
|
630
|
+
const avoidOptionsForDefinedApis = [];
|
|
630
631
|
if (this.data.dbRouting) {
|
|
631
|
-
const avoidOptionsForDefinedApis = [];
|
|
632
632
|
if (this.data.apis?.["/"]?.GET) avoidOptionsForDefinedApis.push("LIST");
|
|
633
633
|
if (this.data.apis?.["/:id"]?.GET) avoidOptionsForDefinedApis.push("GET");
|
|
634
634
|
if (this.data.apis?.["/"]?.POST) avoidOptionsForDefinedApis.push("POST");
|
|
@@ -637,19 +637,6 @@ var RouterWrapper = class {
|
|
|
637
637
|
for (const avoid of this.data.dbRouting.avoid ?? []) {
|
|
638
638
|
if (!avoidOptionsForDefinedApis.includes(avoid)) avoidOptionsForDefinedApis.push(avoid);
|
|
639
639
|
}
|
|
640
|
-
const { entity, bodyParameters, getParameters, primaryKey, secure, returningProps } = this.data.dbRouting;
|
|
641
|
-
DynamicDbRouter.createDbRouter({
|
|
642
|
-
entity,
|
|
643
|
-
bodyParameters,
|
|
644
|
-
getParameters,
|
|
645
|
-
primaryKey,
|
|
646
|
-
router: newRouter,
|
|
647
|
-
basePath: this.data.basePath,
|
|
648
|
-
tag: this.data.tag,
|
|
649
|
-
avoid: avoidOptionsForDefinedApis,
|
|
650
|
-
secure,
|
|
651
|
-
returningProps
|
|
652
|
-
});
|
|
653
640
|
}
|
|
654
641
|
if (this.data.swaggerNewSchemas) {
|
|
655
642
|
for (const schema in this.data.swaggerNewSchemas) Swagger.addSchema(schema, this.data.swaggerNewSchemas[schema].properties);
|
|
@@ -690,7 +677,19 @@ var RouterWrapper = class {
|
|
|
690
677
|
}
|
|
691
678
|
}
|
|
692
679
|
if (this.data.dbRouting) {
|
|
693
|
-
const { entity, bodyParameters, getParameters, primaryKey } = this.data.dbRouting;
|
|
680
|
+
const { entity, bodyParameters, getParameters, primaryKey, secure, returningProps } = this.data.dbRouting;
|
|
681
|
+
DynamicDbRouter.createDbRouter({
|
|
682
|
+
entity,
|
|
683
|
+
bodyParameters,
|
|
684
|
+
getParameters,
|
|
685
|
+
primaryKey,
|
|
686
|
+
router: newRouter,
|
|
687
|
+
basePath: this.data.basePath,
|
|
688
|
+
tag: this.data.tag,
|
|
689
|
+
avoid: avoidOptionsForDefinedApis,
|
|
690
|
+
secure,
|
|
691
|
+
returningProps
|
|
692
|
+
});
|
|
694
693
|
DynamicDbRouter.addDbRouterSwagger({
|
|
695
694
|
entity,
|
|
696
695
|
bodyParameters,
|