@wildberries/service-cdn-uploader
Advanced tools
Comparing version 0.0.3 to 0.0.4
23
index.js
@@ -18,2 +18,3 @@ /* eslint-disable import/no-unresolved */ | ||
const IS_STAGE = process.env.IS_STAGE; | ||
const IS_DLDEVEL = process.env.IS_DLDEVEL; | ||
@@ -74,3 +75,17 @@ // FOR DEBUGGING | ||
const pushStatic = async isStage => { | ||
const getNewStaticPath = () => { | ||
const BASE_PATH = `${APP_STATIC_NAMESPACE}/${APP_VERSION}`; | ||
if (IS_STAGE) { | ||
return `${BASE_PATH}-stage`; | ||
} | ||
if (IS_DLDEVEL) { | ||
return `${BASE_PATH}-dldevel`; | ||
} | ||
return BASE_PATH; | ||
}; | ||
const pushStatic = async () => { | ||
if ( | ||
@@ -99,5 +114,3 @@ !WB_STATIC_URL || | ||
files.map(async file => { | ||
const newStaticPath = isStage | ||
? `${APP_STATIC_NAMESPACE}/${APP_VERSION}-stage` | ||
: `${APP_STATIC_NAMESPACE}/${APP_VERSION}`; | ||
const newStaticPath = getNewStaticPath(); | ||
@@ -144,2 +157,2 @@ const staticPath = file.replace( | ||
pushStatic(IS_STAGE); | ||
pushStatic(); |
{ | ||
"name": "@wildberries/service-cdn-uploader", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188462
4983
9