@anarchitects/nx-typeorm 0.0.3 → 0.2.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.
Files changed (109) hide show
  1. package/README.md +203 -43
  2. package/dist/executors/cache-clear/executor.d.ts +6 -0
  3. package/dist/executors/cache-clear/executor.d.ts.map +1 -0
  4. package/dist/executors/cache-clear/executor.js +5 -0
  5. package/dist/executors/cache-clear/schema.json +28 -0
  6. package/dist/executors/ensure-schema/executor.d.ts +1 -5
  7. package/dist/executors/ensure-schema/executor.d.ts.map +1 -1
  8. package/dist/executors/ensure-schema/executor.js +1 -1
  9. package/dist/executors/entity-create/executor.d.ts +6 -0
  10. package/dist/executors/entity-create/executor.d.ts.map +1 -0
  11. package/dist/executors/entity-create/executor.js +15 -0
  12. package/dist/executors/entity-create/schema.json +23 -0
  13. package/dist/executors/generate/executor.d.ts +1 -7
  14. package/dist/executors/generate/executor.d.ts.map +1 -1
  15. package/dist/executors/generate/executor.js +12 -24
  16. package/dist/executors/generate/schema.json +11 -1
  17. package/dist/executors/init/executor.d.ts +6 -0
  18. package/dist/executors/init/executor.d.ts.map +1 -0
  19. package/dist/executors/init/executor.js +24 -0
  20. package/dist/executors/init/schema.json +40 -0
  21. package/dist/executors/migration-create/executor.d.ts +6 -0
  22. package/dist/executors/migration-create/executor.d.ts.map +1 -0
  23. package/dist/executors/migration-create/executor.js +19 -0
  24. package/dist/executors/migration-create/schema.json +31 -0
  25. package/dist/executors/migration-show/executor.d.ts +6 -0
  26. package/dist/executors/migration-show/executor.d.ts.map +1 -0
  27. package/dist/executors/migration-show/executor.js +5 -0
  28. package/dist/executors/migration-show/schema.json +28 -0
  29. package/dist/executors/query/executor.d.ts +6 -0
  30. package/dist/executors/query/executor.d.ts.map +1 -0
  31. package/dist/executors/query/executor.js +9 -0
  32. package/dist/executors/query/schema.json +33 -0
  33. package/dist/executors/revert/executor.d.ts +1 -5
  34. package/dist/executors/revert/executor.d.ts.map +1 -1
  35. package/dist/executors/revert/executor.js +8 -19
  36. package/dist/executors/revert/schema.json +7 -1
  37. package/dist/executors/run/executor.d.ts +1 -6
  38. package/dist/executors/run/executor.d.ts.map +1 -1
  39. package/dist/executors/run/executor.js +7 -18
  40. package/dist/executors/run/schema.json +6 -0
  41. package/dist/executors/schema-drop/executor.d.ts +6 -0
  42. package/dist/executors/schema-drop/executor.d.ts.map +1 -0
  43. package/dist/executors/schema-drop/executor.js +5 -0
  44. package/dist/executors/schema-drop/schema.json +28 -0
  45. package/dist/executors/schema-log/executor.d.ts +6 -0
  46. package/dist/executors/schema-log/executor.d.ts.map +1 -0
  47. package/dist/executors/schema-log/executor.js +5 -0
  48. package/dist/executors/schema-log/schema.json +28 -0
  49. package/dist/executors/schema-sync/executor.d.ts +6 -0
  50. package/dist/executors/schema-sync/executor.d.ts.map +1 -0
  51. package/dist/executors/schema-sync/executor.js +5 -0
  52. package/dist/executors/schema-sync/schema.json +28 -0
  53. package/dist/executors/seed/executor.d.ts +1 -7
  54. package/dist/executors/seed/executor.d.ts.map +1 -1
  55. package/dist/executors/seed/executor.js +1 -1
  56. package/dist/executors/subscriber-create/executor.d.ts +6 -0
  57. package/dist/executors/subscriber-create/executor.d.ts.map +1 -0
  58. package/dist/executors/subscriber-create/executor.js +13 -0
  59. package/dist/executors/subscriber-create/schema.json +23 -0
  60. package/dist/executors/version/executor.d.ts +6 -0
  61. package/dist/executors/version/executor.d.ts.map +1 -0
  62. package/dist/executors/version/executor.js +5 -0
  63. package/dist/executors/version/schema.json +14 -0
  64. package/dist/generators/bootstrap/files/app/env.example__tmpl__ +55 -1
  65. package/dist/generators/bootstrap/files/app/src/data-source.ts__tmpl__ +6 -0
  66. package/dist/generators/bootstrap/files/app/src/typeorm.datasource.ts__tmpl__ +1 -15
  67. package/dist/generators/bootstrap/files/app/tools/typeorm/connection-options.ts__tmpl__ +292 -0
  68. package/dist/generators/bootstrap/files/app/tools/typeorm/datasource.migrations.ts__tmpl__ +2 -7
  69. package/dist/generators/bootstrap/files/lib/project.json.partial__tmpl__ +3 -1
  70. package/dist/generators/bootstrap/generator.d.ts +5 -1
  71. package/dist/generators/bootstrap/generator.d.ts.map +1 -1
  72. package/dist/generators/bootstrap/generator.js +179 -31
  73. package/dist/generators/bootstrap/schema.json +18 -1
  74. package/dist/generators/entity-create/generator.d.ts +4 -0
  75. package/dist/generators/entity-create/generator.d.ts.map +1 -0
  76. package/dist/generators/entity-create/generator.js +70 -0
  77. package/dist/generators/entity-create/schema.json +28 -0
  78. package/dist/generators/init/generator.d.ts +4 -0
  79. package/dist/generators/init/generator.d.ts.map +1 -0
  80. package/dist/generators/init/generator.js +31 -0
  81. package/dist/generators/init/schema.json +18 -0
  82. package/dist/generators/migration-create/generator.d.ts +4 -0
  83. package/dist/generators/migration-create/generator.d.ts.map +1 -0
  84. package/dist/generators/migration-create/generator.js +72 -0
  85. package/dist/generators/migration-create/schema.json +40 -0
  86. package/dist/generators/subscriber-create/generator.d.ts +4 -0
  87. package/dist/generators/subscriber-create/generator.d.ts.map +1 -0
  88. package/dist/generators/subscriber-create/generator.js +70 -0
  89. package/dist/generators/subscriber-create/schema.json +28 -0
  90. package/dist/index.d.ts +19 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +19 -0
  93. package/dist/index.json +72 -0
  94. package/dist/plugin/index.d.ts +9 -0
  95. package/dist/plugin/index.d.ts.map +1 -0
  96. package/dist/plugin/index.js +241 -0
  97. package/dist/plugins/typeorm.d.ts +1 -6
  98. package/dist/plugins/typeorm.d.ts.map +1 -1
  99. package/dist/plugins/typeorm.js +1 -161
  100. package/dist/utils/cli.d.ts +17 -0
  101. package/dist/utils/cli.d.ts.map +1 -0
  102. package/dist/utils/cli.js +55 -0
  103. package/dist/{executors → utils}/shared.d.ts +12 -9
  104. package/dist/utils/shared.d.ts.map +1 -0
  105. package/dist/utils/shared.js +260 -0
  106. package/package.json +6 -7
  107. package/dist/executors/shared.d.ts.map +0 -1
  108. package/dist/executors/shared.js +0 -71
  109. package/dist/generators/bootstrap/files/app/tools/typeorm/datasource.runtime.ts__tmpl__ +0 -9
