Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
bc6c643
Update CI pipeline
Theosakamg Nov 17, 2025
c69e1ad
Fix core for new generator templates
Theosakamg Nov 17, 2025
bf9a79a
Add custom Templates for node
Theosakamg Nov 17, 2025
1520b11
Fix .gitignore for github action
Theosakamg Nov 17, 2025
fefe6e0
solve issue with discriminator generating import doublon
flovntp Jan 16, 2026
6d6d432
Update templates/node/modelGeneric.mustache
flovntp Jan 16, 2026
294d5b9
add openapispec-upsun.json
flovntp Jan 16, 2026
70d5f1b
remove mustache comment
flovntp Jan 16, 2026
4803558
remove debug comment
flovntp Jan 16, 2026
ed137fa
only support latest LTS
flovntp Jan 16, 2026
91ec3dd
solve doc action issue
flovntp Jan 16, 2026
c5c0fea
Merge pull request #5 from upsun/fix-discriminator
Theosakamg Jan 16, 2026
c743bff
update runtime.mustache to take in account accessTokenFactory and ret…
flovntp Jan 16, 2026
5d3f9ba
add project.delete (with Subsbscription management) + improve error h…
flovntp Jan 28, 2026
d720032
solve upsun.resources.get and upsun.resources.set
flovntp Jan 30, 2026
c981f58
backup.restore test + certificate.update function+test
flovntp Feb 3, 2026
030dabf
solve certificate.update params + tests
flovntp Feb 3, 2026
ccd5afc
using plural for all task names
flovntp Feb 3, 2026
ccc60a2
DomainsTask: add with all parameters + update solved + tests
flovntp Feb 4, 2026
e42b414
VariablesTask done (still need tests)
flovntp Feb 5, 2026
da2e517
EnvironmentTask: complete (with TODO) + tests
flovntp Feb 5, 2026
2084220
TeamsTask function complete (test in progress)
flovntp Feb 6, 2026
22c2563
review with Mickael till environments.ts
flovntp Feb 6, 2026
2b5af08
lint errors solved
flovntp Feb 6, 2026
9c1b424
app.ts
flovntp Feb 6, 2026
78e1d12
align constructor + change upsun.ts init
flovntp Feb 9, 2026
f40ca1e
OrganizationTask function complete (todo tests)
flovntp Feb 9, 2026
ced511e
UsersTask function+comments (todo tests)
flovntp Feb 10, 2026
cb8a552
ProjectsTask aligned with PHP one (TODO tests)
flovntp Feb 10, 2026
ab78954
start adding comments
flovntp Feb 11, 2026
b43d7e6
complete review with Mickael
flovntp Feb 12, 2026
a3dfe8f
prettier + upsun.ts: init API classes only once
flovntp Feb 12, 2026
d4b0ec6
environment.relationship complete
flovntp Feb 12, 2026
1d7b723
environment: adding Autoscaler get+update
flovntp Feb 12, 2026
b9bbe1a
comment complete
flovntp Feb 12, 2026
22e06f4
prettier
flovntp Feb 12, 2026
3a845f8
mounts.list + prettier
flovntp Feb 13, 2026
6c190e1
add a npm run help command
flovntp Feb 13, 2026
5b1dbf9
repositories.ts
flovntp Feb 13, 2026
31b06e6
prettier
flovntp Feb 13, 2026
a2b64f0
tests unit solved
flovntp Feb 13, 2026
73c8e3f
app.ts
flovntp Feb 13, 2026
405a5ca
prettier
flovntp Feb 13, 2026
bf68c5b
tsconfig nodenext
flovntp Feb 13, 2026
ac6b091
tsconfig module=ES2022
flovntp Feb 13, 2026
bc17e59
remove .js in imports
flovntp Feb 13, 2026
b1efb2f
tsconfig module=NodeNext
flovntp Feb 13, 2026
8ed0ce8
revert imports without .js
flovntp Feb 13, 2026
3a03fb1
override moduleResolution for jesst tests
flovntp Feb 13, 2026
518fa79
override moduleResolution for jesst tests
flovntp Feb 13, 2026
7245d10
add isolatedModules: true
flovntp Feb 13, 2026
4798833
module override for jest
flovntp Feb 13, 2026
e3283c6
test fails
flovntp Feb 13, 2026
25b9eba
test fails
flovntp Feb 13, 2026
9b5e364
test fails
flovntp Feb 13, 2026
fb10ec1
test fails
flovntp Feb 13, 2026
9cd34fe
tsconfig with rootdir.
flovntp Feb 13, 2026
b15535b
test fails
flovntp Feb 13, 2026
92042ce
test fails
flovntp Feb 13, 2026
4e9b961
isolatedModules
flovntp Feb 13, 2026
342e695
adding .js in model.js
flovntp Feb 13, 2026
e1aaabe
test fails
flovntp Feb 13, 2026
f02fde7
test fails
flovntp Feb 13, 2026
1cbea38
bundler
flovntp Feb 13, 2026
12b6424
readd .js
flovntp Feb 13, 2026
24fb21f
deactivate test for now
flovntp Feb 13, 2026
7266b11
revert tsconfig
flovntp Feb 13, 2026
bce2cdb
node version 25
flovntp Feb 13, 2026
4816a26
Merge pull request #6 from upsun/fhk_ci_std
Theosakamg Feb 13, 2026
4e35076
Fix build
Theosakamg Feb 13, 2026
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
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ continuation_indent_size = 2
curly_bracket_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = none
spaces_around_brackets = none

