@redmix/api 9.0.0-canary.585 → 9.0.0-canary.587

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.
@@ -8,4 +8,6 @@ export * from './cors.js';
8
8
  export * from './event.js';
9
9
  export declare const prismaVersion: any;
10
10
  export declare const redwoodVersion: any;
11
+ export declare function getPrismaVersion(): Promise<string>;
12
+ export declare function getRedwoodVersion(): Promise<string>;
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAM1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAM1B,eAAO,MAAM,aAAa,KAAgD,CAAA;AAC1E,eAAO,MAAM,cAAc,KAAuB,CAAA;AAGlD,wBAAsB,gBAAgB,oBAIrC;AAGD,wBAAsB,iBAAiB,oBAItC"}
package/dist/cjs/index.js CHANGED
@@ -29,12 +29,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
+ getPrismaVersion: () => getPrismaVersion,
33
+ getRedwoodVersion: () => getRedwoodVersion,
32
34
  prismaVersion: () => prismaVersion,
33
35
  redwoodVersion: () => redwoodVersion
34
36
  });
35
37
  module.exports = __toCommonJS(index_exports);
36
- var import_node_fs = __toESM(require("node:fs"), 1);
37
- var import_node_path = __toESM(require("node:path"), 1);
38
38
  __reExport(index_exports, require("./auth/index.js"), module.exports);
39
39
  __reExport(index_exports, require("./errors.js"), module.exports);
40
40
  __reExport(index_exports, require("./validations/validations.js"), module.exports);
@@ -43,13 +43,21 @@ __reExport(index_exports, require("./types.js"), module.exports);
43
43
  __reExport(index_exports, require("./transforms.js"), module.exports);
44
44
  __reExport(index_exports, require("./cors.js"), module.exports);
45
45
  __reExport(index_exports, require("./event.js"), module.exports);
46
- const packageJson = JSON.parse(
47
- import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../package.json"), "utf8")
48
- );
49
- const prismaVersion = packageJson?.dependencies["@prisma/client"];
46
+ const packageJson = typeof require === "function" ? require("../package.json") : {};
47
+ const prismaVersion = packageJson?.dependencies?.["@prisma/client"];
50
48
  const redwoodVersion = packageJson?.version;
49
+ async function getPrismaVersion() {
50
+ const { default: apiPackageJson } = await import("@redmix/api/package.json");
51
+ return apiPackageJson?.dependencies?.["@prisma/client"];
52
+ }
53
+ async function getRedwoodVersion() {
54
+ const { default: apiPackageJson } = await import("@redmix/api/package.json");
55
+ return apiPackageJson?.version;
56
+ }
51
57
  // Annotate the CommonJS export names for ESM import in node:
52
58
  0 && (module.exports = {
59
+ getPrismaVersion,
60
+ getRedwoodVersion,
53
61
  prismaVersion,
54
62
  redwoodVersion,
55
63
  ...require("./auth/index.js"),
package/dist/index.d.ts CHANGED
@@ -8,4 +8,6 @@ export * from './cors.js';
8
8
  export * from './event.js';
9
9
  export declare const prismaVersion: any;
10
10
  export declare const redwoodVersion: any;
11
+ export declare function getPrismaVersion(): Promise<string>;
12
+ export declare function getRedwoodVersion(): Promise<string>;
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAM1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAM1B,eAAO,MAAM,aAAa,KAAgD,CAAA;AAC1E,eAAO,MAAM,cAAc,KAAuB,CAAA;AAGlD,wBAAsB,gBAAgB,oBAIrC;AAGD,wBAAsB,iBAAiB,oBAItC"}
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import bannerPath from "node:path"; import bannerUrl from "node:url"; const __filename = bannerUrl.fileURLToPath(import.meta.url); const __dirname = bannerPath.dirname(__filename);
2
- import fs from "node:fs";
3
- import path from "node:path";
4
2
  export * from "./auth/index.js";
5
3
  export * from "./errors.js";
6
4
  export * from "./validations/validations.js";
@@ -9,12 +7,20 @@ export * from "./types.js";
9
7
  export * from "./transforms.js";
10
8
  export * from "./cors.js";
11
9
  export * from "./event.js";
12
- const packageJson = JSON.parse(
13
- fs.readFileSync(path.join(__dirname, "../package.json"), "utf8")
14
- );
15
- const prismaVersion = packageJson?.dependencies["@prisma/client"];
10
+ const packageJson = typeof require === "function" ? require("../package.json") : {};
11
+ const prismaVersion = packageJson?.dependencies?.["@prisma/client"];
16
12
  const redwoodVersion = packageJson?.version;
13
+ async function getPrismaVersion() {
14
+ const { default: apiPackageJson } = await import("@redmix/api/package.json");
15
+ return apiPackageJson?.dependencies?.["@prisma/client"];
16
+ }
17
+ async function getRedwoodVersion() {
18
+ const { default: apiPackageJson } = await import("@redmix/api/package.json");
19
+ return apiPackageJson?.version;
20
+ }
17
21
  export {
22
+ getPrismaVersion,
23
+ getRedwoodVersion,
18
24
  prismaVersion,
19
25
  redwoodVersion
20
26
  };
package/dist/package.json CHANGED
@@ -1 +1 @@
1
- {"type":"module","version":"9.0.0-canary.585+c2b5431df","dependencies":{"@prisma/client":"5.20.0","@whatwg-node/fetch":"0.9.21","cookie":"1.0.2","humanize-string":"2.1.0","jsonwebtoken":"9.0.2","pascalcase":"1.0.0","pino":"9.4.0","title-case":"3.0.3"}}
1
+ {"type":"module","version":"9.0.0-canary.587+9d900d54a","dependencies":{"@prisma/client":"5.20.0","@whatwg-node/fetch":"0.9.21","cookie":"1.0.2","humanize-string":"2.1.0","jsonwebtoken":"9.0.2","pascalcase":"1.0.0","pino":"9.4.0","title-case":"3.0.3"}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redmix/api",
3
- "version": "9.0.0-canary.585+c2b5431df",
3
+ "version": "9.0.0-canary.587+9d900d54a",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/redmix-run/redmix.git",
@@ -95,7 +95,7 @@
95
95
  "title-case": "3.0.3"
96
96
  },
97
97
  "devDependencies": {
98
- "@redmix/framework-tools": "9.0.0-canary.585",
98
+ "@redmix/framework-tools": "9.0.0-canary.587",
99
99
  "@types/aws-lambda": "8.10.145",
100
100
  "@types/jsonwebtoken": "9.0.8",
101
101
  "@types/memjs": "1",
@@ -123,5 +123,5 @@
123
123
  "optional": true
124
124
  }
125
125
  },
126
- "gitHead": "c2b5431df6a3836680feae49375dce44e14bdde5"
126
+ "gitHead": "9d900d54a5c354f8104e067c769cde8130680991"
127
127
  }