Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ed9baa7
chore(Node Update): ✨ Update dependencies and refactor code
spirit-wiegmann Dec 11, 2025
78d72f5
chore(CaaSMapper): 🔧 update DEFAULT_MAX_REFERENCE_DEPTH to 2
spirit-wiegmann Dec 11, 2025
381a551
Merge branch 'refs/heads/master' into issue/PX-334-node-and-dependenc…
spirit-wiegmann Dec 11, 2025
a6ea55a
chore(package): 🔧 update package names and repository URLs
spirit-wiegmann Dec 11, 2025
d0bf317
chore(package): 🔧 update package names and repository URLs
spirit-wiegmann Dec 11, 2025
a5f4558
chore(tests): 🔧 update Faker to @faker-js/faker
spirit-wiegmann Dec 11, 2025
d3feef5
chore(tests): 🔧 update integration tests to use `INTEGRATION_TEST_TEN…
spirit-wiegmann Dec 11, 2025
70be118
chore(node): 🔧 update Node.js version to 24.x in CI configurations
spirit-wiegmann Dec 11, 2025
af9b1fa
feat!: breaking API change
spirit-wiegmann Dec 11, 2025
5942451
chore(release): 🔧 update checkout action to use fetch-depth and ref
spirit-wiegmann Dec 11, 2025
918ceb6
chore(validation): 🔧 update checkout action to use `github.head_ref`
spirit-wiegmann Dec 11, 2025
63a0a17
chore(release): 🔧 configure npm authentication for releases
spirit-wiegmann Dec 11, 2025
6b599f6
chore(release): 🔧 update release configuration for npm authentication
spirit-wiegmann Dec 11, 2025
d6abd94
chore(release): 🔧 update release scripts to use `release-it`
spirit-wiegmann Dec 11, 2025
fbb193a
chore(package): 🔧 update Node.js engine version specification
spirit-wiegmann Dec 11, 2025
c276faa
chore(release): 🔧 add release-it configuration and CI script
spirit-wiegmann Dec 11, 2025
e28238f
chore(release): 🔧 update release-it configuration for improved workflow
spirit-wiegmann Dec 11, 2025
b8989a3
chore(package): 🔧 remove unused `postpublish` script from package.json
spirit-wiegmann Dec 11, 2025
8f2928a
chore(release): 🔧 remove unused `@release-it/bumper` plugin
spirit-wiegmann Dec 11, 2025
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 .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x

- name: use cache if package-lock has not changed
uses: actions/cache@v4
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x
registry-url: 'https://registry.npmjs.org'

- name: Install
run: npm install

- name: Build
run: npm run build

- name: Configure npm authentication
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release
run: npm run semantic-release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 8 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x

- name: use cache if package-lock has not changed
uses: actions/cache@v4
Expand All @@ -31,5 +34,8 @@ jobs:
- name: Run tests
run: npm run test

- name: Set authentication for publishing
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}

- name: Dry run publish
run: npm run semantic-release:dry-run
run: npm run release:dry-run
48 changes: 48 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"git": {
"commitMessage": "chore(release): ${version} [skip ci]\n\n${changelog}",
"tagName": "v${version}",
"requireCleanWorkingDir": false,
"requireBranch": false,
"commit": true,
"tag": true,
"push": true
},
"github": {
"release": true,
"releaseName": "v${version}",
"autoGenerate": false
},
"npm": {
"publish": true,
"skipChecks": true
},
"hooks": {
"before:init": [
"npm run test"
],
"after:bump": [
"npm run build"
],
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md",
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.",
"ignoreRecommendedBump": false
},
"@release-it-plugins/workspaces": {
"workspaces": [
"proxy"
],
"publish": true,
"additionalManifests": {
"versionUpdates": [
"proxy/package.json"
]
}
}
}
}
18 changes: 0 additions & 18 deletions .releaserc

This file was deleted.

141 changes: 141 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import * as esbuild from 'esbuild'
import AnalyzerPlugin from 'esbuild-analyzer'
import fs from 'fs'

const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'))

// Externe Dependencies (nicht bündeln)
const external = [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
...Object.keys(pkg.optionalDependencies || {}),
'util'
]

// Gemeinsame Build-Optionen für Node.js (Main Bundle)
const commonNodeOptions = {
bundle: true,
target: 'es2015',
sourcemap: true,
minify: true,
treeShaking: true,
legalComments: 'none',
logLevel: 'info',
external,
minifyWhitespace: true,
minifySyntax: true,
metafile: true,
}

// Gemeinsame Build-Optionen für Browser (Proxy Bundle)
const browserOptions = {
bundle: true,
platform: 'browser',
target: 'es2020',
format: 'esm',
sourcemap: true,
minify: true,
treeShaking: true,
legalComments: 'none',
logLevel: 'info',
external,
minifyWhitespace: true,
minifySyntax: true,
metafile: true,
charset: 'utf8',
}

// Stats-Verzeichnis erstellen
if (!fs.existsSync('stats')) {
fs.mkdirSync('stats', { recursive: true })
}

// Main Bundle (fsxa-api)
console.log('Building main bundle (fsxa-api)...')

// CJS build - use platform: 'node' for proper CommonJS exports
await esbuild.build({
...commonNodeOptions,
platform: 'node',
entryPoints: ['src/index.ts'],
outfile: 'dist/fsxa-api.cjs.js',
format: 'cjs',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-api-cjs.html',
})
],
})

// ESM build - use platform: 'neutral' to avoid Node.js-specific code
await esbuild.build({
...commonNodeOptions,
platform: 'neutral',
entryPoints: ['src/index.ts'],
outfile: 'dist/fsxa-api.es5.js',
format: 'esm',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-api-esm.html',
})
],
})

console.log('Main bundle built successfully!')

// Proxy Bundle (fsxa-proxy-api)
console.log('Building proxy bundle (fsxa-proxy-api)...')

await esbuild.build({
...browserOptions,
entryPoints: ['src/proxy.ts'],
outfile: 'proxy/dist/fsxa-proxy-api.cjs.js',
format: 'cjs',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-proxy-api-cjs.html',
})
],
})

await esbuild.build({
...browserOptions,
entryPoints: ['src/proxy.ts'],
outfile: 'proxy/dist/fsxa-proxy-api.es5.js',
format: 'esm',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-proxy-api-esm.html',
})
],
})

console.log('Proxy bundle built successfully!')

// Bundle-Größen ausgeben
console.log('\n📦 Bundle Sizes:')
console.log('─'.repeat(60))

const files = [
'dist/fsxa-api.cjs.js',
'dist/fsxa-api.es5.js',
'proxy/dist/fsxa-proxy-api.cjs.js',
'proxy/dist/fsxa-proxy-api.es5.js',
]

files.forEach((file) => {
if (fs.existsSync(file)) {
const stats = fs.statSync(file)
const sizeKB = (stats.size / 1024).toFixed(2)
console.log(`${file.padEnd(45)} ${sizeKB.padStart(10)} KB`)
}
})

console.log('─'.repeat(60))

console.log('\n✓ Bundle analysis reports generated:')
console.log(' - stats/fsxa-api-cjs.html')
console.log(' - stats/fsxa-api-esm.html')
console.log(' - stats/fsxa-proxy-api-cjs.html')
console.log(' - stats/fsxa-proxy-api-esm.html')
console.log('\nBuild complete!')
12 changes: 6 additions & 6 deletions integrationtests/AccessControl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { CaasItemFilterParams, Dataset, FSXAContentMode, FSXAProxyApi, LogLevel
import { default as expressIntegration } from '../src/integrations/express'
import { FSXARemoteApi } from '../src/modules/FSXARemoteApi'
import { ComparisonQueryOperatorEnum, LogicalQueryOperatorEnum } from '../src/modules/QueryBuilder'
import { CaasTestingClient } from './utils'
import { CaasTestingClient, closeServer } from './utils'
import { Server } from 'http'
import Faker from 'faker'
import { faker } from '@faker-js/faker'
import { createDataset, createDatasetReference } from '../src/testutils'
import { MapResponse } from '../src/modules'

dotenv.config({ path: './integrationtests/.env' })

const { INTEGRATION_TEST_API_KEY, INTEGRATION_TEST_CAAS } = process.env
const { INTEGRATION_TEST_API_KEY, INTEGRATION_TEST_CAAS, INTEGRATION_TEST_TENANT_ID } = process.env

// promisify server start so we can await it in jest
const startSever = (app: Express) =>
Expand All @@ -24,8 +24,8 @@ const startSever = (app: Express) =>
})

describe('Access Control', () => {
const randomProjectID = Faker.datatype.uuid()
const tenantID = 'fsxa-api-integration-test'
const randomProjectID = faker.string.uuid()
const tenantID = INTEGRATION_TEST_TENANT_ID || 'fsxa-api-integration-test'

const remoteApiBaseConfig = {
apikey: INTEGRATION_TEST_API_KEY!,
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('Access Control', () => {
const res = await caasClient.getCollection()
const parsedRes = await res.json()
await caasClient.removeCollection(parsedRes._etag.$oid)
server.close()
await closeServer(server)
})

it('caas items filter filters data', async () => {
Expand Down
Loading
Loading