@ankhorage/infra 1.0.2 → 1.0.3
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/adapters/minikube/base/index.d.ts.map +1 -1
- package/dist/adapters/minikube/base/index.js +11 -3
- package/dist/adapters/minikube/base/index.js.map +1 -1
- package/dist/adapters/minikube/base/supabaseMigrations.d.ts +2 -0
- package/dist/adapters/minikube/base/supabaseMigrations.d.ts.map +1 -0
- package/dist/adapters/minikube/base/supabaseMigrations.js +6 -0
- package/dist/adapters/minikube/base/supabaseMigrations.js.map +1 -0
- package/dist/adapters/minikube/secrets/supabase-vault/index.js +2 -1
- package/dist/adapters/minikube/secrets/supabase-vault/index.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/minikube/README.md +9 -2
- package/src/adapters/minikube/base/index.test.ts +37 -1
- package/src/adapters/minikube/base/index.ts +11 -3
- package/src/adapters/minikube/base/supabaseMigrations.test.ts +168 -0
- package/src/adapters/minikube/base/supabaseMigrations.ts +5 -0
- package/src/adapters/minikube/secrets/supabase-vault/index.ts +2 -1
- package/src/index.test.ts +4 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# INFRA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Executable infra provider and standalone CLI for Ankhorage project workflows.
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/minikube/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/minikube/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAG9D,eAAO,MAAM,aAAa,QAAQ,CAAC;AAoDnC,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,EAAE,yBAAyB,EAAE,CAAC;IAC/C,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,2BAA2B,EAAE,CAoLhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveSupabaseProfileModel } from '../auth/supabase/profile';
|
|
2
|
+
import { getSupabaseMigrationCommandScript } from './supabaseMigrations';
|
|
2
3
|
export const APP_NAMESPACE = 'app';
|
|
3
4
|
const SUPABASE_NAMESPACE = 'supabase';
|
|
4
5
|
const SUPABASE_IMAGES = {
|
|
@@ -284,7 +285,7 @@ host-level Supabase Compose runtime.
|
|
|
284
285
|
|
|
285
286
|
## Lifecycle Semantics
|
|
286
287
|
|
|
287
|
-
- \`up.sh\`: starts \`minikube -p ${appSlug}\`, deploys provider namespaces, runs migrations with
|
|
288
|
+
- \`up.sh\`: starts \`minikube -p ${appSlug}\`, deploys provider namespaces, runs migrations with CLI telemetry disabled for that command, starts slug-owned port-forwards, and deploys the app runtime.
|
|
288
289
|
- \`down.sh\`: stops slug-owned port-forwards, then stops \`minikube -p ${appSlug}\`. Persistent data remains in the profile.
|
|
289
290
|
- \`reset.sh\`: requires \`ANKH_RESET_CONFIRM=${appSlug}\`; ${resetDescription}. It does not delete the Minikube profile.
|
|
290
291
|
- \`destroy.sh\`: deletes only \`minikube -p ${appSlug}\`.
|
|
@@ -297,7 +298,13 @@ ${resourceLines}
|
|
|
297
298
|
|
|
298
299
|
Supabase runtime ownership is Kubernetes. Migration authoring/history remains Supabase
|
|
299
300
|
migration files. Migration execution targets the Kubernetes Postgres endpoint through
|
|
300
|
-
\`supabase migration up --db-url "$SUPABASE_DB_URL"\`.
|
|
301
|
+
\`SUPABASE_TELEMETRY_DISABLED=1 supabase --yes migration up --db-url "$SUPABASE_DB_URL"\`.
|
|
302
|
+
The migration process does not require stdin. \`--yes\` remains defense in depth for future
|
|
303
|
+
CLI prompts; it is not the hang fix. Command-scoped telemetry disable avoids the unbounded
|
|
304
|
+
telemetry shutdown in Supabase CLI 2.106.0 when PostHog is blocked, without changing the
|
|
305
|
+
user's persistent telemetry preference. Migration failures stop \`up.sh\`, and the completion
|
|
306
|
+
message is printed only after a zero exit status. No migration deadline is added; using a
|
|
307
|
+
current Supabase CLI remains recommended.
|
|
301
308
|
|
|
302
309
|
Supabase manifests are generated from the current official Supabase self-hosting Docker
|
|
303
310
|
topology, service documentation, environment-variable contracts, and pinned official images.
|
|
@@ -1994,6 +2001,7 @@ function getUpScript(args) {
|
|
|
1994
2001
|
oauthProviders,
|
|
1995
2002
|
secretStoreProvider,
|
|
1996
2003
|
});
|
|
2004
|
+
const supabaseMigrationCommand = getSupabaseMigrationCommandScript();
|
|
1997
2005
|
return `#!/usr/bin/env bash
|
|
1998
2006
|
set -Eeuo pipefail
|
|
1999
2007
|
|
|
@@ -2348,7 +2356,7 @@ run_supabase_migrations() {
|
|
|
2348
2356
|
require_command supabase
|
|
2349
2357
|
(
|
|
2350
2358
|
cd "\${ROOT_DIR}"
|
|
2351
|
-
|
|
2359
|
+
${indentShellBlock(supabaseMigrationCommand, 6)}
|
|
2352
2360
|
)
|
|
2353
2361
|
fi
|
|
2354
2362
|
}
|