@habeetat/cli 0.1.0-dev.20260619123920.2f9dafc → 0.1.0-dev.20260624111225.3bf52a3
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/dist/bin.js +18 -3
- package/dist/bin.js.map +1 -1
- package/dist/index.d.mts +54 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +193 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +192 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -13184,6 +13184,17 @@ VALUES ('default', 'nhp-backend-scope', 'nhp-backend-resource', 'nhp:all', 'Full
|
|
|
13184
13184
|
ON CONFLICT (id) DO UPDATE
|
|
13185
13185
|
SET resource_id = EXCLUDED.resource_id, name = EXCLUDED.name, description = EXCLUDED.description;
|
|
13186
13186
|
|
|
13187
|
+
-- Default platform user role: grants the API scope (nhp:all) to EVERY user and is a Logto
|
|
13188
|
+
-- default role (is_default), so self-registered users are auto-assigned it on sign-up. Without
|
|
13189
|
+
-- this a new user has no scope on the API resource \u2192 their token is opaque \u2192 they can't call
|
|
13190
|
+
-- /auth/me or create their first org (org-onboarding self-registration would be locked out).
|
|
13191
|
+
INSERT INTO roles (tenant_id, id, name, description, type, is_default)
|
|
13192
|
+
VALUES ('default', 'role_platform_user', 'platform-user', 'Baseline API access for all users', 'User', true)
|
|
13193
|
+
ON CONFLICT (id) DO UPDATE SET is_default = true;
|
|
13194
|
+
INSERT INTO roles_scopes (tenant_id, id, role_id, scope_id)
|
|
13195
|
+
VALUES ('default', 'rs_platform_user_all', 'role_platform_user', 'nhp-backend-scope')
|
|
13196
|
+
ON CONFLICT DO NOTHING;
|
|
13197
|
+
|
|
13187
13198
|
-- Group scopes (enforced by the SDK ScopeGuard on /sdk/v1/groups). Without
|
|
13188
13199
|
-- these the groups:read scope-gate is unsatisfiable for any client.
|
|
13189
13200
|
INSERT INTO scopes (tenant_id, id, resource_id, name, description)
|
|
@@ -13750,7 +13761,9 @@ async function initPlatform(projectDir) {
|
|
|
13750
13761
|
try {
|
|
13751
13762
|
const signozReady = await waitForDockerHealthy(projectDir, "signoz-query-service", 120);
|
|
13752
13763
|
if (!signozReady) {
|
|
13753
|
-
signozUserSpinner.warn(
|
|
13764
|
+
signozUserSpinner.warn(
|
|
13765
|
+
"SigNoz query service not healthy \u2014 SKIPPED admin creation. SECURITY: the SigNoz UI (logs.<domain>) stays on OPEN SIGNUP until an admin exists \u2014 re-run `habeetat init` (or register the admin) before exposing it."
|
|
13766
|
+
);
|
|
13754
13767
|
} else {
|
|
13755
13768
|
const adminEmail = env2.PLATFORM_ADMIN_EMAIL || config.platform.adminEmail;
|
|
13756
13769
|
const adminPassword = env2.PLATFORM_ADMIN_PASSWORD || "";
|
|
@@ -13776,9 +13789,11 @@ async function initPlatform(projectDir) {
|
|
|
13776
13789
|
`--post-data=${jsonBody}`,
|
|
13777
13790
|
"http://localhost:8080/api/v1/register"
|
|
13778
13791
|
], { cwd: projectDir, stdio: "pipe" });
|
|
13779
|
-
signozUserSpinner.succeed("SigNoz admin user created");
|
|
13792
|
+
signozUserSpinner.succeed("SigNoz admin user created \u2014 UI now requires login");
|
|
13780
13793
|
} catch {
|
|
13781
|
-
signozUserSpinner.warn(
|
|
13794
|
+
signozUserSpinner.warn(
|
|
13795
|
+
"SigNoz admin already exists or registration unavailable \u2014 if this is a fresh SigNoz with no admin, the UI is on OPEN SIGNUP until one is created."
|
|
13796
|
+
);
|
|
13782
13797
|
}
|
|
13783
13798
|
}
|
|
13784
13799
|
} catch (err) {
|