pgflow 0.1.23 → 0.2.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/compile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;kCA+ChB,OAAO;AAAhC,wBA6HE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/compile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;kCAmDhB,OAAO;AAAhC,wBAsJE"}
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- import { intro, log, note } from '@clack/prompts';
2
+ import { intro, log, note, outro } from '@clack/prompts';
3
3
  import path from 'path';
4
4
  import fs from 'fs';
5
5
  import { spawn } from 'child_process';
@@ -34,12 +34,12 @@ function formatCommand(command, args) {
34
34
  */
35
35
  function createTaskLog(command, args, output) {
36
36
  return [
37
- chalk.bold("Command:"),
37
+ chalk.bold('Command:'),
38
38
  formatCommand(command, args),
39
- "",
40
- chalk.bold("Output:"),
41
- output.trim() ? output.trim() : "(no output)",
42
- ].join("\n");
39
+ '',
40
+ chalk.bold('Output:'),
41
+ output.trim() ? output.trim() : '(no output)',
42
+ ].join('\n');
43
43
  }
44
44
  export default (program) => {
45
45
  program
@@ -126,10 +126,24 @@ export default (program) => {
126
126
  // Show the migration file path relative to the current directory
127
127
  const relativeFilePath = path.relative(process.cwd(), migrationFilePath);
128
128
  log.success(`Migration file created: ${relativeFilePath}`);
129
+ // Display next steps with outro
130
+ outro([
131
+ chalk.bold('Flow compilation completed successfully!'),
132
+ '',
133
+ `- Run ${chalk.cyan('supabase migration up')} to apply the migration`,
134
+ '',
135
+ chalk.bold('Continue the setup:'),
136
+ chalk.blue.underline('https://pgflow.dev/getting-started/run-flow/')
137
+ ].join('\n'));
129
138
  }
130
139
  catch (error) {
131
140
  log.error(`Compilation failed: ${error instanceof Error ? error.message : String(error)}`);
132
- note('For troubleshooting help, visit: https://pgflow.dev/getting-started/compile-to-sql/');
141
+ outro([
142
+ chalk.bold('Compilation failed!'),
143
+ '',
144
+ chalk.bold('For troubleshooting help:'),
145
+ chalk.blue.underline('https://pgflow.dev/getting-started/compile-to-sql/')
146
+ ].join('\n'));
133
147
  process.exit(1);
134
148
  }
135
149
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/install/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;kCAOhB,OAAO;AAAhC,wBAuGE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/install/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;kCAQhB,OAAO;AAAhC,wBAiHE"}
@@ -1,4 +1,5 @@
1
- import { intro, log, note, group, cancel } from '@clack/prompts';
1
+ import { intro, group, cancel, outro } from '@clack/prompts';
2
+ import chalk from 'chalk';
2
3
  import { copyMigrations } from './copy-migrations.js';
3
4
  import { updateConfigToml } from './update-config-toml.js';
4
5
  import { updateEnvFile } from './update-env-file.js';
@@ -60,26 +61,30 @@ export default (program) => {
60
61
  process.exit(1);
61
62
  }
62
63
  // Show completion message
64
+ const outroMessages = [];
65
+ // Always start with a bolded acknowledgement
63
66
  if (migrations || configUpdate || envFile) {
64
- log.success('pgflow setup completed successfully');
65
- // Show next steps if changes were made
66
- const nextSteps = [];
67
- if (configUpdate || envFile) {
68
- nextSteps.push('• Restart your Supabase instance for configuration changes to take effect');
69
- }
70
- if (migrations) {
71
- nextSteps.push('• Apply the migrations with: supabase migrations up');
72
- }
73
- // Add documentation link
74
- nextSteps.push('• For more information, visit: https://pgflow.dev/getting-started/install-pgflow/');
75
- if (nextSteps.length > 0) {
76
- note(nextSteps.join('\n'), 'Next steps');
77
- }
67
+ outroMessages.push(chalk.bold('pgflow setup completed successfully!'));
78
68
  }
79
69
  else {
80
- log.success('pgflow is already properly configured - no changes needed');
81
- // Still show documentation link even if no changes were made
82
- note('For more information about pgflow, visit: https://pgflow.dev/getting-started/install-pgflow/', 'Documentation');
70
+ outroMessages.push(chalk.bold('pgflow is already properly configured - no changes needed!'));
83
71
  }
72
+ // Add a newline after the acknowledgement
73
+ outroMessages.push('');
74
+ // Add specific next steps if changes were made
75
+ if (configUpdate || envFile) {
76
+ outroMessages.push(`- Restart your Supabase instance for configuration changes to take effect`);
77
+ }
78
+ if (migrations) {
79
+ outroMessages.push(`- Apply the migrations with: ${chalk.cyan('supabase migrations up')}`);
80
+ }
81
+ // Always add documentation link with consistent formatting
82
+ if (outroMessages.length > 2) {
83
+ // If we have specific steps, add another newline
84
+ outroMessages.push('');
85
+ }
86
+ outroMessages.push(chalk.bold('Continue the setup:'), chalk.blue.underline('https://pgflow.dev/getting-started/compile-to-sql/'));
87
+ // Single outro for all paths
88
+ outro(outroMessages.join('\n'));
84
89
  });
85
90
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgflow",
3
- "version": "0.1.23",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgflow",
3
- "version": "0.1.23",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "chalk": "^5.4.1",
25
25
  "commander": "^13.1.0",
26
26
  "toml-patch": "^0.2.3",
27
- "@pgflow/core": "0.1.23"
27
+ "@pgflow/core": "0.2.0"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"