supabee 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.
- package/LICENSE +21 -0
- package/README.md +239 -0
- package/dist/commands/data.d.ts +1 -0
- package/dist/commands/data.js +372 -0
- package/dist/commands/data.js.map +1 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +322 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/schema.d.ts +1 -0
- package/dist/commands/schema.js +301 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/command-contract.d.ts +28 -0
- package/dist/lib/command-contract.js +87 -0
- package/dist/lib/command-contract.js.map +1 -0
- package/dist/lib/command-mode.d.ts +7 -0
- package/dist/lib/command-mode.js +27 -0
- package/dist/lib/command-mode.js.map +1 -0
- package/dist/lib/config.d.ts +32 -0
- package/dist/lib/config.js +86 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +49 -0
- package/dist/lib/constants.js +22 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/output.d.ts +9 -0
- package/dist/lib/output.js +84 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/step-command.d.ts +27 -0
- package/dist/lib/step-command.js +52 -0
- package/dist/lib/step-command.js.map +1 -0
- package/dist/lib/ui.d.ts +13 -0
- package/dist/lib/ui.js +76 -0
- package/dist/lib/ui.js.map +1 -0
- package/package.json +53 -0
- package/supabase-splitter.config.example.json +29 -0
- package/supabee.config.example.json +29 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { runSubcommandMode } from './command-mode.js';
|
|
2
|
+
import { parseStepCommandArgs, printStepCommandHelp, resolveStepPaths, } from './command-contract.js';
|
|
3
|
+
import { sectionWithNote, title } from './ui.js';
|
|
4
|
+
function printStepDetails(commandDisplayName, step, note, detailLines) {
|
|
5
|
+
console.log(sectionWithNote(title(`${commandDisplayName} ${step}`), note));
|
|
6
|
+
for (const line of detailLines) {
|
|
7
|
+
console.log(line);
|
|
8
|
+
}
|
|
9
|
+
console.log('');
|
|
10
|
+
}
|
|
11
|
+
export async function runStepCommand(args, definition) {
|
|
12
|
+
const { commandName, commandDisplayName, detailNote, buildDefaults, buildStepConfig, getDetailLines, actions } = definition;
|
|
13
|
+
const { subcommand, options, isUnknownSubcommand } = parseStepCommandArgs(args);
|
|
14
|
+
if (options.help) {
|
|
15
|
+
printStepCommandHelp(commandName);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (isUnknownSubcommand) {
|
|
19
|
+
console.error(`Unsupported ${commandName} command: ${subcommand}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
const defaults = buildDefaults(options);
|
|
23
|
+
const resolveDetailNote = (step) => (typeof detailNote === 'function' ? detailNote(step) : detailNote);
|
|
24
|
+
const resolveDetailLines = (step, config) => (typeof getDetailLines === 'function' ? getDetailLines(step, config) : getDetailLines) ?? [];
|
|
25
|
+
const resolveStepConfig = (step) => {
|
|
26
|
+
if (buildStepConfig)
|
|
27
|
+
return buildStepConfig({ step, defaults, options, subcommand });
|
|
28
|
+
const stepPaths = resolveStepPaths({ defaults, options, subcommand, step });
|
|
29
|
+
return {
|
|
30
|
+
...defaults,
|
|
31
|
+
...stepPaths,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
await runSubcommandMode(commandName, subcommand, {
|
|
35
|
+
split: async () => {
|
|
36
|
+
const config = resolveStepConfig('split');
|
|
37
|
+
printStepDetails(commandDisplayName, 'split', resolveDetailNote('split'), resolveDetailLines('split', config));
|
|
38
|
+
return actions.split({ config, options, defaults, subcommand });
|
|
39
|
+
},
|
|
40
|
+
reconstruct: async () => {
|
|
41
|
+
const config = resolveStepConfig('reconstruct');
|
|
42
|
+
printStepDetails(commandDisplayName, 'reconstruct', resolveDetailNote('reconstruct'), resolveDetailLines('reconstruct', config));
|
|
43
|
+
return actions.reconstruct({ config, options, defaults, subcommand });
|
|
44
|
+
},
|
|
45
|
+
validate: async () => {
|
|
46
|
+
const config = resolveStepConfig('validate');
|
|
47
|
+
printStepDetails(commandDisplayName, 'validate', resolveDetailNote('validate'), resolveDetailLines('validate', config));
|
|
48
|
+
return actions.validate({ config, options, defaults, subcommand });
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=step-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-command.js","sourceRoot":"","sources":["../../src/lib/step-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAIjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA4BjD,SAAS,gBAAgB,CAAC,kBAA0B,EAAE,IAAc,EAAE,IAAY,EAAE,WAAqB;IACvG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,kBAAkB,IAAI,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAC3E,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAc,EACd,UAA0C;IAE1C,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAC5H,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC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iB,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YAC/G,OAAO,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,MAAM,MAAM,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;YAChD,gBAAgB,CACd,kBAAkB,EAClB,aAAa,EACb,iBAAiB,CAAC,aAAa,CAAC,EAChC,kBAAkB,CAAC,aAAa,EAAE,MAAM,CAAC,CAC1C,CAAC;YACF,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QACxE,CAAC;QACD,QAAQ,EAAE,KAAK,IAAI,EAAE;YACnB,MAAM,MAAM,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;YAC7C,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;YACxH,OAAO,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QACrE,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/lib/ui.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function section(title: string): string;
|
|
2
|
+
export declare function sectionWithNote(title: string, note: string): string;
|
|
3
|
+
export declare function info(message: string): string;
|
|
4
|
+
export declare function ok(message: string): string;
|
|
5
|
+
export declare function warn(message: string): string;
|
|
6
|
+
export declare function error(message: string): string;
|
|
7
|
+
export declare function title(message: string): string;
|
|
8
|
+
export declare function pass(message: string): string;
|
|
9
|
+
export declare function fail(message: string): string;
|
|
10
|
+
export declare function note(message: string): string;
|
|
11
|
+
export declare function recommended(message: string): string;
|
|
12
|
+
export declare function diffRemove(message: string): string;
|
|
13
|
+
export declare function diffAdd(message: string): string;
|
package/dist/lib/ui.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
3
|
+
const COLORS = {
|
|
4
|
+
reset: '\x1b[0m',
|
|
5
|
+
bold: '\x1b[1m',
|
|
6
|
+
dim: '\x1b[2m',
|
|
7
|
+
cyan: '\x1b[36m',
|
|
8
|
+
green: '\x1b[32m',
|
|
9
|
+
yellow: '\x1b[33m',
|
|
10
|
+
red: '\x1b[31m',
|
|
11
|
+
white: '\x1b[37m',
|
|
12
|
+
};
|
|
13
|
+
function paint(text, color) {
|
|
14
|
+
if (!useColor)
|
|
15
|
+
return text;
|
|
16
|
+
return `${COLORS[color]}${text}${COLORS.reset}`;
|
|
17
|
+
}
|
|
18
|
+
function style(text, ...styles) {
|
|
19
|
+
if (!useColor)
|
|
20
|
+
return text;
|
|
21
|
+
return `${styles.map((name) => COLORS[name]).join('')}${text}${COLORS.reset}`;
|
|
22
|
+
}
|
|
23
|
+
function formatLabel(label, color) {
|
|
24
|
+
return style(`[${label}]`, 'bold', color);
|
|
25
|
+
}
|
|
26
|
+
function line(char = '-', width = 54) {
|
|
27
|
+
return char.repeat(width);
|
|
28
|
+
}
|
|
29
|
+
export function section(title) {
|
|
30
|
+
const header = style(` ${title} `, 'bold', 'white');
|
|
31
|
+
if (!useColor) {
|
|
32
|
+
return `\n${line('=')}\n${header}\n${line('=')}`;
|
|
33
|
+
}
|
|
34
|
+
return `\n${paint(line('-'), 'dim')}\n${header}\n${paint(line('-'), 'dim')}`;
|
|
35
|
+
}
|
|
36
|
+
export function sectionWithNote(title, note) {
|
|
37
|
+
const header = style(` ${title} `, 'bold', 'white');
|
|
38
|
+
if (!useColor) {
|
|
39
|
+
return `\n${line('=')}\n${header}\n${note}\n${line('=')}`;
|
|
40
|
+
}
|
|
41
|
+
return `\n${paint(line('-'), 'dim')}\n${header}\n${note}\n${paint(line('-'), 'dim')}`;
|
|
42
|
+
}
|
|
43
|
+
export function info(message) {
|
|
44
|
+
return useColor ? paint(message, 'dim') : message;
|
|
45
|
+
}
|
|
46
|
+
export function ok(message) {
|
|
47
|
+
return `${formatLabel('SUCCESS', 'green')} ${message}`;
|
|
48
|
+
}
|
|
49
|
+
export function warn(message) {
|
|
50
|
+
return `${formatLabel('WARN', 'yellow')} ${message}`;
|
|
51
|
+
}
|
|
52
|
+
export function error(message) {
|
|
53
|
+
return `${formatLabel('ERROR', 'red')} ${message}`;
|
|
54
|
+
}
|
|
55
|
+
export function title(message) {
|
|
56
|
+
return useColor ? style(`[${message}]`, 'bold', 'cyan') : `[${message}]`;
|
|
57
|
+
}
|
|
58
|
+
export function pass(message) {
|
|
59
|
+
return useColor ? `${paint('✓', 'green')} ${message}` : `✓ ${message}`;
|
|
60
|
+
}
|
|
61
|
+
export function fail(message) {
|
|
62
|
+
return useColor ? `${paint('x', 'red')} ${message}` : `x ${message}`;
|
|
63
|
+
}
|
|
64
|
+
export function note(message) {
|
|
65
|
+
return `${formatLabel('NOTE', 'yellow')} ${message}`;
|
|
66
|
+
}
|
|
67
|
+
export function recommended(message) {
|
|
68
|
+
return useColor ? paint(message, 'yellow') : message;
|
|
69
|
+
}
|
|
70
|
+
export function diffRemove(message) {
|
|
71
|
+
return useColor ? `${paint('-', 'red')} ${paint(message, 'red')}` : `- ${message}`;
|
|
72
|
+
}
|
|
73
|
+
export function diffAdd(message) {
|
|
74
|
+
return useColor ? `${paint('+', 'green')} ${paint(message, 'green')}` : `+ ${message}`;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/lib/ui.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cA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,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;AACzF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "supabee",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "CLI tools for local Supabase schema/data workflows",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Kai Ho Chak",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/kaihochak/supabee.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/kaihochak/supabee",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/kaihochak/supabee/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"supabase",
|
|
17
|
+
"database",
|
|
18
|
+
"schema",
|
|
19
|
+
"sql",
|
|
20
|
+
"cli",
|
|
21
|
+
"devtools",
|
|
22
|
+
"local"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"bin": {
|
|
26
|
+
"supabee": "dist/index.js",
|
|
27
|
+
"supabase-splitter": "dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"supabase-splitter.config.example.json",
|
|
32
|
+
"supabee.config.example.json",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc -p tsconfig.json",
|
|
41
|
+
"prepack": "npm run build",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
|
+
"test": "npm run build && node dist/index.js --help",
|
|
44
|
+
"pack:check": "npm run build && npm_config_cache=.npm-cache npm pack --dry-run"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"commander": "^12.1.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/node": "^22.19.15",
|
|
51
|
+
"typescript": "^5.9.3"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": {
|
|
3
|
+
"input": "supabase/schemas/prod-schemas.sql",
|
|
4
|
+
"output": "supabase/schemas/split",
|
|
5
|
+
"reconstructed": "supabase/schemas/reconstructed-schemas.sql",
|
|
6
|
+
"keepFiles": []
|
|
7
|
+
},
|
|
8
|
+
"data": {
|
|
9
|
+
"input": "supabase/seeds/prod-data.sql",
|
|
10
|
+
"output": "supabase/seeds/split",
|
|
11
|
+
"reconstructed": "supabase/seeds/reconstructed-data.sql",
|
|
12
|
+
"maxLinesPerFile": 2000,
|
|
13
|
+
"maxStatementsPerFile": 20,
|
|
14
|
+
"maxRowsPerInsert": 200,
|
|
15
|
+
"tableRules": {},
|
|
16
|
+
"keepFiles": [
|
|
17
|
+
"800_refresh_materialized_view.sql"
|
|
18
|
+
],
|
|
19
|
+
"ignoreInReconstruct": [
|
|
20
|
+
"800_refresh_materialized_view.sql"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"init": {
|
|
24
|
+
"seedSqlPaths": [
|
|
25
|
+
"./seeds/split/*.sql",
|
|
26
|
+
"./seeds/institutions/seeding_sql/*/*.seed.sql"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": {
|
|
3
|
+
"input": "supabase/schemas/prod-schemas.sql",
|
|
4
|
+
"output": "supabase/schemas/split",
|
|
5
|
+
"reconstructed": "supabase/schemas/reconstructed-schemas.sql",
|
|
6
|
+
"keepFiles": []
|
|
7
|
+
},
|
|
8
|
+
"data": {
|
|
9
|
+
"input": "supabase/seeds/prod-data.sql",
|
|
10
|
+
"output": "supabase/seeds/split",
|
|
11
|
+
"reconstructed": "supabase/seeds/reconstructed-data.sql",
|
|
12
|
+
"maxLinesPerFile": 2000,
|
|
13
|
+
"maxStatementsPerFile": 20,
|
|
14
|
+
"maxRowsPerInsert": 200,
|
|
15
|
+
"tableRules": {},
|
|
16
|
+
"keepFiles": [
|
|
17
|
+
"800_refresh_materialized_view.sql"
|
|
18
|
+
],
|
|
19
|
+
"ignoreInReconstruct": [
|
|
20
|
+
"800_refresh_materialized_view.sql"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"init": {
|
|
24
|
+
"seedSqlPaths": [
|
|
25
|
+
"./seeds/split/*.sql",
|
|
26
|
+
"./seeds/institutions/seeding_sql/*/*.seed.sql"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|