Skip to content

Commit

Permalink
adjust for possible undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
drazisil committed Apr 2, 2024
1 parent 85cafd9 commit 2271bfb
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ common/autoinstallers/*/.npmrc
.heft

dist/
*.xml
5 changes: 3 additions & 2 deletions tools/cli/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/core/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/database/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/gateway/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/lobby/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/login/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/nps/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/patch/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/persona/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/shard/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/shared-packets/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/shared/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down
5 changes: 3 additions & 2 deletions tools/transactions/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD.split('/');
const moduleName = `rm-${x[x.length-1]}`;
const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;

export default defineConfig({
test: {
Expand Down

0 comments on commit 2271bfb

Please sign in to comment.