From ffe418426d1b414b582546b2229cd0315ccb625b Mon Sep 17 00:00:00 2001 From: byteful <80184082+byteful@users.noreply.github.com> Date: Wed, 16 Jul 2025 01:11:56 -0500 Subject: [PATCH 1/5] Create deploy-staging.yml --- .github/workflows/deploy-staging.yml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy-staging.yml diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml new file mode 100644 index 0000000..11ff243 --- /dev/null +++ b/.github/workflows/deploy-staging.yml @@ -0,0 +1,30 @@ +name: "Deploy Staging" + +on: + push: + branches: + - dev + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.STAGING_IP }} >> ~/.ssh/known_hosts + + - name: Deploy via SSH + run: | + ssh ${{ secrets.SERVER_USER }}@${{ secrets.STAGING_IP }} << 'EOF' + cd /home/modl/modl-shared-web + git pull origin main + npm install + npm run build + EOF From 493f4c332aea717a647e6f86ed8dfe0aff893ff7 Mon Sep 17 00:00:00 2001 From: byteful <80184082+byteful@users.noreply.github.com> Date: Thu, 17 Jul 2025 04:32:11 -0500 Subject: [PATCH 2/5] Create build.yml --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a5d7a01 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: "Build (Pull Request)" + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - main + - dev + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '23' + + - name: Install dependencies + run: npm install + + - name: Run build + run: npm run build From 623b0695ade9f72642143e6914c6ef4dc5f71726 Mon Sep 17 00:00:00 2001 From: byteful <80184082+byteful@users.noreply.github.com> Date: Thu, 17 Jul 2025 04:40:31 -0500 Subject: [PATCH 3/5] Update deploy-staging.yml --- .github/workflows/deploy-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 11ff243..2b2f3d3 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -24,7 +24,7 @@ jobs: run: | ssh ${{ secrets.SERVER_USER }}@${{ secrets.STAGING_IP }} << 'EOF' cd /home/modl/modl-shared-web - git pull origin main + git pull origin dev npm install npm run build EOF From e6b8ae1114aa29bc9fafe655e09033125177b3eb Mon Sep 17 00:00:00 2001 From: byteful Date: Sat, 26 Jul 2025 08:16:16 -0500 Subject: [PATCH 4/5] GitHub Actions workflow updates --- .github/workflows/build.yml | 7 ++++--- .github/workflows/deploy-staging.yml | 30 --------------------------- .github/workflows/deploy.yml | 30 --------------------------- .github/workflows/release-package.yml | 24 +++++++++++++++++++++ package.json | 16 ++++++++++---- 5 files changed, 40 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/deploy-staging.yml delete mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/release-package.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5d7a01..11c3727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ on: branches: - main - dev + workflow_dispatch: jobs: build: @@ -13,15 +14,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '23' - name: Install dependencies - run: npm install + run: npm ci - name: Run build run: npm run build diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml deleted file mode 100644 index 2b2f3d3..0000000 --- a/.github/workflows/deploy-staging.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Deploy Staging" - -on: - push: - branches: - - dev - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup SSH - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -H ${{ secrets.STAGING_IP }} >> ~/.ssh/known_hosts - - - name: Deploy via SSH - run: | - ssh ${{ secrets.SERVER_USER }}@${{ secrets.STAGING_IP }} << 'EOF' - cd /home/modl/modl-shared-web - git pull origin dev - npm install - npm run build - EOF diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index c3b0fac..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Deploy - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup SSH - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts - - - name: Deploy via SSH - run: | - ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF' - cd /home/modl/modl-shared-web - git pull origin main - npm install - npm run build - EOF diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 0000000..48cb985 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,24 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '23' + registry-url: https://npm.pkg.github.com/ + scope: '@modl-gg' + - run: npm ci + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/package.json b/package.json index b538bcc..f043e96 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "modl-shared-web", + "name": "@modl-gg/shared-web", "version": "1.0.0", "description": "Shared schemas and types for the modl ecosystem.", "main": "dist/index.js", @@ -63,12 +63,20 @@ "build:esm": "tsc -p tsconfig.esm.json", "test": "echo \"Error: no test specified\" && exit 1" }, + "repository": { + "type": "git", + "url": "git+https://github.com/modl-gg/shared-web.git" + }, + "homepage": "https://github.com/modl-gg/shared-web", + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "keywords": [ "modl", "shared" ], - "author": "", - "license": "ISC", + "author": "modl-gg", + "license": "AGPL-3.0-only", "dependencies": { "clsx": "^2.1.1", "tailwind-merge": "^2.3.0", @@ -125,4 +133,4 @@ "@types/react": "^18.3.3", "@types/express-session": "^1.18.2" } -} +} \ No newline at end of file From c368052136e835f41bed74fb0368265e804aa4f0 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 5 Aug 2025 17:29:52 -0700 Subject: [PATCH 5/5] ticket tracking --- src/schemas/TenantSchemas.ts | 3 ++- src/types/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/schemas/TenantSchemas.ts b/src/schemas/TenantSchemas.ts index 2614a01..3495739 100644 --- a/src/schemas/TenantSchemas.ts +++ b/src/schemas/TenantSchemas.ts @@ -153,7 +153,8 @@ export const ReplySchema = new Schema({ created: { type: Date, default: Date.now }, staff: { type: Boolean, default: false }, action: { type: String }, - attachments: [{ type: mongoose.Schema.Types.Mixed }] + attachments: [{ type: mongoose.Schema.Types.Mixed }], + creatorIdentifier: { type: String } // Browser/device identifier for creator verification }); export const TicketSchema = new Schema({ diff --git a/src/types/index.ts b/src/types/index.ts index b12227c..bd1f0f6 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -165,6 +165,7 @@ export interface IReply { avatar?: string; action?: string; attachments?: any[]; + creatorIdentifier?: string; // Browser/device identifier for creator verification } export interface ITicket extends Document {