@turystack/entity 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.
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/entity/entity.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;AAyBjC,MAAM,UAAU,MAAM,CAAC,UAAmB;IACzC,OAAO,CAAC,WAAkB,EAAE,EAAE;QAC7B,SAAS,CAAC,aAAa,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;IACjD,CAAC,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/entity/entity.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;AAyBjC,MAAM,UAAU,MAAM,CAAC,UAAmB;IACzC,OAAO,CAAC,WAAkB,EAAE,EAAE;QAC7B,SAAS,CAAC,aAAa,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;IACjD,CAAC,CAAA;AACF,CAAC","sourcesContent":["import superjson from 'superjson'\n\ntype Class = {\n\tnew (...args: never[]): object\n}\n\n/**\n * Class decorator that registers a class with superjson for serialization/deserialization.\n *\n * type preservation (e.g. `Date`, custom classes) across serialization boundaries.\n *\n * @example\n * ```ts\n * import { Entity } from '@turystack/entity'\n *\n * @Entity()\n * class Order {\n * id: string\n * createdAt: Date\n * }\n * ```\n *\n * @param identifier - Stable serialization identifier. Prefer a namespaced value\n * such as `orders.order` when class names may be minified or duplicated.\n */\nexport function Entity(identifier?: string) {\n\treturn (Constructor: Class) => {\n\t\tsuperjson.registerClass(Constructor, identifier)\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA","sourcesContent":["export * from './entity.js'\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA","sourcesContent":["export * from '@/entity/index.js'\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@turystack/entity",
3
3
  "description": "Type-safe domain entities with stable SuperJSON serialization identifiers.",
4
4
  "private": false,
5
- "version": "1.0.2",
5
+ "version": "1.0.3",
6
6
  "type": "module",
7
7
  "sideEffects": false,
8
8
  "main": "./dist/index.js",