@geekmidas/cli 10.0.0-alpha.30 → 10.0.0-alpha.31

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/index.cjs CHANGED
@@ -42,7 +42,7 @@ let _geekmidas_constructs_subscribers = require("@geekmidas/constructs/subscribe
42
42
  let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
43
43
  let node_dns_promises = require("node:dns/promises");
44
44
  //#region package.json
45
- var version = "10.0.0-alpha.30";
45
+ var version = "10.0.0-alpha.31";
46
46
  //#endregion
47
47
  //#region src/auth/credentials.ts
48
48
  /**
@@ -8470,7 +8470,34 @@ gkm migrate database # apply one construct's
8470
8470
  - A deploy migrates before the new version goes live, so the old version runs
8471
8471
  against the new schema until it is replaced. Keep each migration compatible
8472
8472
  with the code before it: add a column in one release, stop using the old one,
8473
- drop it in a later release.`;
8473
+ drop it in a later release.
8474
+
8475
+ **Migrations hold schema, never data.** Tables, columns, constraints, indexes.
8476
+ No inserts, updates or deletes against the application's rows.
8477
+
8478
+ - **Data the code defines lives in the code.** A permission catalogue, the
8479
+ system roles, a list of statuses — if a constant in the source already says
8480
+ what they are, a table holding them is a copy, and a copy drifts. Keep the
8481
+ constant; store only what users create (a custom role, which permission keys
8482
+ it grants), checked against the constant in code.
8483
+ - **Define it once, typed, where every app can import it.** A catalogue in
8484
+ code belongs in a shared package (\`packages/models\`), declared \`as const\`
8485
+ so its keys are a union type. The API's guards, the web app's gates and a
8486
+ mobile app's gates then all name the same keys, and a typo — or a removed
8487
+ permission still checked somewhere — fails to compile instead of failing
8488
+ closed at runtime.
8489
+ - **A rule is not a row.** "Every user is a member", "a super admin has every
8490
+ permission" are logic. A row per user, or a grant per permission, is a
8491
+ snapshot of the rule that goes stale the moment the rule's inputs change.
8492
+ - **Nothing needs seeding to run.** If the app fails without some rows present,
8493
+ those rows are code in the wrong place. Sample and demo data comes from test
8494
+ factories — never a migration, never a deploy.
8495
+ - **A backfill is the one exception.** When a schema change needs existing rows
8496
+ transformed — a new non-null column filled from an old one — do it in the
8497
+ same migration, keyed on the rows it transforms. It never inserts rows that
8498
+ were not there.
8499
+ - **A test that only keeps two copies in step is the smell.** Delete a copy,
8500
+ and the test with it.`;
8474
8501
  }
8475
8502
  function queriesSection() {
8476
8503
  return `## Writing queries and relations
@@ -8727,26 +8754,26 @@ function loadPackageJson() {
8727
8754
  * Run: pnpm --filter @geekmidas/cli sync-versions
8728
8755
  */
8729
8756
  const GEEKMIDAS_VERSIONS = {
8730
- "@geekmidas/audit": "~10.0.0-alpha.30",
8731
- "@geekmidas/auth": "~10.0.0-alpha.30",
8732
- "@geekmidas/cache": "~10.0.0-alpha.30",
8733
- "@geekmidas/client": "~10.0.0-alpha.30",
8734
- "@geekmidas/cloud": "~10.0.0-alpha.30",
8735
- "@geekmidas/constructs": "~10.0.0-alpha.30",
8736
- "@geekmidas/db": "~10.0.0-alpha.30",
8737
- "@geekmidas/emailkit": "~10.0.0-alpha.30",
8738
- "@geekmidas/envkit": "~10.0.0-alpha.30",
8739
- "@geekmidas/errors": "~10.0.0-alpha.30",
8740
- "@geekmidas/events": "~10.0.0-alpha.30",
8741
- "@geekmidas/logger": "~10.0.0-alpha.30",
8742
- "@geekmidas/manifest": "~10.0.0-alpha.30",
8743
- "@geekmidas/rate-limit": "~10.0.0-alpha.30",
8744
- "@geekmidas/schema": "~10.0.0-alpha.30",
8745
- "@geekmidas/services": "~10.0.0-alpha.30",
8746
- "@geekmidas/storage": "~10.0.0-alpha.30",
8747
- "@geekmidas/studio": "~10.0.0-alpha.30",
8748
- "@geekmidas/telescope": "~10.0.0-alpha.30",
8749
- "@geekmidas/testkit": "~10.0.0-alpha.30",
8757
+ "@geekmidas/audit": "~10.0.0-alpha.31",
8758
+ "@geekmidas/auth": "~10.0.0-alpha.31",
8759
+ "@geekmidas/cache": "~10.0.0-alpha.31",
8760
+ "@geekmidas/client": "~10.0.0-alpha.31",
8761
+ "@geekmidas/cloud": "~10.0.0-alpha.31",
8762
+ "@geekmidas/constructs": "~10.0.0-alpha.31",
8763
+ "@geekmidas/db": "~10.0.0-alpha.31",
8764
+ "@geekmidas/emailkit": "~10.0.0-alpha.31",
8765
+ "@geekmidas/envkit": "~10.0.0-alpha.31",
8766
+ "@geekmidas/errors": "~10.0.0-alpha.31",
8767
+ "@geekmidas/events": "~10.0.0-alpha.31",
8768
+ "@geekmidas/logger": "~10.0.0-alpha.31",
8769
+ "@geekmidas/manifest": "~10.0.0-alpha.31",
8770
+ "@geekmidas/rate-limit": "~10.0.0-alpha.31",
8771
+ "@geekmidas/schema": "~10.0.0-alpha.31",
8772
+ "@geekmidas/services": "~10.0.0-alpha.31",
8773
+ "@geekmidas/storage": "~10.0.0-alpha.31",
8774
+ "@geekmidas/studio": "~10.0.0-alpha.31",
8775
+ "@geekmidas/telescope": "~10.0.0-alpha.31",
8776
+ "@geekmidas/testkit": "~10.0.0-alpha.31",
8750
8777
  "@geekmidas/cli": `~${loadPackageJson().version}`
8751
8778
  };
8752
8779
  //#endregion