@open-mercato/core 0.6.4-develop.4152.1.1c429e5200 → 0.6.4-develop.4161.1.g7895993543

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.
@@ -1,4 +1,4 @@
1
- [build:core] found 2648 entry points
1
+ [build:core] found 2649 entry points
2
2
  [build:core] built successfully
3
3
  [build:core:generated] found 172 entry points
4
4
  [build:core:generated] built successfully
@@ -0,0 +1,17 @@
1
+ import { Migration } from "@mikro-orm/migrations";
2
+ class Migration20260601120000 extends Migration {
3
+ up() {
4
+ this.addSql(`alter table "users" add column if not exists "updated_at" timestamptz null;`);
5
+ this.addSql(`update "users" set "updated_at" = "created_at" where "updated_at" is null;`);
6
+ this.addSql(`alter table "roles" add column if not exists "updated_at" timestamptz null;`);
7
+ this.addSql(`update "roles" set "updated_at" = "created_at" where "updated_at" is null;`);
8
+ }
9
+ down() {
10
+ this.addSql(`alter table "users" drop column if exists "updated_at";`);
11
+ this.addSql(`alter table "roles" drop column if exists "updated_at";`);
12
+ }
13
+ }
14
+ export {
15
+ Migration20260601120000
16
+ };
17
+ //# sourceMappingURL=Migration20260601120000.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/modules/auth/migrations/Migration20260601120000.ts"],
4
+ "sourcesContent": ["import { Migration } from '@mikro-orm/migrations';\n\n// Add `updated_at` to `users` and `roles` so user/role edits (and the ACL grants\n// keyed off them) participate in OSS optimistic locking (#2055). The column is\n// nullable to keep the migration online; existing rows are backfilled from\n// `created_at` so they carry a version immediately instead of being unprotected\n// until their first edit.\nexport class Migration20260601120000 extends Migration {\n\n override up(): void | Promise<void> {\n this.addSql(`alter table \"users\" add column if not exists \"updated_at\" timestamptz null;`);\n this.addSql(`update \"users\" set \"updated_at\" = \"created_at\" where \"updated_at\" is null;`);\n\n this.addSql(`alter table \"roles\" add column if not exists \"updated_at\" timestamptz null;`);\n this.addSql(`update \"roles\" set \"updated_at\" = \"created_at\" where \"updated_at\" is null;`);\n }\n\n override down(): void | Promise<void> {\n this.addSql(`alter table \"users\" drop column if exists \"updated_at\";`);\n this.addSql(`alter table \"roles\" drop column if exists \"updated_at\";`);\n }\n\n}\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;AAOnB,MAAM,gCAAgC,UAAU;AAAA,EAE5C,KAA2B;AAClC,SAAK,OAAO,6EAA6E;AACzF,SAAK,OAAO,4EAA4E;AAExF,SAAK,OAAO,6EAA6E;AACzF,SAAK,OAAO,4EAA4E;AAAA,EAC1F;AAAA,EAES,OAA6B;AACpC,SAAK,OAAO,yDAAyD;AACrE,SAAK,OAAO,yDAAyD;AAAA,EACvE;AAEF;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/core",
3
- "version": "0.6.4-develop.4152.1.1c429e5200",
3
+ "version": "0.6.4-develop.4161.1.g7895993543",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -243,16 +243,16 @@
243
243
  "zod": "^4.4.3"
244
244
  },
245
245
  "peerDependencies": {
246
- "@open-mercato/ai-assistant": "0.6.4-develop.4152.1.1c429e5200",
247
- "@open-mercato/shared": "0.6.4-develop.4152.1.1c429e5200",
248
- "@open-mercato/ui": "0.6.4-develop.4152.1.1c429e5200",
246
+ "@open-mercato/ai-assistant": "0.6.4-develop.4161.1.g7895993543",
247
+ "@open-mercato/shared": "0.6.4-develop.4161.1.g7895993543",
248
+ "@open-mercato/ui": "0.6.4-develop.4161.1.g7895993543",
249
249
  "react": "^19.0.0",
250
250
  "react-dom": "^19.0.0"
251
251
  },
252
252
  "devDependencies": {
253
- "@open-mercato/ai-assistant": "0.6.4-develop.4152.1.1c429e5200",
254
- "@open-mercato/shared": "0.6.4-develop.4152.1.1c429e5200",
255
- "@open-mercato/ui": "0.6.4-develop.4152.1.1c429e5200",
253
+ "@open-mercato/ai-assistant": "0.6.4-develop.4161.1.g7895993543",
254
+ "@open-mercato/shared": "0.6.4-develop.4161.1.g7895993543",
255
+ "@open-mercato/ui": "0.6.4-develop.4161.1.g7895993543",
256
256
  "@testing-library/dom": "^10.4.1",
257
257
  "@testing-library/jest-dom": "^6.9.1",
258
258
  "@testing-library/react": "^16.3.1",
@@ -72,6 +72,22 @@
72
72
  "enumItems": [],
73
73
  "mappedType": "datetime"
74
74
  },
75
+ "updated_at": {
76
+ "name": "updated_at",
77
+ "type": "timestamptz",
78
+ "unsigned": false,
79
+ "autoincrement": false,
80
+ "primary": false,
81
+ "nullable": true,
82
+ "unique": false,
83
+ "length": 6,
84
+ "precision": null,
85
+ "scale": null,
86
+ "default": null,
87
+ "comment": null,
88
+ "enumItems": [],
89
+ "mappedType": "datetime"
90
+ },
75
91
  "deleted_at": {
76
92
  "name": "deleted_at",
77
93
  "type": "timestamptz",
@@ -618,6 +634,22 @@
618
634
  "enumItems": [],
619
635
  "mappedType": "datetime"
620
636
  },
637
+ "updated_at": {
638
+ "name": "updated_at",
639
+ "type": "timestamptz",
640
+ "unsigned": false,
641
+ "autoincrement": false,
642
+ "primary": false,
643
+ "nullable": true,
644
+ "unique": false,
645
+ "length": 6,
646
+ "precision": null,
647
+ "scale": null,
648
+ "default": null,
649
+ "comment": null,
650
+ "enumItems": [],
651
+ "mappedType": "datetime"
652
+ },
621
653
  "deleted_at": {
622
654
  "name": "deleted_at",
623
655
  "type": "timestamptz",
@@ -0,0 +1,23 @@
1
+ import { Migration } from '@mikro-orm/migrations';
2
+
3
+ // Add `updated_at` to `users` and `roles` so user/role edits (and the ACL grants
4
+ // keyed off them) participate in OSS optimistic locking (#2055). The column is
5
+ // nullable to keep the migration online; existing rows are backfilled from
6
+ // `created_at` so they carry a version immediately instead of being unprotected
7
+ // until their first edit.
8
+ export class Migration20260601120000 extends Migration {
9
+
10
+ override up(): void | Promise<void> {
11
+ this.addSql(`alter table "users" add column if not exists "updated_at" timestamptz null;`);
12
+ this.addSql(`update "users" set "updated_at" = "created_at" where "updated_at" is null;`);
13
+
14
+ this.addSql(`alter table "roles" add column if not exists "updated_at" timestamptz null;`);
15
+ this.addSql(`update "roles" set "updated_at" = "created_at" where "updated_at" is null;`);
16
+ }
17
+
18
+ override down(): void | Promise<void> {
19
+ this.addSql(`alter table "users" drop column if exists "updated_at";`);
20
+ this.addSql(`alter table "roles" drop column if exists "updated_at";`);
21
+ }
22
+
23
+ }