quidproquo-webserver 0.0.58 → 0.0.60
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.
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { QPQConfigSetting } from 'quidproquo-core';
|
|
2
|
-
export
|
|
1
|
+
import { QPQConfigSetting, QPQConfigAdvancedSettings } from 'quidproquo-core';
|
|
2
|
+
export interface QPQConfigAdvancedSeoSettings extends QPQConfigAdvancedSettings {
|
|
3
|
+
webEntry?: string;
|
|
4
|
+
}
|
|
3
5
|
export interface SeoQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
4
6
|
path: string;
|
|
5
7
|
src: string;
|
|
6
8
|
runtime: string;
|
|
7
|
-
|
|
9
|
+
deprecated: boolean;
|
|
10
|
+
webEntry?: string;
|
|
8
11
|
}
|
|
9
|
-
export declare const defineSeo: (path: string, src: string, runtime: string, options?:
|
|
12
|
+
export declare const defineSeo: (path: string, src: string, runtime: string, options?: QPQConfigAdvancedSeoSettings) => SeoQPQWebServerConfigSetting;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineSeo = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineSeo = (path, src, runtime, options
|
|
5
|
+
const defineSeo = (path, src, runtime, options) => ({
|
|
6
6
|
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Seo,
|
|
7
7
|
uniqueKey: runtime,
|
|
8
8
|
path,
|
|
9
9
|
src,
|
|
10
10
|
runtime,
|
|
11
|
-
options,
|
|
11
|
+
deprecated: (options === null || options === void 0 ? void 0 : options.deprecated) || false,
|
|
12
12
|
});
|
|
13
13
|
exports.defineSeo = defineSeo;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { QPQConfigSetting } from 'quidproquo-core';
|
|
1
|
+
import { QPQConfigSetting, QPQConfigAdvancedSettings } from 'quidproquo-core';
|
|
2
|
+
export interface WebDomainOptions {
|
|
3
|
+
subDomainName?: string;
|
|
4
|
+
onRootDomain: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface StorageDriveOptions {
|
|
7
|
+
sourceStorageDrive?: string;
|
|
8
|
+
autoUpload: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface QPQConfigAdvancedWebEntrySettings extends QPQConfigAdvancedSettings {
|
|
11
|
+
buildPath?: string;
|
|
12
|
+
seoBuildPath?: string;
|
|
13
|
+
storageDrive?: StorageDriveOptions;
|
|
14
|
+
domain?: WebDomainOptions;
|
|
15
|
+
indexRoot?: string;
|
|
16
|
+
}
|
|
2
17
|
export interface WebEntryQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
3
18
|
name: string;
|
|
4
|
-
|
|
19
|
+
indexRoot: string;
|
|
20
|
+
storageDrive: StorageDriveOptions;
|
|
21
|
+
domain: WebDomainOptions;
|
|
22
|
+
buildPath?: string;
|
|
5
23
|
seoBuildPath?: string;
|
|
6
24
|
}
|
|
7
|
-
export declare const defineWebEntry: (name: string,
|
|
25
|
+
export declare const defineWebEntry: (name: string, options?: QPQConfigAdvancedWebEntrySettings) => WebEntryQPQWebServerConfigSetting;
|
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineWebEntry = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineWebEntry = (name,
|
|
5
|
+
const defineWebEntry = (name, options) => ({
|
|
6
6
|
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.WebEntry,
|
|
7
7
|
uniqueKey: name,
|
|
8
8
|
name,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
indexRoot: (options === null || options === void 0 ? void 0 : options.indexRoot) || 'index.html',
|
|
10
|
+
storageDrive: (options === null || options === void 0 ? void 0 : options.storageDrive) || {
|
|
11
|
+
autoUpload: true,
|
|
12
|
+
},
|
|
13
|
+
domain: (options === null || options === void 0 ? void 0 : options.domain) || {
|
|
14
|
+
onRootDomain: true,
|
|
15
|
+
},
|
|
16
|
+
buildPath: options === null || options === void 0 ? void 0 : options.buildPath,
|
|
17
|
+
seoBuildPath: options === null || options === void 0 ? void 0 : options.seoBuildPath,
|
|
11
18
|
});
|
|
12
19
|
exports.defineWebEntry = defineWebEntry;
|
package/lib/qpqWebServerUtils.js
CHANGED
|
@@ -67,11 +67,13 @@ const getWebEntry = (configs) => {
|
|
|
67
67
|
};
|
|
68
68
|
exports.getWebEntry = getWebEntry;
|
|
69
69
|
const getWebEntryFullPath = (qpqConfig, webEntryQPQWebServerConfigSetting) => {
|
|
70
|
-
return path.join(quidproquo_core_1.qpqCoreUtils.getConfigRoot(qpqConfig), webEntryQPQWebServerConfigSetting.buildPath);
|
|
70
|
+
return path.join(quidproquo_core_1.qpqCoreUtils.getConfigRoot(qpqConfig), webEntryQPQWebServerConfigSetting.buildPath || '');
|
|
71
71
|
};
|
|
72
72
|
exports.getWebEntryFullPath = getWebEntryFullPath;
|
|
73
73
|
const getWebEntrySeoFullPath = (qpqConfig, webEntryQPQWebServerConfigSetting) => {
|
|
74
|
-
return path.join(quidproquo_core_1.qpqCoreUtils.getConfigRoot(qpqConfig), webEntryQPQWebServerConfigSetting.seoBuildPath ||
|
|
74
|
+
return path.join(quidproquo_core_1.qpqCoreUtils.getConfigRoot(qpqConfig), webEntryQPQWebServerConfigSetting.seoBuildPath ||
|
|
75
|
+
webEntryQPQWebServerConfigSetting.buildPath ||
|
|
76
|
+
'');
|
|
75
77
|
};
|
|
76
78
|
exports.getWebEntrySeoFullPath = getWebEntrySeoFullPath;
|
|
77
79
|
const getApiEntryFullPath = (qpqConfig, apiConfig) => {
|