Comparing version 0.4.0-alpha.6 to 0.4.0-alpha.7
@@ -9,3 +9,3 @@ "use strict"; | ||
name: 'environmentName', | ||
message: 'What is your environment name?', | ||
message: 'What is your application name?', | ||
default: 'Acme App.', | ||
@@ -12,0 +12,0 @@ }, |
@@ -153,9 +153,10 @@ "use strict"; | ||
const tmpPayload = [ | ||
{ key: 'embedPath', value: constants_1.EMBED_PATH }, | ||
{ key: 'url', value: constants_1.API_TRIGGER_URL }, | ||
{ key: 'apiKey', value: config.getValue('apiKey') }, | ||
{ key: 'name', value: createNotificationTemplatesResponse.triggers[0].identifier }, | ||
{ key: '$user_id', value: decodedToken._id }, | ||
{ key: '$first_name', value: decodedToken.firstName }, | ||
{ key: '$last_name', value: decodedToken.lastName }, | ||
{ key: '$email', value: decodedToken.email }, | ||
{ key: 'subscriberId', value: decodedToken._id }, | ||
{ key: 'firstName', value: decodedToken.firstName }, | ||
{ key: 'lastName', value: decodedToken.lastName }, | ||
{ key: 'email', value: decodedToken.email }, | ||
{ key: 'environmentId', value: applicationIdentifier }, | ||
@@ -162,0 +163,0 @@ { key: 'token', value: config.getToken() }, |
@@ -5,2 +5,3 @@ export declare const SERVER_HOST = "localhost"; | ||
export declare const TRIGGER_ROUTE = "/trigger"; | ||
export declare const EMBED_PATH: string; | ||
export declare const API_OAUTH_URL: string; | ||
@@ -7,0 +8,0 @@ export declare const API_CREATE_ORGANIZATION_URL: string; |
"use strict"; | ||
var _a; | ||
var _a, _b; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getServerPort = exports.setAvailablePort = exports.GITHUB_DOCKER_URL = exports.CLIENT_LOGIN_URL = exports.API_TRIGGER_URL = exports.API_NOTIFICATION_TEMPLATES_URL = exports.API_NOTIFICATION_GROUP_URL = exports.API_SWITCH_ENVIRONMENT_FORMAT_URL = exports.API_ENVIRONMENT_KEYS = exports.API_ENVIRONMENT_ME_URL = exports.API_CREATE_ENVIRONMENT_URL = exports.API_SWITCH_ORGANIZATION_FORMAT_URL = exports.API_CREATE_ORGANIZATION_URL = exports.API_OAUTH_URL = exports.TRIGGER_ROUTE = exports.WIDGET_DEMO_ROUTH = exports.REDIRECT_ROUTE = exports.SERVER_HOST = void 0; | ||
exports.getServerPort = exports.setAvailablePort = exports.GITHUB_DOCKER_URL = exports.CLIENT_LOGIN_URL = exports.API_TRIGGER_URL = exports.API_NOTIFICATION_TEMPLATES_URL = exports.API_NOTIFICATION_GROUP_URL = exports.API_SWITCH_ENVIRONMENT_FORMAT_URL = exports.API_ENVIRONMENT_KEYS = exports.API_ENVIRONMENT_ME_URL = exports.API_CREATE_ENVIRONMENT_URL = exports.API_SWITCH_ORGANIZATION_FORMAT_URL = exports.API_CREATE_ORGANIZATION_URL = exports.API_OAUTH_URL = exports.EMBED_PATH = exports.TRIGGER_ROUTE = exports.WIDGET_DEMO_ROUTH = exports.REDIRECT_ROUTE = exports.SERVER_HOST = void 0; | ||
const getPort = require("get-port"); | ||
@@ -10,3 +10,4 @@ exports.SERVER_HOST = 'localhost'; | ||
exports.TRIGGER_ROUTE = '/trigger'; | ||
const apiAddress = (_a = process.env.NOVU_API_ADDRESS) !== null && _a !== void 0 ? _a : 'https://api.novu.co'; | ||
exports.EMBED_PATH = (_a = process.env.NOVU_EMBED_PATH) !== null && _a !== void 0 ? _a : 'https://embed.novu.co/embed.umd.min.js'; | ||
const apiAddress = (_b = process.env.NOVU_API_ADDRESS) !== null && _b !== void 0 ? _b : 'https://api.novu.co'; | ||
exports.API_OAUTH_URL = `${apiAddress}/v1/auth/github`; | ||
@@ -13,0 +14,0 @@ exports.API_CREATE_ORGANIZATION_URL = `${apiAddress}/v1/organizations`; |
@@ -73,6 +73,8 @@ "use strict"; | ||
name: this.getPayloadValue('name'), | ||
to: { | ||
subscriberId: this.getPayloadValue('subscriberId'), | ||
firstName: this.getPayloadValue('firstName'), | ||
lastName: this.getPayloadValue('lastName'), | ||
}, | ||
payload: { | ||
$user_id: this.getPayloadValue('$user_id'), | ||
$first_name: this.getPayloadValue('$first_name'), | ||
$last_name: this.getPayloadValue('$last_name'), | ||
token: this.getPayloadValue('token'), | ||
@@ -79,0 +81,0 @@ }, |
{ | ||
"name": "novu", | ||
"version": "0.4.0-alpha.6", | ||
"version": "0.4.0-alpha.7", | ||
"description": "On-Boarding Cli", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"start": "pnpm start:dev", | ||
"start:dev": "cross-env NOVU_API_ADDRESS=http://localhost:3000 NOVU_CLIENT_LOGIN=http://localhost:4200/auth/login TZ=UTC nodemon init", | ||
"start:dev": "cross-env NODE_ENV=dev NOVU_EMBED_PATH=http://localhost:4701/embed.umd.min.js NOVU_API_ADDRESS=http://localhost:3000 NOVU_CLIENT_LOGIN=http://localhost:4200/auth/login TZ=UTC nodemon init", | ||
"start:test": "cross-env NODE_ENV=test PORT=1336 TZ=UTC nodemon init", | ||
@@ -26,3 +26,3 @@ "start:debug": "TZ=UTC nodemon --config nodemon-debug.json", | ||
"devDependencies": { | ||
"@novu/shared": "^0.4.0-alpha.6", | ||
"@novu/shared": "^0.4.0-alpha.7", | ||
"@types/configstore": "^5.0.1", | ||
@@ -46,3 +46,3 @@ "@types/inquirer": "^8.2.0", | ||
}, | ||
"gitHead": "9f053dc2d7d90553f9946c59ba6b7ee6ebcd271b" | ||
"gitHead": "cbb3c77b9a6c1a194eea8befd4cafdfdc9c200c1" | ||
} |
@@ -8,3 +8,3 @@ import { ListQuestionOptions } from 'inquirer'; | ||
name: 'environmentName', | ||
message: 'What is your environment name?', | ||
message: 'What is your application name?', | ||
default: 'Acme App.', | ||
@@ -11,0 +11,0 @@ }, |
@@ -23,2 +23,3 @@ import * as open from 'open'; | ||
GITHUB_DOCKER_URL, | ||
EMBED_PATH, | ||
} from '../constants'; | ||
@@ -224,9 +225,10 @@ import { | ||
const tmpPayload: { key: string; value: string }[] = [ | ||
{ key: 'embedPath', value: EMBED_PATH }, | ||
{ key: 'url', value: API_TRIGGER_URL }, | ||
{ key: 'apiKey', value: config.getValue('apiKey') }, | ||
{ key: 'name', value: createNotificationTemplatesResponse.triggers[0].identifier }, | ||
{ key: '$user_id', value: decodedToken._id }, | ||
{ key: '$first_name', value: decodedToken.firstName }, | ||
{ key: '$last_name', value: decodedToken.lastName }, | ||
{ key: '$email', value: decodedToken.email }, | ||
{ key: 'subscriberId', value: decodedToken._id }, | ||
{ key: 'firstName', value: decodedToken.firstName }, | ||
{ key: 'lastName', value: decodedToken.lastName }, | ||
{ key: 'email', value: decodedToken.email }, | ||
{ key: 'environmentId', value: applicationIdentifier }, | ||
@@ -233,0 +235,0 @@ { key: 'token', value: config.getToken() }, |
@@ -10,2 +10,4 @@ import * as getPort from 'get-port'; | ||
export const EMBED_PATH = process.env.NOVU_EMBED_PATH ?? 'https://embed.novu.co/embed.umd.min.js'; | ||
// API | ||
@@ -12,0 +14,0 @@ const apiAddress = process.env.NOVU_API_ADDRESS ?? 'https://api.novu.co'; |
@@ -93,6 +93,8 @@ import * as http from 'http'; | ||
name: this.getPayloadValue('name'), | ||
to: { | ||
subscriberId: this.getPayloadValue('subscriberId'), | ||
firstName: this.getPayloadValue('firstName'), | ||
lastName: this.getPayloadValue('lastName'), | ||
}, | ||
payload: { | ||
$user_id: this.getPayloadValue('$user_id'), | ||
$first_name: this.getPayloadValue('$first_name'), | ||
$last_name: this.getPayloadValue('$last_name'), | ||
token: this.getPayloadValue('token'), | ||
@@ -99,0 +101,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
131417
1448
7