quidproquo-core
Advanced tools
Comparing version 0.0.171 to 0.0.172
import { CrossModuleOwner } from '../types'; | ||
export declare enum QPQCoreConfigSettingType { | ||
appName = "@quidproquo-core/config/AppName", | ||
moduleName = "@quidproquo-core/config/moduleName", | ||
storageDrive = "@quidproquo-core/config/storageDrive", | ||
@@ -5,0 +6,0 @@ schedule = "@quidproquo-core/config/schedule", |
@@ -7,2 +7,3 @@ "use strict"; | ||
QPQCoreConfigSettingType["appName"] = "@quidproquo-core/config/AppName"; | ||
QPQCoreConfigSettingType["moduleName"] = "@quidproquo-core/config/moduleName"; | ||
QPQCoreConfigSettingType["storageDrive"] = "@quidproquo-core/config/storageDrive"; | ||
@@ -9,0 +10,0 @@ QPQCoreConfigSettingType["schedule"] = "@quidproquo-core/config/schedule"; |
@@ -1,2 +0,2 @@ | ||
import { QPQConfigSetting } from '../QPQConfig'; | ||
import { QPQConfig, QPQConfigSetting } from '../QPQConfig'; | ||
export interface ApplicationModuleQPQConfigSetting extends QPQConfigSetting { | ||
@@ -10,2 +10,2 @@ applicationName: string; | ||
} | ||
export declare const defineApplicationModule: (applicationName: string, moduleName: string, environment: string, configRoot: string, deployRegion?: string, feature?: string) => ApplicationModuleQPQConfigSetting; | ||
export declare const defineApplicationModule: (applicationName: string, moduleName: string, environment: string, configRoot: string, deployRegion?: string, feature?: string) => QPQConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.defineApplicationModule = void 0; | ||
const QPQConfig_1 = require("../QPQConfig"); | ||
const defineApplicationModule = (applicationName, moduleName, environment, configRoot, deployRegion, feature) => ({ | ||
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.appName, | ||
uniqueKey: `${applicationName}-${moduleName}`, | ||
applicationName, | ||
moduleName, | ||
configRoot, | ||
environment, | ||
deployRegion, | ||
feature, | ||
}); | ||
const applicationName_1 = require("./applicationName"); | ||
const moduleName_1 = require("./moduleName"); | ||
const defineApplicationModule = (applicationName, moduleName, environment, configRoot, deployRegion, feature) => [ | ||
(0, applicationName_1.defineApplication)(applicationName, environment, configRoot, deployRegion, feature), | ||
(0, moduleName_1.defineModule)(moduleName), | ||
]; | ||
exports.defineApplicationModule = defineApplicationModule; |
export * from './emailTemplates'; | ||
export * from './actionProcessors'; | ||
export * from './applicationModule'; | ||
export * from './applicationName'; | ||
export * from './moduleName'; | ||
export * from './buildPath'; | ||
@@ -5,0 +7,0 @@ export * from './configValue'; |
@@ -20,2 +20,4 @@ "use strict"; | ||
__exportStar(require("./applicationModule"), exports); | ||
__exportStar(require("./applicationName"), exports); | ||
__exportStar(require("./moduleName"), exports); | ||
__exportStar(require("./buildPath"), exports); | ||
@@ -22,0 +24,0 @@ __exportStar(require("./configValue"), exports); |
import { QPQConfig, QPQConfigSetting } from './config/QPQConfig'; | ||
import { ApplicationModuleQPQConfigSetting, StorageDriveQPQConfigSetting, EventBusQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting, QueueQPQConfigSetting, QpqQueueProcessors, UserDirectoryQPQConfigSetting, KeyValueStoreQPQConfigSetting, DeployEventsQPQConfigSetting } from './config/settings'; | ||
import { ApplicationQPQConfigSetting, StorageDriveQPQConfigSetting, EventBusQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting, QueueQPQConfigSetting, QpqQueueProcessors, UserDirectoryQPQConfigSetting, KeyValueStoreQPQConfigSetting, DeployEventsQPQConfigSetting } from './config/settings'; | ||
import { EmailTemplates } from './config/settings/emailTemplates/types'; | ||
@@ -36,8 +36,8 @@ import { CrossModuleOwner, CrossServiceResourceName, CustomFullyQualifiedResource, FullyQualifiedResource, ResourceName } from './types'; | ||
* @param {QPQConfig} qpqConfig - The input QPQConfig array. | ||
* @returns {ApplicationModuleQPQConfigSetting} - The ApplicationModuleQPQConfigSetting from the QPQConfig array. | ||
* @throws {Error} - If the ApplicationModuleQPQConfigSetting is not found in the QPQConfig array. | ||
* @returns {ApplicationQPQConfigSetting} - The ApplicationQPQConfigSetting from the QPQConfig array. | ||
* @throws {Error} - If the ApplicationQPQConfigSetting is not found in the QPQConfig array. | ||
*/ | ||
export declare const getApplicationModuleSetting: (qpqConfig: QPQConfig) => ApplicationModuleQPQConfigSetting; | ||
export declare const getApplicationConfigSetting: (qpqConfig: QPQConfig) => ApplicationQPQConfigSetting; | ||
export declare const getApplicationModuleName: (qpqConfig: QPQConfig) => string; | ||
export declare const getApplicationName: (qpqConfig: QPQConfig) => string; | ||
export declare const getApplicationModuleName: (qpqConfig: QPQConfig) => string; | ||
export declare const getApplicationModuleFeature: (qpqConfig: QPQConfig) => string | undefined; | ||
@@ -44,0 +44,0 @@ export declare const getConfigRoot: (qpqConfig: QPQConfig) => string; |
@@ -37,3 +37,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.convertCrossModuleOwnerToGenericResourceNameOverride = exports.getQueueQueueProcessors = exports.getUserDirectoryEntryFullPath = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getDeployEventFullPath = exports.getStorageDriveEntryFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getParameterConfigs = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getSecretByName = exports.getAllSrcEntries = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedStorageDrives = exports.getOwnedKeyValueStores = exports.getDeployEventConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getEventBusConfigByName = exports.getOwnedEventBusConfigs = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDriveByName = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0; | ||
exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.convertCrossModuleOwnerToGenericResourceNameOverride = exports.getQueueQueueProcessors = exports.getUserDirectoryEntryFullPath = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getDeployEventFullPath = exports.getStorageDriveEntryFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getParameterConfigs = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getSecretByName = exports.getAllSrcEntries = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedStorageDrives = exports.getOwnedKeyValueStores = exports.getDeployEventConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getEventBusConfigByName = exports.getOwnedEventBusConfigs = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDriveByName = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationName = exports.getApplicationModuleName = exports.getApplicationConfigSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0; | ||
const path = __importStar(require("path")); | ||
@@ -112,35 +112,39 @@ const QPQConfig_1 = require("./config/QPQConfig"); | ||
* @param {QPQConfig} qpqConfig - The input QPQConfig array. | ||
* @returns {ApplicationModuleQPQConfigSetting} - The ApplicationModuleQPQConfigSetting from the QPQConfig array. | ||
* @throws {Error} - If the ApplicationModuleQPQConfigSetting is not found in the QPQConfig array. | ||
* @returns {ApplicationQPQConfigSetting} - The ApplicationQPQConfigSetting from the QPQConfig array. | ||
* @throws {Error} - If the ApplicationQPQConfigSetting is not found in the QPQConfig array. | ||
*/ | ||
const getApplicationModuleSetting = (qpqConfig) => { | ||
const getApplicationConfigSetting = (qpqConfig) => { | ||
const applicationModuleSetting = (0, exports.getConfigSetting)(qpqConfig, QPQConfig_1.QPQCoreConfigSettingType.appName); | ||
if (!applicationModuleSetting) { | ||
throw new Error('please use defineApplicationModule in your QPQ config'); | ||
throw new Error('please use defineApplication in your QPQ config'); | ||
} | ||
return applicationModuleSetting; | ||
}; | ||
exports.getApplicationModuleSetting = getApplicationModuleSetting; | ||
exports.getApplicationConfigSetting = getApplicationConfigSetting; | ||
const getApplicationModuleName = (qpqConfig) => { | ||
const moduleSetting = (0, exports.getConfigSetting)(qpqConfig, QPQConfig_1.QPQCoreConfigSettingType.moduleName); | ||
if (!moduleSetting) { | ||
throw new Error('please use defineModule in your QPQ config'); | ||
} | ||
return moduleSetting.moduleName; | ||
}; | ||
exports.getApplicationModuleName = getApplicationModuleName; | ||
const getApplicationName = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).applicationName; | ||
return (0, exports.getApplicationConfigSetting)(qpqConfig).applicationName; | ||
}; | ||
exports.getApplicationName = getApplicationName; | ||
const getApplicationModuleName = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).moduleName; | ||
}; | ||
exports.getApplicationModuleName = getApplicationModuleName; | ||
const getApplicationModuleFeature = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).feature; | ||
return (0, exports.getApplicationConfigSetting)(qpqConfig).feature; | ||
}; | ||
exports.getApplicationModuleFeature = getApplicationModuleFeature; | ||
const getConfigRoot = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).configRoot; | ||
return (0, exports.getApplicationConfigSetting)(qpqConfig).configRoot; | ||
}; | ||
exports.getConfigRoot = getConfigRoot; | ||
const getApplicationModuleEnvironment = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).environment || 'production'; | ||
return (0, exports.getApplicationConfigSetting)(qpqConfig).environment || 'production'; | ||
}; | ||
exports.getApplicationModuleEnvironment = getApplicationModuleEnvironment; | ||
const getApplicationModuleDeployRegion = (qpqConfig) => { | ||
return (0, exports.getApplicationModuleSetting)(qpqConfig).deployRegion || 'us-east-1'; | ||
return (0, exports.getApplicationConfigSetting)(qpqConfig).deployRegion || 'us-east-1'; | ||
}; | ||
@@ -147,0 +151,0 @@ exports.getApplicationModuleDeployRegion = getApplicationModuleDeployRegion; |
@@ -1,2 +0,2 @@ | ||
import { AskResponse, AskResponseReturnType, EitherActionResult, QpqContextIdentifier } from "../../types"; | ||
export declare function askContextProvideValue<R, T extends AskResponse<any>>(contextIdentifier: QpqContextIdentifier<R>, value: R, storyIterator: T): AskResponse<EitherActionResult<AskResponseReturnType<T>>>; | ||
import { AskResponse, AskResponseReturnType, QpqContextIdentifier } from '../../types'; | ||
export declare function askContextProvideValue<R, T extends AskResponse<any>>(contextIdentifier: QpqContextIdentifier<R>, value: R, storyIterator: T): AskResponse<AskResponseReturnType<T>>; |
@@ -16,3 +16,4 @@ "use strict"; | ||
const contextActionItterator = nextResult; | ||
if (contextActionItterator.value.payload.contextIdentifier.uniqueName === contextIdentifier.uniqueName) { | ||
if (contextActionItterator.value.payload.contextIdentifier.uniqueName === | ||
contextIdentifier.uniqueName) { | ||
// then we feed it our value | ||
@@ -19,0 +20,0 @@ nextResult = storyIterator.next(value); |
{ | ||
"name": "quidproquo-core", | ||
"version": "0.0.171", | ||
"version": "0.0.172", | ||
"description": "", | ||
@@ -28,5 +28,5 @@ "main": "./lib/commonjs/index.js", | ||
"devDependencies": { | ||
"quidproquo-tsconfig": "0.0.171", | ||
"quidproquo-tsconfig": "0.0.172", | ||
"typescript": "^4.9.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
279887
452
5467