From c5b9a53d4634544b53bbcac1351a4005e4b758fe Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Sun, 31 Mar 2024 22:37:17 +0000 Subject: [PATCH 1/8] Add build step --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e0ebb9c..0bf62c8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,9 @@ jobs: - name: Prepare the CI environment run: npm ci + - name: Build + run: npm run build + - name: Publish run: npm publish env: From 0e532c78b24dbcc69624abec06a074514432e357 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 12:42:15 +0200 Subject: [PATCH 2/8] Change name of package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2393dd..008c3ad 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "pulumi-dynamic-provider-aleph", + "name": "@pocinnovation/alumi", "version": "0.0.1", "description": "Dynamic pulumi provider for Aleph", "main": "dist/index.js", From 7c1cd8b5f1e6adf784d0db4c5cce295cdbd649cf Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 12:49:18 +0200 Subject: [PATCH 3/8] Update test --- tests/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/index.ts b/tests/src/index.ts index 93d8661..f4bc225 100644 --- a/tests/src/index.ts +++ b/tests/src/index.ts @@ -1,4 +1,4 @@ -import { Post, storeFile, Aggregate, securityKey } from "pulumi-dynamic-provider-aleph"; +import { Post, storeFile, Aggregate, securityKey } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; import * as pulumi from "@pulumi/pulumi"; From 53418cb8b08a9c20467663545c16a024f96a7244 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 12:50:25 +0200 Subject: [PATCH 4/8] Update docs install --- DOCS.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DOCS.md b/DOCS.md index 565ef72..ec3414e 100644 --- a/DOCS.md +++ b/DOCS.md @@ -1,4 +1,4 @@ -# Alumi - pulumi-dynamic-provider-aleph +# Alumi - @pocinnovation/alumi - Node Version: v20.11.1 @@ -32,7 +32,7 @@ Post content to aleph Aleph docs: ```ts -import { Post } from "pulumi-dynamic-provider-aleph"; +import { Post } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const messageTest = new Post("messageTest", { @@ -56,7 +56,7 @@ Store a string as file to aleph Aleph docs: ```ts -import { StoreString } from "pulumi-dynamic-provider-aleph"; +import { StoreString } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const stringStored = StoreString("stringStored", { @@ -76,7 +76,7 @@ It is a wrapper around `StoreString` Aleph docs: ```ts -import { storeFile } from "pulumi-dynamic-provider-aleph"; +import { storeFile } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const fileStored = storeFile("fileStored", { @@ -95,7 +95,7 @@ Store Key-Value pair Aleph docs: ```ts -import { Aggregate } from "pulumi-dynamic-provider-aleph"; +import { Aggregate } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const keyValue = new Aggregate("keyValue", { @@ -118,7 +118,7 @@ It is wrapper around `Aggregate` Aleph docs: ```ts -import { securityKey } from "pulumi-dynamic-provider-aleph"; +import { securityKey } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const secuKey = securityKey("key", { From 451696dca66e4c7818e2ff09d275812bb38b8873 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 12:59:46 +0200 Subject: [PATCH 5/8] Add tsc check --- .github/workflows/tests.yml | 15 +++++++++++++++ tests/tests.sh | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/tests.yml create mode 100755 tests/tests.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0265e4c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,15 @@ +name: Test Package +on: [push] + +jobs: + tsc: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build Dockerfile + run: docker build -t alumi . + + - name: Run TSC + run: docker run alumi bash -c 'npm run build && cd tests && ./tests.sh' diff --git a/tests/tests.sh b/tests/tests.sh new file mode 100755 index 0000000..c844480 --- /dev/null +++ b/tests/tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./init.sh + +npx tsc From 6a6c3f5a08fdb4bf4273fc4e3c8103796881f1dd Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 13:01:52 +0200 Subject: [PATCH 6/8] Add volume and workdir to docker --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0265e4c..d34888c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,4 +12,4 @@ jobs: run: docker build -t alumi . - name: Run TSC - run: docker run alumi bash -c 'npm run build && cd tests && ./tests.sh' + run: docker run --rm -v $(pwd):/code --workdir /code alumi bash -c 'npm run build && cd tests && ./tests.sh' From d9a0be9da99b4898abe3a91b88d04af4b2759596 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 13:37:30 +0200 Subject: [PATCH 7/8] Fix ci --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d34888c..c005ef9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,4 +12,4 @@ jobs: run: docker build -t alumi . - name: Run TSC - run: docker run --rm -v $(pwd):/code --workdir /code alumi bash -c 'npm run build && cd tests && ./tests.sh' + run: docker run --rm -v $(pwd):/code --workdir /code alumi bash -c 'npm install && npm run build && cd tests && ./tests.sh' From 1c836fd4c0ee09ad4ddbd45b0afa27f45959dbb9 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Mon, 1 Apr 2024 13:40:29 +0200 Subject: [PATCH 8/8] Fix undefined --- tests/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/index.ts b/tests/src/index.ts index f4bc225..1294f3b 100644 --- a/tests/src/index.ts +++ b/tests/src/index.ts @@ -38,7 +38,7 @@ export const keyValueExplorer = keyValue.aleph_explorer_url; export const secuKey = securityKey("key", { authorizations: [ { - address: process.env.ADDRESS_SECU_GIVE, + address: process.env.ADDRESS_SECU_GIVE || '', types: ['POST'], post_types: ['alumi-test'], channels: ['pulumi-test-channel'],