@cedarjs/project-config 1.1.1-next.18 → 1.1.1-rc.3
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/cjs/config.d.ts +1 -1
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +17 -90
- package/dist/cjs/paths.d.ts +3 -1
- package/dist/cjs/paths.d.ts.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -85
- package/dist/paths.d.ts +3 -1
- package/dist/paths.d.ts.map +1 -1
- package/package.json +3 -4
- package/dist/cjs/prisma.d.ts +0 -45
- package/dist/cjs/prisma.d.ts.map +0 -1
- package/dist/prisma.d.ts +0 -45
- package/dist/prisma.d.ts.map +0 -1
package/dist/cjs/config.d.ts
CHANGED
package/dist/cjs/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAKjC,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAC,IAAI,CAAA;IACvB,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,WAA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;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAmFD;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,mBAA4B,KAAG,MAMxD,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,UAAU,SAAkB,sCAMxD"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -40,17 +40,12 @@ __export(index_exports, {
|
|
|
40
40
|
getBuiltServerEntryFile: () => getBuiltServerEntryFile,
|
|
41
41
|
getConfig: () => getConfig,
|
|
42
42
|
getConfigPath: () => getConfigPath,
|
|
43
|
-
getDataMigrationsPath: () => getDataMigrationsPath,
|
|
44
|
-
getDbDir: () => getDbDir,
|
|
45
43
|
getEnvVarDefinitions: () => getEnvVarDefinitions,
|
|
46
|
-
getMigrationsPath: () => getMigrationsPath,
|
|
47
44
|
getPaths: () => getPaths,
|
|
48
45
|
getRawConfig: () => getRawConfig,
|
|
49
46
|
getRouteHookForPage: () => getRouteHookForPage,
|
|
50
|
-
getSchemaPath: () => getSchemaPath,
|
|
51
47
|
importStatementPath: () => importStatementPath,
|
|
52
48
|
isTypeScriptProject: () => isTypeScriptProject,
|
|
53
|
-
loadPrismaConfig: () => loadPrismaConfig,
|
|
54
49
|
processPagesDir: () => processPagesDir,
|
|
55
50
|
projectIsEsm: () => projectIsEsm,
|
|
56
51
|
projectRootIsEsm: () => projectRootIsEsm,
|
|
@@ -108,7 +103,7 @@ var TargetEnum = /* @__PURE__ */ ((TargetEnum2) => {
|
|
|
108
103
|
})(TargetEnum || {});
|
|
109
104
|
var DEFAULT_CONFIG = {
|
|
110
105
|
web: {
|
|
111
|
-
title: "
|
|
106
|
+
title: "Redwood App",
|
|
112
107
|
port: 8910,
|
|
113
108
|
path: "./web",
|
|
114
109
|
target: "browser" /* BROWSER */,
|
|
@@ -119,11 +114,11 @@ var DEFAULT_CONFIG = {
|
|
|
119
114
|
sourceMap: false
|
|
120
115
|
},
|
|
121
116
|
api: {
|
|
122
|
-
title: "
|
|
117
|
+
title: "Redwood App",
|
|
123
118
|
port: 8911,
|
|
124
119
|
path: "./api",
|
|
125
120
|
target: "node" /* NODE */,
|
|
126
|
-
|
|
121
|
+
schemaPath: "./api/db/schema.prisma",
|
|
127
122
|
serverConfig: "./api/server.config.js",
|
|
128
123
|
debugPort: 18911
|
|
129
124
|
},
|
|
@@ -267,14 +262,8 @@ var getPaths = (BASE_DIR = getBaseDir()) => {
|
|
|
267
262
|
return getPathsCache.get(BASE_DIR);
|
|
268
263
|
}
|
|
269
264
|
const routes = resolveFile(import_path2.default.join(BASE_DIR, PATH_WEB_ROUTES));
|
|
270
|
-
const {
|
|
271
|
-
|
|
272
|
-
).api;
|
|
273
|
-
const prismaConfigBase = import_path2.default.join(
|
|
274
|
-
BASE_DIR,
|
|
275
|
-
prismaConfigFromConfig.replace(/\.[^.]+$/, "")
|
|
276
|
-
);
|
|
277
|
-
const prismaConfig = resolveFile(prismaConfigBase) || import_path2.default.join(BASE_DIR, prismaConfigFromConfig);
|
|
265
|
+
const { schemaPath } = getConfig(getConfigPath(BASE_DIR)).api;
|
|
266
|
+
const schemaDir = import_path2.default.dirname(schemaPath);
|
|
278
267
|
const viteConfig = resolveFile(
|
|
279
268
|
import_path2.default.join(BASE_DIR, PATH_WEB_DIR_CONFIG_VITE)
|
|
280
269
|
);
|
|
@@ -292,7 +281,9 @@ var getPaths = (BASE_DIR = getBaseDir()) => {
|
|
|
292
281
|
scripts: import_path2.default.join(BASE_DIR, PATH_RW_SCRIPTS),
|
|
293
282
|
api: {
|
|
294
283
|
base: import_path2.default.join(BASE_DIR, "api"),
|
|
295
|
-
|
|
284
|
+
dataMigrations: import_path2.default.join(BASE_DIR, schemaDir, "dataMigrations"),
|
|
285
|
+
db: import_path2.default.join(BASE_DIR, schemaDir),
|
|
286
|
+
dbSchema: import_path2.default.join(BASE_DIR, schemaPath),
|
|
296
287
|
functions: import_path2.default.join(BASE_DIR, PATH_API_DIR_FUNCTIONS),
|
|
297
288
|
graphql: import_path2.default.join(BASE_DIR, PATH_API_DIR_GRAPHQL),
|
|
298
289
|
lib: import_path2.default.join(BASE_DIR, PATH_API_DIR_LIB),
|
|
@@ -429,19 +420,19 @@ var processPagesDir = (webPagesDir = getPaths().web.pages) => {
|
|
|
429
420
|
};
|
|
430
421
|
});
|
|
431
422
|
};
|
|
432
|
-
var ensurePosixPath = (
|
|
433
|
-
let posixPath =
|
|
423
|
+
var ensurePosixPath = (path4) => {
|
|
424
|
+
let posixPath = path4;
|
|
434
425
|
if (process.platform === "win32") {
|
|
435
|
-
if (/^[A-Z]:\\/.test(
|
|
436
|
-
const drive =
|
|
437
|
-
posixPath = `/${drive}/${
|
|
426
|
+
if (/^[A-Z]:\\/.test(path4)) {
|
|
427
|
+
const drive = path4[0].toLowerCase();
|
|
428
|
+
posixPath = `/${drive}/${path4.substring(3)}`;
|
|
438
429
|
}
|
|
439
430
|
posixPath = posixPath.replace(/\\/g, "/");
|
|
440
431
|
}
|
|
441
432
|
return posixPath;
|
|
442
433
|
};
|
|
443
|
-
var importStatementPath = (
|
|
444
|
-
let importPath =
|
|
434
|
+
var importStatementPath = (path4) => {
|
|
435
|
+
let importPath = path4;
|
|
445
436
|
if (process.platform === "win32") {
|
|
446
437
|
importPath = importPath.replaceAll("\\", "/");
|
|
447
438
|
}
|
|
@@ -478,67 +469,8 @@ var isTypeScriptProject = () => {
|
|
|
478
469
|
return import_fs3.default.existsSync(import_path2.default.join(paths.web.base, "tsconfig.json")) || import_fs3.default.existsSync(import_path2.default.join(paths.api.base, "tsconfig.json"));
|
|
479
470
|
};
|
|
480
471
|
|
|
481
|
-
// src/prisma.ts
|
|
482
|
-
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
483
|
-
var import_node_path = __toESM(require("node:path"), 1);
|
|
484
|
-
var import_node_url = require("node:url");
|
|
485
|
-
var configCache = /* @__PURE__ */ new Map();
|
|
486
|
-
async function loadPrismaConfig(prismaConfigPath) {
|
|
487
|
-
if (!import_node_fs.default.existsSync(prismaConfigPath)) {
|
|
488
|
-
throw new Error(`Prisma config file not found at: ${prismaConfigPath}`);
|
|
489
|
-
}
|
|
490
|
-
if (configCache.has(prismaConfigPath)) {
|
|
491
|
-
return configCache.get(prismaConfigPath);
|
|
492
|
-
}
|
|
493
|
-
const configUrl = (0, import_node_url.pathToFileURL)(prismaConfigPath).href;
|
|
494
|
-
let config;
|
|
495
|
-
try {
|
|
496
|
-
const mod = require(prismaConfigPath);
|
|
497
|
-
config = mod.default || mod;
|
|
498
|
-
if (!config) {
|
|
499
|
-
throw new Error("Prisma config must have a default export");
|
|
500
|
-
}
|
|
501
|
-
configCache.set(prismaConfigPath, config);
|
|
502
|
-
} catch (error) {
|
|
503
|
-
throw new Error(
|
|
504
|
-
`Failed to load Prisma config from ${prismaConfigPath}: ${error}`
|
|
505
|
-
);
|
|
506
|
-
}
|
|
507
|
-
return config;
|
|
508
|
-
}
|
|
509
|
-
async function getSchemaPath(prismaConfigPath) {
|
|
510
|
-
const config = await loadPrismaConfig(prismaConfigPath);
|
|
511
|
-
const configDir = import_node_path.default.dirname(prismaConfigPath);
|
|
512
|
-
if (config.schema) {
|
|
513
|
-
return import_node_path.default.isAbsolute(config.schema) ? config.schema : import_node_path.default.resolve(configDir, config.schema);
|
|
514
|
-
}
|
|
515
|
-
return import_node_path.default.join(configDir, "schema.prisma");
|
|
516
|
-
}
|
|
517
|
-
async function getMigrationsPath(prismaConfigPath) {
|
|
518
|
-
const config = await loadPrismaConfig(prismaConfigPath);
|
|
519
|
-
const configDir = import_node_path.default.dirname(prismaConfigPath);
|
|
520
|
-
if (config.migrations?.path) {
|
|
521
|
-
return import_node_path.default.isAbsolute(config.migrations.path) ? config.migrations.path : import_node_path.default.resolve(configDir, config.migrations.path);
|
|
522
|
-
}
|
|
523
|
-
const schemaPath = await getSchemaPath(prismaConfigPath);
|
|
524
|
-
const schemaDir = import_node_fs.default.statSync(schemaPath).isDirectory() ? schemaPath : import_node_path.default.dirname(schemaPath);
|
|
525
|
-
return import_node_path.default.join(schemaDir, "migrations");
|
|
526
|
-
}
|
|
527
|
-
async function getDbDir(prismaConfigPath) {
|
|
528
|
-
const schemaPath = await getSchemaPath(prismaConfigPath);
|
|
529
|
-
if (import_node_fs.default.existsSync(schemaPath) && import_node_fs.default.statSync(schemaPath).isDirectory()) {
|
|
530
|
-
return schemaPath;
|
|
531
|
-
}
|
|
532
|
-
return import_node_path.default.dirname(schemaPath);
|
|
533
|
-
}
|
|
534
|
-
async function getDataMigrationsPath(prismaConfigPath) {
|
|
535
|
-
const migrationsPath = await getMigrationsPath(prismaConfigPath);
|
|
536
|
-
const migrationsDir = import_node_path.default.dirname(migrationsPath);
|
|
537
|
-
return import_node_path.default.join(migrationsDir, "dataMigrations");
|
|
538
|
-
}
|
|
539
|
-
|
|
540
472
|
// src/envVarDefinitions.ts
|
|
541
|
-
var
|
|
473
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
542
474
|
var import_project_config = require("@cedarjs/project-config");
|
|
543
475
|
function getEnvVarDefinitions() {
|
|
544
476
|
const rwConfig = (0, import_project_config.getConfig)();
|
|
@@ -547,7 +479,7 @@ function getEnvVarDefinitions() {
|
|
|
547
479
|
RWJS_ENV: {
|
|
548
480
|
RWJS_API_GRAPHQL_URL: rwConfig.web.apiGraphQLUrl ?? rwConfig.web.apiUrl + "/graphql",
|
|
549
481
|
RWJS_API_URL: rwConfig.web.apiUrl,
|
|
550
|
-
__REDWOOD__APP_TITLE: rwConfig.web.title ||
|
|
482
|
+
__REDWOOD__APP_TITLE: rwConfig.web.title || import_node_path.default.basename(rwPaths.base),
|
|
551
483
|
RWJS_EXP_STREAMING_SSR: rwConfig.experimental.streamingSsr?.enabled,
|
|
552
484
|
RWJS_EXP_RSC: rwConfig.experimental?.rsc?.enabled
|
|
553
485
|
},
|
|
@@ -592,17 +524,12 @@ function getEnvVarDefinitions() {
|
|
|
592
524
|
getBuiltServerEntryFile,
|
|
593
525
|
getConfig,
|
|
594
526
|
getConfigPath,
|
|
595
|
-
getDataMigrationsPath,
|
|
596
|
-
getDbDir,
|
|
597
527
|
getEnvVarDefinitions,
|
|
598
|
-
getMigrationsPath,
|
|
599
528
|
getPaths,
|
|
600
529
|
getRawConfig,
|
|
601
530
|
getRouteHookForPage,
|
|
602
|
-
getSchemaPath,
|
|
603
531
|
importStatementPath,
|
|
604
532
|
isTypeScriptProject,
|
|
605
|
-
loadPrismaConfig,
|
|
606
533
|
processPagesDir,
|
|
607
534
|
projectIsEsm,
|
|
608
535
|
projectRootIsEsm,
|
package/dist/cjs/paths.d.ts
CHANGED
package/dist/cjs/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/paths.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/paths.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,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M,QAAQ,GAAI,WAAU,MAAqB,KAAG,KA0G1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,GAAG,SAAS,GAAG,IAAI,kBAetE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,iBAAe,kBAmB9C,CAAA;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAShD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAS7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAC1B,cAAa,MAA6B,KACzC,eAAe,EAsBjB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WAa3C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,WAQ/C,CAAA;AAWD,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,WAKnD;AAED,wBAAgB,YAAY,YAY3B;AAED,eAAO,MAAM,mBAAmB,eAM/B,CAAA"}
|
package/dist/config.d.ts
CHANGED
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAKjC,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAC,IAAI,CAAA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AAE;YACb,OAAO,EAAE,OAAO,CAAA;YAChB,QAAQ,EAAE,OAAO,CAAA;SAClB,CAAA;KACF,CAAA;CACF;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAmFD;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,mBAA4B,KAAG,MAMxD,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,UAAU,SAAkB,sCAMxD"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var TargetEnum = /* @__PURE__ */ ((TargetEnum2) => {
|
|
|
47
47
|
})(TargetEnum || {});
|
|
48
48
|
var DEFAULT_CONFIG = {
|
|
49
49
|
web: {
|
|
50
|
-
title: "
|
|
50
|
+
title: "Redwood App",
|
|
51
51
|
port: 8910,
|
|
52
52
|
path: "./web",
|
|
53
53
|
target: "browser" /* BROWSER */,
|
|
@@ -58,11 +58,11 @@ var DEFAULT_CONFIG = {
|
|
|
58
58
|
sourceMap: false
|
|
59
59
|
},
|
|
60
60
|
api: {
|
|
61
|
-
title: "
|
|
61
|
+
title: "Redwood App",
|
|
62
62
|
port: 8911,
|
|
63
63
|
path: "./api",
|
|
64
64
|
target: "node" /* NODE */,
|
|
65
|
-
|
|
65
|
+
schemaPath: "./api/db/schema.prisma",
|
|
66
66
|
serverConfig: "./api/server.config.js",
|
|
67
67
|
debugPort: 18911
|
|
68
68
|
},
|
|
@@ -206,14 +206,8 @@ var getPaths = (BASE_DIR = getBaseDir()) => {
|
|
|
206
206
|
return getPathsCache.get(BASE_DIR);
|
|
207
207
|
}
|
|
208
208
|
const routes = resolveFile(path2.join(BASE_DIR, PATH_WEB_ROUTES));
|
|
209
|
-
const {
|
|
210
|
-
|
|
211
|
-
).api;
|
|
212
|
-
const prismaConfigBase = path2.join(
|
|
213
|
-
BASE_DIR,
|
|
214
|
-
prismaConfigFromConfig.replace(/\.[^.]+$/, "")
|
|
215
|
-
);
|
|
216
|
-
const prismaConfig = resolveFile(prismaConfigBase) || path2.join(BASE_DIR, prismaConfigFromConfig);
|
|
209
|
+
const { schemaPath } = getConfig(getConfigPath(BASE_DIR)).api;
|
|
210
|
+
const schemaDir = path2.dirname(schemaPath);
|
|
217
211
|
const viteConfig = resolveFile(
|
|
218
212
|
path2.join(BASE_DIR, PATH_WEB_DIR_CONFIG_VITE)
|
|
219
213
|
);
|
|
@@ -231,7 +225,9 @@ var getPaths = (BASE_DIR = getBaseDir()) => {
|
|
|
231
225
|
scripts: path2.join(BASE_DIR, PATH_RW_SCRIPTS),
|
|
232
226
|
api: {
|
|
233
227
|
base: path2.join(BASE_DIR, "api"),
|
|
234
|
-
|
|
228
|
+
dataMigrations: path2.join(BASE_DIR, schemaDir, "dataMigrations"),
|
|
229
|
+
db: path2.join(BASE_DIR, schemaDir),
|
|
230
|
+
dbSchema: path2.join(BASE_DIR, schemaPath),
|
|
235
231
|
functions: path2.join(BASE_DIR, PATH_API_DIR_FUNCTIONS),
|
|
236
232
|
graphql: path2.join(BASE_DIR, PATH_API_DIR_GRAPHQL),
|
|
237
233
|
lib: path2.join(BASE_DIR, PATH_API_DIR_LIB),
|
|
@@ -368,19 +364,19 @@ var processPagesDir = (webPagesDir = getPaths().web.pages) => {
|
|
|
368
364
|
};
|
|
369
365
|
});
|
|
370
366
|
};
|
|
371
|
-
var ensurePosixPath = (
|
|
372
|
-
let posixPath =
|
|
367
|
+
var ensurePosixPath = (path4) => {
|
|
368
|
+
let posixPath = path4;
|
|
373
369
|
if (process.platform === "win32") {
|
|
374
|
-
if (/^[A-Z]:\\/.test(
|
|
375
|
-
const drive =
|
|
376
|
-
posixPath = `/${drive}/${
|
|
370
|
+
if (/^[A-Z]:\\/.test(path4)) {
|
|
371
|
+
const drive = path4[0].toLowerCase();
|
|
372
|
+
posixPath = `/${drive}/${path4.substring(3)}`;
|
|
377
373
|
}
|
|
378
374
|
posixPath = posixPath.replace(/\\/g, "/");
|
|
379
375
|
}
|
|
380
376
|
return posixPath;
|
|
381
377
|
};
|
|
382
|
-
var importStatementPath = (
|
|
383
|
-
let importPath =
|
|
378
|
+
var importStatementPath = (path4) => {
|
|
379
|
+
let importPath = path4;
|
|
384
380
|
if (process.platform === "win32") {
|
|
385
381
|
importPath = importPath.replaceAll("\\", "/");
|
|
386
382
|
}
|
|
@@ -417,67 +413,8 @@ var isTypeScriptProject = () => {
|
|
|
417
413
|
return fs3.existsSync(path2.join(paths.web.base, "tsconfig.json")) || fs3.existsSync(path2.join(paths.api.base, "tsconfig.json"));
|
|
418
414
|
};
|
|
419
415
|
|
|
420
|
-
// src/prisma.ts
|
|
421
|
-
import fs4 from "node:fs";
|
|
422
|
-
import path3 from "node:path";
|
|
423
|
-
import { pathToFileURL } from "node:url";
|
|
424
|
-
var configCache = /* @__PURE__ */ new Map();
|
|
425
|
-
async function loadPrismaConfig(prismaConfigPath) {
|
|
426
|
-
if (!fs4.existsSync(prismaConfigPath)) {
|
|
427
|
-
throw new Error(`Prisma config file not found at: ${prismaConfigPath}`);
|
|
428
|
-
}
|
|
429
|
-
if (configCache.has(prismaConfigPath)) {
|
|
430
|
-
return configCache.get(prismaConfigPath);
|
|
431
|
-
}
|
|
432
|
-
const configUrl = pathToFileURL(prismaConfigPath).href;
|
|
433
|
-
let config;
|
|
434
|
-
try {
|
|
435
|
-
const mod = await import(configUrl);
|
|
436
|
-
config = mod.default || mod;
|
|
437
|
-
if (!config) {
|
|
438
|
-
throw new Error("Prisma config must have a default export");
|
|
439
|
-
}
|
|
440
|
-
configCache.set(prismaConfigPath, config);
|
|
441
|
-
} catch (error) {
|
|
442
|
-
throw new Error(
|
|
443
|
-
`Failed to load Prisma config from ${prismaConfigPath}: ${error}`
|
|
444
|
-
);
|
|
445
|
-
}
|
|
446
|
-
return config;
|
|
447
|
-
}
|
|
448
|
-
async function getSchemaPath(prismaConfigPath) {
|
|
449
|
-
const config = await loadPrismaConfig(prismaConfigPath);
|
|
450
|
-
const configDir = path3.dirname(prismaConfigPath);
|
|
451
|
-
if (config.schema) {
|
|
452
|
-
return path3.isAbsolute(config.schema) ? config.schema : path3.resolve(configDir, config.schema);
|
|
453
|
-
}
|
|
454
|
-
return path3.join(configDir, "schema.prisma");
|
|
455
|
-
}
|
|
456
|
-
async function getMigrationsPath(prismaConfigPath) {
|
|
457
|
-
const config = await loadPrismaConfig(prismaConfigPath);
|
|
458
|
-
const configDir = path3.dirname(prismaConfigPath);
|
|
459
|
-
if (config.migrations?.path) {
|
|
460
|
-
return path3.isAbsolute(config.migrations.path) ? config.migrations.path : path3.resolve(configDir, config.migrations.path);
|
|
461
|
-
}
|
|
462
|
-
const schemaPath = await getSchemaPath(prismaConfigPath);
|
|
463
|
-
const schemaDir = fs4.statSync(schemaPath).isDirectory() ? schemaPath : path3.dirname(schemaPath);
|
|
464
|
-
return path3.join(schemaDir, "migrations");
|
|
465
|
-
}
|
|
466
|
-
async function getDbDir(prismaConfigPath) {
|
|
467
|
-
const schemaPath = await getSchemaPath(prismaConfigPath);
|
|
468
|
-
if (fs4.existsSync(schemaPath) && fs4.statSync(schemaPath).isDirectory()) {
|
|
469
|
-
return schemaPath;
|
|
470
|
-
}
|
|
471
|
-
return path3.dirname(schemaPath);
|
|
472
|
-
}
|
|
473
|
-
async function getDataMigrationsPath(prismaConfigPath) {
|
|
474
|
-
const migrationsPath = await getMigrationsPath(prismaConfigPath);
|
|
475
|
-
const migrationsDir = path3.dirname(migrationsPath);
|
|
476
|
-
return path3.join(migrationsDir, "dataMigrations");
|
|
477
|
-
}
|
|
478
|
-
|
|
479
416
|
// src/envVarDefinitions.ts
|
|
480
|
-
import
|
|
417
|
+
import path3 from "node:path";
|
|
481
418
|
import { getConfig as getConfig2, getPaths as getPaths2 } from "@cedarjs/project-config";
|
|
482
419
|
function getEnvVarDefinitions() {
|
|
483
420
|
const rwConfig = getConfig2();
|
|
@@ -486,7 +423,7 @@ function getEnvVarDefinitions() {
|
|
|
486
423
|
RWJS_ENV: {
|
|
487
424
|
RWJS_API_GRAPHQL_URL: rwConfig.web.apiGraphQLUrl ?? rwConfig.web.apiUrl + "/graphql",
|
|
488
425
|
RWJS_API_URL: rwConfig.web.apiUrl,
|
|
489
|
-
__REDWOOD__APP_TITLE: rwConfig.web.title ||
|
|
426
|
+
__REDWOOD__APP_TITLE: rwConfig.web.title || path3.basename(rwPaths.base),
|
|
490
427
|
RWJS_EXP_STREAMING_SSR: rwConfig.experimental.streamingSsr?.enabled,
|
|
491
428
|
RWJS_EXP_RSC: rwConfig.experimental?.rsc?.enabled
|
|
492
429
|
},
|
|
@@ -530,17 +467,12 @@ export {
|
|
|
530
467
|
getBuiltServerEntryFile,
|
|
531
468
|
getConfig,
|
|
532
469
|
getConfigPath,
|
|
533
|
-
getDataMigrationsPath,
|
|
534
|
-
getDbDir,
|
|
535
470
|
getEnvVarDefinitions,
|
|
536
|
-
getMigrationsPath,
|
|
537
471
|
getPaths,
|
|
538
472
|
getRawConfig,
|
|
539
473
|
getRouteHookForPage,
|
|
540
|
-
getSchemaPath,
|
|
541
474
|
importStatementPath,
|
|
542
475
|
isTypeScriptProject,
|
|
543
|
-
loadPrismaConfig,
|
|
544
476
|
processPagesDir,
|
|
545
477
|
projectIsEsm,
|
|
546
478
|
projectRootIsEsm,
|
package/dist/paths.d.ts
CHANGED
package/dist/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,UAA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|
3
|
-
"version": "1.1.1-
|
|
3
|
+
"version": "1.1.1-rc.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@arethetypeswrong/cli": "0.18.2",
|
|
46
|
-
"@cedarjs/framework-tools": "1.1.1-
|
|
46
|
+
"@cedarjs/framework-tools": "1.1.1-rc.3",
|
|
47
47
|
"concurrently": "8.2.2",
|
|
48
|
-
"prisma": "6.19.0",
|
|
49
48
|
"publint": "0.3.12",
|
|
50
49
|
"rimraf": "6.0.1",
|
|
51
50
|
"tsx": "4.20.5",
|
|
@@ -55,5 +54,5 @@
|
|
|
55
54
|
"publishConfig": {
|
|
56
55
|
"access": "public"
|
|
57
56
|
},
|
|
58
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "1332c50070b0ab7f2cfc0d7bc802c60cd8a664a9"
|
|
59
58
|
}
|
package/dist/cjs/prisma.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PrismaConfig } from 'prisma';
|
|
2
|
-
/**
|
|
3
|
-
* Reads and returns the Prisma configuration at the specified path.
|
|
4
|
-
*
|
|
5
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
6
|
-
* @returns The Prisma configuration object
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadPrismaConfig(prismaConfigPath: string): Promise<PrismaConfig>;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the schema path from Prisma config.
|
|
11
|
-
* Defaults to 'schema.prisma' in the same directory as the config file if not
|
|
12
|
-
* specified.
|
|
13
|
-
*
|
|
14
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
15
|
-
* @returns Absolute path to the schema file or directory
|
|
16
|
-
*/
|
|
17
|
-
export declare function getSchemaPath(prismaConfigPath: string): Promise<string>;
|
|
18
|
-
/**
|
|
19
|
-
* Gets the migrations path from Prisma config.
|
|
20
|
-
* Defaults to 'migrations' in the same directory as the schema.
|
|
21
|
-
*
|
|
22
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
23
|
-
* @returns Absolute path to the migrations directory
|
|
24
|
-
*/
|
|
25
|
-
export declare function getMigrationsPath(prismaConfigPath: string): Promise<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Gets the database directory (directory containing the schema).
|
|
28
|
-
* If schema is a directory, returns that directory.
|
|
29
|
-
* If schema is a file, returns its parent directory.
|
|
30
|
-
*
|
|
31
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
32
|
-
* @returns Absolute path to the database directory
|
|
33
|
-
*/
|
|
34
|
-
export declare function getDbDir(prismaConfigPath: string): Promise<string>;
|
|
35
|
-
/**
|
|
36
|
-
* Gets the data migrations directory path.
|
|
37
|
-
* Data migrations are a Cedar feature (not Prisma) that live alongside Prisma
|
|
38
|
-
* migrations.
|
|
39
|
-
* Defaults to 'dataMigrations' in the same directory as Prisma migrations.
|
|
40
|
-
*
|
|
41
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
42
|
-
* @returns Absolute path to the data migrations directory
|
|
43
|
-
*/
|
|
44
|
-
export declare function getDataMigrationsPath(prismaConfigPath: string): Promise<string>;
|
|
45
|
-
//# sourceMappingURL=prisma.d.ts.map
|
package/dist/cjs/prisma.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/prisma.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAK1C;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,yBA8B9D;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,MAAM,mBAY3D;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAKjB"}
|
package/dist/prisma.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PrismaConfig } from 'prisma';
|
|
2
|
-
/**
|
|
3
|
-
* Reads and returns the Prisma configuration at the specified path.
|
|
4
|
-
*
|
|
5
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
6
|
-
* @returns The Prisma configuration object
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadPrismaConfig(prismaConfigPath: string): Promise<PrismaConfig>;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the schema path from Prisma config.
|
|
11
|
-
* Defaults to 'schema.prisma' in the same directory as the config file if not
|
|
12
|
-
* specified.
|
|
13
|
-
*
|
|
14
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
15
|
-
* @returns Absolute path to the schema file or directory
|
|
16
|
-
*/
|
|
17
|
-
export declare function getSchemaPath(prismaConfigPath: string): Promise<string>;
|
|
18
|
-
/**
|
|
19
|
-
* Gets the migrations path from Prisma config.
|
|
20
|
-
* Defaults to 'migrations' in the same directory as the schema.
|
|
21
|
-
*
|
|
22
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
23
|
-
* @returns Absolute path to the migrations directory
|
|
24
|
-
*/
|
|
25
|
-
export declare function getMigrationsPath(prismaConfigPath: string): Promise<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Gets the database directory (directory containing the schema).
|
|
28
|
-
* If schema is a directory, returns that directory.
|
|
29
|
-
* If schema is a file, returns its parent directory.
|
|
30
|
-
*
|
|
31
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
32
|
-
* @returns Absolute path to the database directory
|
|
33
|
-
*/
|
|
34
|
-
export declare function getDbDir(prismaConfigPath: string): Promise<string>;
|
|
35
|
-
/**
|
|
36
|
-
* Gets the data migrations directory path.
|
|
37
|
-
* Data migrations are a Cedar feature (not Prisma) that live alongside Prisma
|
|
38
|
-
* migrations.
|
|
39
|
-
* Defaults to 'dataMigrations' in the same directory as Prisma migrations.
|
|
40
|
-
*
|
|
41
|
-
* @param prismaConfigPath - Absolute path to the Prisma configuration file
|
|
42
|
-
* @returns Absolute path to the data migrations directory
|
|
43
|
-
*/
|
|
44
|
-
export declare function getDataMigrationsPath(prismaConfigPath: string): Promise<string>;
|
|
45
|
-
//# sourceMappingURL=prisma.d.ts.map
|
package/dist/prisma.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../src/prisma.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAK1C;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,yBA8B9D;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,MAAM,mBAY3D;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAKjB"}
|