@trycourier/cli
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -104,5 +104,3 @@ import React, { useEffect, useState } from 'react'; | ||
React.createElement(Box, { borderStyle: "bold", borderColor: "white" }, | ||
React.createElement(Text, null, | ||
' ', | ||
"Elemental")), | ||
React.createElement(Text, null, " Elemental")), | ||
React.createElement(Box, null, | ||
@@ -109,0 +107,0 @@ React.createElement(Elemental, { elemental: payload.message.content })))) : null, |
import React from 'react'; | ||
import { Box, Text, Spacer } from 'ink'; | ||
import { Box, Text } from 'ink'; | ||
export default ({ elemental }) => { | ||
const buckets = []; | ||
elemental.elements.map((element) => { | ||
elemental.elements.map(element => { | ||
const { type, ...rest } = element; | ||
buckets.push({ | ||
type: element.type, | ||
properties: Object.keys(rest).map((key) => ({ | ||
properties: Object.keys(rest).map(key => ({ | ||
name: key, | ||
value: rest[key] | ||
})) | ||
value: rest[key], | ||
})), | ||
}); | ||
}); | ||
return React.createElement(Box, { flexDirection: 'column' }, buckets.map((bucket) => (bucket.properties.map((property) => (React.createElement(Box, null, | ||
return (React.createElement(Box, { flexDirection: "column" }, buckets.map(bucket => bucket.properties.map(property => (React.createElement(Box, null, | ||
React.createElement(Box, { width: 16, paddingTop: 1 }, | ||
@@ -20,6 +20,5 @@ React.createElement(Text, null, | ||
".", | ||
property.name), | ||
React.createElement(Spacer, null)), | ||
React.createElement(Box, { borderStyle: 'round', flexDirection: 'column', paddingX: 1 }, | ||
property.name)), | ||
React.createElement(Box, { borderStyle: "round", flexDirection: "column", paddingX: 1 }, | ||
React.createElement(Text, null, property.value)))))))); | ||
}; |
@@ -14,3 +14,3 @@ import React from 'react'; | ||
props.request.url)), | ||
props.request.body && (React.createElement(Text, null, JSON.stringify(props.request.body, undefined, ' '))), | ||
props.request.body ? (typeof props.request.body === 'string' ? (React.createElement(Text, null, props.request.body)) : (React.createElement(Text, null, JSON.stringify(props.request.body, undefined, ' ')))) : null, | ||
!props.request.body ? React.createElement(Text, { color: "gray" }, "No request body") : null, | ||
@@ -17,0 +17,0 @@ !props.response ? (React.createElement(Spinner, { text: props.spinnerText || defaultSpinnerText })) : null, |
@@ -7,2 +7,3 @@ import React from 'react'; | ||
import DigestFlush from './commands/DigestFlush.js'; | ||
import TranslationsUpload from './commands/TranslationsUpload.js'; | ||
const mappings = new Map(); | ||
@@ -99,2 +100,9 @@ mappings.set('help', { | ||
}); | ||
mappings.set('translations:upload', { | ||
params: '<locale> <filepath>', | ||
instructions: 'Upload a .PO file to Courier for a given locale', | ||
component: params => { | ||
return React.createElement(TranslationsUpload, { params: params }); | ||
}, | ||
}); | ||
export default mappings; |
{ | ||
"name": "@trycourier/cli", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -38,2 +38,4 @@ # Courier CLI | ||
- `courier track` - Send an event to test your Courier Automations | ||
- `courier digests:flush` - Send an event to test your Courier Automations | ||
- `courier translations:upload` - Upload .PO files to your Courier workspace | ||
@@ -40,0 +42,0 @@ For more details, run `courier` to see a list of commands and their arguments & options. |
39258
69
1029
50
6