fragment-ts 1.1.16 → 1.1.17

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/README.md CHANGED
@@ -24,9 +24,9 @@ Fragment TS is a lightweight, dependency injection-based framework for building
24
24
  ## Installation
25
25
 
26
26
  ```bash
27
- npm install fragment-ts reflect-metadata typeorm mysql2
27
+ npm install fragment-ts reflect-metadata mysql2
28
28
  # or
29
- yarn add fragment-ts reflect-metadata typeorm mysql2
29
+ yarn add fragment-ts reflect-metadata mysql2
30
30
  ```
31
31
 
32
32
  ## Quick Start
package/SETUP.md CHANGED
@@ -12,7 +12,7 @@ Fragment is a TypeScript framework inspired by Spring Boot that provides:
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- npm install fragment-ts reflect-metadata typeorm
15
+ npm install fragment-ts reflect-metadata
16
16
  ```
17
17
 
18
18
  ## Project Setup
package/USAGE.md CHANGED
@@ -453,7 +453,7 @@ export class Application {
453
453
  ```typescript
454
454
  import { Repository, InjectRepository } from 'fragment-ts';
455
455
  import { User } from '../entities/user.entity';
456
- import { Repository as TypeOrmRepository } from 'typeorm';
456
+ import { Repository as TypeOrmRepository } from 'fragment-ts';
457
457
 
458
458
  @Repository()
