Compare commits

..

10 Commits

Author SHA1 Message Date
81f286cb2f 4.3.9
Some checks failed
Docker (tags) / security (push) Successful in 58s
Docker (tags) / test (push) Failing after 3m6s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2024-11-06 17:19:44 +01:00
1f12cb9f94 fix(test and dependencies): Corrected cloudlyUrl in test.apiclient and updated tapbundle dependency. 2024-11-06 17:19:43 +01:00
26490e8ddd 4.3.8
Some checks failed
Docker (tags) / security (push) Successful in 53s
Docker (tags) / test (push) Failing after 2m10s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2024-11-06 16:59:18 +01:00
38d2120c35 fix(api client): Fixed localhost URL issue in test.client.ts 2024-11-06 16:59:17 +01:00
f80b8decbc 4.3.7
Some checks failed
Docker (tags) / security (push) Successful in 59s
Docker (tags) / test (push) Failing after 2m4s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2024-11-06 16:53:22 +01:00
28cd6d1b49 fix(tests): Refactored test setup for consistency and isolated config initialization. 2024-11-06 16:53:21 +01:00
899e5b0a7d 4.3.6
Some checks failed
Docker (tags) / security (push) Successful in 55s
Docker (tags) / test (push) Failing after 2m8s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2024-11-06 16:22:38 +01:00
0eff7c7510 fix(test): Enhance test helpers with dynamic Hetzner token retrieval. 2024-11-06 16:22:38 +01:00
7789348f4e 4.3.5
Some checks failed
Docker (tags) / security (push) Successful in 1m2s
Docker (tags) / test (push) Failing after 2m8s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2024-11-06 16:13:55 +01:00
66a23a515b fix(helpers): Add missing sslMode configuration to Cloudly config. 2024-11-06 16:13:54 +01:00
8 changed files with 78 additions and 140 deletions

View File

@ -13,6 +13,7 @@ env:
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_LOGIN_DOCKER_GITEA: ${{ github.server_url }}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }}
NPMCI_SECRET01: ${{ secrets.NPMCI_SECRET01 }}
jobs:
security:

View File

@ -1,5 +1,33 @@
# Changelog
## 2024-11-06 - 4.3.9 - fix(test and dependencies)
Corrected cloudlyUrl in test.apiclient and updated tapbundle dependency.
- Fixed cloudlyUrl assignment in the test.apiclient to use the correct helper method.
- Updated tapbundle dependency version from ^5.4.3 to ^5.4.4.
## 2024-11-06 - 4.3.8 - fix(api client)
Fixed localhost URL issue in test.client.ts
- Changed the cloudlyUrl in test.client.ts from 'localhost' to '127.0.0.1' to ensure consistency in network requests.
## 2024-11-06 - 4.3.7 - fix(tests)
Refactored test setup for consistency and isolated config initialization.
- test/helpers/cloudlyfactory.ts: Test configuration setup was refactored to ensure consistent initialization of cloudly configuration across tests.
- test/test.apiclient.ts: Updated cloudlyApiClient test setup to use testCloudlyConfig for dynamic port allocation.
## 2024-11-06 - 4.3.6 - fix(test)
Enhance test helpers with dynamic Hetzner token retrieval.
- Updated test/helpers/cloudlyfactory.ts to retrieve Hetzner token from environment variables.
- Expanded docker_tags workflow to securely handle and pass new environment secrets.
## 2024-11-06 - 4.3.5 - fix(helpers)
Add missing sslMode configuration to Cloudly config.
- Added the sslMode key with a value of 'none' to the Cloudly configuration object in test/helpers/cloudlyfactory.ts.
## 2024-11-06 - 4.3.4 - fix(testing)
Fixed Cloudly testing setup and dependencies

View File

