@ooneex/cli 1.20.0 → 1.20.1
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/dist/index.js +20 -25
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5572,15 +5572,7 @@ describe("{{NAME}}Module", () => {
|
|
|
5572
5572
|
|
|
5573
5573
|
// src/templates/module/tsconfig.txt
|
|
5574
5574
|
var tsconfig_default = `{
|
|
5575
|
-
"extends": "../../tsconfig.json"
|
|
5576
|
-
"compilerOptions": {
|
|
5577
|
-
"types": ["@types/bun"],
|
|
5578
|
-
"paths": {
|
|
5579
|
-
"@/*": ["./src/*"]
|
|
5580
|
-
}
|
|
5581
|
-
},
|
|
5582
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "tests/**/*.tsx", "bin/**/*.ts"],
|
|
5583
|
-
"exclude": ["node_modules", "dist"]
|
|
5575
|
+
"extends": "../../tsconfig.json"
|
|
5584
5576
|
}
|
|
5585
5577
|
`;
|
|
5586
5578
|
|
|
@@ -5643,7 +5635,7 @@ class MakeModuleCommand {
|
|
|
5643
5635
|
const existing = match[2]?.trim() ?? "";
|
|
5644
5636
|
const newScope = `"${kebabName}"`;
|
|
5645
5637
|
if (!existing.includes(newScope)) {
|
|
5646
|
-
const newValue = existing ? `${existing}
|
|
5638
|
+
const newValue = existing ? `${existing},
|
|
5647
5639
|
${newScope},` : `
|
|
5648
5640
|
${newScope},`;
|
|
5649
5641
|
content = content.replace(regex, `$1${newValue}
|
|
@@ -5657,7 +5649,7 @@ class MakeModuleCommand {
|
|
|
5657
5649
|
const tsconfig = JSON.parse(content);
|
|
5658
5650
|
tsconfig.compilerOptions ??= {};
|
|
5659
5651
|
tsconfig.compilerOptions.paths ??= {};
|
|
5660
|
-
tsconfig.compilerOptions.paths[`@module/${kebabName}/*`] = [
|
|
5652
|
+
tsconfig.compilerOptions.paths[`@module/${kebabName}/*`] = [`./modules/${kebabName}/src/*`];
|
|
5661
5653
|
await Bun.write(tsconfigPath, `${JSON.stringify(tsconfig, null, 2)}
|
|
5662
5654
|
`);
|
|
5663
5655
|
}
|
|
@@ -5690,10 +5682,10 @@ class MakeModuleCommand {
|
|
|
5690
5682
|
if (await Bun.file(appModulePath).exists()) {
|
|
5691
5683
|
await this.addToAppModule(appModulePath, pascalName, kebabName);
|
|
5692
5684
|
}
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5685
|
+
}
|
|
5686
|
+
const appTsconfigPath = join5(cwd, "tsconfig.json");
|
|
5687
|
+
if (await Bun.file(appTsconfigPath).exists()) {
|
|
5688
|
+
await this.addPathAlias(appTsconfigPath, kebabName);
|
|
5697
5689
|
}
|
|
5698
5690
|
if (kebabName !== "app" && kebabName !== "shared") {
|
|
5699
5691
|
const sharedModuleDir = join5(cwd, "modules", "shared");
|
|
@@ -5701,12 +5693,6 @@ class MakeModuleCommand {
|
|
|
5701
5693
|
if (await Bun.file(sharedModuleFilePath).exists()) {
|
|
5702
5694
|
await this.addToSharedModule(sharedModuleFilePath, pascalName, kebabName);
|
|
5703
5695
|
}
|
|
5704
|
-
const sharedTsconfigPath = join5(sharedModuleDir, "tsconfig.json");
|
|
5705
|
-
if (await Bun.file(sharedTsconfigPath).exists()) {
|
|
5706
|
-
await this.addPathAlias(sharedTsconfigPath, kebabName);
|
|
5707
|
-
const moduleTsconfigPath = join5(moduleDir, "tsconfig.json");
|
|
5708
|
-
await this.addPathAlias(moduleTsconfigPath, "shared");
|
|
5709
|
-
}
|
|
5710
5696
|
}
|
|
5711
5697
|
const commitlintPath = join5(cwd, ".commitlintrc.ts");
|
|
5712
5698
|
if (await Bun.file(commitlintPath).exists()) {
|
|
@@ -5928,6 +5914,7 @@ const Configuration: UserConfig = {
|
|
|
5928
5914
|
"always",
|
|
5929
5915
|
[
|
|
5930
5916
|
"common",
|
|
5917
|
+
"shared",
|
|
5931
5918
|
"app",
|
|
5932
5919
|
],
|
|
5933
5920
|
],
|
|
@@ -6211,7 +6198,7 @@ var app_database_default = `import { inject } from "@ooneex/container";
|
|
|
6211
6198
|
import { AppEnv } from "@ooneex/app-env";
|
|
6212
6199
|
import { DataSource } from "typeorm";
|
|
6213
6200
|
import { TypeormDatabase, DatabaseException, decorator } from "@ooneex/database";
|
|
6214
|
-
import { SharedModule } from "
|
|
6201
|
+
import { SharedModule } from "@module/shared/SharedModule";
|
|
6215
6202
|
|
|
6216
6203
|
@decorator.database()
|
|
6217
6204
|
export class SharedDatabase extends TypeormDatabase {
|
|
@@ -6341,6 +6328,8 @@ ARG DATABASE_URL
|
|
|
6341
6328
|
|
|
6342
6329
|
# Promote build arg to runtime environment variable
|
|
6343
6330
|
ENV DATABASE_URL=\${DATABASE_URL}
|
|
6331
|
+
# Disable HUSKY
|
|
6332
|
+
ENV HUSKY=0
|
|
6344
6333
|
|
|
6345
6334
|
# install dependencies into temp directory
|
|
6346
6335
|
# this will cache them and speed up future builds
|
|
@@ -6352,7 +6341,7 @@ RUN cd /temp/dev && bun install --frozen-lockfile
|
|
|
6352
6341
|
# install with --production (exclude devDependencies)
|
|
6353
6342
|
RUN mkdir -p /temp/prod
|
|
6354
6343
|
COPY package.json bun.lock /temp/prod/
|
|
6355
|
-
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
|
6344
|
+
RUN cd /temp/prod && bun install --frozen-lockfile --production --ignore-scripts
|
|
6356
6345
|
|
|
6357
6346
|
# copy node_modules from temp directory
|
|
6358
6347
|
# then copy all (non-ignored) project files into the image
|
|
@@ -6888,8 +6877,14 @@ var tsconfig_json_default = `{
|
|
|
6888
6877
|
"emitDecoratorMetadata": true,
|
|
6889
6878
|
"experimentalDecorators": true,
|
|
6890
6879
|
"strictNullChecks": true,
|
|
6891
|
-
"exactOptionalPropertyTypes": false
|
|
6880
|
+
"exactOptionalPropertyTypes": false,
|
|
6881
|
+
"paths": {
|
|
6882
|
+
"@module/app/*": ["./modules/app/src/*"],
|
|
6883
|
+
"@module/shared/*": ["./modules/shared/src/*"]
|
|
6884
|
+
},
|
|
6885
|
+
"types": ["bun"]
|
|
6892
6886
|
},
|
|
6887
|
+
"include": ["modules/**/*.ts"],
|
|
6893
6888
|
"exclude": ["node_modules", ".github", ".husky", ".nx", ".zed", ".vscode"]
|
|
6894
6889
|
}
|
|
6895
6890
|
`;
|
|
@@ -21244,4 +21239,4 @@ SeedRunCommand = __legacyDecorateClassTS([
|
|
|
21244
21239
|
// src/index.ts
|
|
21245
21240
|
await run();
|
|
21246
21241
|
|
|
21247
|
-
//# debugId=
|
|
21242
|
+
//# debugId=D4DF0ABBA727352664756E2164756E21
|