@cedarjs/auth-dbauth-setup 1.0.0-canary.12780 → 1.0.0-canary.12781

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.
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,OAAO,QAAkD,CAAA;AACtE,eAAO,MAAM,aAAa,QAGzB,CAAA;AAED,eAAO,MAAM,aAAa,yBAMzB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAU,MAAM,MAAM,qBAe1C,CAAA;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,iBAQ7C;AAED,wBAAgB,YAAY,YAuB3B;AAED,wBAAgB,qBAAqB,CAAC,mBAAmB,EAAE,OAAO;;;EAwBjE"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,OAAO,QAAkD,CAAA;AACtE,eAAO,MAAM,aAAa,QAGzB,CAAA;AAED,eAAO,MAAM,aAAa,yBAOzB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAU,MAAM,MAAM,qBAe1C,CAAA;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,iBAS7C;AAED,wBAAgB,YAAY,YAuB3B;AAED,wBAAgB,qBAAqB,CAAC,mBAAmB,EAAE,OAAO;;;EAwBjE"}
package/dist/shared.js CHANGED
@@ -25,7 +25,8 @@ const libPath = exports.libPath = (0, _cliHelpers.getPaths)().api.lib.replace((0
25
25
  const functionsPath = exports.functionsPath = (0, _cliHelpers.getPaths)().api.functions.replace((0, _cliHelpers.getPaths)().base, '');
26
26
  const getModelNames = async () => {
27
27
  var _context;
28
- const result = await (0, _internals.getSchemaWithPath)((0, _cliHelpers.getPaths)().api.dbSchema);
28
+ const schemaPath = await (0, _projectConfig.getSchemaPath)((0, _cliHelpers.getPaths)().api.prismaConfig);
29
+ const result = await (0, _internals.getSchemaWithPath)(schemaPath);
29
30
  const datamodel = result.schemas;
30
31
  const schema = await (0, _internals.getDMMF)({
31
32
  datamodel
@@ -50,11 +51,12 @@ const hasModel = async name => {
50
51
  };
51
52
  exports.hasModel = hasModel;
52
53
  async function addModels(models) {
53
- const isDirectory = _nodeFs.default.statSync((0, _cliHelpers.getPaths)().api.dbSchema).isDirectory();
54
+ const schemaPath = await (0, _projectConfig.getSchemaPath)((0, _cliHelpers.getPaths)().api.prismaConfig);
55
+ const isDirectory = _nodeFs.default.statSync(schemaPath).isDirectory();
54
56
  if (isDirectory) {
55
- _nodeFs.default.writeFileSync(_nodePath.default.join((0, _cliHelpers.getPaths)().api.dbSchema, 'user.prisma'), models);
57
+ _nodeFs.default.writeFileSync(_nodePath.default.join(schemaPath, 'user.prisma'), models);
56
58
  } else {
57
- _nodeFs.default.appendFileSync((0, _cliHelpers.getPaths)().api.dbSchema, models);
59
+ _nodeFs.default.appendFileSync(schemaPath, models);
58
60
  }
59
61
  }
60
62
  function hasAuthPages() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-dbauth-setup",
3
- "version": "1.0.0-canary.12780+7f8401db4",
3
+ "version": "1.0.0-canary.12781+3646d1b08",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@babel/runtime-corejs3": "7.27.6",
28
- "@cedarjs/cli-helpers": "1.0.0-canary.12780",
28
+ "@cedarjs/cli-helpers": "1.0.0-canary.12781",
29
29
  "@prisma/internals": "6.19.0",
30
30
  "@simplewebauthn/browser": "9.0.1",
31
31
  "core-js": "3.42.0",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "7f8401db41974dafa310f9b8dcbb355bb36fd24c"
47
+ "gitHead": "3646d1b08789be1ee38792889bc71cf331de1435"
48
48
  }