@vaharoni/devops 1.2.15 → 1.2.17
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/devops.js
CHANGED
|
@@ -884,6 +884,7 @@ import fs from "fs";
|
|
|
884
884
|
import { globSync } from "glob";
|
|
885
885
|
import _ from "lodash";
|
|
886
886
|
import Handlebars from "handlebars";
|
|
887
|
+
Handlebars.registerHelper("eq", (a, b) => a === b);
|
|
887
888
|
var MANIFEST_FOLDER_PATH = path3.join(process.cwd(), ".devops/manifests");
|
|
888
889
|
var MANIFEST_INDEX_FILE_PATH = path3.join(MANIFEST_FOLDER_PATH, "_index.yaml");
|
|
889
890
|
var DB_MIGRATE_TEMPLATE_NAME = "db-migrate";
|
|
@@ -107,16 +107,6 @@ export const prismaClientSingleton = () => {
|
|
|
107
107
|
return client as unknown as ExtendedTransactionClient | FlatTransactionClient;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
// Use the same global singleton key as db-client.ts (prismaGlobal)
|
|
111
|
-
// This ensures all code importing from "db" uses the same transactional client
|
|
112
|
-
declare global {
|
|
113
|
-
// eslint-disable-next-line no-var
|
|
114
|
-
var prismaGlobal:
|
|
115
|
-
| ExtendedTransactionClient
|
|
116
|
-
| FlatTransactionClient
|
|
117
|
-
| undefined;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
110
|
export type ExtendedTransactionClient = Prisma.TransactionClient & {
|
|
121
111
|
$begin: () => Promise<FlatTransactionClient>;
|
|
122
112
|
};
|
|
@@ -126,10 +116,16 @@ export type FlatTransactionClient = Prisma.TransactionClient & {
|
|
|
126
116
|
$rollback: () => Promise<void>;
|
|
127
117
|
};
|
|
128
118
|
|
|
119
|
+
// Use the same global singleton key as db-client.ts (prismaGlobal)
|
|
120
|
+
// This ensures all code importing from "db" uses the same transactional client
|
|
121
|
+
// Note: We don't redeclare the global type here to avoid conflicts with db-client.ts
|
|
122
|
+
// when the IDE loads both files. We use type assertions instead.
|
|
123
|
+
type TestPrismaGlobal = ExtendedTransactionClient | FlatTransactionClient | undefined;
|
|
124
|
+
|
|
129
125
|
const prisma: ExtendedTransactionClient | FlatTransactionClient =
|
|
130
|
-
globalThis.prismaGlobal ?? prismaClientSingleton();
|
|
126
|
+
(globalThis.prismaGlobal as TestPrismaGlobal) ?? prismaClientSingleton();
|
|
131
127
|
|
|
132
|
-
globalThis.prismaGlobal = prisma;
|
|
128
|
+
(globalThis as { prismaGlobal: TestPrismaGlobal }).prismaGlobal = prisma;
|
|
133
129
|
|
|
134
130
|
export { prisma };
|
|
135
131
|
|
package/package.json
CHANGED
package/src/libs/k8s-generate.ts
CHANGED
|
@@ -9,6 +9,9 @@ import { globSync } from "glob";
|
|
|
9
9
|
import _ from 'lodash';
|
|
10
10
|
import Handlebars from "handlebars";
|
|
11
11
|
import { getImageData } from "./config";
|
|
12
|
+
|
|
13
|
+
// Register Handlebars helpers
|
|
14
|
+
Handlebars.registerHelper('eq', (a, b) => a === b);
|
|
12
15
|
import { getImageDescendentData } from "./discovery/images";
|
|
13
16
|
|
|
14
17
|
const MANIFEST_FOLDER_PATH = path.join(process.cwd(), '.devops/manifests');
|
|
@@ -107,16 +107,6 @@ export const prismaClientSingleton = () => {
|
|
|
107
107
|
return client as unknown as ExtendedTransactionClient | FlatTransactionClient;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
// Use the same global singleton key as db-client.ts (prismaGlobal)
|
|
111
|
-
// This ensures all code importing from "db" uses the same transactional client
|
|
112
|
-
declare global {
|
|
113
|
-
// eslint-disable-next-line no-var
|
|
114
|
-
var prismaGlobal:
|
|
115
|
-
| ExtendedTransactionClient
|
|
116
|
-
| FlatTransactionClient
|
|
117
|
-
| undefined;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
110
|
export type ExtendedTransactionClient = Prisma.TransactionClient & {
|
|
121
111
|
$begin: () => Promise<FlatTransactionClient>;
|
|
122
112
|
};
|
|
@@ -126,10 +116,16 @@ export type FlatTransactionClient = Prisma.TransactionClient & {
|
|
|
126
116
|
$rollback: () => Promise<void>;
|
|
127
117
|
};
|
|
128
118
|
|
|
119
|
+
// Use the same global singleton key as db-client.ts (prismaGlobal)
|
|
120
|
+
// This ensures all code importing from "db" uses the same transactional client
|
|
121
|
+
// Note: We don't redeclare the global type here to avoid conflicts with db-client.ts
|
|
122
|
+
// when the IDE loads both files. We use type assertions instead.
|
|
123
|
+
type TestPrismaGlobal = ExtendedTransactionClient | FlatTransactionClient | undefined;
|
|
124
|
+
|
|
129
125
|
const prisma: ExtendedTransactionClient | FlatTransactionClient =
|
|
130
|
-
globalThis.prismaGlobal ?? prismaClientSingleton();
|
|
126
|
+
(globalThis.prismaGlobal as TestPrismaGlobal) ?? prismaClientSingleton();
|
|
131
127
|
|
|
132
|
-
globalThis.prismaGlobal = prisma;
|
|
128
|
+
(globalThis as { prismaGlobal: TestPrismaGlobal }).prismaGlobal = prisma;
|
|
133
129
|
|
|
134
130
|
export { prisma };
|
|
135
131
|
|