459
459
  export class UserRepository {
@@ -479,7 +479,7 @@ export class UserRepository {
479
479
  ```typescript
480
480
  import { Repository, InjectRepository } from 'fragment-ts';
481
481
  import { User } from '../entities/user.entity';
482
- import { Repository as TypeOrmRepository } from 'typeorm';
482
+ import { Repository as TypeOrmRepository } from 'fragment-ts';
483
483
 
484
484
  @Repository()
485
485
  export class UserRepository {
@@ -195,7 +195,7 @@ export class ${className} {${repositoryProp}
195
195
  const fileName = this.kebabCase(name) + ".entity.ts";
196
196
  const srcDir = tsconfig_utils_1.TsConfigUtils.getRootDir();
197
197
  const filePath = path.join(srcDir, "entities", fileName);
198
- const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
198
+ const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'fragment-ts';
199
199
 
200
200
  @Entity()
201
201
  export class ${className} {
@@ -235,7 +235,7 @@ export class ${className} {
235
235
  const filePath = path.join(srcDir, "repositories", fileName);
236
236
  const content = `import { Repository, InjectRepository } from 'fragment-ts';
237
237
  import { ${entityName} } from '../entities/${this.kebabCase(name)}.entity';
238
- import { Repository as TypeOrmRepository } from 'typeorm';
238
+ import { Repository as TypeOrmRepository } from 'fragment-ts';
239
239
 
240
240
  @Repository()
241
241
  export class ${className} {
@@ -183,7 +183,7 @@ class InitCommand {
183
183
  "migrate:revert": "fragment migrate:revert",
184
184
  },
185
185
  dependencies: {
186
- "fragment-ts": "^1.1.16",
186
+ "fragment-ts": "^1.1.17",
187
187
  "reflect-metadata": "^0.1.13",
188
188
  sqlite3: "^5.1.7",
189
189
  },
@@ -339,7 +339,7 @@ export class AppService {
339
339
  await fs.writeFile(path.join(projectPath, "src", "services", "app.service.ts"), content);
340
340
  }
341
341
  static async generateExampleEntity(projectPath) {
342
- const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
342
+ const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'fragment-ts';
343
343
 
344
344
  @Entity()
345
345
  export class User {
@@ -224,7 +224,7 @@ class MigrateCommand {
224
224
  const timestamp = Date.now();
225
225
  const fileName = `${timestamp}-${name}.ts`;
226
226
  const filePath = path.join(migrationsDir, fileName);
227
- const content = `import { MigrationInterface, QueryRunner } from 'typeorm';
227
+ const content = `import { MigrationInterface, QueryRunner } from 'fragment-ts';
228
228
 
229
229
  export class ${name}${timestamp} implements MigrationInterface {
230
230
  async up(queryRunner: QueryRunner): Promise<void> {}
@@ -497,7 +497,7 @@ class MigrateCommand {
497
497
  const downBody = downStatements.length > 0
498
498
  ? downStatements.map((s) => ` ${s}`).join("\n")
499
499
  : " // No changes";
500
- return `import { MigrationInterface, QueryRunner } from "typeorm";
500
+ return `import { MigrationInterface, QueryRunner } from "fragment-ts";
501
501
 
502
502
  export class ${className} implements MigrationInterface {
503
503
  public async up(queryRunner: QueryRunner): Promise<void> {
@@ -1,4 +1,4 @@
1
- import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
1
+ import { Entity, PrimaryGeneratedColumn, Column } from 'fragment-ts';
2
2
 
3
3
  @Entity()
4
4
  export class Category {
@@ -1,4 +1,4 @@
1
- import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
1
+ import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'fragment-ts';
2
2
  import { User } from './user.entity';
3
3
  import { Post } from './post.entity';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, OneToMany, JoinColumn } from 'typeorm';
1
+ import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, OneToMany, JoinColumn } from 'fragment-ts';
2
2
  import { User } from './user.entity';
3
3
  import { Comment } from './comment.entity';
4
4
  import { Category } from './category.entity';
@@ -1,4 +1,4 @@
1
- import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
1
+ import { Entity, PrimaryGeneratedColumn, Column } from 'fragment-ts';
2
2
 
3
3
  @Entity()
4
4
  export class User {
@@ -1,4 +1,4 @@
1
- import { MigrationInterface, QueryRunner, Table } from 'typeorm';
1
+ import { MigrationInterface, QueryRunner, Table } from 'fragment-ts';
2
2
 
3
3
  export class InitialSchema1234567890 implements MigrationInterface {
4
4
  async up(queryRunner: QueryRunner): Promise<void> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fragment-ts",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Spring Boot-style framework for TypeScript with Express and TypeORM",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -183,7 +183,7 @@ export class ${className} {${repositoryProp}
183
183
  const srcDir = TsConfigUtils.getRootDir();
184
184
  const filePath = path.join(srcDir, "entities", fileName);
185
185
 
186
- const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
186
+ const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'fragment-ts';
187
187
 
188
188
  @Entity()
189
189
  export class ${className} {
@@ -231,7 +231,7 @@ export class ${className} {
231
231
 
232
232
  const content = `import { Repository, InjectRepository } from 'fragment-ts';
233
233
  import { ${entityName} } from '../entities/${this.kebabCase(name)}.entity';
234
- import { Repository as TypeOrmRepository } from 'typeorm';
234
+ import { Repository as TypeOrmRepository } from 'fragment-ts';
235
235
 
236
236
  @Repository()
237
237
  export class ${className} {
@@ -176,7 +176,7 @@ export class InitCommand {
176
176
  "migrate:revert": "fragment migrate:revert",
177
177
  },
178
178
  dependencies: {
179
- "fragment-ts": "^1.1.16",
179
+ "fragment-ts": "^1.1.17",
180
180
  "reflect-metadata": "^0.1.13",
181
181
  sqlite3: "^5.1.7",
182
182
  },
@@ -369,7 +369,7 @@ export class AppService {
369
369
  private static async generateExampleEntity(
370
370
  projectPath: string,
371
371
  ): Promise<void> {
372
- const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
372
+ const content = `import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'fragment-ts';
373
373
 
374
374
  @Entity()
375
375
  export class User {
@@ -249,7 +249,7 @@ export class MigrateCommand {
249
249
  const fileName = `${timestamp}-${name}.ts`;
250
250
  const filePath = path.join(migrationsDir, fileName);
251
251
 
252
- const content = `import { MigrationInterface, QueryRunner } from 'typeorm';
252
+ const content = `import { MigrationInterface, QueryRunner } from 'fragment-ts';
253
253
 
254
254
  export class ${name}${timestamp} implements MigrationInterface {
255
255
  async up(queryRunner: QueryRunner): Promise<void> {}
@@ -626,7 +626,7 @@ export class MigrateCommand {
626
626
  ? downStatements.map((s) => ` ${s}`).join("\n")
627
627
  : " // No changes";
628
628
 
629
- return `import { MigrationInterface, QueryRunner } from "typeorm";
629
+ return `import { MigrationInterface, QueryRunner } from "fragment-ts";
630
630
 
631
631
  export class ${className} implements MigrationInterface {
632
632
  public async up(queryRunner: QueryRunner): Promise<void> {
@@ -3,7 +3,7 @@
3
3
  // Demonstrates all decorators working together
4
4
  // ============================================
5
5
 
6
- import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
6
+ import { Entity, PrimaryGeneratedColumn, Column } from 'fragment-ts';
7
7
  import {
8
8
  FragmentApplication,
9
9
  Controller,
@@ -19,7 +19,7 @@ import {
19
19
  Value,
20
20
  PostConstruct,
21
21
  } from 'fragment-ts';
22
- import { Repository as TypeORMRepository } from 'typeorm';
22
+ import { Repository as TypeORMRepository } from 'fragment-ts';
23
23
 
24
24
  // ============================================
25
25
  // 1. Entity Definition