Skip to content

Commit 0f8d46e

Browse files
jtomaszewskiclaude
andcommitted
fix: commit dist/ for github: protocol installs
pnpm's github: protocol downloads a tarball and doesn't run lifecycle scripts, so dist/ must be committed for consumers that install via github:fullstackhouse/nestjs-common. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d98fd69 commit 0f8d46e

27 files changed

Lines changed: 1192 additions & 1 deletion

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
2-
dist/
32
*.tsbuildinfo
43
.DS_Store

dist/cls/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { ClsModuleOptions } from 'nestjs-cls';
2+
3+
declare function createClsConfig(): ClsModuleOptions;
4+
5+
export { createClsConfig };

dist/cls/index.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"use strict";
2+
var __defProp = Object.defineProperty;
3+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4+
var __getOwnPropNames = Object.getOwnPropertyNames;
5+
var __hasOwnProp = Object.prototype.hasOwnProperty;
6+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7+
var __export = (target, all) => {
8+
for (var name in all)
9+
__defProp(target, name, { get: all[name], enumerable: true });
10+
};
11+
var __copyProps = (to, from, except, desc) => {
12+
if (from && typeof from === "object" || typeof from === "function") {
13+
for (let key of __getOwnPropNames(from))
14+
if (!__hasOwnProp.call(to, key) && key !== except)
15+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16+
}
17+
return to;
18+
};
19+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20+
21+
// src/cls/index.ts
22+
var cls_exports = {};
23+
__export(cls_exports, {
24+
createClsConfig: () => createClsConfig
25+
});
26+
module.exports = __toCommonJS(cls_exports);
27+
function createClsConfig() {
28+
return {};
29+
}
30+
__name(createClsConfig, "createClsConfig");
31+
// Annotate the CommonJS export names for ESM import in node:
32+
0 && (module.exports = {
33+
createClsConfig
34+
});

dist/config/eslint.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ConfigArray } from 'typescript-eslint';
2+
3+
interface CreateEslintConfigOptions {
4+
tsconfigPath?: string;
5+
rootDir: string;
6+
}
7+
declare function createEslintConfig(opts: CreateEslintConfigOptions): ConfigArray;
8+
9+
export { type CreateEslintConfigOptions, createEslintConfig };

