pgflow 0.0.1-prealpha.0 → 0.0.12

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE.md +660 -0
  3. package/eslint.config.cjs +3 -0
  4. package/package.json +13 -6
  5. package/project.json +40 -0
  6. package/src/commands/install/copy-migrations.ts +101 -0
  7. package/src/commands/install/index.ts +45 -0
  8. package/src/commands/install/supabase-path-prompt.ts +28 -0
  9. package/src/commands/install/update-config-toml.ts +130 -0
  10. package/src/index.ts +76 -0
  11. package/src/types.d.ts +1 -0
  12. package/tsconfig.json +20 -0
  13. package/tsconfig.lib.json +19 -0
  14. package/tsconfig.spec.json +33 -0
  15. package/vite.config.ts +25 -0
  16. package/dist/node_modules/.package-lock.json +0 -129
  17. package/dist/node_modules/@commander-js/extra-typings/LICENSE +0 -21
  18. package/dist/node_modules/@commander-js/extra-typings/README.md +0 -66
  19. package/dist/node_modules/@commander-js/extra-typings/esm.d.mts +0 -2
  20. package/dist/node_modules/@commander-js/extra-typings/esm.mjs +0 -16
  21. package/dist/node_modules/@commander-js/extra-typings/index.d.ts +0 -1467
  22. package/dist/node_modules/@commander-js/extra-typings/index.js +0 -25
  23. package/dist/node_modules/@commander-js/extra-typings/package.json +0 -63
  24. package/dist/node_modules/@esbuild/linux-x64/README.md +0 -3
  25. package/dist/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  26. package/dist/node_modules/@esbuild/linux-x64/package.json +0 -20
  27. package/dist/node_modules/commander/LICENSE +0 -22
  28. package/dist/node_modules/commander/Readme.md +0 -1149
  29. package/dist/node_modules/commander/esm.mjs +0 -16
  30. package/dist/node_modules/commander/index.js +0 -24
  31. package/dist/node_modules/commander/lib/argument.js +0 -149
  32. package/dist/node_modules/commander/lib/command.js +0 -2662
  33. package/dist/node_modules/commander/lib/error.js +0 -39
  34. package/dist/node_modules/commander/lib/help.js +0 -709
  35. package/dist/node_modules/commander/lib/option.js +0 -367
  36. package/dist/node_modules/commander/lib/suggestSimilar.js +0 -101
  37. package/dist/node_modules/commander/package-support.json +0 -16
  38. package/dist/node_modules/commander/package.json +0 -82
  39. package/dist/node_modules/commander/typings/esm.d.mts +0 -3
  40. package/dist/node_modules/commander/typings/index.d.ts +0 -1045
  41. package/dist/node_modules/esbuild/LICENSE.md +0 -21
  42. package/dist/node_modules/esbuild/README.md +0 -3
  43. package/dist/node_modules/esbuild/bin/esbuild +0 -0
  44. package/dist/node_modules/esbuild/install.js +0 -287
  45. package/dist/node_modules/esbuild/lib/main.d.ts +0 -705
  46. package/dist/node_modules/esbuild/lib/main.js +0 -2251
  47. package/dist/node_modules/esbuild/package.json +0 -48
  48. package/dist/node_modules/get-tsconfig/LICENSE +0 -21
  49. package/dist/node_modules/get-tsconfig/README.md +0 -235
  50. package/dist/node_modules/get-tsconfig/dist/index.cjs +0 -7
  51. package/dist/node_modules/get-tsconfig/dist/index.d.cts +0 -1439
  52. package/dist/node_modules/get-tsconfig/dist/index.d.mts +0 -1439
  53. package/dist/node_modules/get-tsconfig/dist/index.mjs +0 -7
  54. package/dist/node_modules/get-tsconfig/package.json +0 -46
  55. package/dist/node_modules/resolve-pkg-maps/LICENSE +0 -21
  56. package/dist/node_modules/resolve-pkg-maps/README.md +0 -216
  57. package/dist/node_modules/resolve-pkg-maps/dist/index.cjs +0 -1
  58. package/dist/node_modules/resolve-pkg-maps/dist/index.d.cts +0 -11
  59. package/dist/node_modules/resolve-pkg-maps/dist/index.d.mts +0 -11
  60. package/dist/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
  61. package/dist/node_modules/resolve-pkg-maps/package.json +0 -42
  62. package/dist/node_modules/tsx/LICENSE +0 -21
  63. package/dist/node_modules/tsx/README.md +0 -32
  64. package/dist/node_modules/tsx/dist/cjs/api/index.cjs +0 -1
  65. package/dist/node_modules/tsx/dist/cjs/api/index.d.cts +0 -35
  66. package/dist/node_modules/tsx/dist/cjs/api/index.d.mts +0 -35
  67. package/dist/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
  68. package/dist/node_modules/tsx/dist/cjs/index.cjs +0 -1
  69. package/dist/node_modules/tsx/dist/cjs/index.mjs +0 -1
  70. package/dist/node_modules/tsx/dist/cli.cjs +0 -54
  71. package/dist/node_modules/tsx/dist/cli.mjs +0 -55
  72. package/dist/node_modules/tsx/dist/client-BQVF1NaW.mjs +0 -1
  73. package/dist/node_modules/tsx/dist/client-D6NvIMSC.cjs +0 -1
  74. package/dist/node_modules/tsx/dist/esm/api/index.cjs +0 -1
  75. package/dist/node_modules/tsx/dist/esm/api/index.d.cts +0 -35
  76. package/dist/node_modules/tsx/dist/esm/api/index.d.mts +0 -35
  77. package/dist/node_modules/tsx/dist/esm/api/index.mjs +0 -1
  78. package/dist/node_modules/tsx/dist/esm/index.cjs +0 -2
  79. package/dist/node_modules/tsx/dist/esm/index.mjs +0 -2
  80. package/dist/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +0 -1
  81. package/dist/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +0 -1
  82. package/dist/node_modules/tsx/dist/index-B4SIRlEU.cjs +0 -16
  83. package/dist/node_modules/tsx/dist/index-DlKgSVBb.mjs +0 -16
  84. package/dist/node_modules/tsx/dist/loader.cjs +0 -1
  85. package/dist/node_modules/tsx/dist/loader.mjs +0 -1
  86. package/dist/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +0 -1
  87. package/dist/node_modules/tsx/dist/node-features-roYmp9jK.cjs +0 -1
  88. package/dist/node_modules/tsx/dist/package--YiorJOq.mjs +0 -1
  89. package/dist/node_modules/tsx/dist/package-BUuKnQXZ.cjs +0 -1
  90. package/dist/node_modules/tsx/dist/patch-repl.cjs +0 -1
  91. package/dist/node_modules/tsx/dist/patch-repl.mjs +0 -1
  92. package/dist/node_modules/tsx/dist/preflight.cjs +0 -1
  93. package/dist/node_modules/tsx/dist/preflight.mjs +0 -1
  94. package/dist/node_modules/tsx/dist/register-C3TE0KFF.mjs +0 -3
  95. package/dist/node_modules/tsx/dist/register-CVZT-Tul.cjs +0 -1
  96. package/dist/node_modules/tsx/dist/register-DCnOAxY2.cjs +0 -3
  97. package/dist/node_modules/tsx/dist/register-RyGUjI6j.mjs +0 -1
  98. package/dist/node_modules/tsx/dist/repl.cjs +0 -3
  99. package/dist/node_modules/tsx/dist/repl.mjs +0 -3
  100. package/dist/node_modules/tsx/dist/require-BnyFnlmk.mjs +0 -1
  101. package/dist/node_modules/tsx/dist/require-DBpSESet.cjs +0 -1
  102. package/dist/node_modules/tsx/dist/suppress-warnings.cjs +0 -1
  103. package/dist/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  104. package/dist/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  105. package/dist/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +0 -1
  106. package/dist/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
  107. package/dist/node_modules/tsx/package.json +0 -68
  108. package/dist/package.json +0 -27
  109. package/dist/sql/000000_schema.sql +0 -150
  110. package/dist/sql/000005_create_flow.sql +0 -29
  111. package/dist/sql/000010_add_step.sql +0 -48
  112. package/dist/sql/000015_start_ready_steps.sql +0 -45
  113. package/dist/sql/000020_start_flow.sql +0 -46
  114. package/dist/sql/000030_read_with_poll_backport.sql +0 -70
  115. package/dist/sql/000040_poll_for_tasks.sql +0 -100
  116. package/dist/sql/000045_maybe_complete_run.sql +0 -30
  117. package/dist/sql/000050_complete_task.sql +0 -98
  118. package/dist/sql/000055_calculate_retry_delay.sql +0 -11
  119. package/dist/sql/000060_fail_task.sql +0 -124
  120. package/dist/sql/000_edge_worker_initial.sql +0 -86
  121. package/dist/src/commands/install.d.ts +0 -4
  122. package/dist/src/commands/install.d.ts.map +0 -1
  123. package/dist/src/index.d.ts +0 -2
  124. package/dist/src/index.d.ts.map +0 -1
  125. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -1,16 +0,0 @@