@@ -0,0 +1,70 @@
1
+ import { joinPathFragments, readProjectConfiguration, } from '@nx/devkit';
2
+ import { isAbsolute, posix } from 'node:path';
3
+ import createEntity from '../../executors/entity-create/executor.js';
4
+ import { normalizeName } from '../../utils/shared.js';
5
+ export default async function entityCreateGenerator(tree, options) {
6
+ const projectName = requireOption(options.project, 'project');
7
+ const entityName = normalizeName(requireOption(options.name, 'name'));
8
+ const projectConfig = readProjectConfiguration(tree, projectName);
9
+ const targetDirectory = resolveTargetDirectory(projectConfig.projectType, options.directory);
10
+ const context = createExecutorContext(tree, projectName);
11
+ const result = await createEntity({
12
+ projectRoot: projectConfig.root,
13
+ path: joinPathFragments(targetDirectory, entityName),
14
+ args: options.args,
15
+ }, context);
16
+ if (!result.success) {
17
+ throw new Error('TypeORM entity:create failed.');
18
+ }
19
+ }
20
+ function resolveTargetDirectory(projectType, directory) {
21
+ if (!directory) {
22
+ return projectType === 'application'
23
+ ? 'src/entities'
24
+ : 'src/infrastructure-persistence/entities';
25
+ }
26
+ return normalizeRelativeDirectory(directory);
27
+ }
28
+ function normalizeRelativeDirectory(directory) {
29
+ const trimmedDirectory = directory.trim();
30
+ if (trimmedDirectory.length === 0) {
31
+ throw new Error('Provide a non-empty directory when using the directory option.');
32
+ }
33
+ if (isAbsolute(trimmedDirectory)) {
34
+ throw new Error('The directory option must be relative to the project root.');
35
+ }
36
+ const normalizedDirectory = posix
37
+ .normalize(trimmedDirectory.replace(/\\/g, '/').replace(/^\.\//, ''))
38
+ .replace(/^\.\//, '');
39
+ if (normalizedDirectory.length === 0 ||
40
+ normalizedDirectory === '.' ||
41
+ normalizedDirectory === '..' ||
42
+ normalizedDirectory.startsWith('../')) {
43
+ throw new Error('The directory option must stay within the project root.');
44
+ }
45
+ return normalizedDirectory;
46
+ }
47
+ function requireOption(value, optionName) {
48
+ const trimmed = value?.trim();
49
+ if (!trimmed) {
50
+ throw new Error(`Provide a value for the ${optionName} option.`);
51
+ }
52
+ return trimmed;
53
+ }
54
+ function createExecutorContext(tree, projectName) {
55
+ const projectConfig = readProjectConfiguration(tree, projectName);
56
+ return {
57
+ root: tree.root,
58
+ projectName,
59
+ projectsConfigurations: {
60
+ version: 2,
61
+ projects: {
62
+ [projectName]: {
63
+ root: projectConfig.root,
64
+ projectType: projectConfig.projectType,
65
+ targets: projectConfig.targets ?? {},
66
+ },
67
+ },
68
+ },
69
+ };
70
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "title": "TypeORM Entity Create Generator",
4
+ "type": "object",
5
+ "properties": {
6
+ "project": {
7
+ "type": "string",
8
+ "description": "Name of the existing Nx project to scaffold an entity for."
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Entity name. Spaces are normalized to hyphens."
13
+ },
14
+ "directory": {
15
+ "type": "string",
16
+ "description": "Optional directory relative to the project root where the entity should be created."
17
+ },
18
+ "args": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string"
22
+ },
23
+ "description": "Additional CLI arguments passed through to TypeORM."
24
+ }
25
+ },
26
+ "required": ["project", "name"],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,4 @@
1
+ import { Tree, type GeneratorCallback } from '@nx/devkit';
2
+ import type { InitGeneratorSchema } from './schema.js';
3
+ export default function initGenerator(tree: Tree, options?: InitGeneratorSchema): Promise<GeneratorCallback>;
4
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/init/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,IAAI,EAEJ,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAUvD,wBAA8B,aAAa,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,iBAAiB,CAAC,CAqB5B"}
@@ -0,0 +1,31 @@
1
+ import { addDependenciesToPackageJson, formatFiles, updateJson, } from '@nx/devkit';
2
+ const TYPEORM_PLUGIN_NAME = '@anarchitects/nx-typeorm';
3
+ export default async function initGenerator(tree, options = {}) {
4
+ ensureNxPluginRegistration(tree);
5
+ const dependencyTask = addDependenciesToPackageJson(tree, {
6
+ typeorm: '^0.3.28',
7
+ 'reflect-metadata': '^0.2.2',
8
+ }, {});
9
+ if (!options.skipFormat) {
10
+ await formatFiles(tree);
11
+ }
12
+ if (options.skipInstall) {
13
+ return () => undefined;
14
+ }
15
+ return dependencyTask;
16
+ }
17
+ function ensureNxPluginRegistration(tree) {
18
+ updateJson(tree, 'nx.json', (json) => {
19
+ const plugins = Array.isArray(json.plugins) ? [...json.plugins] : [];
20
+ const alreadyRegistered = plugins.some((entry) => typeof entry === 'string'
21
+ ? entry === TYPEORM_PLUGIN_NAME
22
+ : entry.plugin === TYPEORM_PLUGIN_NAME);
23
+ if (!alreadyRegistered) {
24
+ plugins.push({ plugin: TYPEORM_PLUGIN_NAME });
25
+ }
26
+ return {
27
+ ...json,
28
+ plugins,
29
+ };
30
+ });
31
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "title": "TypeORM Init Generator",
4
+ "type": "object",
5
+ "properties": {
6
+ "skipFormat": {
7
+ "type": "boolean",
8
+ "default": false,
9
+ "description": "Skip formatting files after generation."
10
+ },
11
+ "skipInstall": {
12
+ "type": "boolean",
13
+ "default": false,
14
+ "description": "Skip running package manager install tasks."
15
+ }
16
+ },
17
+ "additionalProperties": false
18
+ }
@@ -0,0 +1,4 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { MigrationCreateGeneratorSchema } from './schema.js';
3
+ export default function migrationCreateGenerator(tree: Tree, options: MigrationCreateGeneratorSchema): Promise<void>;
4
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/migration-create/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAOpB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAElE,wBAA8B,wBAAwB,CACpD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,8BAA8B,iBA2BxC"}
@@ -0,0 +1,72 @@
1
+ import { readProjectConfiguration, } from '@nx/devkit';
2
+ import { isAbsolute, join, posix } from 'node:path';
3
+ import createMigration from '../../executors/migration-create/executor.js';
4
+ import { defaultMigrationsDirectory, normalizeName, } from '../../utils/shared.js';
5
+ export default async function migrationCreateGenerator(tree, options) {
6
+ const projectName = requireOption(options.project, 'project');
7
+ const migrationName = normalizeName(requireOption(options.name, 'name'));
8
+ const projectConfig = readProjectConfiguration(tree, projectName);
9
+ const targetDirectory = resolveMigrationDirectory(projectConfig.root, projectConfig.projectType, options.directory);
10
+ const targetPath = join(targetDirectory, migrationName);
11
+ const context = createExecutorContext(tree, projectName);
12
+ const result = await createMigration({
13
+ path: targetPath,
14
+ outputJs: options.outputJs,
15
+ esm: options.esm,
16
+ timestamp: options.timestamp,
17
+ args: options.args,
18
+ }, context);
19
+ if (!result.success) {
20
+ throw new Error('TypeORM migration:create failed.');
21
+ }
22
+ }
23
+ function resolveMigrationDirectory(projectRoot, projectType, directory) {
24
+ if (!directory) {
25
+ return defaultMigrationsDirectory(projectRoot, projectType);
26
+ }
27
+ const normalizedDirectory = normalizeRelativeDirectory(directory);
28
+ return join(projectRoot, normalizedDirectory);
29
+ }
30
+ function normalizeRelativeDirectory(directory) {
31
+ const trimmedDirectory = directory.trim();
32
+ if (trimmedDirectory.length === 0) {
33
+ throw new Error('Provide a non-empty directory when using the directory option.');
34
+ }
35
+ if (isAbsolute(trimmedDirectory)) {
36
+ throw new Error('The directory option must be relative to the project root.');
37
+ }
38
+ const normalizedDirectory = posix
39
+ .normalize(trimmedDirectory.replace(/\\/g, '/').replace(/^\.\//, ''))
40
+ .replace(/^\.\//, '');
41
+ if (normalizedDirectory.length === 0 ||
42
+ normalizedDirectory === '.' ||
43
+ normalizedDirectory === '..' ||
44
+ normalizedDirectory.startsWith('../')) {
45
+ throw new Error('The directory option must stay within the project root.');
46
+ }
47
+ return normalizedDirectory;
48
+ }
49
+ function requireOption(value, optionName) {
50
+ const trimmed = value?.trim();
51
+ if (!trimmed) {
52
+ throw new Error(`Provide a value for the ${optionName} option.`);
53
+ }
54
+ return trimmed;
55
+ }
56
+ function createExecutorContext(tree, projectName) {
57
+ const projectConfig = readProjectConfiguration(tree, projectName);
58
+ return {
59
+ root: tree.root,
60
+ projectName,
61
+ projectsConfigurations: {
62
+ version: 2,
63
+ projects: {
64
+ [projectName]: {
65
+ root: projectConfig.root,
66
+ projectType: projectConfig.projectType,
67
+ targets: projectConfig.targets ?? {},
68
+ },
69
+ },
70
+ },
71
+ };
72
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "title": "TypeORM Migration Create Generator",
4
+ "type": "object",
5
+ "properties": {
6
+ "project": {
7
+ "type": "string",
8
+ "description": "Name of the existing Nx project to scaffold a migration for."
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Migration name. Spaces are normalized to hyphens."
13
+ },
14
+ "directory": {
15
+ "type": "string",
16
+ "description": "Optional directory relative to the project root where the migration should be created."
17
+ },
18
+ "outputJs": {
19
+ "type": "boolean",
20
+ "description": "Generate JavaScript migration output."
21
+ },
22
+ "esm": {
23
+ "type": "boolean",
24
+ "description": "Generate ESM migration output."
25
+ },
26
+ "timestamp": {
27
+ "type": "number",
28
+ "description": "Custom migration timestamp."
29
+ },
30
+ "args": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "string"
34
+ },
35
+ "description": "Additional CLI arguments passed through to TypeORM."
36
+ }
37
+ },
38
+ "required": ["project", "name"],
39
+ "additionalProperties": false
40
+ }
@@ -0,0 +1,4 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { SubscriberCreateGeneratorSchema } from './schema.js';
3
+ export default function subscriberCreateGenerator(tree: Tree, options: SubscriberCreateGeneratorSchema): Promise<void>;
4
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/subscriber-create/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAEnE,wBAA8B,yBAAyB,CACrD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,iBAuBzC"}
@@ -0,0 +1,70 @@
1
+ import { joinPathFragments, readProjectConfiguration, } from '@nx/devkit';
2
+ import { isAbsolute, posix } from 'node:path';
3
+ import createSubscriber from '../../executors/subscriber-create/executor.js';
4
+ import { normalizeName } from '../../utils/shared.js';
5
+ export default async function subscriberCreateGenerator(tree, options) {
6
+ const projectName = requireOption(options.project, 'project');
7
+ const subscriberName = normalizeName(requireOption(options.name, 'name'));
8
+ const projectConfig = readProjectConfiguration(tree, projectName);
9
+ const targetDirectory = resolveTargetDirectory(projectConfig.projectType, options.directory);
10
+ const context = createExecutorContext(tree, projectName);
11
+ const result = await createSubscriber({
12
+ projectRoot: projectConfig.root,
13
+ path: joinPathFragments(targetDirectory, subscriberName),
14
+ args: options.args,
15
+ }, context);
16
+ if (!result.success) {
17
+ throw new Error('TypeORM subscriber:create failed.');
18
+ }
19
+ }
20
+ function resolveTargetDirectory(projectType, directory) {
21
+ if (!directory) {
22
+ return projectType === 'application'
23
+ ? 'src/subscribers'
24
+ : 'src/infrastructure-persistence/subscribers';
25
+ }
26
+ return normalizeRelativeDirectory(directory);
27
+ }
28
+ function normalizeRelativeDirectory(directory) {
29
+ const trimmedDirectory = directory.trim();
30
+ if (trimmedDirectory.length === 0) {
31
+ throw new Error('Provide a non-empty directory when using the directory option.');
32
+ }
33
+ if (isAbsolute(trimmedDirectory)) {
34
+ throw new Error('The directory option must be relative to the project root.');
35
+ }
36
+ const normalizedDirectory = posix
37
+ .normalize(trimmedDirectory.replace(/\\/g, '/').replace(/^\.\//, ''))
38
+ .replace(/^\.\//, '');
39
+ if (normalizedDirectory.length === 0 ||
40
+ normalizedDirectory === '.' ||
41
+ normalizedDirectory === '..' ||
42
+ normalizedDirectory.startsWith('../')) {
43
+ throw new Error('The directory option must stay within the project root.');
44
+ }
45
+ return normalizedDirectory;
46
+ }
47
+ function requireOption(value, optionName) {
48
+ const trimmed = value?.trim();
49
+ if (!trimmed) {
50
+ throw new Error(`Provide a value for the ${optionName} option.`);
51
+ }
52
+ return trimmed;
53
+ }
54
+ function createExecutorContext(tree, projectName) {
55
+ const projectConfig = readProjectConfiguration(tree, projectName);
56
+ return {
57
+ root: tree.root,
58
+ projectName,
59
+ projectsConfigurations: {
60
+ version: 2,
61
+ projects: {
62
+ [projectName]: {
63
+ root: projectConfig.root,
64
+ projectType: projectConfig.projectType,
65
+ targets: projectConfig.targets ?? {},
66
+ },
67
+ },
68
+ },
69
+ };
70
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "title": "TypeORM Subscriber Create Generator",
4
+ "type": "object",
5
+ "properties": {
6
+ "project": {
7
+ "type": "string",
8
+ "description": "Name of the existing Nx project to scaffold a subscriber for."
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Subscriber name. Spaces are normalized to hyphens."
13
+ },
14
+ "directory": {
15
+ "type": "string",
16
+ "description": "Optional directory relative to the project root where the subscriber should be created."
17
+ },
18
+ "args": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string"
22
+ },
23
+ "description": "Additional CLI arguments passed through to TypeORM."
24
+ }
25
+ },
26
+ "required": ["project", "name"],
27
+ "additionalProperties": false
28
+ }
package/dist/index.d.ts CHANGED
@@ -3,5 +3,24 @@ export { default as runExecutor } from './executors/run/executor.js';
3
3
  export { default as revertExecutor } from './executors/revert/executor.js';
4
4
  export { default as ensureSchemaExecutor } from './executors/ensure-schema/executor.js';
5
5
  export { default as seedExecutor } from './executors/seed/executor.js';
6
+ export { default as migrationCreateExecutor } from './executors/migration-create/executor.js';
7
+ export { default as migrationShowExecutor } from './executors/migration-show/executor.js';
8
+ export { default as schemaSyncExecutor } from './executors/schema-sync/executor.js';
9
+ export { default as schemaLogExecutor } from './executors/schema-log/executor.js';
10
+ export { default as schemaDropExecutor } from './executors/schema-drop/executor.js';
11
+ export { default as queryExecutor } from './executors/query/executor.js';
12
+ export { default as cacheClearExecutor } from './executors/cache-clear/executor.js';
13
+ export { default as entityCreateExecutor } from './executors/entity-create/executor.js';
14
+ export { default as subscriberCreateExecutor } from './executors/subscriber-create/executor.js';
15
+ export { default as versionExecutor } from './executors/version/executor.js';
16
+ export { default as initExecutor } from './executors/init/executor.js';
17
+ export { default as initGenerator } from './generators/init/generator.js';
6
18
  export { default as bootstrapGenerator } from './generators/bootstrap/generator.js';
19
+ export { default as migrationCreateGenerator } from './generators/migration-create/generator.js';
20
+ export { default as migrationGenerator } from './generators/migration-create/generator.js';
21
+ export { default as entityCreateGenerator } from './generators/entity-create/generator.js';
22
+ export { default as entityGenerator } from './generators/entity-create/generator.js';
23
+ export { default as subscriberCreateGenerator } from './generators/subscriber-create/generator.js';
24
+ export { default as subscriberGenerator } from './generators/subscriber-create/generator.js';
25
+ export { default } from './plugin/index.js';
7
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -3,4 +3,23 @@ export { default as runExecutor } from './executors/run/executor.js';
3
3
  export { default as revertExecutor } from './executors/revert/executor.js';
4
4
  export { default as ensureSchemaExecutor } from './executors/ensure-schema/executor.js';
5
5
  export { default as seedExecutor } from './executors/seed/executor.js';
6
+ export { default as migrationCreateExecutor } from './executors/migration-create/executor.js';
7
+ export { default as migrationShowExecutor } from './executors/migration-show/executor.js';
8
+ export { default as schemaSyncExecutor } from './executors/schema-sync/executor.js';
9
+ export { default as schemaLogExecutor } from './executors/schema-log/executor.js';
10
+ export { default as schemaDropExecutor } from './executors/schema-drop/executor.js';
11
+ export { default as queryExecutor } from './executors/query/executor.js';
12
+ export { default as cacheClearExecutor } from './executors/cache-clear/executor.js';
13
+ export { default as entityCreateExecutor } from './executors/entity-create/executor.js';
14
+ export { default as subscriberCreateExecutor } from './executors/subscriber-create/executor.js';
15
+ export { default as versionExecutor } from './executors/version/executor.js';
16
+ export { default as initExecutor } from './executors/init/executor.js';
17
+ export { default as initGenerator } from './generators/init/generator.js';
6
18
  export { default as bootstrapGenerator } from './generators/bootstrap/generator.js';
19
+ export { default as migrationCreateGenerator } from './generators/migration-create/generator.js';
20
+ export { default as migrationGenerator } from './generators/migration-create/generator.js';
21
+ export { default as entityCreateGenerator } from './generators/entity-create/generator.js';
22
+ export { default as entityGenerator } from './generators/entity-create/generator.js';
23
+ export { default as subscriberCreateGenerator } from './generators/subscriber-create/generator.js';
24
+ export { default as subscriberGenerator } from './generators/subscriber-create/generator.js';
25
+ export { default } from './plugin/index.js';
package/dist/index.json CHANGED
@@ -19,12 +19,84 @@
19
19
  "seed": {
20
20
  "implementation": "./executors/seed/executor",
21
21
  "schema": "./executors/seed/schema.json"
22
+ },
23
+ "migration-create": {
24
+ "implementation": "./executors/migration-create/executor",
25
+ "schema": "./executors/migration-create/schema.json"
26
+ },
27
+ "migration-show": {
28
+ "implementation": "./executors/migration-show/executor",
29
+ "schema": "./executors/migration-show/schema.json"
30
+ },
31
+ "schema-sync": {
32
+ "implementation": "./executors/schema-sync/executor",
33
+ "schema": "./executors/schema-sync/schema.json"
34
+ },
35
+ "schema-log": {
36
+ "implementation": "./executors/schema-log/executor",
37
+ "schema": "./executors/schema-log/schema.json"
38
+ },
39
+ "schema-drop": {
40
+ "implementation": "./executors/schema-drop/executor",
41
+ "schema": "./executors/schema-drop/schema.json"
42
+ },
43
+ "query": {
44
+ "implementation": "./executors/query/executor",
45
+ "schema": "./executors/query/schema.json"
46
+ },
47
+ "cache-clear": {
48
+ "implementation": "./executors/cache-clear/executor",
49
+ "schema": "./executors/cache-clear/schema.json"
50
+ },
51
+ "entity-create": {
52
+ "implementation": "./executors/entity-create/executor",
53
+ "schema": "./executors/entity-create/schema.json"
54
+ },
55
+ "subscriber-create": {
56
+ "implementation": "./executors/subscriber-create/executor",
57
+ "schema": "./executors/subscriber-create/schema.json"
58
+ },
59
+ "version": {
60
+ "implementation": "./executors/version/executor",
61
+ "schema": "./executors/version/schema.json"
62
+ },
63
+ "init": {
64
+ "implementation": "./executors/init/executor",
65
+ "schema": "./executors/init/schema.json"
22
66
  }
23
67
  },
24
68
  "generators": {
69
+ "init": {
70
+ "implementation": "./generators/init/generator",
71
+ "schema": "./generators/init/schema.json"
72
+ },
25
73
  "bootstrap": {
26
74
  "implementation": "./generators/bootstrap/generator",
27
75
  "schema": "./generators/bootstrap/schema.json"
76
+ },
77
+ "migration-create": {
78
+ "implementation": "./generators/migration-create/generator",
79
+ "schema": "./generators/migration-create/schema.json"
80
+ },
81
+ "migration": {
82
+ "implementation": "./generators/migration-create/generator",
83
+ "schema": "./generators/migration-create/schema.json"
84
+ },
85
+ "entity-create": {
86
+ "implementation": "./generators/entity-create/generator",
87
+ "schema": "./generators/entity-create/schema.json"
88
+ },
89
+ "entity": {
90
+ "implementation": "./generators/entity-create/generator",
91
+ "schema": "./generators/entity-create/schema.json"
92
+ },
93
+ "subscriber-create": {
94
+ "implementation": "./generators/subscriber-create/generator",
95
+ "schema": "./generators/subscriber-create/schema.json"
96
+ },
97
+ "subscriber": {
98
+ "implementation": "./generators/subscriber-create/generator",
99
+ "schema": "./generators/subscriber-create/schema.json"
28
100
  }
29
101
  }
30
102
  }
@@ -0,0 +1,9 @@
1
+ import type { CreateNodesV2 } from '@nx/devkit';
2
+ export declare const createNodesV2: CreateNodesV2;
3
+ export declare const name = "@anarchitects/nx-typeorm/inference";
4
+ declare const _default: {
5
+ name: string;
6
+ createNodesV2: CreateNodesV2;
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,aAAa,EAEd,MAAM,YAAY,CAAC;AAwTpB,eAAO,MAAM,aAAa,EAAE,aAgB3B,CAAC;AAEF,eAAO,MAAM,IAAI,uCAAuC,CAAC;;;;;AAEzD,wBAGE"}