@embeddables/cli 0.7.10 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +10 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -40,10 +40,10 @@ async function requireLogin(commandName) {
|
|
|
40
40
|
stdout.print(pc.gray('Run "embeddables login" first.'));
|
|
41
41
|
await exit(1);
|
|
42
42
|
}
|
|
43
|
-
/** Set Sentry context from config and auth for the current command. */
|
|
44
|
-
|
|
43
|
+
/** Set Sentry context from config and auth for the current command. Config is set immediately; user is set in background so we don't block on auth. */
|
|
44
|
+
function setSentryContextForCommand() {
|
|
45
45
|
setSentryContext(getSentryContextFromProjectConfig());
|
|
46
|
-
|
|
46
|
+
void setSentryUserFromAuth();
|
|
47
47
|
}
|
|
48
48
|
const program = new Command();
|
|
49
49
|
program
|
|
@@ -57,7 +57,7 @@ program
|
|
|
57
57
|
.option('-y, --yes', 'Skip prompts and use defaults')
|
|
58
58
|
.action(async (opts) => {
|
|
59
59
|
await requireLogin('init');
|
|
60
|
-
|
|
60
|
+
setSentryContextForCommand();
|
|
61
61
|
await runInit({ projectId: opts.projectId, yes: opts.yes });
|
|
62
62
|
});
|
|
63
63
|
program
|
|
@@ -69,7 +69,7 @@ program
|
|
|
69
69
|
.option('--pageKeyFrom <mode>', 'filename|export', 'filename')
|
|
70
70
|
.action(async (opts) => {
|
|
71
71
|
await requireLogin('build');
|
|
72
|
-
|
|
72
|
+
setSentryContextForCommand();
|
|
73
73
|
await runBuild(opts);
|
|
74
74
|
});
|
|
75
75
|
program
|
|
@@ -85,7 +85,7 @@ program
|
|
|
85
85
|
.option('--pageKeyFrom <mode>', 'filename|export', 'filename')
|
|
86
86
|
.action(async (opts) => {
|
|
87
87
|
await requireLogin('dev');
|
|
88
|
-
|
|
88
|
+
setSentryContextForCommand();
|
|
89
89
|
// --local flag overrides --engine to use local engine
|
|
90
90
|
if (opts.local) {
|
|
91
91
|
opts.engine = 'http://localhost:8787';
|
|
@@ -115,7 +115,7 @@ program
|
|
|
115
115
|
.option('-p, --preserve', 'Preserve component order in config for forward compile')
|
|
116
116
|
.action(async (opts) => {
|
|
117
117
|
await requireLogin('pull');
|
|
118
|
-
|
|
118
|
+
setSentryContextForCommand();
|
|
119
119
|
await runPull({
|
|
120
120
|
...opts,
|
|
121
121
|
version: opts.version,
|
|
@@ -131,7 +131,7 @@ program
|
|
|
131
131
|
.option('--from-version <number>', 'Base version number (auto-detected from local files if not provided)')
|
|
132
132
|
.action(async (opts) => {
|
|
133
133
|
await requireLogin('save');
|
|
134
|
-
|
|
134
|
+
setSentryContextForCommand();
|
|
135
135
|
await runSave({
|
|
136
136
|
id: opts.id,
|
|
137
137
|
label: opts.label,
|
|
@@ -152,7 +152,7 @@ program
|
|
|
152
152
|
.option('-i, --id <id>', 'Embeddable ID (will prompt if not provided)')
|
|
153
153
|
.action(async (opts) => {
|
|
154
154
|
await requireLogin('branch');
|
|
155
|
-
|
|
155
|
+
setSentryContextForCommand();
|
|
156
156
|
await runBranch(opts);
|
|
157
157
|
});
|
|
158
158
|
const experiments = program.command('experiments').description('Manage embeddable experiments');
|
|
@@ -164,7 +164,7 @@ experiments
|
|
|
164
164
|
.option('--experiment-key <key>', 'Experiment key (required if --experiment-id is set)')
|
|
165
165
|
.action(async (opts) => {
|
|
166
166
|
await requireLogin('experiments connect');
|
|
167
|
-
|
|
167
|
+
setSentryContextForCommand();
|
|
168
168
|
await runExperimentsConnect({
|
|
169
169
|
id: opts.id,
|
|
170
170
|
experimentId: opts.experimentId,
|