Skip to content

Commit

Permalink
fix: update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ozum committed Feb 11, 2021
1 parent 70c6974 commit 0eb1d7f
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 152 deletions.
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Example .env config file. If available "pg-structure" uses the ".env" file to read the environment varaibles.
# For full list of options see https://node-postgres.com/api/client
# All variables start with the default prefix "DB". It can be changed using "options.envPrefix":
# const db = await pgStructure({ envPrefix: "DB" });

DB_DATABASE=database
DB_HOST=localhost
DB_USER=user
DB_PASSWORD=password
19 changes: 9 additions & 10 deletions .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"author.url": "",
"bugs": "https://github.com/ozum/pg-structure/issues",
"engines.node": ">= 12.0.0",
"files": ["dist", "!dist/**/@(*.spec|*.test)*", "!dist/**/__test__", "module-files", "@types"],
"files": ["dist", "!dist/**/@(*.spec|*.test)*", "!dist/**/__test__", "module-files"],
"homepage": "https://github.com/ozum/pg-structure",
"main": "dist/index.js",
"repository": "ozum/pg-structure",
"scripts.build": "tsc --incremental",
"scripts.build": "tsc",
"scripts.docs:build": "npm run tsmod vuepress-api && NODE_ENV=production vuepress build docs",
"scripts.docs:dev": "npm run tsmod vuepress-api && vuepress dev docs",
"scripts.execute": "ts-node --transpile-only --compiler-options '{ \"module\": \"commonjs\" }'",
Expand All @@ -44,14 +44,13 @@
"types": "dist/index.d.ts"
},
"normal": {
"dependencies.tslib": "^2.1.0",
"devDependencies.@commitlint/cli": "^11.0.0",
"devDependencies.@commitlint/config-conventional": "^11.0.0",
"devDependencies.@ozum/pinst": "^2.1.4",
"devDependencies.@types/jest": "^26.0.20",
"devDependencies.@types/node": "^14.14.25",
"devDependencies.@typescript-eslint/eslint-plugin": "^4.14.2",
"devDependencies.@typescript-eslint/parser": "^4.14.2",
"devDependencies.@typescript-eslint/eslint-plugin": "^4.15.0",
"devDependencies.@typescript-eslint/parser": "^4.15.0",
"devDependencies.@vuepress/plugin-active-header-links": "^1.8.0",
"devDependencies.@vuepress/plugin-google-analytics": "^1.8.0",
"devDependencies.@vuepress/plugin-pwa": "^1.8.0",
Expand All @@ -63,21 +62,21 @@
"devDependencies.eslint-plugin-import": "^2.22.0",
"devDependencies.eslint-plugin-jest": "^24.1.3",
"devDependencies.eslint-plugin-prettier": "^3.3.1",
"devDependencies.husky": "^5.0.8",
"devDependencies.husky": "^5.0.9",
"devDependencies.is-ci": "^2.0.0",
"devDependencies.jest": "^26.6.3",
"devDependencies.lint-staged": "^10.5.4",
"devDependencies.not-sync": "^1.4.0",
"devDependencies.not-sync": "^1.4.1",
"devDependencies.npm-run-all": "^4.1.5",
"devDependencies.prettier": "^2.2.1",
"devDependencies.readmeasy": "^0.2.7",
"devDependencies.ts-jest": "^26.5.0",
"devDependencies.ts-jest": "^26.5.1",
"devDependencies.ts-node-dev": "^1.1.1",
"devDependencies.typedoc": "^0.20.23",
"devDependencies.typedoc": "^0.20.24",
"devDependencies.typedoc-neo-theme": "^1.1.0",
"devDependencies.typedoc-plugin-example-tag": "^1.0.2",
"devDependencies.typedoc-plugin-markdown": "^3.4.5",
"devDependencies.typescript": "^4.1.3",
"devDependencies.typescript": "^4.1.5",
"devDependencies.vuepress": "^1.8.0",
"devDependencies.vuepress-bar": "^0.3.5",
"devDependencies.walkdir": "^0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please see [pg-structure.com](https://www.pg-structure.com) for details.
import pgStructure from "pg-structure";

async function demo() {
// pg-structure may read client config from process.env. Use environment variables for sensitive information such as passwords.
// Prefer to use environment variables or ".env" file for the credentials. See the ".env.example" file.
const db = await pgStructure({ database: "db", user: "u", password: "pass" }, { includeSchemas: ["public"] });

const table = db.get("contact");
Expand Down
2 changes: 1 addition & 1 deletion README.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please see [pg-structure.com](https://www.pg-structure.com) for details.
import pgStructure from "pg-structure";

async function demo() {
// pg-structure may read client config from process.env. Use environment variables for sensitive information such as passwords.
// Prefer to use environment variables or ".env" file for the credentials. See the ".env.example" file.
const db = await pgStructure({ database: "db", user: "u", password: "pass" }, { includeSchemas: ["public"] });

const table = db.get("contact");
Expand Down
117 changes: 66 additions & 51 deletions module-files/configs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,72 @@
{
"compilerOptions": {
// Basic Options schema
"target": "ES2018", // Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'.
"module": "commonjs", // Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.
"lib": ["dom", "esnext"], // Specify library files to be included in the compilation. schema
// "allowJs": true, // Allow javascript files to be compiled. schema
// "checkJs": true, // Report errors in .js files. schema
// "jsx": "preserve", // Specify JSX code generation: 'preserve', 'react-native', or 'react'. schema
// Visit https://aka.ms/tsconfig.json to read more about this file

"declaration": true, // Generates corresponding '.d.ts' file. schema
"declarationMap": true, // Generates a sourcemap for each corresponding '.d.ts' file. schema
"sourceMap": true, // Generates corresponding '.map' file. schema
// "outFile": "./", // Concatenate and emit output to single file. schema
"outDir": "../../dist", // Redirect output structure to the directory. schema
// "rootDir": "./", // Specify the root directory of input files. Use to control the output directory structure with --outDir. schema
// "composite": true, // Enable project compilation schema
// "incremental": true, // Enable incremental compilation schema
// "tsBuildInfoFile": "./", // Specify file to store incremental compilation information schema
// "removeComments": true, // Do not emit comments to output. schema
// "noEmit": true, // Do not emit outputs. schema
"importHelpers": true, // Import emit helpers from 'tslib'. schema
// "downlevelIteration": true, // Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. schema
// "isolatedModules": true, // Transpile each file as a separate module (similar to 'ts.transpileModule'). schema
// Strict Type-Checking Options schema
// Basic Options
"incremental": true, // Enable incremental compilation
"target": "ES2020", // Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.
"module": "commonjs", // Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.
// "lib": ["dom", "esnext"], // Specify library files to be included in the compilation.
// "allowJs": true, // Allow javascript files to be compiled.
// "checkJs": true, // Report errors in .js files.
// "jsx": "preserve", // Specify JSX code generation: 'preserve', 'react-native', or 'react'.
"declaration": true, // Generates corresponding '.d.ts' file.
"declarationMap": true, // Generates a sourcemap for each corresponding '.d.ts' file.

"sourceMap": true, // Generates corresponding '.map' file.
// "outFile": "./", // Concatenate and emit output to single file.
"outDir": "../../dist", // Redirect output structure to the directory.
// "rootDir": "./", // Specify the root directory of input files. Use to control the output directory structure with --outDir.
// "composite": true, // Enable project compilation
// "tsBuildInfoFile": "./", // Specify file to store incremental compilation information
// "removeComments": true, // Do not emit comments to output.
// "noEmit": true, // Do not emit outputs.
// "importHelpers": true, // Import emit helpers from 'tslib'.
// "downlevelIteration": true, // Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.
// "isolatedModules": true, // Transpile each file as a separate module (similar to 'ts.transpileModule').

// Strict Type-Checking Options
"strict": true, // Enable all strict type-checking options.
// "noImplicitAny": true, // Raise error on expressions and declarations with an implied 'any' type. schema
// "strictNullChecks": true, // Enable strict null checks. schema
// "strictFunctionTypes": true, // Enable strict checking of function types. schema
// "strictBindCallApply": true, // Enable strict 'bind', 'call', and 'apply' methods on functions. schema
// "strictPropertyInitialization": true, // Enable strict checking of property initialization in classes. schema
// "noImplicitThis": true, // Raise error on 'this' expressions with an implied 'any' type. schema
// "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file. schema
// Additional Checks schema
// "noUnusedLocals": true, // Report errors on unused locals. schema
// "noUnusedParameters": true, // Report errors on unused parameters. schema
// "noImplicitReturns": true, // Report error when not all code paths in function return a value. schema
// "noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement. schema
// Module Resolution Options schema
"moduleResolution": "node", // Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). schema
// "baseUrl": "./", // Base directory to resolve non-absolute module names. schema
// "paths": {}, // A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. schema
// "rootDirs": [], // List of root folders whose combined content represents the structure of the project at runtime. schema
"typeRoots": ["../../@types", "../../node_modules/@types"], // List of folders to include type definitions from. schema
// "types": [], // Type declaration files to be included in compilation. schema
// "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking. schema
// "noImplicitAny": true, // Raise error on expressions and declarations with an implied 'any' type.
// "strictNullChecks": true, // Enable strict null checks.
// "strictFunctionTypes": true, // Enable strict checking of function types.
// "strictBindCallApply": true, // Enable strict 'bind', 'call', and 'apply' methods on functions.
// "strictPropertyInitialization": true, // Enable strict checking of property initialization in classes.
// "noImplicitThis": true, // Raise error on 'this' expressions with an implied 'any' type.
// "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file.

// Additional Checks
// "noUnusedLocals": true, // Report errors on unused locals.
// "noUnusedParameters": true, // Report errors on unused parameters.
// "noImplicitReturns": true, // Report error when not all code paths in function return a value.
// "noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement.
// "noUncheckedIndexedAccess": true, // Include 'undefined' in index signature results

// Module Resolution Options
// "moduleResolution": "node", // Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).
// "baseUrl": "./", // Base directory to resolve non-absolute module names.
// "paths": {}, // A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.
// "rootDirs": [], // List of root folders whose combined content represents the structure of the project at runtime.
// "typeRoots": [], // List of folders to include type definitions from.
// "types": [], // Type declaration files to be included in compilation.
// "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
"esModuleInterop": true, // Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
// "preserveSymlinks": true, // Do not resolve the real path of symlinks. schema
// Source Map Options schema
// "sourceRoot": "", // Specify the location where debugger should locate TypeScript files instead of source locations. schema
// "mapRoot": "", // Specify the location where debugger should locate map files instead of generated locations. schema
// "inlineSourceMap": true, // Emit a single file with source maps instead of having a separate file. schema
// "inlineSources": true, // Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. schema
// Experimental Options schema
// "preserveSymlinks": true, // Do not resolve the real path of symlinks.
// "allowUmdGlobalAccess": true, // Allow accessing UMD globals from modules.

// Source Map Options
// "sourceRoot": "", // Specify the location where debugger should locate TypeScript files instead of source locations.
// "mapRoot": "", // Specify the location where debugger should locate map files instead of generated locations.
// "inlineSourceMap": true, // Emit a single file with source maps instead of having a separate file.
// "inlineSources": true, // Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.

// Experimental Options
"experimentalDecorators": true, // Enables experimental support for ES7 decorators.
"emitDecoratorMetadata": true // Enables experimental support for emitting type metadata for decorators. schema
"emitDecoratorMetadata": true, // Enables experimental support for emitting type metadata for decorators.

// Advanced Options
"skipLibCheck": true, // Skip type checking of declaration files.
"forceConsistentCasingInFileNames": true // Disallow inconsistently-cased references to the same file.
},
"include": ["../../src/**/*"],
"exclude": [
Expand All @@ -62,7 +75,9 @@
"../../**/*.test.ts",
"../../**/*.spec.ts",
"../../**/*.e2e.ts",
"../../**/*/test-helper"
"../../**/*/test-helper",

"../../dist"
],
"typedocOptions": {
"exclude": ["../../**/*+(.test|.spec|.e2e).ts", "/*/test-helper/**/*"]
Expand Down
Loading

0 comments on commit 0eb1d7f

Please sign in to comment.