Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/rpdk/typescript/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging

__version__ = "0.5.0"
__version__ = "1.0.0"

logging.getLogger(__name__).addHandler(logging.NullHandler())
9 changes: 3 additions & 6 deletions python/rpdk/typescript/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
LOG = logging.getLogger(__name__)

EXECUTABLE = "cfn"
SUPPORT_LIB_NAME = "cfn-rpdk"
SUPPORT_LIB_VERSION = "0.5.0"
SUPPORT_LIB_NAME = "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib"
SUPPORT_LIB_VERSION = "^1.0.0"
MAIN_HANDLER_FUNCTION = "TypeFunction"
REPO_URL = "https://github.com/eduardomourar/cloudformation-cli-typescript-plugin"
REPO_RELEASE_SUFFIX = f"v{SUPPORT_LIB_VERSION}/cfn-rpdk-{SUPPORT_LIB_VERSION}.tgz"


def validate_no(value):
Expand All @@ -40,7 +38,6 @@ class TypescriptLanguagePlugin(LanguagePlugin):
ENTRY_POINT = "dist/handlers.entrypoint"
TEST_ENTRY_POINT = "dist/handlers.testEntrypoint"
CODE_URI = "./"
SUPPORT_LIB_URI = f"{REPO_URL}/releases/download/{REPO_RELEASE_SUFFIX}"

def __init__(self):
self.env = self._setup_jinja_env(
Expand All @@ -65,7 +62,7 @@ def _init_from_project(self, project):
self._use_docker = project.settings.get("useDocker", True)
self.package_root = project.root / "src"
self._build_command = project.settings.get("buildCommand", None)
self._lib_path = project.settings.get("supportLibrary", self.SUPPORT_LIB_URI)
self._lib_path = SUPPORT_LIB_VERSION

def _init_settings(self, project):
LOG.debug("Writing settings")
Expand Down
2 changes: 1 addition & 1 deletion python/rpdk/typescript/templates/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ProgressEvent,
ResourceHandlerRequest,
SessionProxy,
} from '{{lib_name}}';
} from '@amazon-web-services-cloudformation/{{lib_name}}';
import { ResourceModel } from './models';

interface CallbackContext extends Record<string, any> {}
Expand Down
2 changes: 1 addition & 1 deletion python/rpdk/typescript/templates/models.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This is a generated file. Modifications will be overwritten.
import { BaseModel, Dict, integer, Integer, Optional, transformValue } from '{{lib_name}}';
import { BaseModel, Dict, integer, Integer, Optional, transformValue } from '@amazon-web-services-cloudformation/{{lib_name}}';
import { Exclude, Expose, Type, Transform } from 'class-transformer';

{% for model, properties in models.items() %}
Expand Down