dist/config/eslint.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
"use strict";
2+
var __create = Object.create;
3+
var __defProp = Object.defineProperty;
4+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5+
var __getOwnPropNames = Object.getOwnPropertyNames;
6+
var __getProtoOf = Object.getPrototypeOf;
7+
var __hasOwnProp = Object.prototype.hasOwnProperty;
8+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9+
var __export = (target, all) => {
10+
for (var name in all)
11+
__defProp(target, name, { get: all[name], enumerable: true });
12+
};
13+
var __copyProps = (to, from, except, desc) => {
14+
if (from && typeof from === "object" || typeof from === "function") {
15+
for (let key of __getOwnPropNames(from))
16+
if (!__hasOwnProp.call(to, key) && key !== except)
17+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18+
}
19+
return to;
20+
};
21+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22+
// If the importer is in node compatibility mode or this is not an ESM
23+
// file that has been converted to a CommonJS file using a Babel-
24+
// compatible transform (i.e. "__esModule" has not been set), then set
25+
// "default" to the CommonJS "module.exports" for node compatibility.
26+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27+
mod
28+
));
29+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30+
31+
// src/config/eslint.ts
32+
var eslint_exports = {};
33+
__export(eslint_exports, {
34+
createEslintConfig: () => createEslintConfig
35+
});
36+
module.exports = __toCommonJS(eslint_exports);
37+
var import_eslintrc = require("@eslint/eslintrc");
38+
var import_js = __toESM(require("@eslint/js"));
39+
var import_globals = __toESM(require("globals"));
40+
var import_typescript_eslint = __toESM(require("typescript-eslint"));
41+
function createEslintConfig(opts) {
42+
const compat = new import_eslintrc.FlatCompat({
43+
baseDirectory: opts.rootDir,
44+
recommendedConfig: import_js.default.configs.recommended,
45+
allConfig: import_js.default.configs.all
46+
});
47+
return import_typescript_eslint.default.config({
48+
ignores: [
49+
"dist/**",
50+
"node_modules/**",
51+
"src/metadata.d.ts"
52+
]
53+
}, ...import_typescript_eslint.default.configs.recommended, ...import_typescript_eslint.default.configs.recommendedTypeChecked, ...import_typescript_eslint.default.configs.stylisticTypeChecked, ...compat.extends("plugin:prettier/recommended"), {
54+
languageOptions: {
55+
globals: {
56+
...import_globals.default.node,
57+
...import_globals.default.jest
58+
},
59+
parserOptions: {
60+
project: opts.tsconfigPath ?? "./tsconfig.lint.json",
61+
tsconfigRootDir: opts.rootDir
62+
}
63+
},
64+
rules: {
65+
curly: [
66+
"error",
67+
"all"
68+
],
69+
"@typescript-eslint/array-type": [
70+
"error",
71+
{
72+
default: "array-simple"
73+
}
74+
],
75+
"@typescript-eslint/return-await": [
76+
"error",
77+
"always"
78+
],
79+
"no-restricted-imports": [
80+
"error",
81+
{
82+
patterns: [
83+
{
84+
group: [
85+
"src/**/*"
86+
],
87+
message: 'Absolute imports from "src/" are not allowed. Use relative imports instead.'
88+
}
89+
]
90+
}
91+
]
92+
}
93+
}, {
94+
files: [
95+
"src/database/migrations/**/*.ts"
96+
],
97+
rules: {
98+
"@typescript-eslint/require-await": "off"
99+
}
100+
}, {
101+
files: [
102+
"**/*.controller.ts",
103+
"**/dto/*.dto.ts"
104+
],
105+
rules: {
106+
"@typescript-eslint/no-unsafe-call": "off"
107+
}
108+
}, {
109+
files: [
110+
"**/*.test.ts",
111+
"**/*.spec.ts",
112+
"test/**/*.ts"
113+
],
114+
rules: {
115+
"@typescript-eslint/no-unsafe-assignment": "off",
116+
"@typescript-eslint/no-unsafe-member-access": "off",
117+
"@typescript-eslint/no-unsafe-call": "off",
118+
"@typescript-eslint/no-unsafe-argument": "off"
119+
}
120+
});
121+
}
122+
__name(createEslintConfig, "createEslintConfig");
123+
// Annotate the CommonJS export names for ESM import in node:
124+
0 && (module.exports = {
125+
createEslintConfig
126+
});

dist/config/vitest.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as vite from 'vite';
2+
3+
declare function createVitestConfig(overrides?: {
4+
test?: Record<string, unknown>;
5+
plugins?: unknown[];
6+
}): vite.UserConfig;
7+
8+
export { createVitestConfig };

dist/config/vitest.js

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
"use strict";
2+
var __create = Object.create;
3+
var __defProp = Object.defineProperty;
4+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5+
var __getOwnPropNames = Object.getOwnPropertyNames;
6+
var __getProtoOf = Object.getPrototypeOf;
7+
var __hasOwnProp = Object.prototype.hasOwnProperty;
8+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9+
var __export = (target, all) => {
10+
for (var name in all)
11+
__defProp(target, name, { get: all[name], enumerable: true });
12+
};
13+
var __copyProps = (to, from, except, desc) => {
14+
if (from && typeof from === "object" || typeof from === "function") {
15+
for (let key of __getOwnPropNames(from))
16+
if (!__hasOwnProp.call(to, key) && key !== except)
17+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18+
}
19+
return to;
20+
};
21+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22+
// If the importer is in node compatibility mode or this is not an ESM
23+
// file that has been converted to a CommonJS file using a Babel-
24+
// compatible transform (i.e. "__esModule" has not been set), then set
25+
// "default" to the CommonJS "module.exports" for node compatibility.
26+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27+
mod
28+
));
29+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30+
31+
// src/config/vitest.ts
32+
var vitest_exports = {};
33+
__export(vitest_exports, {
34+
createVitestConfig: () => createVitestConfig
35+
});
36+
module.exports = __toCommonJS(vitest_exports);
37+
var import_unplugin_swc = __toESM(require("unplugin-swc"));
38+
var import_config = require("vitest/config");
39+
function createVitestConfig(overrides) {
40+
const reporter = process.env.VITEST_REPORTER ?? "default";
41+
return (0, import_config.defineConfig)({
42+
test: {
43+
globals: true,
44+
root: "./",
45+
reporters: process.env.GITHUB_ACTIONS ? [
46+
reporter,
47+
"github-actions"
48+
] : [
49+
reporter
50+
],
51+
passWithNoTests: true,
52+
exclude: [
53+
"node_modules",
54+
"dist"
55+
],
56+
fileParallelism: false,
57+
pool: "threads",
58+
isolate: false,
59+
onConsoleLog(log) {
60+
if (log.includes("SERVER_ERROR") && log.includes("better-auth")) {
61+
return false;
62+
}
63+
},
64+
...overrides?.test
65+
},
66+
plugins: [
67+
import_unplugin_swc.default.vite({
68+
module: {
69+
type: "es6"
70+
}
71+
}),
72+
...overrides?.plugins ?? []
73+
]
74+
});
75+
}
76+
__name(createVitestConfig, "createVitestConfig");
77+
// Annotate the CommonJS export names for ESM import in node:
78+
0 && (module.exports = {
79+
createVitestConfig
80+
});