@ -1,6 +1,6 @@
{
"name": "@serve.zone/cloudly",
"version": "4.3.4",
"version": "4.3.9",
"private": false,
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
"type": "module",
@ -28,7 +28,7 @@
"@git.zone/tspublish": "^1.7.7",
"@git.zone/tstest": "^1.0.90",
"@git.zone/tswatch": "^2.0.25",
"@push.rocks/tapbundle": "^5.4.3",
"@push.rocks/tapbundle": "^5.4.4",
"@types/node": "^22.9.0"
},
"dependencies": {

124
pnpm-lock.yaml generated
View File

@ -155,8 +155,8 @@ devDependencies:
specifier: ^2.0.25
version: 2.0.25
'@push.rocks/tapbundle':
specifier: ^5.4.3
version: 5.4.3(@aws-sdk/client-sso-oidc@3.682.0)
specifier: ^5.4.4
version: 5.4.4(@aws-sdk/client-sso-oidc@3.682.0)
'@types/node':
specifier: ^22.9.0
version: 22.9.0
@ -530,56 +530,6 @@ packages:
transitivePeerDependencies:
- aws-crt
/@aws-sdk/client-sso-oidc@3.682.0(@aws-sdk/client-sts@3.679.0):
resolution: {integrity: sha512-ZPZ7Y/r/w3nx/xpPzGSqSQsB090Xk5aZZOH+WBhTDn/pBEuim09BYXCLzvvxb7R7NnuoQdrTJiwimdJAhHl7ZQ==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@aws-sdk/client-sts': ^3.682.0
dependencies:
'@aws-crypto/sha256-browser': 5.2.0
'@aws-crypto/sha256-js': 5.2.0
'@aws-sdk/client-sts': 3.679.0
'@aws-sdk/core': 3.679.0
'@aws-sdk/credential-provider-node': 3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.679.0)
'@aws-sdk/middleware-host-header': 3.679.0
'@aws-sdk/middleware-logger': 3.679.0
'@aws-sdk/middleware-recursion-detection': 3.679.0
'@aws-sdk/middleware-user-agent': 3.682.0
'@aws-sdk/region-config-resolver': 3.679.0
'@aws-sdk/types': 3.679.0
'@aws-sdk/util-endpoints': 3.679.0
'@aws-sdk/util-user-agent-browser': 3.679.0
'@aws-sdk/util-user-agent-node': 3.682.0
'@smithy/config-resolver': 3.0.10
'@smithy/core': 2.5.1
'@smithy/fetch-http-handler': 3.2.9
'@smithy/hash-node': 3.0.8
'@smithy/invalid-dependency': 3.0.8
'@smithy/middleware-content-length': 3.0.10
'@smithy/middleware-endpoint': 3.2.1
'@smithy/middleware-retry': 3.0.25
'@smithy/middleware-serde': 3.0.8
'@smithy/middleware-stack': 3.0.8
'@smithy/node-config-provider': 3.1.9
'@smithy/node-http-handler': 3.2.5
'@smithy/protocol-http': 4.1.5
'@smithy/smithy-client': 3.4.2
'@smithy/types': 3.6.0
'@smithy/url-parser': 3.0.8
'@smithy/util-base64': 3.0.0
'@smithy/util-body-length-browser': 3.0.0
'@smithy/util-body-length-node': 3.0.0
'@smithy/util-defaults-mode-browser': 3.0.25
'@smithy/util-defaults-mode-node': 3.0.25
'@smithy/util-endpoints': 2.1.4
'@smithy/util-middleware': 3.0.8
'@smithy/util-retry': 3.0.8
'@smithy/util-utf8': 3.0.0
tslib: 2.8.0
transitivePeerDependencies:
- aws-crt
optional: true
/@aws-sdk/client-sso-oidc@3.682.0(@aws-sdk/client-sts@3.682.0):
resolution: {integrity: sha512-ZPZ7Y/r/w3nx/xpPzGSqSQsB090Xk5aZZOH+WBhTDn/pBEuim09BYXCLzvvxb7R7NnuoQdrTJiwimdJAhHl7ZQ==}
engines: {node: '>=16.0.0'}
@ -895,31 +845,6 @@ packages:
- '@aws-sdk/client-sso-oidc'
- aws-crt
/@aws-sdk/credential-provider-ini@3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.679.0):
resolution: {integrity: sha512-6eqWeHdK6EegAxqDdiCi215nT3QZPwukgWAYuVxNfJ/5m0/P7fAzF+D5kKVgByUvGJEbq/FEL8Fw7OBe64AA+g==}
engines: {node: '>=16.0.0'}
requiresBuild: true
peerDependencies:
'@aws-sdk/client-sts': ^3.682.0
dependencies:
'@aws-sdk/client-sts': 3.679.0
'@aws-sdk/core': 3.679.0
'@aws-sdk/credential-provider-env': 3.679.0
'@aws-sdk/credential-provider-http': 3.679.0
'@aws-sdk/credential-provider-process': 3.679.0
'@aws-sdk/credential-provider-sso': 3.682.0(@aws-sdk/client-sso-oidc@3.682.0)
'@aws-sdk/credential-provider-web-identity': 3.679.0(@aws-sdk/client-sts@3.679.0)
'@aws-sdk/types': 3.679.0
'@smithy/credential-provider-imds': 3.2.5
'@smithy/property-provider': 3.1.8
'@smithy/shared-ini-file-loader': 3.1.9
'@smithy/types': 3.6.0
tslib: 2.8.0
transitivePeerDependencies:
- '@aws-sdk/client-sso-oidc'
- aws-crt
optional: true
/@aws-sdk/credential-provider-ini@3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.682.0):
resolution: {integrity: sha512-6eqWeHdK6EegAxqDdiCi215nT3QZPwukgWAYuVxNfJ/5m0/P7fAzF+D5kKVgByUvGJEbq/FEL8Fw7OBe64AA+g==}
engines: {node: '>=16.0.0'}
@ -966,29 +891,6 @@ packages:
- '@aws-sdk/client-sts'
- aws-crt
/@aws-sdk/credential-provider-node@3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.679.0):
resolution: {integrity: sha512-HSmDqZcBVZrTctHCT9m++vdlDfJ1ARI218qmZa+TZzzOFNpKWy6QyHMEra45GB9GnkkMmV6unoDSPMuN0AqcMg==}
engines: {node: '>=16.0.0'}
requiresBuild: true
dependencies:
'@aws-sdk/credential-provider-env': 3.679.0
'@aws-sdk/credential-provider-http': 3.679.0
'@aws-sdk/credential-provider-ini': 3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.679.0)
'@aws-sdk/credential-provider-process': 3.679.0
'@aws-sdk/credential-provider-sso': 3.682.0(@aws-sdk/client-sso-oidc@3.682.0)
'@aws-sdk/credential-provider-web-identity': 3.679.0(@aws-sdk/client-sts@3.679.0)
'@aws-sdk/types': 3.679.0
'@smithy/credential-provider-imds': 3.2.5
'@smithy/property-provider': 3.1.8
'@smithy/shared-ini-file-loader': 3.1.9
'@smithy/types': 3.6.0
tslib: 2.8.0
transitivePeerDependencies:
- '@aws-sdk/client-sso-oidc'
- '@aws-sdk/client-sts'
- aws-crt
optional: true
/@aws-sdk/credential-provider-node@3.682.0(@aws-sdk/client-sso-oidc@3.682.0)(@aws-sdk/client-sts@3.682.0):
resolution: {integrity: sha512-HSmDqZcBVZrTctHCT9m++vdlDfJ1ARI218qmZa+TZzzOFNpKWy6QyHMEra45GB9GnkkMmV6unoDSPMuN0AqcMg==}
engines: {node: '>=16.0.0'}
@ -1276,7 +1178,7 @@ packages:
peerDependencies:
'@aws-sdk/client-sso-oidc': ^3.679.0
dependencies:
'@aws-sdk/client-sso-oidc': 3.682.0(@aws-sdk/client-sts@3.679.0)
'@aws-sdk/client-sso-oidc': 3.682.0(@aws-sdk/client-sts@3.682.0)
'@aws-sdk/types': 3.679.0
'@smithy/property-provider': 3.1.8
'@smithy/shared-ini-file-loader': 3.1.9
@ -2026,7 +1928,7 @@ packages:
'@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpromise': 4.0.4
'@push.rocks/smartshell': 3.0.6
'@push.rocks/tapbundle': 5.4.3(@aws-sdk/client-sso-oidc@3.682.0)
'@push.rocks/tapbundle': 5.4.4(@aws-sdk/client-sso-oidc@3.682.0)
'@types/ws': 8.5.12
figures: 6.1.0
ws: 8.18.0
@ -2063,9 +1965,7 @@ packages:
'@push.rocks/smartshell': 3.0.6
'@push.rocks/taskbuffer': 3.1.7
transitivePeerDependencies:
- bufferutil
- supports-color
- utf-8-validate
dev: true
/@hapi/bourne@3.0.0:
@ -3035,8 +2935,8 @@ packages:
'@push.rocks/smartpromise': 4.0.4
rxjs: 7.8.1
/@push.rocks/smarts3@2.2.2:
resolution: {integrity: sha512-H1dou6JrSkrwx6Y/szuOlnARGSSuZTSL2rLnJqg93/vp6GjLPQqI4+zEkuIO+3fAoQH0hRYvc0/DPhalKWJA2A==}
/@push.rocks/smarts3@2.2.5:
resolution: {integrity: sha512-OZjD0jBCUTJCLnwraxBcyZ3he5buXf2OEM1zipiTBChA2EcKUZWKk/a6KR5WT+NlFCIIuB23UG+U+cxsIWM91Q==}
dependencies:
'@push.rocks/smartbucket': 3.0.23
'@push.rocks/smartfile': 11.0.21
@ -3194,8 +3094,8 @@ packages:
'@types/js-yaml': 3.12.10
js-yaml: 3.14.1
/@push.rocks/tapbundle@5.4.3(@aws-sdk/client-sso-oidc@3.682.0):
resolution: {integrity: sha512-8s8UMHW6gmhVGp4wucnPOiPEegaVZBcKQb+dQ8rclRm2qxipsshfKvsYw48R6ZxAFllwSicMm+xaPlpP31/mJg==}
/@push.rocks/tapbundle@5.4.4(@aws-sdk/client-sso-oidc@3.682.0):
resolution: {integrity: sha512-NpozEyisxtal1Zd/T2pRnorNFDlLvWMgXi19z4hGsLWBGHgPX3pyAuZmxlsJu2RH0LlSaHI7FA410wfcF3b2LQ==}
dependencies:
'@open-wc/testing': 4.0.0
'@push.rocks/consolecolor': 2.0.2
@ -3207,7 +3107,7 @@ packages:
'@push.rocks/smartjson': 5.0.20
'@push.rocks/smartmongo': 2.0.10(@aws-sdk/client-sso-oidc@3.682.0)
'@push.rocks/smartpromise': 4.0.4
'@push.rocks/smarts3': 2.2.2
'@push.rocks/smarts3': 2.2.5
'@push.rocks/smartshell': 3.0.6
'@push.rocks/smarttime': 4.0.8
transitivePeerDependencies:
@ -4541,8 +4441,8 @@ packages:
errorstacks: 2.4.1
dev: true
/@web/dev-server-core@0.7.3:
resolution: {integrity: sha512-GS+Ok6HiqNZOsw2oEv5V2OISZ2s/6icJodyGjUuD3RChr0G5HiESbKf2K8mZV4shTz9sRC9KSQf8qvno2gPKrQ==}
/@web/dev-server-core@0.7.4:
resolution: {integrity: sha512-nHSNrJ1J9GjmSceKNHpWRMjvpfE2NTV9EYUffPIr7j0sIV59gK7NI/4+9slotJ/ODXw0+e1gSeJshTOhjjVNxQ==}
engines: {node: '>=18.0.0'}
dependencies:
'@types/koa': 2.15.0
@ -4601,7 +4501,7 @@ packages:
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@web/browser-logs': 0.4.0
'@web/dev-server-core': 0.7.3
'@web/dev-server-core': 0.7.4
chokidar: 4.0.1
cli-cursor: 3.1.0
co-body: 6.2.0

