Skip to content

Commit

Permalink
Update RecordService import (#87)
Browse files Browse the repository at this point in the history
* Update RecordService import

* bump: pkg

* revert: dep

* chore: update snapshots
  • Loading branch information
seofernando25 authored Oct 30, 2023
1 parent e6f4246 commit b50cdb8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var EXPORT_COMMENT = `/**
* This file was @generated using pocketbase-typegen
*/`;
var IMPORTS = `import type PocketBase from 'pocketbase'
import { type RecordService } from 'pocketbase'`;
import type { RecordService } from 'pocketbase'`;
var RECORD_TYPE_COMMENT = `// Record types for each collection`;
var RESPONSE_TYPE_COMMENT = `// Response types include system fields and match responses from the PocketBase API`;
var ALL_RECORD_RESPONSE_COMMENT = `// Types containing all Records and Responses, useful for creating typing helper functions`;
Expand Down Expand Up @@ -319,7 +319,7 @@ async function main(options2) {
import { program } from "commander";

// package.json
var version = "1.2.0";
var version = "1.2.1";

// src/index.ts
program.name("Pocketbase Typegen").version(version).description(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pocketbase-typegen",
"version": "1.2.0",
"version": "1.2.1",
"description": "Generate pocketbase record types from your database",
"main": "dist/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const EXPORT_COMMENT = `/**
* This file was @generated using pocketbase-typegen
*/`
export const IMPORTS = `import type PocketBase from 'pocketbase'
import { type RecordService } from 'pocketbase'`
import type { RecordService } from 'pocketbase'`
export const RECORD_TYPE_COMMENT = `// Record types for each collection`
export const RESPONSE_TYPE_COMMENT = `// Response types include system fields and match responses from the PocketBase API`
export const ALL_RECORD_RESPONSE_COMMENT = `// Types containing all Records and Responses, useful for creating typing helper functions`
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/fromJSON.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`creates a type file from json schema 1`] = `
*/
import type PocketBase from 'pocketbase'
import { type RecordService } from 'pocketbase'
import type { RecordService } from 'pocketbase'
export enum Collections {
Base = "base",
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/lib.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`generate generates correct output given db input 1`] = `
*/
import type PocketBase from 'pocketbase'
import { type RecordService } from 'pocketbase'
import type { RecordService } from 'pocketbase'
export enum Collections {
Books = "books",
Expand Down
2 changes: 1 addition & 1 deletion test/pocketbase-types-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import type PocketBase from 'pocketbase'
import { type RecordService } from 'pocketbase'
import type { RecordService } from 'pocketbase'

export enum Collections {
Base = "base",
Expand Down

0 comments on commit b50cdb8

Please sign in to comment.