jenssimon / sfcc-deploy Goto Github PK
View Code? Open in Web Editor NEWDeploy cartridges to a Salesforce Commerce Cloud (SFCC) instance
License: MIT License
Deploy cartridges to a Salesforce Commerce Cloud (SFCC) instance
License: MIT License
HOST=staging.na01.redacted.demandware.net
HOSTNAME=cert.staging.na01.redacted.demandware.net
CLIENT_ID=redacted
VERSION=v1.1.65
CLIENT_SECRET=redacted
P12=./sfcc/eg.p12
PASSPHRASE=redacted
ACTIVATE_CODE_VERSION=True
'use strict'; var sfccDeploy = require('sfcc-deploy').default; var sfcc = require('sfcc-ci'); require('dotenv').config(); var version = process.env.VERSION; var config = { host: process.env.HOST, hostname: process.env.HOSTNAME, clientId: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, p12: process.env.P12, // two factor authentication passphrase: process.env.PASSPHRASE // two factor authentication }; var activateCodeVersion = { name: function (params) { return 'Activating code version: ' + params.options.version; }, condition: 'activateCodeVersion', // the flag name needed to active the task emoji: 'fast_forward', fn: function (params) { if (!params.activateCodeVersion) { return; } sfcc.code.activate(config.host, version, params.token, function (error) { if (error) { console.log(error); } }); } }; sfccDeploy({ additionalSteps: [ activateCodeVersion ], activateCodeVersion: true, credentials: config, version: version, root: './' });
when i run this script with .env values i'm encountering this error
(node:80615) UnhandledPromiseRejectionWarning: Error: null at Request._callback (/Users/****redacted****/Documents/****redacted****/eg_sfcc/node_modules/sfcc-ci/lib/auth.js:692:22) at Request.self.callback (/Users/jesse/Documents/****redacted****/eg_sfcc/node_modules/sfcc-ci/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request.<anonymous> (/Users/****redacted****/Documents/****redacted****/eg_sfcc/node_modules/sfcc-ci/node_modules/request/request.js:1154:10) at Request.emit (events.js:314:20) at IncomingMessage.<anonymous> (/Users/****redacted****/Documents/****redacted****/eg_sfcc/node_modules/sfcc-ci/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:420:28) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1241:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) (node:80615) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:80615) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
but when i hardcode the values within my script it works fine i also verified that the no null values are being passed in
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates await pending status checks before automerging. Click on a checkbox to abort the branch automerge, and create a PR instead.
@types/node
, npm-run-all2
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
archiver
, @types/archiver
).github/workflows/ci.yml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
.github/workflows/codeql-analysis.yml
actions/checkout v4
github/codeql-action v3
github/codeql-action v3
github/codeql-action v3
.github/workflows/commitlint.yml
actions/checkout v4
wagoid/commitlint-github-action v5
package.json
archiver ^5.3.2
camel-case ^4.1.2
chalk ^4.1.2
cli-step ^1.0.2
commander ^10.0.1
dwdav >=3.5.1
@commitlint/cli 18.6.0
@commitlint/config-conventional 18.6.0
@jenssimon/eslint-config-base 7.3.17
@jenssimon/eslint-config-typescript 5.2.19
@types/archiver 5.3.4
@types/node 20.11.13
commitizen 4.3.0
cz-conventional-changelog 3.3.0
eslint 8.56.0
husky 9.0.7
lint-staged 15.2.1
npm-run-all2 6.1.1
pinst 3.0.0
semantic-release 23.0.0
sfcc-ci 2.11.0
ts-node 10.9.2
typescript 5.3.3
sfcc-ci >=2.4.0
yarn 4.1.0
.nvmrc
node 20.11.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.