spine-framework 0.1.21 → 0.1.22

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.
@@ -96,8 +96,6 @@ function writeEnvFile(dryRun: boolean): void {
96
96
  }
97
97
 
98
98
  function copyFrameworkFiles(dryRun: boolean): void {
99
- console.log(` package: ${PACKAGE_ROOT}`)
100
- console.log(` project: ${PROJECT_ROOT}`)
101
99
  // Directories and files to copy from the package root into the consumer project root
102
100
  const items = [
103
101
  { src: '.framework', dest: '.framework' },
@@ -39,7 +39,6 @@
39
39
  * @seeAlso functions/_shared/index.ts (core functions exposed to CLI)
40
40
  */
41
41
 
42
- import './env-loader.ts'
43
42
  import { Command } from 'commander'
44
43
 
45
44
  const program = new Command()
@@ -50,59 +49,67 @@ program
50
49
  .version('2.0.0')
51
50
  .option('--account <id>', 'Override the account ID for this command')
52
51
 
53
- const [
54
- { registerAuthCommands },
55
- { registerPipelineCommands },
56
- { registerItemCommands },
57
- { registerAgentCommands },
58
- { registerMigrationCommands },
59
- { registerDoctorCommands },
60
- { registerDevCommands },
61
- { registerTestCommands },
62
- { registerSystemCommands },
63
- { registerGenerateCommands },
64
- { registerCreateAppCommands },
65
- { registerInitCommands },
66
- { registerInstallAppCommands },
67
- { registerStatusCommands },
68
- { registerUninstallAppCommands },
69
- { registerMigrateCommands },
70
- ] = await Promise.all([
71
- import('./commands/auth.ts'),
72
- import('./commands/pipelines.ts'),
73
- import('./commands/items.ts'),
74
- import('./commands/agents.ts'),
75
- import('./commands/migrations.ts'),
76
- import('./commands/doctor.ts'),
77
- import('./commands/dev.ts'),
78
- import('./commands/test.ts'),
79
- import('./commands/system.ts'),
80
- import('./commands/generate.ts'),
81
- import('./commands/create-app.ts'),
82
- import('./commands/init.ts'),
83
- import('./commands/install-app.ts'),
84
- import('./commands/status.ts'),
85
- import('./commands/uninstall-app.ts'),
86
- import('./commands/migrate.ts'),
87
- ])
88
-
89
- registerAuthCommands(program)
90
- registerPipelineCommands(program)
91
- registerItemCommands(program)
92
- registerAgentCommands(program)
93
- registerMigrationCommands(program)
94
- registerDoctorCommands(program)
95
- registerDevCommands(program)
96
- registerTestCommands(program)
97
- registerSystemCommands(program)
98
- registerGenerateCommands(program)
99
- registerCreateAppCommands(program)
52
+ // Commands that do NOT need DB/env — safe to run on a fresh install
53
+ const { registerInitCommands } = await import('./commands/init.ts')
54
+ const { registerMigrateCommands } = await import('./commands/migrate.ts')
100
55
  registerInitCommands(program)
101
- registerInstallAppCommands(program)
102
- registerStatusCommands(program)
103
- registerUninstallAppCommands(program)
104
56
  registerMigrateCommands(program)
105
57
 
58
+ // All other commands require SUPABASE_URL to be set — only load if not init/migrate
59
+ const subcommand = process.argv[2]
60
+ const noDbCommands = ['init', 'migrate', '--help', '-h', '--version', '-V', undefined]
61
+
62
+ if (!noDbCommands.includes(subcommand)) {
63
+ await import('./env-loader.ts')
64
+
65
+ const [
66
+ { registerAuthCommands },
67
+ { registerPipelineCommands },
68
+ { registerItemCommands },
69
+ { registerAgentCommands },
70
+ { registerMigrationCommands },
71
+ { registerDoctorCommands },
72
+ { registerDevCommands },
73
+ { registerTestCommands },
74
+ { registerSystemCommands },
75
+ { registerGenerateCommands },
76
+ { registerCreateAppCommands },
77
+ { registerInstallAppCommands },
78
+ { registerStatusCommands },
79
+ { registerUninstallAppCommands },
80
+ ] = await Promise.all([
81
+ import('./commands/auth.ts'),
82
+ import('./commands/pipelines.ts'),
83
+ import('./commands/items.ts'),
84
+ import('./commands/agents.ts'),
85
+ import('./commands/migrations.ts'),
86
+ import('./commands/doctor.ts'),
87
+ import('./commands/dev.ts'),
88
+ import('./commands/test.ts'),
89
+ import('./commands/system.ts'),
90
+ import('./commands/generate.ts'),
91
+ import('./commands/create-app.ts'),
92
+ import('./commands/install-app.ts'),
93
+ import('./commands/status.ts'),
94
+ import('./commands/uninstall-app.ts'),
95
+ ])
96
+
97
+ registerAuthCommands(program)
98
+ registerPipelineCommands(program)
99
+ registerItemCommands(program)
100
+ registerAgentCommands(program)
101
+ registerMigrationCommands(program)
102
+ registerDoctorCommands(program)
103
+ registerDevCommands(program)
104
+ registerTestCommands(program)
105
+ registerSystemCommands(program)
106
+ registerGenerateCommands(program)
107
+ registerCreateAppCommands(program)
108
+ registerInstallAppCommands(program)
109
+ registerStatusCommands(program)
110
+ registerUninstallAppCommands(program)
111
+ }
112
+
106
113
  program.parseAsync(process.argv).catch((err) => {
107
114
  console.error('Error:', err.message)
108
115
  process.exit(1)
@@ -31,9 +31,9 @@ import { createClient } from '@supabase/supabase-js'
31
31
  * @calledBy adminDb, getUserDb (applied at client construction time)
32
32
  */
33
33
  const _env = (globalThis as any).process?.env || {}
34
- const supabaseUrl: string = _env.SUPABASE_URL!
35
- const supabaseServiceKey: string = _env.SUPABASE_SERVICE_ROLE_KEY!
36
- const supabaseAnonKey: string = _env.SUPABASE_ANON_KEY!
34
+ const supabaseUrl: string = _env.SUPABASE_URL || 'https://placeholder.supabase.co'
35
+ const supabaseServiceKey: string = _env.SUPABASE_SERVICE_ROLE_KEY || ''
36
+ const supabaseAnonKey: string = _env.SUPABASE_ANON_KEY || ''
37
37
  const dbSchema: string = _env.DB_SCHEMA || 'public'
38
38
 
39
39
  // ─── CLIENTS ─────────────────────────────────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/init.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA4IxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/init.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA0IxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
@@ -37,5 +37,5 @@
37
37
  * @seeAlso cli/context.ts (buildCliContext — constructs CoreContext for every command)
38
38
  * @seeAlso functions/_shared/index.ts (core functions exposed to CLI)
39
39
  */
40
- import './env-loader.ts';
40
+ export {};
41
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../.framework/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../.framework/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "private": false,
5
5
  "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
6
6
  "type": "module",