diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ebc8b5..69b3e08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,30 +12,35 @@ stages: - release - metadata +before_script: + - npm install -g @shipzone/npmci + # ==================== # security stage # ==================== -mirror: +auditProductionDependencies: + image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security script: - - npmci git mirror + - npmci npm prepare + - npmci command npm install --production --ignore-scripts + - npmci command npm config set registry https://registry.npmjs.org + - npmci command npm audit --audit-level=high --only=prod --production tags: - - lossless - docker - - notpriv + allow_failure: true -audit: +auditDevDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security script: - npmci npm prepare - npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org - - npmci command npm audit --audit-level=high + - npmci command npm audit --audit-level=high --only=dev tags: - - lossless - docker - - notpriv + allow_failure: true # ==================== # test stage @@ -50,9 +55,7 @@ testStable: - npmci npm test coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - priv testBuild: stage: test @@ -63,9 +66,7 @@ testBuild: - npmci command npm run build coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - notpriv release: stage: release @@ -85,11 +86,12 @@ release: codequality: stage: metadata allow_failure: true + only: + - tags script: - - npmci command npm install -g tslint typescript + - npmci command npm install -g typescript - npmci npm prepare - npmci npm install - - npmci command "tslint -c tslint.json ./ts/**/*.ts" tags: - lossless - docker @@ -109,11 +111,10 @@ trigger: pages: stage: metadata script: - - npmci node install lts - - npmci command npm install -g @gitzone/tsdoc + - npmci node install stable - npmci npm prepare - npmci npm install - - npmci command tsdoc + - npmci command npm run buildDocs tags: - lossless - docker diff --git a/.vscode/launch.json b/.vscode/launch.json index 112db52..26e9f92 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,28 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "current file", - "type": "node", + "command": "npm test", + "name": "Run npm test", "request": "launch", - "args": [ - "${relativeFile}" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": "test.ts", - "type": "node", - "request": "launch", - "args": [ - "test/test.ts" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" + "type": "node-terminal" } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 01d2b8d..3648eaa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,7 +15,7 @@ "properties": { "projectType": { "type": "string", - "enum": ["website", "element", "service", "npm"] + "enum": ["website", "element", "service", "npm", "wcc"] } } } diff --git a/package.json b/package.json index 22a3705..67dd3f2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "type": "module", "scripts": { "test": "(tstest test/)", - "build": "(tsbuild --web)" + "build": "(tsbuild --web)", + "buildDocs": "tsdoc" }, "repository": { "type": "git", @@ -50,5 +51,8 @@ "cli.js", "npmextra.json", "readme.md" + ], + "browserslist": [ + "last 1 chrome versions" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index fc88648..f411c90 100644 --- a/test/test.ts +++ b/test/test.ts @@ -4,13 +4,10 @@ import * as qenv from '../ts/index.js'; import * as smartpath from '@pushrocks/smartpath'; -export { - smartpath -} +export { smartpath }; const __dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url); - process.env['key1'] = 'original'; let testQenv: qenv.Qenv; diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 8acaad7..af1207f 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/qenv', - version: '5.0.0', + version: '5.0.1', description: 'easy promised environments' } diff --git a/ts/qenv.classes.qenv.ts b/ts/qenv.classes.qenv.ts index 39fad14..06a2b88 100644 --- a/ts/qenv.classes.qenv.ts +++ b/ts/qenv.classes.qenv.ts @@ -111,8 +111,8 @@ export class Qenv { envVarFromEnvironmentVariable, envVarFromEnvJsonFile, envVarFromDockerSecret, - dockerSecretJson - ].forEach(candidate => { + dockerSecretJson, + ].forEach((candidate) => { if (candidate) { availableCcandidates.push(candidate); }