@cedarjs/internal 6.0.0-canary.2676 → 6.0.0-canary.2679

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":"clientPreset.d.ts","sourceRoot":"","sources":["../../../src/generate/clientPreset.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,8BAA8B,QAAO,OAIjD,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;iBAGN,MAAM;eAAS,OAAO;;;;;;iBAAtB,MAAM;eAAS,OAAO;;EAoDhD,CAAA"}
1
+ {"version":3,"file":"clientPreset.d.ts","sourceRoot":"","sources":["../../../src/generate/clientPreset.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,8BAA8B,QAAO,OAIjD,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;iBAGN,MAAM;eAAS,OAAO;;;;;;iBAAtB,MAAM;eAAS,OAAO;;EAiEhD,CAAA"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var clientPreset_exports = {};
20
30
  __export(clientPreset_exports, {
@@ -22,6 +32,7 @@ __export(clientPreset_exports, {
22
32
  shouldGenerateTrustedDocuments: () => shouldGenerateTrustedDocuments
23
33
  });
24
34
  module.exports = __toCommonJS(clientPreset_exports);
35
+ var import_node_path = __toESM(require("node:path"), 1);
25
36
  var import_cli = require("@graphql-codegen/cli");
26
37
  var import_client_preset = require("@graphql-codegen/client-preset");
27
38
  var import_project_config = require("@cedarjs/project-config");
@@ -36,14 +47,15 @@ const generateClientPreset = async () => {
36
47
  if (!shouldGenerateTrustedDocuments()) {
37
48
  return { clientPresetFiles, trustedDocumentsStoreFile: [], errors };
38
49
  }
39
- const documentsGlob = `${(0, import_project_config.getPaths)().web.src}/**/!(*.d).{ts,tsx,js,jsx}`;
50
+ const documentsGlob = "./web/src/**/!(*.d).{ts,tsx,js,jsx}";
40
51
  const config = {
52
+ cwd: (0, import_project_config.getPaths)().base,
41
53
  schema: (0, import_project_config.getPaths)().generated.schema,
42
54
  documents: documentsGlob,
43
55
  silent: true,
44
56
  // Plays nicely with cli task output
45
57
  generates: {
46
- [`${(0, import_project_config.getPaths)().web.src}/graphql/`]: {
58
+ ["./web/src/graphql/"]: {
47
59
  preset: "client",
48
60
  presetConfig: {
49
61
  persistedDocuments: true
@@ -56,7 +68,12 @@ const generateClientPreset = async () => {
56
68
  }
57
69
  };
58
70
  try {
59
- const generatedFiles = await (0, import_cli.generate)(config, true);
71
+ const generatedFiles = (await (0, import_cli.generate)(config, true)).map(
72
+ (f) => ({
73
+ ...f,
74
+ filename: import_node_path.default.resolve((0, import_project_config.getPaths)().base, f.filename)
75
+ })
76
+ );
60
77
  clientPresetFiles = generatedFiles.map((f) => f.filename);
61
78
  const trustedDocumentsStoreFile = await (0, import_trustedDocuments.trustedDocumentsStore)(generatedFiles);
62
79
  (0, import_trustedDocuments.replaceGqlTagWithTrustedDocumentGraphql)(generatedFiles);
@@ -1 +1 @@
1
- {"version":3,"file":"clientPreset.d.ts","sourceRoot":"","sources":["../../src/generate/clientPreset.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,8BAA8B,QAAO,OAIjD,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;iBAGN,MAAM;eAAS,OAAO;;;;;;iBAAtB,MAAM;eAAS,OAAO;;EAoDhD,CAAA"}
1
+ {"version":3,"file":"clientPreset.d.ts","sourceRoot":"","sources":["../../src/generate/clientPreset.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,8BAA8B,QAAO,OAIjD,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;iBAGN,MAAM;eAAS,OAAO;;;;;;iBAAtB,MAAM;eAAS,OAAO;;EAiEhD,CAAA"}
@@ -1,3 +1,4 @@
1
+ import path from "node:path";
1
2
  import { generate } from "@graphql-codegen/cli";
2
3
  import { addTypenameSelectionDocumentTransform } from "@graphql-codegen/client-preset";
3
4
  import { getConfig, getPaths } from "@cedarjs/project-config";
@@ -15,14 +16,15 @@ const generateClientPreset = async () => {
15
16
  if (!shouldGenerateTrustedDocuments()) {
16
17
  return { clientPresetFiles, trustedDocumentsStoreFile: [], errors };
17
18
  }
18
- const documentsGlob = `${getPaths().web.src}/**/!(*.d).{ts,tsx,js,jsx}`;
19
+ const documentsGlob = "./web/src/**/!(*.d).{ts,tsx,js,jsx}";
19
20
  const config = {
21
+ cwd: getPaths().base,
20
22
  schema: getPaths().generated.schema,
21
23
  documents: documentsGlob,
22
24
  silent: true,
23
25
  // Plays nicely with cli task output
24
26
  generates: {
25
- [`${getPaths().web.src}/graphql/`]: {
27
+ ["./web/src/graphql/"]: {
26
28
  preset: "client",
27
29
  presetConfig: {
28
30
  persistedDocuments: true
@@ -35,7 +37,12 @@ const generateClientPreset = async () => {
35
37
  }
36
38
  };
37
39
  try {
38
- const generatedFiles = await generate(config, true);
40
+ const generatedFiles = (await generate(config, true)).map(
41
+ (f) => ({
42
+ ...f,
43
+ filename: path.resolve(getPaths().base, f.filename)
44
+ })
45
+ );
39
46
  clientPresetFiles = generatedFiles.map((f) => f.filename);
40
47
  const trustedDocumentsStoreFile = await trustedDocumentsStore(generatedFiles);
41
48
  replaceGqlTagWithTrustedDocumentGraphql(generatedFiles);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/internal",
3
- "version": "6.0.0-canary.2676",
3
+ "version": "6.0.0-canary.2679",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -179,13 +179,13 @@
179
179
  "@babel/plugin-transform-react-jsx": "7.29.7",
180
180
  "@babel/plugin-transform-typescript": "^7.26.8",
181
181
  "@babel/traverse": "7.29.7",
182
- "@cedarjs/babel-config": "6.0.0-canary.2676",
183
- "@cedarjs/cli-helpers": "6.0.0-canary.2676",
184
- "@cedarjs/graphql-server": "6.0.0-canary.2676",
185
- "@cedarjs/project-config": "6.0.0-canary.2676",
186
- "@cedarjs/router": "6.0.0-canary.2676",
187
- "@cedarjs/structure": "6.0.0-canary.2676",
188
- "@cedarjs/utils": "6.0.0-canary.2676",
182
+ "@cedarjs/babel-config": "6.0.0-canary.2679",
183
+ "@cedarjs/cli-helpers": "6.0.0-canary.2679",
184
+ "@cedarjs/graphql-server": "6.0.0-canary.2679",
185
+ "@cedarjs/project-config": "6.0.0-canary.2679",
186
+ "@cedarjs/router": "6.0.0-canary.2679",
187
+ "@cedarjs/structure": "6.0.0-canary.2679",
188
+ "@cedarjs/utils": "6.0.0-canary.2679",
189
189
  "@graphql-codegen/add": "6.0.1",
190
190
  "@graphql-codegen/cli": "6.3.1",
191
191
  "@graphql-codegen/client-preset": "5.3.0",
@@ -230,7 +230,7 @@
230
230
  },
231
231
  "devDependencies": {
232
232
  "@arethetypeswrong/cli": "0.18.5",
233
- "@cedarjs/framework-tools": "6.0.0-canary.2676",
233
+ "@cedarjs/framework-tools": "6.0.0-canary.2679",
234
234
  "concurrently": "9.2.1",
235
235
  "graphql-tag": "2.12.6",
236
236
  "publint": "0.3.21",