Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make compatible with IPM v0.9 #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.1.4] - 2024-12-05
### Added
- Added compatibility with IPM 0.9.x versions

## [1.1.3] - 2024-02-06
### Fixed
- Added support for Angular 14+ by changing cli options to kebab-case


## [1.1.2] - 2023-02-17
### Fixed
- Web application file copy handles package manager operation ordering more robustly (#4)
Expand Down
13 changes: 11 additions & 2 deletions cls/pkg/isc/ipm/js/base/processor.cls
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Method PromoteFiles(verbose As %Boolean, ByRef pParams)
Write !,"Activating "_..#FLAVOR_" application changes..."
Write !,"Copying ",sourceDir," to ",targetDir
}
$$$ThrowOnError(##class(%ZPM.PackageManager.Developer.File).CopyDir(sourceDir,targetDir,..clearTarget))
$$$ThrowOnError(..CopyDir(sourceDir,targetDir,..clearTarget))
// Clear CSPGateway caches...
If verbose {
Write !,"Clearing CSPGateway caches..."
Expand All @@ -90,6 +90,15 @@ Method PromoteFiles(verbose As %Boolean, ByRef pParams)
Set pParams($classname(),..ResourceReference.Name,"PromotedFiles") = 1
}

ClassMethod CopyDir(pSource As %String, pDest As %String, pDeleteFirst As %Boolean = 1, pVerbose As %Boolean = 0) As %Status
{
If ##class(%Dictionary.Definintion).%ExistsId("%IPM.Utils.File") {
Return ##class(%IPM.Utils.File).CopyDir(pSource, pDest, pDeleteFirst, pVerbose)
} Else {
Return ##class(%ZPM.PackageManager.Developer.File).CopyDir(pSource, pDest, pDeleteFirst, pVerbose)
}
}

Method CleanSettings() [ Abstract ]
{
}
Expand Down Expand Up @@ -368,7 +377,7 @@ Method OnExportItem(pFullExportPath As %String, pItemName As %String, ByRef pIte
// NOTE: Does not overlay directories.
Set tSourcePath = ##class(%File).NormalizeDirectory(tSourcePath)
Set tExportPath = ##class(%File).NormalizeDirectory(tExportPath)
Set tSC = ##class(%ZPM.PackageManager.Developer.File).CopyDir(tSourcePath,tExportPath)
Set tSC = ..CopyDir(tSourcePath,tExportPath)
If $$$ISERR(tSC) {
Quit
}
Expand Down
2 changes: 1 addition & 1 deletion cls/pkg/isc/ipm/js/openApiModule.cls
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Class pkg.isc.ipm.js.openApiModule Extends %ZPM.PackageManager.Developer.Lifecycle.Module
{

Parameter PHASES As COSEXPRESSION = "##class(%ZPM.PackageManager.Developer.Lifecycle.Module).#PHASES _ $ListBuild(""Generate"")";
Parameter PHASES As COSEXPRESSION = "$Select(##class(%Dictionary.ClassDefinition).%ExistsId(""%IPM.Lifecycle.Module""):##class(%IPM.Lifecycle.Module).#PHASES, 1:##class(%ZPM.PackageManager.Developer.Lifecycle.Module).#PHASES) _ $ListBuild(""Generate"")";

/// Custom phase: Generate
/// Generates OpenAPI sources (via openApiProcessor)
Expand Down
4 changes: 2 additions & 2 deletions module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<Export generator="Cache" version="25">
<Document name="isc.ipm.js.ZPM"><Module>
<Name>isc.ipm.js</Name>
<Version>1.1.3</Version>
<Version>1.1.4</Version>
<Dependencies>
<ModuleReference>
<Name>isc.json</Name>
<Version>^2.0.0</Version>
<Version>^2.0.1</Version>
</ModuleReference>
</Dependencies>
<Packaging>module</Packaging>
Expand Down