@ankhorage/infra 1.0.2 → 1.0.4
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 +12 -0
- package/README.md +1 -1
- package/dist/adapters/minikube/base/index.d.ts.map +1 -1
- package/dist/adapters/minikube/base/index.js +19 -4
- 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 +16 -3
- package/src/adapters/minikube/base/appImageBuild.test.ts +263 -0
- package/src/adapters/minikube/base/index.test.ts +45 -1
- package/src/adapters/minikube/base/index.ts +19 -4
- 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
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/infra
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 434d4da: Clear the Expo/Metro export cache before building generated Minikube app images so rotated browser-safe Supabase credentials replace stale values in the client bundle.
|
|
8
|
+
|
|
9
|
+
## 1.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 9ab757e: Prevent generated Supabase migration lifecycles from waiting indefinitely on blocked CLI telemetry, and report visible migration progress.
|
|
14
|
+
|
|
3
15
|
## 1.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
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.
|
|
@@ -322,6 +329,13 @@ Pinned images:
|
|
|
322
329
|
- Studio: \`http://127.0.0.1:${supabaseHostPorts.studio}\`
|
|
323
330
|
- DB migration endpoint: \`127.0.0.1:${supabaseHostPorts.db}\`
|
|
324
331
|
|
|
332
|
+
## App Image Export
|
|
333
|
+
|
|
334
|
+
\`build-app-image.sh\` clears the Expo/Metro bundler cache before every web export. Expo
|
|
335
|
+
inlines \`EXPO_PUBLIC_*\` values into the browser bundle, so cache invalidation ensures a
|
|
336
|
+
rotated browser-safe Supabase URL or anon key replaces the previous value before the Docker
|
|
337
|
+
image is built. Privileged Supabase credentials are not written to the app's public env file.
|
|
338
|
+
|
|
325
339
|
## Runtime Conventions
|
|
326
340
|
|
|
327
341
|
- Monitoring requested: \`${monitoringEnabled ? 'true' : 'false'}\`
|
|
@@ -1994,6 +2008,7 @@ function getUpScript(args) {
|
|
|
1994
2008
|
oauthProviders,
|
|
1995
2009
|
secretStoreProvider,
|
|
1996
2010
|
});
|
|
2011
|
+
const supabaseMigrationCommand = getSupabaseMigrationCommandScript();
|
|
1997
2012
|
return `#!/usr/bin/env bash
|
|
1998
2013
|
set -Eeuo pipefail
|
|
1999
2014
|
|
|
@@ -2348,7 +2363,7 @@ run_supabase_migrations() {
|
|
|
2348
2363
|
require_command supabase
|
|
2349
2364
|
(
|
|
2350
2365
|
cd "\${ROOT_DIR}"
|
|
2351
|
-
|
|
2366
|
+
${indentShellBlock(supabaseMigrationCommand, 6)}
|
|
2352
2367
|
)
|
|
2353
2368
|
fi
|
|
2354
2369
|
}
|
|
@@ -2647,7 +2662,7 @@ fi
|
|
|
2647
2662
|
|
|
2648
2663
|
(
|
|
2649
2664
|
cd "\${APP_SOURCE_DIR}"
|
|
2650
|
-
bunx expo export --platform web --output-dir "\${APP_WEB_EXPORT_DIR}"
|
|
2665
|
+
bunx expo export --platform web --clear --output-dir "\${APP_WEB_EXPORT_DIR}"
|
|
2651
2666
|
)
|
|
2652
2667
|
|
|
2653
2668
|
if [[ "\${APP_WEB_EXPORT_DIR}" = /* ]]; then
|