Skip to content

Commit

Permalink
chore(npm): use veriables
Browse files Browse the repository at this point in the history
  • Loading branch information
anteqkois committed May 30, 2024
1 parent 29bfb38 commit 9a715f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ publish-connectors-prod:
publish-shared-prod:
NODE_ENV=production npx ts-node -T tools/scripts/package-manager/publish-nx-project.ts libs/shared

publish-package:
NODE_ENV=production npx ts-node -T tools/scripts/package-manager/publish-nx-project.ts libs/connectors/telegram-bot

ssh:
ssh [email protected]
16 changes: 14 additions & 2 deletions libs/nest-core/src/lib/package-manager/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ import { access, writeFile } from 'node:fs/promises'
import { join } from 'node:path'
import { promisify } from 'node:util'

// const npmrcContent = `
// strict-peer-dependencies=false
// auto-install-peers=true
// ignore-scripts=true
// registry=\${REGISTRY_URL}
// //\${REGISTRY_URL}:_authToken=\${REGISTRY_TOKEN}
// `

const npmrcContent = `
strict-peer-dependencies=false
auto-install-peers=true
ignore-scripts=true
registry=\${REGISTRY_URL}
//\${REGISTRY_URL}/:_authToken=\${REGISTRY_TOKEN}
registry=http://64.226.97.74:4873
//http://64.226.97.74:4873:_authToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWFsX2dyb3VwcyI6WyJsaW5rZXJyeV9vZmZpY2lhbF93b3JrZXIiLCIkYWxsIiwiJGF1dGhlbnRpY2F0ZWQiLCJAYWxsIiwiQGF1dGhlbnRpY2F0ZWQiLCJhbGwiXSwibmFtZSI6ImxpbmtlcnJ5X29mZmljaWFsX3dvcmtlciIsImdyb3VwcyI6WyJsaW5rZXJyeV9vZmZpY2lhbF93b3JrZXIiLCIkYWxsIiwiJGF1dGhlbnRpY2F0ZWQiLCJAYWxsIiwiQGF1dGhlbnRpY2F0ZWQiLCJhbGwiXSwiaWF0IjoxNzE2NzEyNjE1LCJuYmYiOjE3MTY3MTI2MTYsImV4cCI6MTc0ODI0ODYxNX0.h0xkG-TrJUU0crMNerrfoHpc48L0N3AREQW2naR0F18
`

export const exec = promisify(execCallback)
Expand Down Expand Up @@ -79,6 +87,10 @@ export const packageManager = {
async init({ path }: InitParams): Promise<PackageManagerOutput> {
await writeNpmrcIfNotExists(path, npmrcContent)

console.log('TEST');
console.log(process.env['REGISTRY_URL']);
console.log(process.env['REGISTRY_TOKEN']);

return runCommand(path, 'init')
},

Expand Down

0 comments on commit 9a715f8

Please sign in to comment.