1
- import commander from './index.js';
2
-
3
- // wrapper to provide named exports for ESM.
4
- export const {
5
- program,
6
- createCommand,
7
- createArgument,
8
- createOption,
9
- CommanderError,
10
- InvalidArgumentError,
11
- InvalidOptionArgumentError, // deprecated old name
12
- Command,
13
- Argument,
14
- Option,
15
- Help,
16
- } = commander;
@@ -1,24 +0,0 @@
1
- const { Argument } = require('./lib/argument.js');
2
- const { Command } = require('./lib/command.js');
3
- const { CommanderError, InvalidArgumentError } = require('./lib/error.js');
4
- const { Help } = require('./lib/help.js');
5
- const { Option } = require('./lib/option.js');
6
-
7
- exports.program = new Command();
8
-
9
- exports.createCommand = (name) => new Command(name);
10
- exports.createOption = (flags, description) => new Option(flags, description);
11
- exports.createArgument = (name, description) => new Argument(name, description);
12
-
13
- /**
14
- * Expose classes
15
- */
16
-
17
- exports.Command = Command;
18
- exports.Option = Option;
19
- exports.Argument = Argument;
20
- exports.Help = Help;
21
-
22
- exports.CommanderError = CommanderError;
23
- exports.InvalidArgumentError = InvalidArgumentError;
24
- exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated
@@ -1,149 +0,0 @@
1
- const { InvalidArgumentError } = require('./error.js');
2
-
3
- class Argument {
4
- /**
5
- * Initialize a new command argument with the given name and description.
6
- * The default is that the argument is required, and you can explicitly
7
- * indicate this with <> around the name. Put [] around the name for an optional argument.
8
- *
9
- * @param {string} name
10
- * @param {string} [description]
11
- */
12
-
13
- constructor(name, description) {
14
- this.description = description || '';
15
- this.variadic = false;
16
- this.parseArg = undefined;
17
- this.defaultValue = undefined;
18
- this.defaultValueDescription = undefined;
19
- this.argChoices = undefined;
20
-
21
- switch (name[0]) {
22
- case '<': // e.g. <required>
23
- this.required = true;
24
- this._name = name.slice(1, -1);
25
- break;
26
- case '[': // e.g. [optional]
27
- this.required = false;
28
- this._name = name.slice(1, -1);
29
- break;
30
- default:
31
- this.required = true;
32
- this._name = name;
33
- break;
34
- }
35
-
36
- if (this._name.length > 3 && this._name.slice(-3) === '...') {
37
- this.variadic = true;
38
- this._name = this._name.slice(0, -3);
39
- }
40
- }
41
-
42
- /**
43
- * Return argument name.
44
- *
45
- * @return {string}
46
- */
47
-
48
- name() {
49
- return this._name;
50
- }
51
-
52
- /**
53
- * @package
54
- */
55
-
56
- _concatValue(value, previous) {
57
- if (previous === this.defaultValue || !Array.isArray(previous)) {
58
- return [value];
59
- }
60
-
61
- return previous.concat(value);
62
- }
63
-
64
- /**
65
- * Set the default value, and optionally supply the description to be displayed in the help.
66
- *
67
- * @param {*} value
68
- * @param {string} [description]
69
- * @return {Argument}
70
- */
71
-
72
- default(value, description) {
73
- this.defaultValue = value;
74
- this.defaultValueDescription = description;
75
- return this;
76
- }
77
-
78
- /**
79
- * Set the custom handler for processing CLI command arguments into argument values.
80
- *
81
- * @param {Function} [fn]
82
- * @return {Argument}
83
- */
84
-
85
- argParser(fn) {
86
- this.parseArg = fn;
87
- return this;
88
- }
89
-
90
- /**
91
- * Only allow argument value to be one of choices.
92
- *
93
- * @param {string[]} values
94
- * @return {Argument}
95
- */
96
-
97
- choices(values) {
98
- this.argChoices = values.slice();
99
- this.parseArg = (arg, previous) => {
100
- if (!this.argChoices.includes(arg)) {
101
- throw new InvalidArgumentError(
102
- `Allowed choices are ${this.argChoices.join(', ')}.`,
103
- );
104
- }
105
- if (this.variadic) {
106
- return this._concatValue(arg, previous);
107
- }
108
- return arg;
109
- };
110
- return this;
111
- }
112
-
113
- /**
114
- * Make argument required.
115
- *
116
- * @returns {Argument}
117
- */
118
- argRequired() {
119
- this.required = true;
120
- return this;
121
- }
122
-
123
- /**
124
- * Make argument optional.
125
- *
126
- * @returns {Argument}
127
- */
128
- argOptional() {
129
- this.required = false;
130
- return this;
131
- }
132
- }
133
-
134
- /**
135
- * Takes an argument and returns its human readable equivalent for help usage.
136
- *
137
- * @param {Argument} arg
138
- * @return {string}
139
- * @private
140
- */
141
-
142
- function humanReadableArgName(arg) {
143
- const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');
144
-
145
- return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';
146
- }
147
-
148
- exports.Argument = Argument;
149
- exports.humanReadableArgName = humanReadableArgName;