View File

@ -5,29 +5,39 @@ import * as cloudly from '../../ts/index.js';
const stopFunctions: Array<() => Promise<void>> = [];
export const createCloudly = async () => {
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
stopFunctions.push(async () => {
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
stopFunctions.push(async () => {
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
});
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
await smarts3.createBucket('cloudly-test');
stopFunctions.push(async () => {
});
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
await smarts3.createBucket('cloudly-test');
stopFunctions.push(async () => {
await smarts3.stop();
});
const cloudlyConfig: cloudly.ICloudlyConfig = {
});
export const testCloudlyConfig: cloudly.ICloudlyConfig = {
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
environment: 'integration',
letsEncryptEmail: 'test@serve.zone',
publicUrl: 'localhost',
publicUrl: '127.0.0.1',
publicPort: '8080',
mongoDescriptor: await smartmongo.getMongoDescriptor(),
s3Descriptor: await smarts3.getS3Descriptor(),
sslMode: 'none',
...(() => {
if (process.env.NPMCI_SECRET01) {
return {
hetznerToken: process.env.NPMCI_SECRET01,
};
const cloudlyInstance = new cloudly.Cloudly(cloudlyConfig);
}
})(),
};
export const createCloudly = async () => {
const cloudlyInstance = new cloudly.Cloudly(testCloudlyConfig);
return cloudlyInstance;
}
};
export const stopCloudly = async () => {
await Promise.all(stopFunctions.map((stopFunction) => stopFunction()));
@ -35,5 +45,4 @@ export const stopCloudly = async () => {
export const getEnvVarOnDemand = async (envVarName: string) => {
return testQenv.getEnvVarOnDemand(envVarName);
}
};

View File

@ -33,7 +33,7 @@ tap.preTask('should create a new machine user for testing', async () => {
tap.test('should create a new cloudlyApiClient', async () => {
testClient = new cloudlyApiClient.CloudlyApiClient({
registerAs: 'api',
cloudlyUrl: `http://localhost:${await helpers.getEnvVarOnDemand('SERVEZONE_PORT')}`,
cloudlyUrl: `http://${helpers.testCloudlyConfig.publicUrl}:${helpers.testCloudlyConfig.publicPort}`,
});
await testClient.start();
expect(testClient).toBeTruthy();

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/cloudly',
version: '4.3.4',
version: '4.3.9',
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
}

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/cloudly',
version: '4.3.4',
version: '4.3.9',
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
}