[*.mustache]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
46 changes: 46 additions & 0 deletions .github/workflows/actions/coverage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Code Coverage Report
description: Generate code coverage report and publish them
inputs:
default-runtime-version:
description: "Version used to setup runtime"
required: true
codecov-secret:
description: "CodeCov secret token"
required: true

runs:
using: "composite"
steps:
- name: Set up runtime - Node.js ${{ inputs.default-runtime-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.default-runtime-version }}
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Generate OpenAPI client
shell: bash
run: npm run spec:generate

- name: Run unit tests with coverage
shell: bash
run: npm run test:coverage:ci

- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v3
with:
files: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
slug: upsun/upsun-sdk-node
token: ${{ inputs.codecov-secret }}
24 changes: 24 additions & 0 deletions .github/workflows/actions/doc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Generate Documentation
description: Generate documentation of the project
inputs:
default-runtime-version:
description: "Version used to setup runtime"
required: true

runs:
using: "composite"
steps:
- name: Set up runtime - Node.js ${{ inputs.default-runtime-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.default-runtime-version }}
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci

- name: Generate documentation (with docs generator)
if: false
shell: bash
run: npm run docs
130 changes: 130 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: PR Code review

on:
push:
branches:
- main
pull_request:

env:
# Define the primary Node.js version for release, build, coverage uploads and badge generation
PRIMARY_NODE_VERSION: '25'

jobs:
quality:
name: Code Quality
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up runtime - Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: 'npm'

- name: Validate dependency file
run: npm install --dry-run

- name: Install dependencies
run: npm ci

- name: Run JS/TS lint (eslint, prettier)
run: npm run lint:all

tests:
name: Test on Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x, 24.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up runtime - Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Install OpenAPI Generator CLI
run: npm run spec:generate:install

- name: Generate OpenAPI client
run: npm run spec:generate

- name: Run unit tests
run: npm run test:unit

doc:
name: Generate Documentation
runs-on: ubuntu-latest
needs: [ tests ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: ./.github/workflows/actions/doc
with:
default-runtime-version: ${{ env.PRIMARY_NODE_VERSION }}

coverage:
name: Code Coverage Report
runs-on: ubuntu-latest
needs: [ tests ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: ./.github/workflows/actions/coverage
if: false
with:
default-runtime-version: ${{ env.PRIMARY_NODE_VERSION }}
codecov-secret: ${{ secrets.CODECOV_TOKEN || 'Please define a CODECOV_TOKEN in your GitHub envVars' }}

build:
name: Build Project
runs-on: ubuntu-latest
needs: [ coverage, quality ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up runtime - Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Install OpenAPI Generator CLI
run: npm run spec:generate:install

- name: Generate OpenAPI client
run: npm run spec:generate

- name: Build project
run: npm run build
41 changes: 0 additions & 41 deletions .github/workflows/main.yml

This file was deleted.

79 changes: 61 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,78 @@
name: Publish Package to npmjs
name: Publish Release

on:
release:
types: [published]

env:
# Define the primary Node.js version for release, build, coverage uploads and badge generation
PRIMARY_NODE_VERSION: '22'

jobs:
build:
doc:
name: Generate Documentation
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: ./.github/actions/doc
with:
default-runtime-version: ${{ env.PRIMARY_NODE_VERSION }}

coverage:
name: Code Coverage Report
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: ./.github/actions/coverage
if: false
with:
default-runtime-version: ${{ env.PRIMARY_NODE_VERSION }}
codecov-secret: ${{ secrets.CODECOV_TOKEN || 'Please define a CODECOV_TOKEN in your GitHub envVars' }}

publish:
name: Publish release to NPM
runs-on: ubuntu-latest
needs: [ doc, coverage ]
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up runtime - Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run gen-client
- run: npm run build
- run: npm publish

- name: Install OpenAPI Generator CLI
run: npm run spec:generate:install

- name: Generate OpenAPI client
run: npm run spec:generate

- name: Build project
run: npm run build

- name: Publish package
if: success()
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
#TODO --access public --provenance when repo is public
# - uses: actions/setup-node@v4
# with:
# registry-url: 'https://npm.pkg.github.com'
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pids
lib-cov

# Coverage directory used by tools like istanbul
coverage
/coverage
*.lcov

# nyc test coverage
Expand Down Expand Up @@ -235,5 +235,9 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,linux,macos,windows

src/apis-gen
!.github/**
src/.openapi-generator
openapitools.json
src/api/**
src/model/**
src/core/runtime.ts
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dist
node_modules
coverage
*.yaml
*.yml
*.json
src/api/**
src/model/**
!src/core/runtime.ts
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "avoid"
}
Loading