@smartive/graphql-magic 16.3.9-next.1 → 17.0.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/.github/workflows/release.yml +2 -4
- package/.gqmrc.json +2 -2
- package/CHANGELOG.md +1 -6
- package/README.md +1 -1
- package/dist/bin/gqm.cjs +4 -4
- package/docs/package-lock.json +4 -4
- package/docs/package.json +1 -1
- package/package.json +4 -4
- package/src/bin/gqm/gqm.ts +8 -8
- package/src/bin/gqm/settings.ts +2 -2
- package/docs/docs/11-migration-guides.md +0 -19
|
@@ -3,7 +3,6 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- 'main'
|
|
6
|
-
- 'next'
|
|
7
6
|
|
|
8
7
|
jobs:
|
|
9
8
|
release:
|
|
@@ -15,7 +14,7 @@ jobs:
|
|
|
15
14
|
submodules: true
|
|
16
15
|
- uses: actions/setup-node@v4
|
|
17
16
|
with:
|
|
18
|
-
node-version:
|
|
17
|
+
node-version: 20
|
|
19
18
|
- run: npm ci
|
|
20
19
|
- run: npm run build
|
|
21
20
|
- name: semantic release
|
|
@@ -23,7 +22,6 @@ jobs:
|
|
|
23
22
|
env:
|
|
24
23
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
24
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
26
|
-
|
|
27
25
|
docs:
|
|
28
26
|
runs-on: ubuntu-latest
|
|
29
27
|
steps:
|
|
@@ -34,7 +32,7 @@ jobs:
|
|
|
34
32
|
- name: Setup Node
|
|
35
33
|
uses: actions/setup-node@v4
|
|
36
34
|
with:
|
|
37
|
-
node-version:
|
|
35
|
+
node-version: '20'
|
|
38
36
|
- name: Install and Build
|
|
39
37
|
run: |
|
|
40
38
|
cd docs
|
package/.gqmrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* gqlModule to gqmModule ([#241](https://github.com/smartive/graphql-magic/issues/241)) ([3cd2bc2](https://github.com/smartive/graphql-magic/commit/3cd2bc25bbf6e07ede309503972ee87381c74146))
|
|
1
|
+
# [17.0.0](https://github.com/smartive/graphql-magic/compare/v16.3.8...v17.0.0) (2025-03-03)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# graphql-magic
|
|
1
|
+
# graphql-magic!
|
|
2
2
|
|
|
3
3
|
Welcome to `graphql-magic`, a revolutionary library that transforms the way of working with GraphQL and databases in TypeScript projects. This library aims to streamline the development process, enhancing speed, efficiency, and type safety.
|
|
4
4
|
|
package/dist/bin/gqm.cjs
CHANGED
|
@@ -1802,7 +1802,7 @@ var DEFAULTS = {
|
|
|
1802
1802
|
ensureFileExists(`${path}/execute.ts`, EXECUTE);
|
|
1803
1803
|
}
|
|
1804
1804
|
},
|
|
1805
|
-
|
|
1805
|
+
gqlModule: {
|
|
1806
1806
|
defaultValue: "@smartive/graphql-magic"
|
|
1807
1807
|
},
|
|
1808
1808
|
dateLibrary: {
|
|
@@ -1847,7 +1847,7 @@ var initSettings = async () => {
|
|
|
1847
1847
|
saveSettings(settings);
|
|
1848
1848
|
};
|
|
1849
1849
|
var saveSettings = (settings) => {
|
|
1850
|
-
writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2)
|
|
1850
|
+
writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2));
|
|
1851
1851
|
};
|
|
1852
1852
|
var getSettings = async () => {
|
|
1853
1853
|
if (!(0, import_fs.existsSync)(SETTINGS_PATH)) {
|
|
@@ -2252,9 +2252,9 @@ import_commander.program.command("generate").description("Generate all the thing
|
|
|
2252
2252
|
await getSetting("knexfilePath");
|
|
2253
2253
|
const models = await parseModels();
|
|
2254
2254
|
const generatedFolderPath = await getSetting("generatedFolderPath");
|
|
2255
|
-
const
|
|
2255
|
+
const gqlModule = await getSetting("gqlModule");
|
|
2256
2256
|
writeToFile(`${generatedFolderPath}/schema.graphql`, printSchemaFromModels(models));
|
|
2257
|
-
writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models,
|
|
2257
|
+
writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqlModule));
|
|
2258
2258
|
const dateLibrary = await getSetting("dateLibrary");
|
|
2259
2259
|
writeToFile(`${generatedFolderPath}/db/index.ts`, generateDBModels(models, dateLibrary));
|
|
2260
2260
|
writeToFile(`${generatedFolderPath}/db/knex.ts`, generateKnexTables(models));
|
package/docs/package-lock.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@docusaurus/module-type-aliases": "3.7.0",
|
|
21
21
|
"@docusaurus/tsconfig": "3.7.0",
|
|
22
22
|
"@docusaurus/types": "3.7.0",
|
|
23
|
-
"typescript": "5.
|
|
23
|
+
"typescript": "5.8.2"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=22.0"
|
|
@@ -16466,9 +16466,9 @@
|
|
|
16466
16466
|
}
|
|
16467
16467
|
},
|
|
16468
16468
|
"node_modules/typescript": {
|
|
16469
|
-
"version": "5.
|
|
16470
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.
|
|
16471
|
-
"integrity": "sha512-
|
|
16469
|
+
"version": "5.8.2",
|
|
16470
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
|
|
16471
|
+
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
|
|
16472
16472
|
"license": "Apache-2.0",
|
|
16473
16473
|
"bin": {
|
|
16474
16474
|
"tsc": "bin/tsc",
|
package/docs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartive/graphql-magic",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@smartive/eslint-config": "6.5.0",
|
|
69
69
|
"@smartive/prettier-config": "3.1.2",
|
|
70
70
|
"@types/jest": "29.5.14",
|
|
71
|
-
"@types/lodash": "4.17.
|
|
71
|
+
"@types/lodash": "4.17.16",
|
|
72
72
|
"@types/luxon": "3.4.2",
|
|
73
73
|
"@types/pg": "8.11.11",
|
|
74
74
|
"@types/uuid": "10.0.0",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"eslint": "9.21.0",
|
|
79
79
|
"jest": "29.7.0",
|
|
80
80
|
"mock-knex": "0.4.13",
|
|
81
|
-
"prettier": "3.5.
|
|
81
|
+
"prettier": "3.5.3",
|
|
82
82
|
"ts-jest": "29.2.6",
|
|
83
83
|
"ts-node": "10.9.2",
|
|
84
|
-
"typescript": "5.
|
|
84
|
+
"typescript": "5.8.2"
|
|
85
85
|
}
|
|
86
86
|
}
|
package/src/bin/gqm/gqm.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { config } from 'dotenv';
|
|
|
5
5
|
import knex from 'knex';
|
|
6
6
|
import { simpleGit } from 'simple-git';
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
MigrationGenerator,
|
|
9
|
+
generateDBModels,
|
|
10
|
+
generateKnexTables,
|
|
11
|
+
generateMutations,
|
|
12
|
+
getMigrationDate,
|
|
13
|
+
printSchemaFromModels,
|
|
14
14
|
} from '../..';
|
|
15
15
|
import { DateLibrary } from '../../utils/dates';
|
|
16
16
|
import { generateGraphqlApiTypes, generateGraphqlClientTypes } from './codegen';
|
|
@@ -35,9 +35,9 @@ program
|
|
|
35
35
|
await getSetting('knexfilePath');
|
|
36
36
|
const models = await parseModels();
|
|
37
37
|
const generatedFolderPath = await getSetting('generatedFolderPath');
|
|
38
|
-
const
|
|
38
|
+
const gqlModule = await getSetting('gqlModule');
|
|
39
39
|
writeToFile(`${generatedFolderPath}/schema.graphql`, printSchemaFromModels(models));
|
|
40
|
-
writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models,
|
|
40
|
+
writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqlModule));
|
|
41
41
|
const dateLibrary = (await getSetting('dateLibrary')) as DateLibrary;
|
|
42
42
|
writeToFile(`${generatedFolderPath}/db/index.ts`, generateDBModels(models, dateLibrary));
|
|
43
43
|
writeToFile(`${generatedFolderPath}/db/knex.ts`, generateKnexTables(models));
|
package/src/bin/gqm/settings.ts
CHANGED
|
@@ -58,7 +58,7 @@ const DEFAULTS = {
|
|
|
58
58
|
ensureFileExists(`${path}/execute.ts`, EXECUTE);
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
gqlModule: {
|
|
62
62
|
defaultValue: '@smartive/graphql-magic',
|
|
63
63
|
},
|
|
64
64
|
dateLibrary: {
|
|
@@ -111,7 +111,7 @@ const initSettings = async () => {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
const saveSettings = (settings: Settings) => {
|
|
114
|
-
writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2)
|
|
114
|
+
writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2));
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
export const getSettings = async (): Promise<Settings> => {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Migration Guides
|
|
2
|
-
|
|
3
|
-
## Upgrading to v17.0.0
|
|
4
|
-
|
|
5
|
-
### Configuration changes
|
|
6
|
-
|
|
7
|
-
- The `gqlModule` configuration property has been renamed to `gqmModule` to maintain consistency with the project naming. Please update your `.gqmrc.json` file accordingly:
|
|
8
|
-
|
|
9
|
-
```diff
|
|
10
|
-
{
|
|
11
|
-
"modelsPath": "path/to/models.ts",
|
|
12
|
-
"generatedFolderPath": "path/to/generated",
|
|
13
|
-
"graphqlQueriesPath": "path/to/queries",
|
|
14
|
-
- "gqlModule": "../path/to/module",
|
|
15
|
-
+ "gqmModule": "../path/to/module",
|
|
16
|
-
"knexfilePath": "knexfile.ts",
|
|
17
|
-
"dateLibrary": "luxon"
|
|
18
|
-
}
|
|
19
|
-
```
|