dist/database/index.d.ts

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import { UnderscoreNamingStrategy } from '@mikro-orm/core';
2+
import { Migrator } from '@mikro-orm/migrations';
3+
4+
interface DatabaseConnectionOptions {
5+
databaseUrl?: string;
6+
host?: string;
7+
port?: number;
8+
user?: string;
9+
password?: string;
10+
dbName?: string;
11+
schema?: string;
12+
}
13+
interface DatabaseConfigOptions extends DatabaseConnectionOptions {
14+
entitiesPath?: string;
15+
entitiesTsPath?: string;
16+
migrationsPath?: string;
17+
migrationsTsPath?: string;
18+
}
19+
declare function createDatabaseConnectionConfig(opts: DatabaseConnectionOptions): {
20+
host: string;
21+
port: number;
22+
user: string;
23+
password: string;
24+
dbName: string;
25+
schema: string;
26+
connect: boolean;
27+
clientUrl?: undefined;
28+
} | {
29+
host: string;
30+
port: number;
31+
user: string;
32+
password: string;
33+
dbName: string;
34+
schema: string;
35+
connect?: undefined;
36+
clientUrl?: undefined;
37+
} | {
38+
clientUrl: string;
39+
schema: string;
40+
host?: undefined;
41+
port?: undefined;
42+
user?: undefined;
43+
password?: undefined;
44+
dbName?: undefined;
45+
connect?: undefined;
46+
};
47+
declare function createDatabaseConfig(opts: DatabaseConfigOptions): {
48+
entities: string[];
49+
entitiesTs: string[];
50+
discovery: {
51+
warnWhenNoEntities: boolean;
52+
};
53+
debug: boolean;
54+
namingStrategy: typeof UnderscoreNamingStrategy;
55+
extensions: (typeof Migrator)[];
56+
migrations: {
57+
path: string;
58+
pathTs: string;
59+
};
60+
allowGlobalContext: boolean;
61+
host: string;
62+
port: number;
63+
user: string;
64+
password: string;
65+
dbName: string;
66+
schema: string;
67+
connect: boolean;
68+
clientUrl?: undefined;
69+
} | {
70+
entities: string[];
71+
entitiesTs: string[];
72+
discovery: {
73+
warnWhenNoEntities: boolean;
74+
};
75+
debug: boolean;
76+
namingStrategy: typeof UnderscoreNamingStrategy;
77+
extensions: (typeof Migrator)[];
78+
migrations: {
79+
path: string;
80+
pathTs: string;
81+
};
82+
allowGlobalContext: boolean;
83+
host: string;
84+
port: number;
85+
user: string;
86+
password: string;
87+
dbName: string;
88+
schema: string;
89+
connect?: undefined;
90+
clientUrl?: undefined;
91+
} | {
92+
entities: string[];
93+
entitiesTs: string[];
94+
discovery: {
95+
warnWhenNoEntities: boolean;
96+
};
97+
debug: boolean;
98+
namingStrategy: typeof UnderscoreNamingStrategy;
99+
extensions: (typeof Migrator)[];
100+
migrations: {
101+
path: string;
102+
pathTs: string;
103+
};
104+
allowGlobalContext: boolean;
105+
clientUrl: string;
106+
schema: string;
107+
host?: undefined;
108+
port?: undefined;
109+
user?: undefined;
110+
password?: undefined;
111+
dbName?: undefined;
112+
connect?: undefined;
113+
};
114+
115+
export { type DatabaseConfigOptions, type DatabaseConnectionOptions, createDatabaseConfig, createDatabaseConnectionConfig };

0 commit comments

Comments
 (0)