@bprotsyk/aso-core 1.2.237 → 1.2.238
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/lib/app/app.d.ts +3 -2
- package/lib/app/app.js +2 -2
- package/lib/general/namecheap-domain.d.ts +1 -0
- package/lib/general/queue.d.ts +2 -1
- package/lib/general/queue.js +0 -1
- package/lib/general/shape.js +1 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -24
- package/lib/network/keitaro/http.d.ts +1 -2
- package/lib/network/keitaro/http.js +1 -4
- package/lib/network/keitaro/keitaro-service.js +1 -4
- package/lib/utils/keitaro-utils.js +1 -4
- package/lib/utils/server-util.d.ts +0 -7
- package/lib/utils/server-util.js +7 -68
- package/package.json +6 -6
- package/src/app/app.ts +3 -3
- package/src/general/domain.ts +17 -1
- package/src/index.ts +2 -3
- package/src/utils/server-util.ts +71 -194
- package/tsconfig.json +6 -7
- package/lib/aso/config/aso-config-v0.d.ts +0 -333
- package/lib/aso/config/aso-config-v0.js +0 -59
- package/lib/aso/config/aso-config-v1.d.ts +0 -330
- package/lib/aso/config/aso-config-v1.js +0 -58
- package/lib/aso/config/aso-config-v2.d.ts +0 -297
- package/lib/aso/config/aso-config-v2.js +0 -57
- package/lib/aso/config/aso-config-v3.d.ts +0 -294
- package/lib/aso/config/aso-config-v3.js +0 -58
- package/lib/aso/config/aso-config-v4.d.ts +0 -208
- package/lib/aso/config/aso-config-v4.js +0 -58
- package/lib/aso/config/aso-config-v5.d.ts +0 -227
- package/lib/aso/config/aso-config-v5.js +0 -58
- package/lib/aso/config/aso-default-config.d.ts +0 -57
- package/lib/aso/config/aso-default-config.js +0 -2
- package/lib/aso/config/aso-single-response.d.ts +0 -5
- package/lib/aso/config/aso-single-response.js +0 -2
- package/lib/aso/offer/aso-customized-offer.d.ts +0 -11
- package/lib/aso/offer/aso-customized-offer.js +0 -2
- package/lib/aso/offer/aso-offer-response.d.ts +0 -6
- package/lib/aso/offer/aso-offer-response.js +0 -2
- package/lib/aso/offer/aso-offer-section.d.ts +0 -6
- package/lib/aso/offer/aso-offer-section.js +0 -2
- package/lib/aso/offer/aso-single-offer.d.ts +0 -5
- package/lib/aso/offer/aso-single-offer.js +0 -2
- package/lib/aso/offer/config/aso-config-v0.d.ts +0 -271
- package/lib/aso/offer/config/aso-config-v0.js +0 -57
- package/lib/aso/offer/config/aso-config-v1.d.ts +0 -263
- package/lib/aso/offer/config/aso-config-v1.js +0 -57
- package/lib/aso/offer/config/aso-config-v2.d.ts +0 -230
- package/lib/aso/offer/config/aso-config-v2.js +0 -55
- package/lib/aso/offer/config/aso-config-v3.d.ts +0 -227
- package/lib/aso/offer/config/aso-config-v3.js +0 -56
- package/lib/aso/offer/config/aso-config-v4.d.ts +0 -205
- package/lib/aso/offer/config/aso-config-v4.js +0 -56
- package/lib/aso/offer/config/aso-default-config.d.ts +0 -56
- package/lib/aso/offer/config/aso-default-config.js +0 -2
- package/lib/aso/offer/config/aso-single-response.d.ts +0 -5
- package/lib/aso/offer/config/aso-single-response.js +0 -2
- package/lib/aso/offerwall/auth/offerwall-auth-config.d.ts +0 -14
- package/lib/aso/offerwall/auth/offerwall-auth-config.js +0 -2
- package/lib/aso/offerwall/auth/offerwall-auth-localization.d.ts +0 -8
- package/lib/aso/offerwall/auth/offerwall-auth-localization.js +0 -2
- package/lib/aso/offerwall/auth/offerwall-auth-submit-request.d.ts +0 -3
- package/lib/aso/offerwall/auth/offerwall-auth-submit-request.js +0 -2
- package/lib/aso/offerwall/auth/offerwall-auth-submit-response.d.ts +0 -3
- package/lib/aso/offerwall/auth/offerwall-auth-submit-response.js +0 -2
- package/lib/aso/offerwall/offerwall-home-dialog-data.d.ts +0 -6
- package/lib/aso/offerwall/offerwall-home-dialog-data.js +0 -2
- package/lib/aso/offerwall/offerwall-offer.d.ts +0 -8
- package/lib/aso/offerwall/offerwall-offer.js +0 -2
- package/lib/aso/offerwall/offerwall-response.d.ts +0 -6
- package/lib/aso/offerwall/offerwall-response.js +0 -2
- package/lib/aso/offerwall/offerwall-section.d.ts +0 -6
- package/lib/aso/offerwall/offerwall-section.js +0 -2
- package/lib/aso/usage-logs/aso-config-fetch-entry.d.ts +0 -28
- package/lib/aso/usage-logs/aso-config-fetch-entry.js +0 -2
- package/lib/flash/flash-app-integration.d.ts +0 -53
- package/lib/flash/flash-app-integration.js +0 -63
- package/lib/flash/flash-app-list-item.d.ts +0 -5
- package/lib/flash/flash-app-list-item.js +0 -2
- package/lib/flash/flash-app-type.d.ts +0 -4
- package/lib/flash/flash-app-type.js +0 -8
- package/lib/flash/flash-app.d.ts +0 -169
- package/lib/flash/flash-app.js +0 -215
- package/src/templates/nginx-template.conf +0 -35
- package/src/types/ssh2-sftp-client.d.ts +0 -59
package/lib/app/app.d.ts
CHANGED
|
@@ -78,13 +78,14 @@ export interface IPrivacyPolicyParams {
|
|
|
78
78
|
redirect: boolean;
|
|
79
79
|
}
|
|
80
80
|
export declare enum IntegrationVersion {
|
|
81
|
-
|
|
81
|
+
NONE = "MVVM",
|
|
82
82
|
POLICY = "POLICY",
|
|
83
83
|
OFFER_STUB = "OFFER_STUB",
|
|
84
84
|
DIRECT = "DIRECT",
|
|
85
85
|
WEB = "WEB",
|
|
86
86
|
WEB_DIRECT = "WEB_DIRECT",
|
|
87
|
-
BANNER = "BANNER"
|
|
87
|
+
BANNER = "BANNER",
|
|
88
|
+
PWA = "PWA"
|
|
88
89
|
}
|
|
89
90
|
export interface IntegrationAlterations {
|
|
90
91
|
networkTool: AlternativeNetworkTool;
|
package/lib/app/app.js
CHANGED
|
@@ -6,13 +6,14 @@ const mongoose_1 = require("mongoose");
|
|
|
6
6
|
const util = require("util");
|
|
7
7
|
var IntegrationVersion;
|
|
8
8
|
(function (IntegrationVersion) {
|
|
9
|
-
IntegrationVersion["
|
|
9
|
+
IntegrationVersion["NONE"] = "MVVM";
|
|
10
10
|
IntegrationVersion["POLICY"] = "POLICY";
|
|
11
11
|
IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
|
|
12
12
|
IntegrationVersion["DIRECT"] = "DIRECT";
|
|
13
13
|
IntegrationVersion["WEB"] = "WEB";
|
|
14
14
|
IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
|
|
15
15
|
IntegrationVersion["BANNER"] = "BANNER";
|
|
16
|
+
IntegrationVersion["PWA"] = "PWA";
|
|
16
17
|
})(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
|
|
17
18
|
var PlugType;
|
|
18
19
|
(function (PlugType) {
|
|
@@ -162,7 +163,6 @@ exports.AppSchema = new mongoose_1.Schema({
|
|
|
162
163
|
},
|
|
163
164
|
clouflareZone: {
|
|
164
165
|
type: String,
|
|
165
|
-
unique: true
|
|
166
166
|
},
|
|
167
167
|
}
|
|
168
168
|
});
|
package/lib/general/queue.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
interface IQueueElement {
|
|
2
|
+
}
|
package/lib/general/queue.js
CHANGED
package/lib/general/shape.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ShapeDiv = void 0;
|
|
7
|
-
const styled_components_1 =
|
|
4
|
+
const styled_components_1 = require("styled-components");
|
|
8
5
|
exports.ShapeDiv = styled_components_1.default.div `
|
|
9
6
|
background: ${props => typeof props.fill === 'string'
|
|
10
7
|
? props.fill
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { IPush } from "./general/push";
|
|
|
2
2
|
export { IOffer, IPartner, IOfferType } from "./offers/offer";
|
|
3
3
|
export { IOffersSection, OffersSectionSchema, DefaultSectionId } from "./offers/section";
|
|
4
4
|
export { IAppOffersSection, ISectionsList, SectionsListSchema } from "./offers/list";
|
|
5
|
-
export { IntegrationAlterations, IntegrationVersion, IApp, AppSchema, PlugType } from "./app/app";
|
|
5
|
+
export { IntegrationAlterations, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData } from "./app/app";
|
|
6
6
|
export { IAppListItem } from "./app/app-list-item";
|
|
7
7
|
export { AppType } from "./app/app-type";
|
|
8
8
|
export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IAppIntegration as IFlashIntegration } from "./app/app-integration";
|
package/lib/index.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.NamecheapBuyRequestSchema = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.KeitaroUtils = exports.KeitaroService = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.AppType = exports.PlugType = exports.AppSchema = exports.IntegrationVersion = exports.SectionsListSchema = exports.DefaultSectionId = exports.OffersSectionSchema = exports.IOfferType = void 0;
|
|
27
4
|
var offer_1 = require("./offers/offer");
|
|
@@ -53,7 +30,7 @@ var shape_1 = require("./general/shape");
|
|
|
53
30
|
Object.defineProperty(exports, "ShapeDiv", { enumerable: true, get: function () { return shape_1.ShapeDiv; } });
|
|
54
31
|
var keitaro_service_1 = require("./network/keitaro/keitaro-service");
|
|
55
32
|
Object.defineProperty(exports, "KeitaroService", { enumerable: true, get: function () { return keitaro_service_1.KeitaroService; } });
|
|
56
|
-
exports.KeitaroUtils =
|
|
33
|
+
exports.KeitaroUtils = require("./utils/keitaro-utils");
|
|
57
34
|
var cloudflare_domain_1 = require("./general/cloudflare-domain");
|
|
58
35
|
Object.defineProperty(exports, "ICloudflareDomainStatus", { enumerable: true, get: function () { return cloudflare_domain_1.ICloudflareDomainStatus; } });
|
|
59
36
|
Object.defineProperty(exports, "ICloudflareDomainType", { enumerable: true, get: function () { return cloudflare_domain_1.ICloudflareDomainType; } });
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const axios_1 =
|
|
3
|
+
const axios_1 = require("axios");
|
|
7
4
|
exports.default = axios_1.default.create({
|
|
8
5
|
baseURL: 'https://aibprtsk.com/admin_api/v1/',
|
|
9
6
|
headers: {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.KeitaroService = exports.upsertStreamToCampaign = void 0;
|
|
7
|
-
const http_1 =
|
|
4
|
+
const http_1 = require("./http");
|
|
8
5
|
const keitaro_utils_1 = require("../../utils/keitaro-utils");
|
|
9
6
|
const general_1 = require("../../utils/general");
|
|
10
7
|
async function getStreamsByCampaignId(campaignId) {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.createOWCampaign = exports.createDirectCampaign = exports.createFlashCampaigns = exports.createOWStreamPartialPayload = exports.prepareOWCampaignParameters = exports.createOrFindFlashRedirectCampaign = exports.removeGeosFromAllRedirectCampaigns = exports.addGeosToAllRedirectCampaigns = exports.TRAFFIC_SOURCE_ID_FLASH_AI = void 0;
|
|
7
4
|
const keitaro_service_1 = require("../network/keitaro/keitaro-service");
|
|
8
|
-
const sleep_promise_1 =
|
|
5
|
+
const sleep_promise_1 = require("sleep-promise");
|
|
9
6
|
const FLASH_REDIRECT_GROUP_ID = 82;
|
|
10
7
|
exports.TRAFFIC_SOURCE_ID_FLASH_AI = 22;
|
|
11
8
|
const UNIQUENESS_METHOD = "ip_ua";
|
|
@@ -8,12 +8,6 @@ export declare class ServerUtil {
|
|
|
8
8
|
ssh?: NodeSSH;
|
|
9
9
|
constructor(ssh?: NodeSSH);
|
|
10
10
|
exec(command: string, options?: any): Promise<string>;
|
|
11
|
-
generateSSHKey(): Promise<string>;
|
|
12
|
-
createDirectories(): Promise<void>;
|
|
13
|
-
installGit(): Promise<void>;
|
|
14
|
-
addBitbucketToKnownHosts(): Promise<void>;
|
|
15
|
-
cloneRepository(repoName: string, targetPath: string): Promise<void>;
|
|
16
|
-
installNginx(): Promise<void>;
|
|
17
11
|
isNginxActive(): Promise<boolean>;
|
|
18
12
|
isMongoActive(): Promise<boolean>;
|
|
19
13
|
mongoInstallCommand: string;
|
|
@@ -21,6 +15,5 @@ export declare class ServerUtil {
|
|
|
21
15
|
domainNginxCertsExist(host: string): Promise<boolean>;
|
|
22
16
|
isCerbotActive(): Promise<boolean>;
|
|
23
17
|
setupCertbot(): Promise<boolean>;
|
|
24
|
-
setupSSL(email: string, host: string): Promise<void>;
|
|
25
18
|
refresh(): Promise<boolean>;
|
|
26
19
|
}
|
package/lib/utils/server-util.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ServerUtil = exports.PORT = exports.HOST = exports.PASSWORD = exports.IP = void 0;
|
|
7
|
-
const child_process_1 =
|
|
8
|
-
const { promisify } = require(
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const { promisify } = require('util');
|
|
9
6
|
const execPromise = promisify(child_process_1.default.exec);
|
|
10
7
|
exports.IP = "185.123.53.227";
|
|
11
8
|
exports.PASSWORD = "xUA3oOX06Kfc9m12rZ";
|
|
@@ -30,49 +27,10 @@ class ServerUtil {
|
|
|
30
27
|
});
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
|
-
// SSH
|
|
34
|
-
async generateSSHKey() {
|
|
35
|
-
await this.exec(`ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n`);
|
|
36
|
-
let sshFingerprint = await this.exec(`cat ~/.ssh/id_rsa.pub`);
|
|
37
|
-
return sshFingerprint;
|
|
38
|
-
}
|
|
39
|
-
// create Directories in /Var
|
|
40
|
-
async createDirectories() {
|
|
41
|
-
await this.exec(`mkdir -p /var/www/ai`);
|
|
42
|
-
}
|
|
43
|
-
// install git
|
|
44
|
-
async installGit() {
|
|
45
|
-
await this.exec(`apt-get update; apt-get install -y git`);
|
|
46
|
-
}
|
|
47
|
-
// add ssh to bitbucket
|
|
48
|
-
async addBitbucketToKnownHosts() {
|
|
49
|
-
await this.exec(`ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts`);
|
|
50
|
-
}
|
|
51
|
-
// clone bitbucket Repository
|
|
52
|
-
async cloneRepository(repoName, targetPath) {
|
|
53
|
-
let gitResponse = await this.exec(`git clone git@bitbucket.org:bprtsk/${repoName}.git`, { cwd: targetPath });
|
|
54
|
-
if (gitResponse.includes(`Please make sure you have the correct access rights`)) {
|
|
55
|
-
throw new Error(`No access to the remote repository!`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// не знаю чи треба але додав ?
|
|
59
|
-
// async checkoutBranch(branch: string, repoPath: string): Promise<void> {
|
|
60
|
-
// await this.exec(`git checkout -b ${branch}; git branch --set-upstream-to=origin/${branch} ${branch}; git reset --hard origin/${branch};`, { cwd: repoPath });
|
|
61
|
-
// }
|
|
62
|
-
// не знаю чи треба але додав ?
|
|
63
|
-
// async installJava(): Promise<void> {
|
|
64
|
-
// await this.exec(`apt-get update; apt-get install -y default-jre default-jdk`);
|
|
65
|
-
// }
|
|
66
|
-
// install Nginx
|
|
67
|
-
async installNginx() {
|
|
68
|
-
await this.exec(`apt-get update; apt-get install -y nginx`);
|
|
69
|
-
await this.exec(`systemctl enable nginx`);
|
|
70
|
-
await this.exec(`systemctl start nginx`);
|
|
71
|
-
}
|
|
72
30
|
// Nginx
|
|
73
31
|
async isNginxActive() {
|
|
74
32
|
try {
|
|
75
|
-
let result = await this.exec(
|
|
33
|
+
let result = await this.exec('systemctl status nginx');
|
|
76
34
|
if (result.includes("Active: active"))
|
|
77
35
|
return true;
|
|
78
36
|
}
|
|
@@ -84,7 +42,7 @@ class ServerUtil {
|
|
|
84
42
|
// Mongo
|
|
85
43
|
async isMongoActive() {
|
|
86
44
|
try {
|
|
87
|
-
let result = await this.exec(
|
|
45
|
+
let result = await this.exec('systemctl status mongod');
|
|
88
46
|
if (result.includes("Active: active"))
|
|
89
47
|
return true;
|
|
90
48
|
}
|
|
@@ -120,20 +78,11 @@ class ServerUtil {
|
|
|
120
78
|
return true;
|
|
121
79
|
}
|
|
122
80
|
async domainNginxCertsExist(host) {
|
|
123
|
-
try {
|
|
124
|
-
let result = await this.exec(`ls /etc/letsencrypt/live/${host}`);
|
|
125
|
-
if (result.includes("No such file or directory"))
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
catch (e) {
|
|
129
|
-
console.error(e);
|
|
130
|
-
}
|
|
131
|
-
return true;
|
|
132
81
|
}
|
|
133
82
|
// Certbot CRON
|
|
134
83
|
async isCerbotActive() {
|
|
135
84
|
try {
|
|
136
|
-
let result = await this.exec(
|
|
85
|
+
let result = await this.exec('which certbot');
|
|
137
86
|
if (result.includes("/usr/bin/certbot"))
|
|
138
87
|
return true;
|
|
139
88
|
}
|
|
@@ -142,23 +91,13 @@ class ServerUtil {
|
|
|
142
91
|
}
|
|
143
92
|
return false;
|
|
144
93
|
}
|
|
145
|
-
// install certbot
|
|
146
94
|
async setupCertbot() {
|
|
147
95
|
await this.exec(`apt-get install -y certbot python3-certbot-nginx;`);
|
|
148
96
|
return true;
|
|
149
97
|
}
|
|
150
|
-
//
|
|
151
|
-
async setupSSL(email, host) {
|
|
152
|
-
let certbotResponse = await this.exec(`certbot --non-interactive --agree-tos --nginx -m "${email}" -d "${host}"`);
|
|
153
|
-
if (certbotResponse.includes(`Some challenges have failed.`)) {
|
|
154
|
-
throw new Error("Certbot encountered an error");
|
|
155
|
-
}
|
|
156
|
-
await this.exec(`echo "0 12 * * * /usr/bin/certbot renew --quiet" | crontab -`);
|
|
157
|
-
}
|
|
158
|
-
// Git
|
|
98
|
+
// Git
|
|
159
99
|
async refresh() {
|
|
160
|
-
|
|
161
|
-
return true;
|
|
100
|
+
// git stash; rm-rf built; git pull
|
|
162
101
|
}
|
|
163
102
|
}
|
|
164
103
|
exports.ServerUtil = ServerUtil;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bprotsyk/aso-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.238",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"prod": "tsc; git add .; git commit -m \"Stub\"; git push origin master; npm version patch; npm publish;",
|
|
7
|
+
"prod": "tsc -p ./tsconfig.json; git add .; git commit -m \"Stub\"; git push origin master; npm version patch; npm publish;",
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
10
|
"keitaro": "tsc; node lib/utils/keitaro-utils.js",
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"@types/module-alias": "^2.0.1",
|
|
27
27
|
"@types/mongoose": "^5.11.97",
|
|
28
28
|
"@types/node-ssh": "^7.0.6",
|
|
29
|
+
"@types/react": "^18.0.0",
|
|
30
|
+
"@types/react-dom": "^18.0.0",
|
|
29
31
|
"@types/styled-components": "^5.1.26",
|
|
30
32
|
"axios": "^1.4.0",
|
|
31
33
|
"module-alias": "^2.2.2",
|
|
32
34
|
"mongoose": "^6.8.3",
|
|
33
|
-
"mustache": "^4.2.0",
|
|
34
35
|
"node-ssh": "^13.2.0",
|
|
35
36
|
"react": "^18.2.0",
|
|
36
37
|
"replace-in-file": "^7.0.1",
|
|
37
38
|
"sleep-promise": "^9.1.0",
|
|
38
|
-
"ssh2-sftp-client": "^10.0.3",
|
|
39
39
|
"styled-components": "^5.3.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/
|
|
42
|
+
"@types/node": "^20.14.12",
|
|
43
43
|
"typedoc": "^0.23.28",
|
|
44
|
-
"typescript": "^4.
|
|
44
|
+
"typescript": "^4.9.5"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/app/app.ts
CHANGED
|
@@ -98,13 +98,14 @@ export interface IPrivacyPolicyParams {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export enum IntegrationVersion {
|
|
101
|
-
|
|
101
|
+
NONE = "MVVM",
|
|
102
102
|
POLICY = "POLICY",
|
|
103
103
|
OFFER_STUB = "OFFER_STUB",
|
|
104
104
|
DIRECT = "DIRECT",
|
|
105
105
|
WEB = "WEB",
|
|
106
106
|
WEB_DIRECT = "WEB_DIRECT",
|
|
107
|
-
BANNER = "BANNER"
|
|
107
|
+
BANNER = "BANNER",
|
|
108
|
+
PWA = "PWA"
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
export interface IntegrationAlterations {
|
|
@@ -302,7 +303,6 @@ export const AppSchema = new Schema({
|
|
|
302
303
|
},
|
|
303
304
|
clouflareZone: {
|
|
304
305
|
type: String,
|
|
305
|
-
unique: true
|
|
306
306
|
},
|
|
307
307
|
}
|
|
308
308
|
})
|
package/src/general/domain.ts
CHANGED
|
@@ -20,10 +20,26 @@ export interface IDomain extends Document {
|
|
|
20
20
|
|
|
21
21
|
ip: string
|
|
22
22
|
subdomain: string | null
|
|
23
|
-
txtRecords:
|
|
23
|
+
txtRecords: DNSRecords[],
|
|
24
24
|
target: DomainTarget,
|
|
25
25
|
assignedTo: number[]
|
|
26
26
|
}
|
|
27
|
+
type DNSRecords = TXTRecord | MXRecord;
|
|
28
|
+
// Інтерфейс для TXT-записів
|
|
29
|
+
interface TXTRecord extends DNSRecord {
|
|
30
|
+
type: "TXT";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Інтерфейс для MX-записів
|
|
34
|
+
interface MXRecord extends DNSRecord {
|
|
35
|
+
type: "MX";
|
|
36
|
+
priority: number;
|
|
37
|
+
}
|
|
38
|
+
interface DNSRecord {
|
|
39
|
+
type: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
27
43
|
|
|
28
44
|
export interface IDomainsBuyRequestResponse {
|
|
29
45
|
requestId: string,
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { IOffer, IPartner, IOfferType } from "./offers/offer"
|
|
|
4
4
|
export { IOffersSection, OffersSectionSchema, DefaultSectionId } from "./offers/section"
|
|
5
5
|
export { IAppOffersSection, ISectionsList, SectionsListSchema } from "./offers/list"
|
|
6
6
|
|
|
7
|
-
export { IntegrationAlterations, IntegrationVersion, IApp, AppSchema, PlugType } from "./app/app"
|
|
7
|
+
export { IntegrationAlterations, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData } from "./app/app"
|
|
8
8
|
export { IAppListItem } from "./app/app-list-item"
|
|
9
9
|
export { AppType } from "./app/app-type"
|
|
10
10
|
export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IAppIntegration as IFlashIntegration } from "./app/app-integration"
|
|
@@ -29,5 +29,4 @@ export { IKeitaroStream } from "./keitaro/keitaro-stream"
|
|
|
29
29
|
|
|
30
30
|
export { ICloudflareDomainStatus, ICloudflareDomainType, ICloudflareDomain } from "./general/cloudflare-domain"
|
|
31
31
|
export { IDomain, IDomainSetupResult, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY, IDomainsBuyRequestResponse } from "./general/domain"
|
|
32
|
-
export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema } from "./general/namecheap-domain"
|
|
33
|
-
export {ServerUtil} from "./utils/server-util"
|
|
32
|
+
export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema } from "./general/namecheap-domain"
|