@tsed/formio 6.102.4 → 6.102.8-rc.1

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -2,17 +2,17 @@ import { __decorate, __metadata } from "tslib";
2
2
  import { Constant, Inject, InjectorService, normalizePath, PlatformApplication } from "@tsed/common";
3
3
  import { deepClone } from "@tsed/core";
4
4
  import { Module } from "@tsed/di";
5
- import { AlterActions } from "./components/AlterActions";
6
- import { AlterAudit } from "./components/AlterAudit";
7
- import { AlterHost } from "./components/AlterHost";
8
- import { AlterLog } from "./components/AlterLog";
9
- import { AlterSkip } from "./components/AlterSkip";
10
- import { AlterTemplateExportSteps } from "./components/AlterTemplateExportSteps";
11
- import { AlterTemplateImportSteps } from "./components/AlterTemplateImportSteps";
12
- import { FormioAuthService } from "./services/FormioAuthService";
13
- import { FormioHooksService } from "./services/FormioHooksService";
14
- import { FormioInstaller } from "./services/FormioInstaller";
15
- import { FormioService } from "./services/FormioService";
5
+ import { AlterActions } from "./components/AlterActions.js";
6
+ import { AlterAudit } from "./components/AlterAudit.js";
7
+ import { AlterHost } from "./components/AlterHost.js";
8
+ import { AlterLog } from "./components/AlterLog.js";
9
+ import { AlterSkip } from "./components/AlterSkip.js";
10
+ import { AlterTemplateExportSteps } from "./components/AlterTemplateExportSteps.js";
11
+ import { AlterTemplateImportSteps } from "./components/AlterTemplateImportSteps.js";
12
+ import { FormioAuthService } from "./services/FormioAuthService.js";
13
+ import { FormioHooksService } from "./services/FormioHooksService.js";
14
+ import { FormioInstaller } from "./services/FormioInstaller.js";
15
+ import { FormioService } from "./services/FormioService.js";
16
16
  let FormioModule = class FormioModule {
17
17
  $onInit() {
18
18
  return this.init(deepClone(this.settings));
@@ -1,8 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { EndpointMetadata, PlatformHandler } from "@tsed/common";
3
3
  import { Inject, InjectorService } from "@tsed/di";
4
- import { Alter } from "../decorators/alter";
5
- import { FormioService } from "../services/FormioService";
4
+ import { Alter } from "../decorators/alter.js";
5
+ import { FormioService } from "../services/FormioService.js";
6
6
  let AlterActions = class AlterActions {
7
7
  transform(actions) {
8
8
  const { Action } = this.formio;
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { Alter } from "../decorators/alter";
2
+ import { Alter } from "../decorators/alter.js";
3
3
  let AlterAudit = class AlterAudit {
4
4
  transform(info, event, ctx) {
5
5
  ctx.logger.info({ event, info });
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { Alter } from "../decorators/alter";
2
+ import { Alter } from "../decorators/alter.js";
3
3
  let AlterHost = class AlterHost {
4
4
  transform(baseUrl, ctx) {
5
5
  return `${ctx.request.protocol}://${ctx.request.host}${baseUrl}`;
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { Alter } from "../decorators/alter";
2
+ import { Alter } from "../decorators/alter.js";
3
3
  let AlterLog = class AlterLog {
4
4
  transform(event, ctx, ...info) {
5
5
  ctx.logger.debug({ event, info });
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Constant } from "@tsed/common";
3
3
  import { normalizePath } from "@tsed/common";
4
- import { Alter } from "../decorators/alter";
4
+ import { Alter } from "../decorators/alter.js";
5
5
  let AlterSkip = class AlterSkip {
6
6
  transform(value, ctx) {
7
7
  if (value) {
@@ -1,8 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { getValue } from "@tsed/core";
3
3
  import { Inject } from "@tsed/di";
4
- import { Alter } from "../decorators/alter";
5
- import { FormioDatabase } from "../services/FormioDatabase";
4
+ import { Alter } from "../decorators/alter.js";
5
+ import { FormioDatabase } from "../services/FormioDatabase.js";
6
6
  import async from "async";
7
7
  let AlterTemplateExportSteps = class AlterTemplateExportSteps {
8
8
  transform(queue, template, map, options) {
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Inject } from "@tsed/di";
3
- import { Alter } from "../decorators/alter";
4
- import { FormioDatabase } from "../services/FormioDatabase";
3
+ import { Alter } from "../decorators/alter.js";
4
+ import { FormioDatabase } from "../services/FormioDatabase.js";
5
5
  import async from "async";
6
6
  let AlterTemplateImportSteps = class AlterTemplateImportSteps {
7
7
  transform(queue, install, template) {
@@ -1,5 +1,5 @@
1
1
  import { UseAuth } from "@tsed/common";
2
- import { FormioAuthMiddleware } from "../middlewares/FormioAuthMiddleware";
2
+ import { FormioAuthMiddleware } from "../middlewares/FormioAuthMiddleware.js";
3
3
  /**
4
4
  * Check if a user is connected by using the Formio Auth middleware
5
5
  * @decorator
package/lib/esm/index.js CHANGED
@@ -1,43 +1,43 @@
1
1
  // decorators
2
- export * from "./decorators/action";
3
- export * from "./decorators/actionCtx";
4
- export * from "./decorators/alter";
5
- export * from "./decorators/on";
6
- export * from "./decorators/useFormioAuth";
2
+ export * from "./decorators/action.js";
3
+ export * from "./decorators/actionCtx.js";
4
+ export * from "./decorators/alter.js";
5
+ export * from "./decorators/on.js";
6
+ export * from "./decorators/useFormioAuth.js";
7
7
  // middlewares
8
- export * from "./middlewares/FormioAuthMiddleware";
8
+ export * from "./middlewares/FormioAuthMiddleware.js";
9
9
  // domain
10
- export * from "./domain/AlterHook";
11
- export * from "./domain/Formio";
12
- export * from "./domain/FormioDecodedToken";
13
- export * from "./domain/FormioAction";
14
- export * from "./domain/FormioActionsIndex";
15
- export * from "./domain/FormioAuth";
16
- export * from "./domain/FormioBaseModel";
17
- export * from "./domain/FormioConfig";
18
- export * from "./domain/FormioCtxMapper";
19
- export * from "./domain/FormioErrors";
20
- export * from "./domain/FormioHooks";
21
- export * from "./domain/FormioJs";
22
- export * from "./domain/FormioModels";
23
- export * from "./domain/FormioRouter";
24
- export * from "./domain/FormioSettings";
25
- export * from "./domain/FormioUpdate";
26
- export * from "./domain/FormioUtils";
27
- export * from "./domain/FormioTemplate";
28
- export * from "./domain/FormioTemplateUtil";
29
- export * from "./domain/OnHook";
10
+ export * from "./domain/AlterHook.js";
11
+ export * from "./domain/Formio.js";
12
+ export * from "./domain/FormioDecodedToken.js";
13
+ export * from "./domain/FormioAction.js";
14
+ export * from "./domain/FormioActionsIndex.js";
15
+ export * from "./domain/FormioAuth.js";
16
+ export * from "./domain/FormioBaseModel.js";
17
+ export * from "./domain/FormioConfig.js";
18
+ export * from "./domain/FormioCtxMapper.js";
19
+ export * from "./domain/FormioErrors.js";
20
+ export * from "./domain/FormioHooks.js";
21
+ export * from "./domain/FormioJs.js";
22
+ export * from "./domain/FormioModels.js";
23
+ export * from "./domain/FormioRouter.js";
24
+ export * from "./domain/FormioSettings.js";
25
+ export * from "./domain/FormioUpdate.js";
26
+ export * from "./domain/FormioUtils.js";
27
+ export * from "./domain/FormioTemplate.js";
28
+ export * from "./domain/FormioTemplateUtil.js";
29
+ export * from "./domain/OnHook.js";
30
30
  // module
31
- export * from "./FormioModule";
32
- export * from "./builder/FormioMapper";
33
- export * from "./services/FormioService";
34
- export * from "./services/FormioDatabase";
35
- export * from "./services/FormioDatabase";
36
- export * from "./services/FormioAuthService";
37
- export * from "./services/FormioHooksService";
38
- export * from "./components/AlterActions";
39
- export * from "./components/AlterAudit";
40
- export * from "./components/AlterLog";
41
- export * from "./components/AlterHost";
42
- export * from "./components/AlterSkip";
31
+ export * from "./FormioModule.js";
32
+ export * from "./builder/FormioMapper.js";
33
+ export * from "./services/FormioService.js";
34
+ export * from "./services/FormioDatabase.js";
35
+ export * from "./services/FormioDatabase.js";
36
+ export * from "./services/FormioAuthService.js";
37
+ export * from "./services/FormioHooksService.js";
38
+ export * from "./components/AlterActions.js";
39
+ export * from "./components/AlterAudit.js";
40
+ export * from "./components/AlterLog.js";
41
+ export * from "./components/AlterHost.js";
42
+ export * from "./components/AlterSkip.js";
43
43
  //# sourceMappingURL=index.js.map
@@ -3,7 +3,7 @@ import { Context, Inject, Middleware } from "@tsed/common";
3
3
  import { getValue } from "@tsed/core";
4
4
  import { Unauthorized } from "@tsed/exceptions";
5
5
  import { promisify } from "util";
6
- import { FormioService } from "../services/FormioService";
6
+ import { FormioService } from "../services/FormioService.js";
7
7
  /**
8
8
  * @middleware
9
9
  * @formio
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -3,9 +3,9 @@ import { isFunction } from "@tsed/core";
3
3
  import { Inject, Injectable } from "@tsed/di";
4
4
  import { BadRequest, NotFound, Unauthorized } from "@tsed/exceptions";
5
5
  import { promisify } from "util";
6
- import { FormioDatabase } from "./FormioDatabase";
7
- import { FormioHooksService } from "./FormioHooksService";
8
- import { FormioService } from "./FormioService";
6
+ import { FormioDatabase } from "./FormioDatabase.js";
7
+ import { FormioHooksService } from "./FormioHooksService.js";
8
+ import { FormioService } from "./FormioService.js";
9
9
  let FormioAuthService = class FormioAuthService {
10
10
  get currentUser() {
11
11
  return promisify(this.formio.auth.currentUser);
@@ -1,9 +1,9 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { isArray, isObject, isString, toMap as tMap } from "@tsed/core";
3
3
  import { Inject, Injectable } from "@tsed/di";
4
- import { FormioMapper } from "../builder/FormioMapper";
5
- import { isMongoId } from "../utils/isMongoId";
6
- import { FormioService } from "./FormioService";
4
+ import { FormioMapper } from "../builder/FormioMapper.js";
5
+ import { isMongoId } from "../utils/isMongoId.js";
6
+ import { FormioService } from "./FormioService.js";
7
7
  function toMap(list) {
8
8
  return tMap(list, (o) => [o._id.toString(), `$machineName:${o.machineName}`]);
9
9
  }
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Inject, Injectable, InjectorService } from "@tsed/common";
3
3
  import { promisify } from "util";
4
- import { FormioService } from "./FormioService";
4
+ import { FormioService } from "./FormioService.js";
5
5
  let FormioHooksService = class FormioHooksService {
6
6
  get settings() {
7
7
  return this.formio.hook.settings;
@@ -1,8 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Inject, Injectable } from "@tsed/di";
3
3
  import { Logger } from "@tsed/logger";
4
- import { FormioDatabase } from "./FormioDatabase";
5
- import { FormioService } from "./FormioService";
4
+ import { FormioDatabase } from "./FormioDatabase.js";
5
+ import { FormioService } from "./FormioService.js";
6
6
  let FormioInstaller = class FormioInstaller extends FormioDatabase {
7
7
  async install(template, root) {
8
8
  this.logger.info("Install formio template...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/formio",
3
- "version": "6.102.4",
3
+ "version": "6.102.8-rc.1",
4
4
  "description": "Formio package for Ts.ED framework",
5
5
  "private": false,
6
6
  "keywords": [
@@ -13,6 +13,7 @@
13
13
  ],
14
14
  "source": "./src/index.ts",
15
15
  "main": "./lib/cjs/index.js",
16
+ "module": "./lib/esm/index.js",
16
17
  "typings": "./lib/types/index.d.ts",
17
18
  "exports": {
18
19
  "types": "./lib/types/index.d.ts",
@@ -28,14 +29,14 @@
28
29
  "test": "cross-env NODE_ENV=test nyc mocha"
29
30
  },
30
31
  "dependencies": {
31
- "@tsed/formio-types": "6.102.4",
32
+ "@tsed/formio-types": "6.102.8-rc.1",
32
33
  "tslib": "2.2.0"
33
34
  },
34
35
  "devDependencies": {
35
- "@tsed/common": "6.102.4",
36
- "@tsed/core": "6.102.4",
37
- "@tsed/di": "6.102.4",
38
- "@tsed/mongoose": "6.102.4",
36
+ "@tsed/common": "6.102.8-rc.1",
37
+ "@tsed/core": "6.102.8-rc.1",
38
+ "@tsed/di": "6.102.8-rc.1",
39
+ "@tsed/mongoose": "6.102.8-rc.1",
39
40
  "@types/async": "3.2.12",
40
41
  "express": "^4.17.1",
41
42
  "formio": "^2.0.0",
@@ -43,6 +44,10 @@
43
44
  "mongoose": "^5.12.2"
44
45
  },
45
46
  "peerDependencies": {
47
+ "@tsed/common": "^6.102.8-rc.1",
48
+ "@tsed/core": "^6.102.8-rc.1",
49
+ "@tsed/di": "^6.102.8-rc.1",
50
+ "@tsed/mongoose": "^6.102.8-rc.1",
46
51
  "express": "^4.17.1",
47
52
  "formio": "^2.0.0",
48
53
  "mongodb": "*",
@@ -52,7 +57,7 @@
52
57
  "bugs": {
53
58
  "url": "https://github.com/tsedio/tsed/issues"
54
59
  },
55
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/third-parties/formio",
60
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/third-parties/formio",
56
61
  "author": "Romain Lenzotti",
57
62
  "license": "MIT"
58
63
  }