Skip to content

Commit

Permalink
fix: make sure tools package has a package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Aug 10, 2023
1 parent 8f581b8 commit 165bf1b
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 10 deletions.
19 changes: 19 additions & 0 deletions libs/tools/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@pubkey-stack/tools",
"version": "0.0.1",
"dependencies": {
"@mrleebo/prisma-ast": "^0.7.0",
"@nx/devkit": "16.6.0",
"@nx/nest": "16.6.0",
"@nx/react": "16.6.0",
"@nx/linter": "16.6.0",
"dotenv": "^10.0.0",
"pg": "^8.11.2",
"tslib": "^2.3.0",
"ts-morph": "^19.0.0"
},
"type": "commonjs",
"main": "./src/index.js",
"typings": "./src/index.d.ts",
"generators": "./generators.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export * from './lib/dto/admin-update-test.input';

exports[`api-feature generator should generate the feature libraries 2`] = `
"import { Injectable } from '@nestjs/common';
import { ApiCoreService } from '@pubkey-stack/api/core/data-access';
import { ApiCoreService } from '@<%= npmScope %>/api/core/data-access';
import { AdminCreateTestInput } from './dto/admin-create-test.input';
import { AdminFindManyTestInput } from './dto/admin-find-many-test.input';
import { AdminUpdateTestInput } from './dto/admin-update-test.input';
Expand Down Expand Up @@ -80,7 +80,7 @@ export class ApiTestDataAccessModule {}
exports[`api-feature generator should generate the feature libraries 4`] = `
"import { Injectable } from '@nestjs/common';
import { ApiCoreService } from '@pubkey-stack/api/core/data-access';
import { ApiCoreService } from '@<%= npmScope %>/api/core/data-access';
import { ApiTestAdminService } from './api-test-admin.service';
@Injectable()
Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/api/api-update-core-feature-module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { addNamedImport } from '../utils/add-named-import'
import { updateSourceFile } from '../utils/update-source-file'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'
import { ApiCoreService } from '@pubkey-stack/api/core/data-access'
import { ApiCoreService } from '@<%= npmScope %>/api/core/data-access'
import { <%= admin.className %>Create<%= model.className %>Input } from './dto/<%= admin.fileName %>-create-<%= model.fileName %>.input'
import { <%= admin.className %>FindMany<%= model.className %>Input } from './dto/<%= admin.fileName %>-find-many-<%= model.fileName %>.input'
import { <%= admin.className %>Update<%= model.className %>Input } from './dto/<%= admin.fileName %>-update-<%= model.fileName %>.input'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'
import { ApiCoreService } from '@pubkey-stack/api/core/data-access'
import { ApiCoreService } from '@<%= npmScope %>/api/core/data-access'
import { Api<%= model.className %><%= admin.className %>Service } from './api-<%= model.fileName %>-<%= admin.fileName %>.service'

@Injectable()
Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/api/generate-api-feature.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { NormalizedApiFeatureSchema } from '../../generators/api-feature/api-feature-schema'
import { generateApiLib } from './generate-api-lib'
import { generateSdkFile } from './generate-sdk-file'
Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/utils/add-export.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { updateSourceFile } from './update-source-file'

export function addExport(tree: Tree, path: string, exportPath: string) {
Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/utils/get-source-file.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { Project, SourceFile } from 'ts-morph'

export function getSourceFile(tree: Tree, path: string): SourceFile {
Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/utils/update-source-file.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { SourceFile } from 'ts-morph'
import { getSourceFile } from './get-source-file'

Expand Down
2 changes: 1 addition & 1 deletion libs/tools/src/lib/web/generate-web-feature.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tree } from '@nrwl/devkit'
import { Tree } from '@nx/devkit'
import { NormalizedWebFeatureSchema } from '../../generators/web-feature/web-feature-schema'
import { generateWebLib } from './generate-web-lib'

Expand Down

0 comments on commit 165bf1b

Please sign in to comment.