@worktif/runtime 0.3.0-edge.11 → 0.3.0-edge.14
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/out/dist/bin/index.js +30 -78
- package/out/dist/bin/purenow.js +11 -10
- package/out/dist/bin/templates/runtime-web/basic/package.json +1 -1
- package/out/dist/infra/index.js +43 -43
- package/out/dist/lambda/bundle.js +16 -16
- package/out/dist/lib/utils/decorators.d.ts +9 -0
- package/out/dist/lib/utils/index.d.ts +3 -0
- package/out/dist/lib/utils/stack-name-sanitizer.d.ts +14 -0
- package/out/dist/src/bin/cli.d.ts +18 -0
- package/out/dist/src/bin/commands/dev-validation.service.d.ts +1 -0
- package/out/dist/src/bin/commands/index.d.ts +1 -0
- package/out/dist/src/bin/commands/init.d.ts +25 -0
- package/out/dist/src/bin/index.d.ts +1 -1
- package/out/dist/src/bin/runtime-web-cli.d.ts +4 -0
- package/out/dist/src/bin/services/runtime-web-cli-extensions.d.ts +18 -0
- package/out/dist/src/bin/services/template.service.d.ts +79 -33
- package/out/dist/src/bin/utils/command-metadata.d.ts +63 -0
- package/out/dist/src/bin/utils/errors.d.ts +35 -0
- package/out/dist/src/core/bundle/runtime.container.d.ts.map +1 -1
- package/out/dist/src/core/runtime-web/di/pure-container-factory.d.ts.map +1 -1
- package/out/dist/src/core/runtime-web/di/ties-registrar.d.ts.map +1 -1
- package/out/dist/src/core/runtime-web/factory/lambda-handler-factory.d.ts.map +1 -1
- package/out/dist/src/core/runtime-web/registrar/microservice-registrar.d.ts.map +1 -1
- package/out/dist/src/core/services/runtime-extensions/runtime-extensions.service.d.ts.map +1 -1
- package/out/dist/src/infra/purenow-infra-stack.d.ts +10 -0
- package/out/dist/src/infra/utils/infra-outputs-resolver.d.ts +17 -0
- package/out/dist/src/infra/utils/stack-existence-detector.d.ts +17 -0
- package/out/dist/src/infra/utils/stack-name-sanitizer.d.ts +9 -0
- package/out/dist/src/utils/decorators.d.ts +9 -0
- package/out/dist/src/utils/decorators.d.ts.map +1 -0
- package/out/dist/src/utils/index.d.ts +3 -0
- package/out/dist/src/utils/index.d.ts.map +1 -0
- package/out/dist/src/utils/stack-name-sanitizer.d.ts +14 -0
- package/out/dist/src/utils/stack-name-sanitizer.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Purable decorator - combines injectable with additional runtime metadata
|
|
3
|
+
* This is a runtime-specific decorator that extends Inversify's injectable
|
|
4
|
+
*/
|
|
5
|
+
export declare function purable(options?: {
|
|
6
|
+
singleton?: boolean;
|
|
7
|
+
scope?: string;
|
|
8
|
+
}): <T extends new (...args: any[]) => any>(constructor: T) => T;
|
|
9
|
+
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes a stack name to be compatible with AWS CloudFormation naming requirements.
|
|
3
|
+
*
|
|
4
|
+
* CloudFormation stack names must:
|
|
5
|
+
* - Be 1-128 characters long
|
|
6
|
+
* - Contain only alphanumeric characters and hyphens
|
|
7
|
+
* - Start with an alphabetic character
|
|
8
|
+
* - Not end with a hyphen
|
|
9
|
+
*
|
|
10
|
+
* @param name - The stack name to sanitize
|
|
11
|
+
* @returns The sanitized stack name
|
|
12
|
+
*/
|
|
13
|
+
export declare function sanitizeStackName(name: string): string;
|
|
14
|
+
//# sourceMappingURL=stack-name-sanitizer.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { RuntimeWebCli } from './runtime-web-cli';
|
|
3
|
+
/**
|
|
4
|
+
* Runtime CLI class that extends PurenowCli
|
|
5
|
+
*/
|
|
6
|
+
export declare class RuntimeCli extends RuntimeWebCli {
|
|
7
|
+
static defaultToolName: string;
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Create CLI instance
|
|
12
|
+
*/
|
|
13
|
+
export declare function createRuntimeCli(): RuntimeCli;
|
|
14
|
+
/**
|
|
15
|
+
* Main CLI entry point
|
|
16
|
+
*/
|
|
17
|
+
export declare function main(): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=dev-validation.service.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
export { RuntimeWebDeploymentService } from './runtime-web-deployment.service';
|
|
3
3
|
export { buildCommand, type BuildOptions } from './build.command';
|
|
4
|
+
export { runtimeInitCommand, type RuntimeInitOptions } from './init';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CommandResult, Logger } from '@worktif/purenow/bin';
|
|
2
|
+
import { EnvironmentValidator } from '@worktif/purenow/bin';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the runtime init command
|
|
5
|
+
*/
|
|
6
|
+
export interface RuntimeInitOptions {
|
|
7
|
+
/** Target directory for the new project */
|
|
8
|
+
dir?: string;
|
|
9
|
+
/** Template name to use */
|
|
10
|
+
template?: string;
|
|
11
|
+
/** Initialize CDK infrastructure only */
|
|
12
|
+
cdk?: boolean;
|
|
13
|
+
/** Project core instance: always runtime-web for runtime package */
|
|
14
|
+
core?: string;
|
|
15
|
+
/** Force overwrite existing files */
|
|
16
|
+
force?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Initialize a new Runtime project using runtime-specific templates
|
|
20
|
+
*
|
|
21
|
+
* This command extends purenow's init functionality but uses RuntimeTemplateService
|
|
22
|
+
* to ensure templates are resolved from the runtime package's file system.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runtimeInitCommand(options: RuntimeInitOptions, logger: Logger, cwd?: string, envValidator?: EnvironmentValidator): Promise<CommandResult>;
|
|
25
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -2,5 +2,5 @@ import 'reflect-metadata';
|
|
|
2
2
|
export { RuntimeWebCli, createRuntimeCli } from './runtime-web-cli';
|
|
3
3
|
export { TemplateService as RuntimeTemplateService, ScaffoldOptions as RuntimeScaffoldOptions, TemplateContext as RuntimeTemplateContext, PurenowRuntimeStacksDeployService, RuntimeDeploymentStrategy, buildStaticHtml, PurenowRuntimeCliContext, PurenowRuntimeDeploymentOutputs, PurenowRuntimeStacksDeployResult, } from './services';
|
|
4
4
|
export { RuntimeWebDeploymentService } from './commands';
|
|
5
|
-
export { RuntimeBuildError, RuntimeCliError, RuntimeConfigError, RuntimeDeploymentError, RuntimeValidationError, RuntimeFriendlyErrorFormatter, RuntimeStructuredLogger, } from './utils/errors';
|
|
5
|
+
export { RuntimeBuildError, RuntimeCliError, RuntimeConfigError, RuntimeDeploymentError, RuntimeValidationError, RuntimeTemplateError, RuntimeTemplateStructureError, RuntimeFriendlyErrorFormatter, RuntimeStructuredLogger, } from './utils/errors';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -24,6 +24,10 @@ export declare class RuntimeWebCli extends PurenowCli {
|
|
|
24
24
|
* Wrapper for deploy command (requires AWS credentials)
|
|
25
25
|
*/
|
|
26
26
|
deployCommand(options: unknown, cmd: Command, strategies?: StrategyContainer): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Wrapper for init command (uses RuntimeTemplateService)
|
|
29
|
+
*/
|
|
30
|
+
initCommand(options: unknown, cmd: Command, strategies?: StrategyContainer): Promise<void>;
|
|
27
31
|
/**
|
|
28
32
|
* Wrapper for destroy command (requires AWS credentials)
|
|
29
33
|
*/
|
|
@@ -1 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime Web CLI Extensions
|
|
3
|
+
* Provides runtime-specific CLI functionality that extends purenow CLI
|
|
4
|
+
*/
|
|
5
|
+
export declare class RuntimeWebCliExtensions {
|
|
6
|
+
/**
|
|
7
|
+
* Initialize runtime CLI extensions
|
|
8
|
+
*/
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Get runtime-specific commands
|
|
12
|
+
*/
|
|
13
|
+
getRuntimeCommands(): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Check if command is runtime-specific
|
|
16
|
+
*/
|
|
17
|
+
isRuntimeCommand(command: string): boolean;
|
|
18
|
+
}
|
|
1
19
|
//# sourceMappingURL=runtime-web-cli-extensions.d.ts.map
|
|
@@ -1,53 +1,99 @@
|
|
|
1
|
+
import { TemplateService as PurenowTemplateService, type ScaffoldOptions, type TemplateContext } from '@worktif/purenow/bin';
|
|
2
|
+
export type { ScaffoldOptions, TemplateContext };
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
4
|
+
* Runtime-specific template service that extends purenow's TemplateService
|
|
5
|
+
* to resolve templates from the runtime package's file system instead of purenow's.
|
|
6
|
+
*
|
|
7
|
+
* This service addresses the issue where `@worktif/runtime init` was using
|
|
8
|
+
* purenow templates instead of runtime-specific templates.
|
|
3
9
|
*/
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
projectName: string;
|
|
7
|
-
/** Force overwrite existing files */
|
|
8
|
-
force: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Template variable substitution context
|
|
12
|
-
*/
|
|
13
|
-
export interface TemplateContext {
|
|
14
|
-
projectName: string;
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Service for project scaffolding and template management
|
|
19
|
-
*/
|
|
20
|
-
export declare class TemplateService {
|
|
21
|
-
private cwd;
|
|
22
|
-
private readonly templatesDir;
|
|
10
|
+
export declare class RuntimeTemplateService extends PurenowTemplateService {
|
|
11
|
+
private readonly runtimeTemplatesDir;
|
|
23
12
|
constructor(cwd?: string);
|
|
24
13
|
/**
|
|
25
|
-
* Scaffold a new project
|
|
14
|
+
* Scaffold a new project using runtime-specific templates
|
|
15
|
+
*
|
|
16
|
+
* Overrides the parent method to use runtime templates from the
|
|
17
|
+
* runtime package's file system instead of purenow templates.
|
|
18
|
+
*
|
|
19
|
+
* Implements comprehensive validation and fallback strategies:
|
|
20
|
+
* - Validates template directory structure before proceeding
|
|
21
|
+
* - Provides detailed error messages for troubleshooting
|
|
22
|
+
* - Ensures runtime-specific template resolution
|
|
26
23
|
*/
|
|
27
24
|
scaffold(templateName: string, targetDir: string, options: ScaffoldOptions, coreDir?: string): Promise<void>;
|
|
28
25
|
/**
|
|
29
|
-
*
|
|
26
|
+
* Resolve the runtime package's template directory
|
|
27
|
+
*
|
|
28
|
+
* This method detects the runtime package context and finds the correct
|
|
29
|
+
* template directory within the runtime package's file system.
|
|
30
|
+
*
|
|
31
|
+
* Implements multiple fallback strategies for robust template path detection:
|
|
32
|
+
* 1. Package.json detection (most reliable)
|
|
33
|
+
* 2. Module location-based detection
|
|
34
|
+
* 3. Node.js module resolution
|
|
35
|
+
* 4. Environment-based detection
|
|
36
|
+
*/
|
|
37
|
+
private resolveRuntimeTemplateDirectory;
|
|
38
|
+
/**
|
|
39
|
+
* Detect runtime package root by searching for package.json with @worktif/runtime
|
|
40
|
+
*/
|
|
41
|
+
private detectRuntimePackageRoot;
|
|
42
|
+
/**
|
|
43
|
+
* Get possible template paths based on module location
|
|
44
|
+
*/
|
|
45
|
+
private getModuleBasedPaths;
|
|
46
|
+
/**
|
|
47
|
+
* Get possible template paths from node_modules resolution
|
|
48
|
+
*/
|
|
49
|
+
private getNodeModulePaths;
|
|
50
|
+
/**
|
|
51
|
+
* Get possible template paths based on environment
|
|
52
|
+
*/
|
|
53
|
+
private getEnvironmentBasedPaths;
|
|
54
|
+
/**
|
|
55
|
+
* Validate that a template directory contains the expected structure
|
|
56
|
+
*/
|
|
57
|
+
private validateTemplateDirectory;
|
|
58
|
+
/**
|
|
59
|
+
* Get available templates in the specified core directory
|
|
30
60
|
*/
|
|
31
|
-
|
|
61
|
+
private getAvailableTemplates;
|
|
32
62
|
/**
|
|
33
|
-
*
|
|
63
|
+
* Check if runtime templates directory exists and is valid
|
|
64
|
+
*
|
|
65
|
+
* Performs comprehensive validation of the template directory structure:
|
|
66
|
+
* - Verifies directory exists and is accessible
|
|
67
|
+
* - Validates runtime-web subdirectory exists
|
|
68
|
+
* - Checks that templates contain required files
|
|
69
|
+
* - Validates template structure integrity
|
|
34
70
|
*/
|
|
35
|
-
|
|
71
|
+
validateRuntimeTemplates(): boolean;
|
|
36
72
|
/**
|
|
37
|
-
* Validate
|
|
73
|
+
* Validate template directory structure for a specific core directory
|
|
38
74
|
*/
|
|
39
|
-
|
|
75
|
+
validateTemplateStructure(coreDir?: string): {
|
|
76
|
+
valid: boolean;
|
|
77
|
+
errors: string[];
|
|
78
|
+
};
|
|
40
79
|
/**
|
|
41
|
-
*
|
|
80
|
+
* Get the resolved runtime templates directory path
|
|
42
81
|
*/
|
|
43
|
-
|
|
82
|
+
getRuntimeTemplatesDirectory(): string;
|
|
44
83
|
/**
|
|
45
|
-
*
|
|
84
|
+
* Get the runtime package version for template substitution
|
|
46
85
|
*/
|
|
47
|
-
private
|
|
86
|
+
private getRuntimePackageVersion;
|
|
48
87
|
/**
|
|
49
|
-
*
|
|
88
|
+
* Get detailed information about template resolution for debugging
|
|
50
89
|
*/
|
|
51
|
-
|
|
90
|
+
getTemplateResolutionInfo(): {
|
|
91
|
+
runtimeTemplatesDir: string;
|
|
92
|
+
isValid: boolean;
|
|
93
|
+
availableCores: string[];
|
|
94
|
+
packageContext: string | null;
|
|
95
|
+
resolutionStrategy: string;
|
|
96
|
+
};
|
|
52
97
|
}
|
|
98
|
+
export { RuntimeTemplateService as TemplateService };
|
|
53
99
|
//# sourceMappingURL=template.service.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a command requires AWS credentials
|
|
3
|
+
*/
|
|
4
|
+
export declare function commandRequiresCredentials(commandName: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Get all commands that require credentials
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommandsRequiringCredentials(): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Runtime-specific command metadata
|
|
11
|
+
*/
|
|
12
|
+
export declare const RUNTIME_COMMAND_METADATA: {
|
|
13
|
+
readonly deploy: {
|
|
14
|
+
readonly requiresCredentials: true;
|
|
15
|
+
readonly description: "Deploy runtime stacks to AWS";
|
|
16
|
+
readonly category: "deployment";
|
|
17
|
+
};
|
|
18
|
+
readonly destroy: {
|
|
19
|
+
readonly requiresCredentials: true;
|
|
20
|
+
readonly description: "Destroy runtime stacks from AWS";
|
|
21
|
+
readonly category: "deployment";
|
|
22
|
+
};
|
|
23
|
+
readonly init: {
|
|
24
|
+
readonly requiresCredentials: false;
|
|
25
|
+
readonly description: "Initialize new runtime project";
|
|
26
|
+
readonly category: "scaffolding";
|
|
27
|
+
};
|
|
28
|
+
readonly build: {
|
|
29
|
+
readonly requiresCredentials: false;
|
|
30
|
+
readonly description: "Build runtime bundles";
|
|
31
|
+
readonly category: "build";
|
|
32
|
+
};
|
|
33
|
+
readonly 'dev:validate': {
|
|
34
|
+
readonly requiresCredentials: false;
|
|
35
|
+
readonly description: "Validate runtime bundles in development";
|
|
36
|
+
readonly category: "development";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Get metadata for a specific command
|
|
41
|
+
*/
|
|
42
|
+
export declare function getCommandMetadata(commandName: string): {
|
|
43
|
+
readonly requiresCredentials: true;
|
|
44
|
+
readonly description: "Deploy runtime stacks to AWS";
|
|
45
|
+
readonly category: "deployment";
|
|
46
|
+
} | {
|
|
47
|
+
readonly requiresCredentials: true;
|
|
48
|
+
readonly description: "Destroy runtime stacks from AWS";
|
|
49
|
+
readonly category: "deployment";
|
|
50
|
+
} | {
|
|
51
|
+
readonly requiresCredentials: false;
|
|
52
|
+
readonly description: "Initialize new runtime project";
|
|
53
|
+
readonly category: "scaffolding";
|
|
54
|
+
} | {
|
|
55
|
+
readonly requiresCredentials: false;
|
|
56
|
+
readonly description: "Build runtime bundles";
|
|
57
|
+
readonly category: "build";
|
|
58
|
+
} | {
|
|
59
|
+
readonly requiresCredentials: false;
|
|
60
|
+
readonly description: "Validate runtime bundles in development";
|
|
61
|
+
readonly category: "development";
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=command-metadata.d.ts.map
|
|
@@ -28,6 +28,12 @@ export declare class RuntimeBuildError extends RuntimeCliError {
|
|
|
28
28
|
export declare class RuntimeDeploymentError extends RuntimeCliError {
|
|
29
29
|
constructor(message: string, hint?: string);
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Alias for RuntimeDeploymentError to match purenow patterns
|
|
33
|
+
*/
|
|
34
|
+
export declare class DeploymentError extends RuntimeDeploymentError {
|
|
35
|
+
constructor(message: string, hint?: string);
|
|
36
|
+
}
|
|
31
37
|
/**
|
|
32
38
|
* Error thrown when runtime validation checks fail
|
|
33
39
|
* Extends purenow ValidationError pattern
|
|
@@ -35,6 +41,27 @@ export declare class RuntimeDeploymentError extends RuntimeCliError {
|
|
|
35
41
|
export declare class RuntimeValidationError extends RuntimeCliError {
|
|
36
42
|
constructor(message: string, hint?: string);
|
|
37
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Error thrown when runtime template resolution fails
|
|
46
|
+
* Provides detailed context about package resolution and searched paths
|
|
47
|
+
*/
|
|
48
|
+
export declare class RuntimeTemplateError extends RuntimeCliError {
|
|
49
|
+
readonly templateName?: string | undefined;
|
|
50
|
+
readonly coreDir?: string | undefined;
|
|
51
|
+
readonly searchedPaths?: string[] | undefined;
|
|
52
|
+
readonly packageContext?: string | undefined;
|
|
53
|
+
readonly resolutionStrategy?: string | undefined;
|
|
54
|
+
constructor(message: string, templateName?: string | undefined, coreDir?: string | undefined, searchedPaths?: string[] | undefined, packageContext?: string | undefined, resolutionStrategy?: string | undefined, hint?: string);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Error thrown when runtime template directory structure is invalid
|
|
58
|
+
* Provides detailed validation errors and troubleshooting guidance
|
|
59
|
+
*/
|
|
60
|
+
export declare class RuntimeTemplateStructureError extends RuntimeCliError {
|
|
61
|
+
readonly templateDir?: string | undefined;
|
|
62
|
+
readonly validationErrors?: string[] | undefined;
|
|
63
|
+
constructor(message: string, templateDir?: string | undefined, validationErrors?: string[] | undefined, hint?: string);
|
|
64
|
+
}
|
|
38
65
|
/**
|
|
39
66
|
* Friendly error formatter for runtime workspace
|
|
40
67
|
* Follows purenow FriendlyErrorFormatter pattern without emoji
|
|
@@ -52,6 +79,14 @@ export declare class RuntimeFriendlyErrorFormatter {
|
|
|
52
79
|
* Format deployment error without emoji
|
|
53
80
|
*/
|
|
54
81
|
formatDeploymentError(stackName: string, operation: string, message: string, verbose?: boolean): string;
|
|
82
|
+
/**
|
|
83
|
+
* Format runtime template error with detailed context
|
|
84
|
+
*/
|
|
85
|
+
formatTemplateError(error: RuntimeTemplateError, verbose?: boolean): string;
|
|
86
|
+
/**
|
|
87
|
+
* Format runtime template structure error with validation details
|
|
88
|
+
*/
|
|
89
|
+
formatTemplateStructureError(error: RuntimeTemplateStructureError, verbose?: boolean): string;
|
|
55
90
|
}
|
|
56
91
|
/**
|
|
57
92
|
* Structured logger for runtime workspace
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.container.d.ts","sourceRoot":"","sources":["../../../../../src/core/bundle/runtime.container.ts"],"names":[],"mappings":"AAgBA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"runtime.container.d.ts","sourceRoot":"","sources":["../../../../../src/core/bundle/runtime.container.ts"],"names":[],"mappings":"AAgBA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C;;;;;;;GAOG;AACH,qBACa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAwB;;IASzC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;;OAGG;IACI,YAAY,IAAI,aAAa,CAAC,MAAM,CAAC;IAI5C;;;OAGG;IACI,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;IAIvC;;;OAGG;IACI,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;CAQhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure-container-factory.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/di/pure-container-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"pure-container-factory.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/di/pure-container-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;;;;;;;;;;;;GAeG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;;IAM9C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,2BAA2B,CAAC,WAAW,EAAE,YAAY,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC;IAoB/E;;;;;;;;;;;;;;;;;;OAkBG;IACH,qBAAqB,CACnB,WAAW,EAAE,YAAY,EAAE,EAC3B,OAAO,GAAE;QAAE,YAAY,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;KAAO,GACzD,aAAa,CAAC,MAAM,CAAC;IAcxB;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrF;;;;;;;;;;;;;;;;;OAiBG;IACH,wBAAwB,CACtB,WAAW,EAAE,YAAY,EAAE,EAC3B,kBAAkB,GAAE,MAAM,EAAO,GAChC,aAAa,CAAC,MAAM,CAAC;CAazB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ties-registrar.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/di/ties-registrar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ties-registrar.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/di/ties-registrar.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,aAAa;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI;IA6BjF;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI;IAmBrF;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CAAC,WAAW,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE;CAsB3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lambda-handler-factory.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/factory/lambda-handler-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"lambda-handler-factory.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/factory/lambda-handler-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAU,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;;IAQhC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,CAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,uBAAuB;IAU/F;;;;;;;;;;;;;;;;;;OAkBG;IACH,kBAAkB,CAChB,IAAI,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,EAChD,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAqC1B;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CACT,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,EAC/D,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACxC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC;IAIzD;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"microservice-registrar.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/registrar/microservice-registrar.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"microservice-registrar.d.ts","sourceRoot":"","sources":["../../../../../../src/core/runtime-web/registrar/microservice-registrar.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;;IAO7C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,IAAI;IA0B7E;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;IAI9D;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,GAAG,MAAM;IAU3E;;;;OAIG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;;;OAIG;IACH,YAAY,IAAI,MAAM,EAAE;IAIxB;;;;;OAKG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQzD;;;;;OAKG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAIxC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC;;;;;OAKG;IACH,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE;IAInD;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAIb;;;;;;;;OAQG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB;IAIvD;;;;;;OAMG;IACH,WAAW,IAAI,iBAAiB;IAIhC;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;CAa1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-extensions.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/services/runtime-extensions/runtime-extensions.service.ts"],"names":[],"mappings":"AAgBA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"runtime-extensions.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/services/runtime-extensions/runtime-extensions.service.ts"],"names":[],"mappings":"AAgBA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EAEd,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEpF;;;;;;;;;;GAUG;AACH,qBACa,iBAAiB;IAY5B;;;OAGG;IACH,OAAO,CAAC,aAAa,CAcnB;IAEF;;;OAGG;;IAMH;;;OAGG;YACW,2BAA2B;IAKzC;;;;;;;OAOG;IACU,gBAAgB,CAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;OAOG;IACU,aAAa,CACxB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAgB/B;;;;;;;OAOG;IACU,yBAAyB,CACpC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAiCrC;;;;;;OAMG;IACU,mBAAmB,CAC9B,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,EAC9B,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,IAAI,CAAC;IAgBhB;;;;;OAKG;IACI,gBAAgB,IAAI,QAAQ,CAAC,aAAa,CAAC;IAIlD;;;;;;OAMG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIjD;;;;;;OAMG;IACU,aAAa,CACxB,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;;OAMG;IACU,cAAc,CACzB,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* Base infrastructure stack for Purenow applications
|
|
5
|
+
* This is a runtime-specific implementation that extends the base purenow stack
|
|
6
|
+
*/
|
|
7
|
+
export declare class PurenowInfraStack extends Stack {
|
|
8
|
+
constructor(scope: Construct, id: string, props?: StackProps);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=purenow-infra-stack.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CloudFormationClient } from '@aws-sdk/client-cloudformation';
|
|
2
|
+
/**
|
|
3
|
+
* Utility for resolving CloudFormation stack outputs
|
|
4
|
+
*/
|
|
5
|
+
export declare class InfraOutputsResolver {
|
|
6
|
+
private cloudFormation;
|
|
7
|
+
constructor(cloudFormation: CloudFormationClient);
|
|
8
|
+
/**
|
|
9
|
+
* Get all outputs from a stack
|
|
10
|
+
*/
|
|
11
|
+
getStackOutputs(stackName: string): Promise<Record<string, string>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a specific output value from a stack
|
|
14
|
+
*/
|
|
15
|
+
getStackOutput(stackName: string, outputKey: string): Promise<string | null>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=infra-outputs-resolver.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CloudFormationClient } from '@aws-sdk/client-cloudformation';
|
|
2
|
+
/**
|
|
3
|
+
* Utility for detecting if CloudFormation stacks exist
|
|
4
|
+
*/
|
|
5
|
+
export declare class StackExistenceDetector {
|
|
6
|
+
private cloudFormation;
|
|
7
|
+
constructor(cloudFormation: CloudFormationClient);
|
|
8
|
+
/**
|
|
9
|
+
* Check if a stack exists
|
|
10
|
+
*/
|
|
11
|
+
stackExists(stackName: string): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Get stack status if it exists
|
|
14
|
+
*/
|
|
15
|
+
getStackStatus(stackName: string): Promise<string | null>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=stack-existence-detector.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitize stack name to meet CloudFormation requirements
|
|
3
|
+
*/
|
|
4
|
+
export declare function sanitizeStackName(name: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Validate that a stack name meets CloudFormation requirements
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateStackName(name: string): boolean;
|
|
9
|
+
//# sourceMappingURL=stack-name-sanitizer.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Purable decorator - combines injectable with additional runtime metadata
|
|
3
|
+
* This is a runtime-specific decorator that extends Inversify's injectable
|
|
4
|
+
*/
|
|
5
|
+
export declare function purable(options?: {
|
|
6
|
+
singleton?: boolean;
|
|
7
|
+
scope?: string;
|
|
8
|
+
}): <T extends new (...args: any[]) => any>(constructor: T) => T;
|
|
9
|
+
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../src/utils/decorators.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IACpD,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,aAAa,CAAC,KAAG,CAAC,CAe7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAgBA,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes a stack name to be compatible with AWS CloudFormation naming requirements.
|
|
3
|
+
*
|
|
4
|
+
* CloudFormation stack names must:
|
|
5
|
+
* - Be 1-128 characters long
|
|
6
|
+
* - Contain only alphanumeric characters and hyphens
|
|
7
|
+
* - Start with an alphabetic character
|
|
8
|
+
* - Not end with a hyphen
|
|
9
|
+
*
|
|
10
|
+
* @param name - The stack name to sanitize
|
|
11
|
+
* @returns The sanitized stack name
|
|
12
|
+
*/
|
|
13
|
+
export declare function sanitizeStackName(name: string): string;
|
|
14
|
+
//# sourceMappingURL=stack-name-sanitizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-name-sanitizer.d.ts","sourceRoot":"","sources":["../../../../src/utils/stack-name-sanitizer.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA8BtD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worktif/runtime",
|
|
3
|
-
"version": "0.3.0-edge.
|
|
3
|
+
"version": "0.3.0-edge.14",
|
|
4
4
|
"description": "Serverless web framework running on AWS Lambda with support for server-side rendering, caching, and CI/CD.",
|
|
5
5
|
"repository": "git@bitbucket.org:worktif/runtime-target.git",
|
|
6
6
|
"author": "Raman Marozau <raman@worktif.com>",
|
|
@@ -120,8 +120,10 @@
|
|
|
120
120
|
"migrate:seo:dry-run": "ts-node scripts/migrate-seo-metadata.ts --dry-run"
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@worktif/purenow": "
|
|
124
|
-
"@worktif/utils": "^0.2.32"
|
|
123
|
+
"@worktif/purenow": "workspace:*",
|
|
124
|
+
"@worktif/utils": "^0.2.32",
|
|
125
|
+
"aws-cdk-lib": "^2.172.0",
|
|
126
|
+
"constructs": "^10.4.2"
|
|
125
127
|
},
|
|
126
128
|
"devDependencies": {
|
|
127
129
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -137,9 +139,7 @@
|
|
|
137
139
|
"@types/react-is": "^19.0.0",
|
|
138
140
|
"@types/react-router-dom": "^5.3.3",
|
|
139
141
|
"@types/ws": "^8.18.1",
|
|
140
|
-
"aws-cdk-lib": "^2.172.0",
|
|
141
142
|
"aws-sdk-client-mock": "^4.1.0",
|
|
142
|
-
"constructs": "^10.4.2",
|
|
143
143
|
"fast-check": "^4.3.0",
|
|
144
144
|
"jest": "^29.7.0",
|
|
145
145
|
"jest-environment-jsdom": "^29.7.0",
|