@hcmforge/types-generator 0.1.0 → 0.1.1

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.d.ts CHANGED
@@ -5,5 +5,5 @@ export type { TypeSource } from './sources/index.js';
5
5
  export type { TypeIR, TypeKind, FieldIR, FunctionIR, ParameterIR, ObjectIR, TypeBundle, } from './ir.js';
6
6
  export { STATIC_FUNCTIONS } from './static-data/functions.js';
7
7
  export { STATIC_OBJECTS } from './static-data/objects.js';
8
- export declare const VERSION = "0.0.1";
8
+ export { VERSION, getVersion } from './version.js';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -2,5 +2,5 @@ export { generateTypeBundle } from './generator.js';
2
2
  export { StaticSource } from './sources/index.js';
3
3
  export { STATIC_FUNCTIONS } from './static-data/functions.js';
4
4
  export { STATIC_OBJECTS } from './static-data/objects.js';
5
- export const VERSION = '0.0.1';
5
+ export { VERSION, getVersion } from './version.js';
6
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function getVersion(): string;
2
+ export declare const VERSION: string;
3
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,IAAI,MAAM,CASnC;AAED,eAAO,MAAM,OAAO,QAAe,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { dirname, join } from 'node:path';
4
+ const __dirname = dirname(fileURLToPath(import.meta.url));
5
+ let cachedVersion = null;
6
+ export function getVersion() {
7
+ if (cachedVersion)
8
+ return cachedVersion;
9
+ // В dev-режиме: src/version.ts → ../package.json
10
+ // В dist: dist/version.js → ../package.json
11
+ const pkgPath = join(__dirname, '..', 'package.json');
12
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
13
+ cachedVersion = pkg.version;
14
+ return cachedVersion;
15
+ }
16
+ export const VERSION = getVersion();
17
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAM1D,IAAI,aAAa,GAAkB,IAAI,CAAC;AAExC,MAAM,UAAU,UAAU;IACxB,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IAExC,iDAAiD;IACjD,4CAA4C;IAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAgB,CAAC;IACrE,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hcmforge/types-generator",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Generate TypeScript definitions for WebSoft HCM functions and objects",
5
5
  "license": "MIT",
6
6
  "author": "Стародед Максим Юрьевич <hello@hcmforge.ru>",
@@ -38,7 +38,7 @@
38
38
  "LICENSE"
39
39
  ],
40
40
  "dependencies": {
41
- "@hcmforge/core": "0.1.0"
41
+ "@hcmforge/core": "0.1.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^20.0.0",