@balena/pinejs 19.6.3 → 19.7.0
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/.pinejs-cache.json +1 -1
- package/.versionbot/CHANGELOG.yml +21 -1
- package/CHANGELOG.md +5 -0
- package/VERSION +1 -1
- package/out/bin/abstract-sql-compiler.js +12 -4
- package/out/bin/abstract-sql-compiler.js.map +1 -1
- package/package.json +3 -3
- package/src/bin/abstract-sql-compiler.ts +18 -4
- package/src/migrator/migrations.ts +1 -1
- package/src/sbvr-api/dev.ts +1 -1
- package/src/sbvr-api/user.ts +1 -1
- package/src/tasks/tasks.ts +1 -1
@@ -1,3 +1,15 @@
|
|
1
|
+
- commits:
|
2
|
+
- subject: Add convert serial option to generate-types command
|
3
|
+
hash: 13e62a4a1a9671ded893cb7d7945d6fe55a2fa8c
|
4
|
+
body: ""
|
5
|
+
footer:
|
6
|
+
Change-type: minor
|
7
|
+
change-type: minor
|
8
|
+
author: Josh Bowling
|
9
|
+
nested: []
|
10
|
+
version: 19.7.0
|
11
|
+
title: ""
|
12
|
+
date: 2024-12-17T03:37:29.850Z
|
1
13
|
- commits:
|
2
14
|
- subject: Use translationAbstractSqlModel for resolving translations
|
3
15
|
hash: 62dabf733348b2f82549264d63380555d7d61eb7
|
@@ -17,7 +29,7 @@
|
|
17
29
|
nested: []
|
18
30
|
version: 19.6.3
|
19
31
|
title: ""
|
20
|
-
date: 2024-12-
|
32
|
+
date: 2024-12-04T15:10:14.481Z
|
21
33
|
- commits:
|
22
34
|
- subject: Update dependency @balena/lf-to-abstract-sql to 5.0.3
|
23
35
|
hash: 90c78095c8d41245f69ae6c56de6054034f06d12
|
@@ -1987,6 +1999,7 @@
|
|
1987
1999
|
|
1988
2000
|
|
1989
2001
|
|
2002
|
+
|
1990
2003
|
As balena-lint
|
1991
2004
|
rejects `new
|
1992
2005
|
Boolean()`, `new
|
@@ -2026,6 +2039,7 @@
|
|
2026
2039
|
|
2027
2040
|
|
2028
2041
|
|
2042
|
+
|
2029
2043
|
As engine and npm is
|
2030
2044
|
now required as part
|
2031
2045
|
of package.json we
|
@@ -2080,6 +2094,7 @@
|
|
2080
2094
|
|
2081
2095
|
|
2082
2096
|
|
2097
|
+
|
2083
2098
|
Ensure that the
|
2084
2099
|
input passed in for
|
2085
2100
|
JSON types is either
|
@@ -2197,6 +2212,7 @@
|
|
2197
2212
|
|
2198
2213
|
|
2199
2214
|
|
2215
|
+
|
2200
2216
|
This also deprecates
|
2201
2217
|
the legacy version
|
2202
2218
|
footer:
|
@@ -2242,6 +2258,7 @@
|
|
2242
2258
|
|
2243
2259
|
|
2244
2260
|
|
2261
|
+
|
2245
2262
|
It can in fact be a
|
2246
2263
|
lot of different
|
2247
2264
|
things and that is
|
@@ -2288,6 +2305,7 @@
|
|
2288
2305
|
|
2289
2306
|
|
2290
2307
|
|
2308
|
+
|
2291
2309
|
We know what type
|
2292
2310
|
they return and they
|
2293
2311
|
should be explicitly
|
@@ -2339,6 +2357,7 @@
|
|
2339
2357
|
|
2340
2358
|
|
2341
2359
|
|
2360
|
+
|
2342
2361
|
Update
|
2343
2362
|
@balena/sbvr-types
|
2344
2363
|
from 3.4.18 to 3.5.0
|
@@ -2501,6 +2520,7 @@
|
|
2501
2520
|
|
2502
2521
|
|
2503
2522
|
|
2523
|
+
|
2504
2524
|
This also deprecates
|
2505
2525
|
the legacy use of
|
2506
2526
|
direct true/false
|
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
|
|
4
4
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
# v19.7.0
|
8
|
+
## (2024-12-17)
|
9
|
+
|
10
|
+
* Add convert serial option to generate-types command [Josh Bowling]
|
11
|
+
|
7
12
|
# v19.6.3
|
8
13
|
## (2024-12-04)
|
9
14
|
|
package/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
19.
|
1
|
+
19.7.0
|
@@ -8,11 +8,13 @@ const runCompile = async (inputFile, outputFile) => {
|
|
8
8
|
const sqlModel = generateSqlModel(abstractSql, commander_1.program.opts().engine);
|
9
9
|
(0, utils_1.writeSqlModel)(sqlModel, outputFile);
|
10
10
|
};
|
11
|
-
const generateTypes = async (inputFile,
|
11
|
+
const generateTypes = async (inputFile, options) => {
|
12
12
|
const { abstractSqlToTypescriptTypes } = await import('@balena/abstract-sql-to-typescript/generate');
|
13
13
|
const abstractSql = (0, utils_1.getAbstractSqlModelFromFile)(inputFile, commander_1.program.opts().model);
|
14
|
-
const types = abstractSqlToTypescriptTypes(abstractSql
|
15
|
-
|
14
|
+
const types = abstractSqlToTypescriptTypes(abstractSql, {
|
15
|
+
convertSerialToInteger: options.convertSerialToInteger,
|
16
|
+
});
|
17
|
+
(0, utils_1.writeAll)(types, options.outputFile);
|
16
18
|
};
|
17
19
|
commander_1.program
|
18
20
|
.version(utils_1.version)
|
@@ -29,7 +31,13 @@ commander_1.program
|
|
29
31
|
commander_1.program
|
30
32
|
.command('generate-types <input-file> [output-file]')
|
31
33
|
.description('generate typescript types from the input AbstractSql')
|
32
|
-
.
|
34
|
+
.option('--convert-serial-to-integer', 'Convert serials to integers')
|
35
|
+
.action(async (inputFile, outputFile, opts) => {
|
36
|
+
await generateTypes(inputFile, {
|
37
|
+
outputFile,
|
38
|
+
convertSerialToInteger: opts.convertSerialToInteger,
|
39
|
+
});
|
40
|
+
});
|
33
41
|
commander_1.program
|
34
42
|
.command('help')
|
35
43
|
.description('print the help')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"abstract-sql-compiler.js","sourceRoot":"","sources":["../../src/bin/abstract-sql-compiler.ts"],"names":[],"mappings":";;AAAA,mCAKiB;AAEjB,yCAAoC;AAEpC,MAAM,UAAU,GAAG,KAAK,EAAE,SAAiB,EAAE,UAAmB,EAAE,EAAE;IACnE,MAAM,EAAE,gBAAgB,EAAE,GAAG,M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AAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/pinejs",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.7.0",
|
4
4
|
"main": "out/server-glue/module",
|
5
5
|
"type": "commonjs",
|
6
6
|
"repository": "git@github.com:balena-io/pinejs.git",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
30
|
"@balena/abstract-sql-compiler": "^10.1.0",
|
31
|
-
"@balena/abstract-sql-to-typescript": "^5.0
|
31
|
+
"@balena/abstract-sql-to-typescript": "^5.1.0",
|
32
32
|
"@balena/env-parsing": "^1.2.0",
|
33
33
|
"@balena/lf-to-abstract-sql": "^5.0.3",
|
34
34
|
"@balena/odata-parser": "^3.1.2",
|
@@ -147,6 +147,6 @@
|
|
147
147
|
"recursive": true
|
148
148
|
},
|
149
149
|
"versionist": {
|
150
|
-
"publishedAt": "2024-12-
|
150
|
+
"publishedAt": "2024-12-17T03:37:30.799Z"
|
151
151
|
}
|
152
152
|
}
|
@@ -18,7 +18,13 @@ const runCompile = async (inputFile: string, outputFile?: string) => {
|
|
18
18
|
writeSqlModel(sqlModel, outputFile);
|
19
19
|
};
|
20
20
|
|
21
|
-
const generateTypes = async (
|
21
|
+
const generateTypes = async (
|
22
|
+
inputFile: string,
|
23
|
+
options: {
|
24
|
+
outputFile?: string;
|
25
|
+
convertSerialToInteger?: boolean;
|
26
|
+
},
|
27
|
+
) => {
|
22
28
|
const { abstractSqlToTypescriptTypes } = await import(
|
23
29
|
'@balena/abstract-sql-to-typescript/generate'
|
24
30
|
);
|
@@ -26,9 +32,11 @@ const generateTypes = async (inputFile: string, outputFile?: string) => {
|
|
26
32
|
inputFile,
|
27
33
|
program.opts().model,
|
28
34
|
);
|
29
|
-
const types = abstractSqlToTypescriptTypes(abstractSql
|
35
|
+
const types = abstractSqlToTypescriptTypes(abstractSql, {
|
36
|
+
convertSerialToInteger: options.convertSerialToInteger,
|
37
|
+
});
|
30
38
|
|
31
|
-
writeAll(types, outputFile);
|
39
|
+
writeAll(types, options.outputFile);
|
32
40
|
};
|
33
41
|
|
34
42
|
program
|
@@ -57,7 +65,13 @@ program
|
|
57
65
|
program
|
58
66
|
.command('generate-types <input-file> [output-file]')
|
59
67
|
.description('generate typescript types from the input AbstractSql')
|
60
|
-
.
|
68
|
+
.option('--convert-serial-to-integer', 'Convert serials to integers')
|
69
|
+
.action(async (inputFile, outputFile, opts) => {
|
70
|
+
await generateTypes(inputFile, {
|
71
|
+
outputFile,
|
72
|
+
convertSerialToInteger: opts.convertSerialToInteger,
|
73
|
+
});
|
74
|
+
});
|
61
75
|
|
62
76
|
program
|
63
77
|
.command('help')
|
package/src/sbvr-api/dev.ts
CHANGED
package/src/sbvr-api/user.ts
CHANGED
package/src/tasks/tasks.ts
CHANGED