Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zigbang/appstream",
"version": "1.1.2",
"version": "1.1.4",
"main": "index.js",
"scripts": {
"build": "npx -p @mermaid-js/mermaid-cli mmdc -i ./docs/workflow.mmd -o ./docs/workflow.png && npx tsc",
Expand Down
9 changes: 4 additions & 5 deletions src/sdk/SdkUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,17 @@ export class SdkUtil {

async describeImage(): Promise<any> {
try {
const data = this.appstream.describeImages().promise()
const result = JSON.stringify((await data).Images)

const data = await this.appstream.describeImages().promise()
const result = JSON.stringify((data).Images)
const images = JSON.parse(result)
const winSvr = images.filter((list: any) => {
return list.Name.includes(this.config?.baseImage || "AppStream-WinServer2019")
})
const result2 = Object.keys(winSvr)
.sort((a, b) => Date.parse(winSvr[b].PublicBaseImageReleasedDate) - Date.parse(winSvr[a].PublicBaseImageReleasedDate))
.map((k) => ({ [k]: winSvr[k] }))
.map((k) => (winSvr[k]))
const winSvrLatestImage: any = result2[0]
const winSvrLatestImageArn = winSvrLatestImage[0]["Arn"]
const winSvrLatestImageArn = winSvrLatestImage["Arn"]
return winSvrLatestImageArn as string
} catch (err) {
console.log(err, err.stack)
Expand Down
2 changes: 1 addition & 1 deletion src/template/ad/phase1.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

choco install -y awscli
choco install -y nodejs
choco install -y nodejs-lts
choco install -y yarn

Set-Location \
Expand Down