node-server-engine 1.3.5 → 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.
@@ -0,0 +1,59 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ permissions:
13
+ contents: write
14
+ id-token: write
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: 20
26
+ registry-url: 'https://registry.npmjs.org/'
27
+
28
+ - name: Configure git identity
29
+ run: |
30
+ git config user.name "github-actions[bot]"
31
+ git config user.email "github-actions[bot]@users.noreply.github.com"
32
+
33
+ - name: Install dependencies
34
+ run: npm ci
35
+
36
+ - name: Lint
37
+ run: npm run lint
38
+
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
45
+
46
+ # Commit and push version bump
47
+ - name: Commit version bump
48
+ run: |
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)"
52
+
53
+ - name: Build package
54
+ run: npm run build --if-present
55
+
56
+ - name: Publish to npm
57
+ run: npm publish
58
+ env:
59
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -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","console","log","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 console.log('SecrrtCj', secretCache);\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;IACrCM,OAAO,CAACC,GAAG,CAAC,UAAU,EAAEF,yBAAW,CAAC;IAEpC,IAAI,CAACD,WAAW,EAAE;MAChB,MAAM,IAAII,wBAAW,CAAC;QACpBC,OAAO,EAAE,oBAAoBT,IAAI;MACnC,CAAC,CAAC;IACJ;IACA,OAAOI,WAAW;EACpB,CAAC,MAAM;IACL,MAAMM,SAAS,GAAGT,OAAO,CAACC,GAAG,CAACF,IAAI,CAAC;IACnC,IAAI,CAACU,SAAS,EAAE;MACd,MAAM,IAAIF,wBAAW,CAAC;QACpBC,OAAO,EAAE,kBAAkBT,IAAI;MACjC,CAAC,CAAC;IACJ;IAEA,IAAI;MACF,OAAOW,WAAE,CAACC,YAAY,CAACF,SAAS,EAAE,OAAO,CAAC;IAC5C,CAAC,CAAC,OAAOG,GAAG,EAAE;MACZ,MAAM,IAAIL,wBAAW,CAAC;QACpBC,OAAO,EAAE,gCAAgCT,IAAI,KAAMa,GAAG,CAAWJ,OAAO;MAC1E,CAAC,CAAC;IACJ;EACF;AACF,CAAC;AAACK,OAAA,CAAAf,eAAA,GAAAA,eAAA","ignoreList":[]}
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.5",
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({