node-server-engine 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,14 +10,14 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
|
|
12
12
|
permissions:
|
|
13
|
-
contents: write
|
|
13
|
+
contents: write
|
|
14
14
|
id-token: write
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout code
|
|
18
18
|
uses: actions/checkout@v4
|
|
19
19
|
with:
|
|
20
|
-
fetch-depth: 0
|
|
20
|
+
fetch-depth: 0
|
|
21
21
|
|
|
22
22
|
- name: Setup Node.js
|
|
23
23
|
uses: actions/setup-node@v4
|
|
@@ -36,15 +36,19 @@ jobs:
|
|
|
36
36
|
- name: Lint
|
|
37
37
|
run: npm run lint
|
|
38
38
|
|
|
39
|
-
# -
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
# Auto-increment version (no tag)
|
|
40
|
+
- name: Bump version
|
|
41
|
+
id: bump
|
|
42
|
+
run: |
|
|
43
|
+
NEW_VERSION=$(npm version patch --no-git-tag-version)
|
|
44
|
+
echo "version=${NEW_VERSION}" >> $GITHUB_OUTPUT
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
# Commit and push version bump
|
|
47
|
+
- name: Commit version bump
|
|
46
48
|
run: |
|
|
47
|
-
git
|
|
49
|
+
git add package.json package-lock.json
|
|
50
|
+
git commit -m "chore(release): bump to ${{ steps.bump.outputs.version }} [skip ci]" || echo "No changes to commit"
|
|
51
|
+
git push origin main || echo "Push skipped (branch protection may apply)"
|
|
48
52
|
|
|
49
53
|
- name: Build package
|
|
50
54
|
run: npm run build --if-present
|
|
@@ -15,7 +15,6 @@ var _secretLoader = require("./secretLoader");
|
|
|
15
15
|
const getSecretOrFile = name => {
|
|
16
16
|
if (process.env.NODE_ENV === 'production') {
|
|
17
17
|
const secretValue = _secretLoader.secretCache[name];
|
|
18
|
-
console.log('SecrrtCj', _secretLoader.secretCache);
|
|
19
18
|
if (!secretValue) {
|
|
20
19
|
throw new _EngineError.EngineError({
|
|
21
20
|
message: `Secret value for ${name} not found in cache`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretResolver.js","names":["_fs","_interopRequireDefault","require","_EngineError","_secretLoader","getSecretOrFile","name","process","env","NODE_ENV","secretValue","secretCache","
|
|
1
|
+
{"version":3,"file":"secretResolver.js","names":["_fs","_interopRequireDefault","require","_EngineError","_secretLoader","getSecretOrFile","name","process","env","NODE_ENV","secretValue","secretCache","EngineError","message","localPath","fs","readFileSync","err","exports"],"sources":["../../../src/utils/secretManager/secretResolver.ts"],"sourcesContent":["import fs from 'fs';\nimport { EngineError } from 'entities/EngineError';\nimport { secretCache } from './secretLoader';\n\n/**\n * Retrieve a secret value (production) or file content (development).\n * @param name The env var name that contains either the secret path (prod) or local file path (dev)\n */\nexport const getSecretOrFile = (name: string): string => {\n if (process.env.NODE_ENV === 'production') {\n const secretValue = secretCache[name];\n\n if (!secretValue) {\n throw new EngineError({\n message: `Secret value for ${name} not found in cache`\n });\n }\n return secretValue;\n } else {\n const localPath = process.env[name];\n if (!localPath) {\n throw new EngineError({\n message: `Local path for ${name} is not defined`\n });\n }\n\n try {\n return fs.readFileSync(localPath, 'utf-8');\n } catch (err) {\n throw new EngineError({\n message: `Error reading local file for ${name}: ${(err as Error).message}`\n });\n }\n }\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACO,MAAMG,eAAe,GAAIC,IAAY,IAAa;EACvD,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,MAAMC,WAAW,GAAGC,yBAAW,CAACL,IAAI,CAAC;IAErC,IAAI,CAACI,WAAW,EAAE;MAChB,MAAM,IAAIE,wBAAW,CAAC;QACpBC,OAAO,EAAE,oBAAoBP,IAAI;MACnC,CAAC,CAAC;IACJ;IACA,OAAOI,WAAW;EACpB,CAAC,MAAM;IACL,MAAMI,SAAS,GAAGP,OAAO,CAACC,GAAG,CAACF,IAAI,CAAC;IACnC,IAAI,CAACQ,SAAS,EAAE;MACd,MAAM,IAAIF,wBAAW,CAAC;QACpBC,OAAO,EAAE,kBAAkBP,IAAI;MACjC,CAAC,CAAC;IACJ;IAEA,IAAI;MACF,OAAOS,WAAE,CAACC,YAAY,CAACF,SAAS,EAAE,OAAO,CAAC;IAC5C,CAAC,CAAC,OAAOG,GAAG,EAAE;MACZ,MAAM,IAAIL,wBAAW,CAAC;QACpBC,OAAO,EAAE,gCAAgCP,IAAI,KAAMW,GAAG,CAAWJ,OAAO;MAC1E,CAAC,CAAC;IACJ;EACF;AACF,CAAC;AAACK,OAAA,CAAAb,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-server-engine",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Framework used to develop backend services. This package ships with a lot of features to standardize the creation of services, letting you focus on the business logic.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,6 @@ import { secretCache } from './secretLoader';
|
|
|
9
9
|
export const getSecretOrFile = (name: string): string => {
|
|
10
10
|
if (process.env.NODE_ENV === 'production') {
|
|
11
11
|
const secretValue = secretCache[name];
|
|
12
|
-
console.log('SecrrtCj', secretCache);
|
|
13
12
|
|
|
14
13
|
if (!secretValue) {
|
|
15
14
|
throw new EngineError({
|