@atom8n/backend-common 1.4.2 → 1.4.4

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.
@@ -27,15 +27,14 @@ let LicenseState = class LicenseState {
27
27
  throw new ProviderNotSetError();
28
28
  }
29
29
  isLicensed(feature) {
30
- this.assertProvider();
31
- if (typeof feature === 'string')
32
- return this.licenseProvider.isLicensed(feature);
33
- for (const featureName of feature) {
34
- if (this.licenseProvider.isLicensed(featureName)) {
35
- return true;
36
- }
30
+ const disabledFeatures = [
31
+ constants_1.LICENSE_FEATURES.SHOW_NON_PROD_BANNER,
32
+ constants_1.LICENSE_FEATURES.API_DISABLED,
33
+ ];
34
+ if (typeof feature === 'string') {
35
+ return !disabledFeatures.includes(feature);
37
36
  }
38
- return false;
37
+ return feature.some((f) => !disabledFeatures.includes(f));
39
38
  }
40
39
  getValue(feature) {
41
40
  this.assertProvider();
@@ -138,34 +137,34 @@ let LicenseState = class LicenseState {
138
137
  return this.isLicensed(['feat:saml', 'feat:oidc']);
139
138
  }
140
139
  getMaxUsers() {
141
- return this.getValue('quota:users') ?? constants_1.UNLIMITED_LICENSE_QUOTA;
140
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
142
141
  }
143
142
  getMaxActiveWorkflows() {
144
- return this.getValue('quota:activeWorkflows') ?? constants_1.UNLIMITED_LICENSE_QUOTA;
143
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
145
144
  }
146
145
  getMaxVariables() {
147
- return this.getValue('quota:maxVariables') ?? constants_1.UNLIMITED_LICENSE_QUOTA;
146
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
148
147
  }
149
148
  getMaxAiCredits() {
150
- return this.getValue('quota:aiCredits') ?? 0;
149
+ return 10000;
151
150
  }
152
151
  getWorkflowHistoryPruneQuota() {
153
- return this.getValue('quota:workflowHistoryPrune') ?? constants_1.UNLIMITED_LICENSE_QUOTA;
152
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
154
153
  }
155
154
  getInsightsMaxHistory() {
156
- return this.getValue('quota:insights:maxHistoryDays') ?? 7;
155
+ return 365;
157
156
  }
158
157
  getInsightsRetentionMaxAge() {
159
- return this.getValue('quota:insights:retention:maxAgeDays') ?? 180;
158
+ return 365;
160
159
  }
161
160
  getInsightsRetentionPruneInterval() {
162
- return this.getValue('quota:insights:retention:pruneIntervalDays') ?? 24;
161
+ return 24;
163
162
  }
164
163
  getMaxTeamProjects() {
165
- return this.getValue('quota:maxTeamProjects') ?? 0;
164
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
166
165
  }
167
166
  getMaxWorkflowsWithEvaluations() {
168
- return this.getValue('quota:evaluations:maxWorkflows') ?? 0;
167
+ return constants_1.UNLIMITED_LICENSE_QUOTA;
169
168
  }
170
169
  };
171
170
  exports.LicenseState = LicenseState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom8n/backend-common",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "scripts": {
5
5
  "clean": "rimraf dist .turbo",
6
6
  "dev": "pnpm watch",
@@ -22,19 +22,19 @@
22
22
  "dist/**/*"
23
23
  ],
24
24
  "dependencies": {
25
- "@n8n/config": "npm:@atom8n/config@2.3.2",
26
- "@n8n/constants": "npm:@atom8n/constants@0.17.2",
27
- "@n8n/decorators": "npm:@atom8n/decorators@1.4.2",
28
- "@n8n/di": "npm:@atom8n/di@0.12.2",
25
+ "@n8n/config": "npm:@atom8n/config@2.3.3",
26
+ "@n8n/constants": "npm:@atom8n/constants@0.17.3",
27
+ "@n8n/decorators": "npm:@atom8n/decorators@1.4.3",
28
+ "@n8n/di": "npm:@atom8n/di@0.12.3",
29
29
  "callsites": "3.1.0",
30
- "n8n-workflow": "npm:@atom8n/n8n-workflow@2.4.2",
30
+ "n8n-workflow": "npm:@atom8n/n8n-workflow@2.4.3",
31
31
  "picocolors": "1.0.1",
32
32
  "reflect-metadata": "0.2.2",
33
33
  "winston": "3.14.2",
34
34
  "yargs-parser": "21.1.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@n8n/typescript-config": "npm:@atom8n/typescript-config@1.5.2",
37
+ "@n8n/typescript-config": "npm:@atom8n/typescript-config@1.5.3",
38
38
  "@types/yargs-parser": "21.0.0",
39
39
  "zod": "3.25.67"
40
40
  }