quidproquo-core 0.0.52 → 0.0.54
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/config/settings/applicationModule.d.ts +10 -0
- package/lib/config/settings/applicationModule.js +15 -0
- package/lib/config/settings/index.d.ts +1 -1
- package/lib/config/settings/index.js +1 -1
- package/lib/qpqCoreUtils.d.ts +8 -5
- package/lib/qpqCoreUtils.js +27 -25
- package/package.json +1 -1
- package/lib/config/settings/application.d.ts +0 -8
- package/lib/config/settings/application.js +0 -13
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { QPQConfigSetting } from '../QPQConfig';
|
|
2
|
+
export interface ApplicationModuleQPQConfigSetting extends QPQConfigSetting {
|
|
3
|
+
applicationName: string;
|
|
4
|
+
moduleName: string;
|
|
5
|
+
configRoot: string;
|
|
6
|
+
environment?: string;
|
|
7
|
+
deployRegion?: string;
|
|
8
|
+
feature?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const defineApplicationModule: (applicationName: string, moduleName: string, environment: string, configRoot: string, deployRegion?: string, feature?: string) => ApplicationModuleQPQConfigSetting;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineApplicationModule = void 0;
|
|
4
|
+
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
+
const defineApplicationModule = (applicationName, moduleName, environment, configRoot, deployRegion, feature) => ({
|
|
6
|
+
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.appName,
|
|
7
|
+
uniqueKey: `${applicationName}-${moduleName}`,
|
|
8
|
+
applicationName,
|
|
9
|
+
moduleName,
|
|
10
|
+
configRoot,
|
|
11
|
+
environment,
|
|
12
|
+
deployRegion,
|
|
13
|
+
feature,
|
|
14
|
+
});
|
|
15
|
+
exports.defineApplicationModule = defineApplicationModule;
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./actionProcessors"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./applicationModule"), exports);
|
|
19
19
|
__exportStar(require("./buildPath"), exports);
|
|
20
20
|
__exportStar(require("./parameter"), exports);
|
|
21
21
|
__exportStar(require("./schedule"), exports);
|
package/lib/qpqCoreUtils.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { QPQConfig, QPQConfigSetting } from './config/QPQConfig';
|
|
2
|
-
import { ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting } from './config/settings';
|
|
2
|
+
import { ApplicationModuleQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting } from './config/settings';
|
|
3
3
|
export declare const getConfigSettings: <T extends QPQConfigSetting>(configs: QPQConfig, configSettingType: string) => T[];
|
|
4
4
|
export declare const getConfigSetting: <T extends QPQConfigSetting>(configs: QPQConfig, serviceInfrastructureConfigType: string) => T | undefined;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
5
|
+
export declare const getApplicationModuleSetting: (qpqConfig: QPQConfig) => ApplicationModuleQPQConfigSetting;
|
|
6
|
+
export declare const getApplicationName: (qpqConfig: QPQConfig) => string;
|
|
7
|
+
export declare const getApplicationModuleName: (qpqConfig: QPQConfig) => string;
|
|
8
|
+
export declare const getApplicationModuleFeature: (qpqConfig: QPQConfig) => string | undefined;
|
|
9
|
+
export declare const getConfigRoot: (qpqConfig: QPQConfig) => string;
|
|
10
|
+
export declare const getApplicationModuleEnvironment: (qpqConfig: QPQConfig) => string;
|
|
11
|
+
export declare const getApplicationModuleDeployRegion: (qpqConfig: QPQConfig) => string;
|
|
9
12
|
export declare const getStorageDriveNames: (configs: QPQConfig) => string[];
|
|
10
13
|
export declare const getActionProcessorSources: (configs: QPQConfig) => string[];
|
|
11
14
|
export declare const getScheduleEvents: (configs: QPQConfig) => ScheduleQPQConfigSetting[];
|
package/lib/qpqCoreUtils.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getBuildPath = exports.getSharedSecrets = exports.getOwnedParameters = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getScheduleEvents = exports.getActionProcessorSources = exports.getStorageDriveNames = exports.getConfigRoot = exports.
|
|
26
|
+
exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getBuildPath = exports.getSharedSecrets = exports.getOwnedParameters = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getScheduleEvents = exports.getActionProcessorSources = exports.getStorageDriveNames = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const QPQConfig_1 = require("./config/QPQConfig");
|
|
29
29
|
const getConfigSettings = (configs, configSettingType) => {
|
|
@@ -35,36 +35,38 @@ const getConfigSetting = (configs, serviceInfrastructureConfigType) => {
|
|
|
35
35
|
return setting;
|
|
36
36
|
};
|
|
37
37
|
exports.getConfigSetting = getConfigSetting;
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
throw new Error('please use defineApplication in your QPQ config');
|
|
38
|
+
const getApplicationModuleSetting = (qpqConfig) => {
|
|
39
|
+
const applicationModuleSetting = (0, exports.getConfigSetting)(qpqConfig, QPQConfig_1.QPQCoreConfigSettingType.appName);
|
|
40
|
+
if (!applicationModuleSetting) {
|
|
41
|
+
throw new Error('please use defineApplicationModule in your QPQ config');
|
|
43
42
|
}
|
|
44
|
-
return
|
|
43
|
+
return applicationModuleSetting;
|
|
45
44
|
};
|
|
46
|
-
exports.
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const featureName = ((_a = (0, exports.getConfigSetting)(configs, QPQConfig_1.QPQCoreConfigSettingType.appName)) === null || _a === void 0 ? void 0 : _a.featureName) || 'production';
|
|
50
|
-
return featureName;
|
|
45
|
+
exports.getApplicationModuleSetting = getApplicationModuleSetting;
|
|
46
|
+
const getApplicationName = (qpqConfig) => {
|
|
47
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).applicationName;
|
|
51
48
|
};
|
|
52
|
-
exports.
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const deployRegion = ((_a = (0, exports.getConfigSetting)(configs, QPQConfig_1.QPQCoreConfigSettingType.appName)) === null || _a === void 0 ? void 0 : _a.deployRegion) || 'us-east-1';
|
|
56
|
-
return deployRegion;
|
|
49
|
+
exports.getApplicationName = getApplicationName;
|
|
50
|
+
const getApplicationModuleName = (qpqConfig) => {
|
|
51
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).moduleName;
|
|
57
52
|
};
|
|
58
|
-
exports.
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return configRoot;
|
|
53
|
+
exports.getApplicationModuleName = getApplicationModuleName;
|
|
54
|
+
const getApplicationModuleFeature = (qpqConfig) => {
|
|
55
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).feature;
|
|
56
|
+
};
|
|
57
|
+
exports.getApplicationModuleFeature = getApplicationModuleFeature;
|
|
58
|
+
const getConfigRoot = (qpqConfig) => {
|
|
59
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).configRoot;
|
|
66
60
|
};
|
|
67
61
|
exports.getConfigRoot = getConfigRoot;
|
|
62
|
+
const getApplicationModuleEnvironment = (qpqConfig) => {
|
|
63
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).environment || 'production';
|
|
64
|
+
};
|
|
65
|
+
exports.getApplicationModuleEnvironment = getApplicationModuleEnvironment;
|
|
66
|
+
const getApplicationModuleDeployRegion = (qpqConfig) => {
|
|
67
|
+
return (0, exports.getApplicationModuleSetting)(qpqConfig).deployRegion || 'us-east-1';
|
|
68
|
+
};
|
|
69
|
+
exports.getApplicationModuleDeployRegion = getApplicationModuleDeployRegion;
|
|
68
70
|
const getStorageDriveNames = (configs) => {
|
|
69
71
|
const storageDriveNames = (0, exports.getConfigSettings)(configs, QPQConfig_1.QPQCoreConfigSettingType.storageDrive).map((sd) => sd.storageDrive);
|
|
70
72
|
return storageDriveNames;
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QPQConfigSetting } from '../QPQConfig';
|
|
2
|
-
export interface AppNameQPQConfigSetting extends QPQConfigSetting {
|
|
3
|
-
appName: string;
|
|
4
|
-
configRoot: string;
|
|
5
|
-
featureName?: string;
|
|
6
|
-
deployRegion?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const defineApplication: (appName: string, configRoot: string, featureName?: string, deployRegion?: string) => AppNameQPQConfigSetting;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineApplication = void 0;
|
|
4
|
-
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineApplication = (appName, configRoot, featureName, deployRegion) => ({
|
|
6
|
-
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.appName,
|
|
7
|
-
uniqueKey: appName,
|
|
8
|
-
appName,
|
|
9
|
-
configRoot,
|
|
10
|
-
featureName,
|
|
11
|
-
deployRegion,
|
|
12
|
-
});
|
|
13
|
-
exports.defineApplication = defineApplication;
|