netlify-cli 10.17.5 → 10.17.6

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,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "10.17.5",
3
+ "version": "10.17.6",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "10.17.5",
9
+ "version": "10.17.6",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -81,7 +81,7 @@
81
81
  "multiparty": "^4.2.1",
82
82
  "netlify": "^12.0.0",
83
83
  "netlify-headers-parser": "^6.0.2",
84
- "netlify-onegraph-internal": "0.8.6",
84
+ "netlify-onegraph-internal": "0.8.7",
85
85
  "netlify-redirect-parser": "^13.0.5",
86
86
  "netlify-redirector": "^0.2.1",
87
87
  "node-fetch": "^2.6.0",
@@ -15996,9 +15996,9 @@
15996
15996
  }
15997
15997
  },
15998
15998
  "node_modules/netlify-onegraph-internal": {
15999
- "version": "0.8.6",
16000
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.6.tgz",
16001
- "integrity": "sha512-B8xP8eonSNDe9ytJwQVND0eJYDd2JDwedwknJqtiANe11Hw4DHlw/eWZ7CdaTLiRXjD0WbMlW088NZrUZY2rtw==",
15999
+ "version": "0.8.7",
16000
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.7.tgz",
16001
+ "integrity": "sha512-FDHQes/GP7UjlzAwJ+qwKfhESBo9NQDN9Ed6U+9a5CW5o2j8Lr23P9Ac1MKp7jDP5h0uAq73r9P86J9Kl1yzLQ==",
16002
16002
  "dependencies": {
16003
16003
  "graphql": "16.5.0",
16004
16004
  "node-fetch": "^2.6.0",
@@ -34229,9 +34229,9 @@
34229
34229
  }
34230
34230
  },
34231
34231
  "netlify-onegraph-internal": {
34232
- "version": "0.8.6",
34233
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.6.tgz",
34234
- "integrity": "sha512-B8xP8eonSNDe9ytJwQVND0eJYDd2JDwedwknJqtiANe11Hw4DHlw/eWZ7CdaTLiRXjD0WbMlW088NZrUZY2rtw==",
34232
+ "version": "0.8.7",
34233
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.7.tgz",
34234
+ "integrity": "sha512-FDHQes/GP7UjlzAwJ+qwKfhESBo9NQDN9Ed6U+9a5CW5o2j8Lr23P9Ac1MKp7jDP5h0uAq73r9P86J9Kl1yzLQ==",
34235
34235
  "requires": {
34236
34236
  "graphql": "16.5.0",
34237
34237
  "node-fetch": "^2.6.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "10.17.5",
4
+ "version": "10.17.6",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "@whitep4nth3r (https://twitter.com/whitep4nth3r)",
@@ -293,7 +293,7 @@
293
293
  "multiparty": "^4.2.1",
294
294
  "netlify": "^12.0.0",
295
295
  "netlify-headers-parser": "^6.0.2",
296
- "netlify-onegraph-internal": "0.8.6",
296
+ "netlify-onegraph-internal": "0.8.7",
297
297
  "netlify-redirect-parser": "^13.0.5",
298
298
  "netlify-redirector": "^0.2.1",
299
299
  "node-fetch": "^2.6.0",
@@ -780,10 +780,9 @@ const getCLISessionMetadata = async ({ jwt, oneGraphSessionId, siteId }) => {
780
780
  * Look at the current project, filesystem, etc. and determine relevant metadata for a cli session
781
781
  * @param {object} input
782
782
  * @param {string} input.siteRoot The root file path for the site
783
- * @param {object} input.config The parsed netlify.toml config file
784
783
  * @returns {Promise<CliEventHelper.DetectedLocalCLISessionMetadata>} Any locally detected facts that are relevant to include in the cli session metadata
785
784
  */
786
- const detectLocalCLISessionMetadata = async ({ config, siteRoot }) => {
785
+ const detectLocalCLISessionMetadata = async ({ siteRoot }) => {
787
786
  // @ts-ignore
788
787
  const { listFrameworks } = await frameworkInfoPromise
789
788
 
@@ -806,25 +805,6 @@ const detectLocalCLISessionMetadata = async ({ config, siteRoot }) => {
806
805
 
807
806
  const editor = process.env.EDITOR || null
808
807
 
809
- /** @type {CodegenHelpers.CodegenModuleMeta | null} */
810
- let codegen = null
811
-
812
- const codegenModule = await getCodegenModule({ config })
813
-
814
- if (codegenModule) {
815
- codegen = {
816
- id: codegenModule.id,
817
- version: codegenModule.id,
818
- generators: codegenModule.generators.map((generator) => ({
819
- id: generator.id,
820
- name: generator.name,
821
- options: generator.generateHandlerOptions || null,
822
- supportedDefinitionTypes: generator.supportedDefinitionTypes,
823
- version: generator.version,
824
- })),
825
- }
826
- }
827
-
828
808
  const detectedMetadata = {
829
809
  gitBranch: branch,
830
810
  hostname,
@@ -835,8 +815,8 @@ const detectLocalCLISessionMetadata = async ({ config, siteRoot }) => {
835
815
  platform,
836
816
  arch,
837
817
  nodeVersion: process.version,
838
- codegen,
839
818
  framework,
819
+ codegen: null,
840
820
  }
841
821
 
842
822
  return detectedMetadata
@@ -847,13 +827,12 @@ const detectLocalCLISessionMetadata = async ({ config, siteRoot }) => {
847
827
  * @param {object} input
848
828
  * @param {string} input.jwt The GraphJWT string
849
829
  * @param {string} input.sessionId The id of the cli session to fetch the current metadata for
850
- * @param {object} input.config The parsed netlify.toml config file
851
830
  * @param {string} input.siteRoot Path to the root of the project
852
831
  * @param {string} input.docId The GraphQL operations document id to fetch
853
832
  * @param {string} input.schemaId The GraphQL schemaId to use when generating code
854
833
  */
855
- const publishCliSessionMetadataPublishEvent = async ({ config, docId, jwt, schemaId, sessionId, siteRoot }) => {
856
- const detectedMetadata = await detectLocalCLISessionMetadata({ config, siteRoot })
834
+ const publishCliSessionMetadataPublishEvent = async ({ docId, jwt, schemaId, sessionId, siteRoot }) => {
835
+ const detectedMetadata = await detectLocalCLISessionMetadata({ siteRoot })
857
836
 
858
837
  /** @type {CliEventHelper.OneGraphNetlifyCliSessionMetadataPublishEvent} */
859
838
  const event = {
@@ -901,13 +880,13 @@ const publishCliSessionMetadataPublishEvent = async ({ config, docId, jwt, schem
901
880
  * @param {object} input.newMetadata The metadata to merge into (with priority) the existing metadata
902
881
  * @returns {Promise<object>}
903
882
  */
904
- const upsertMergeCLISessionMetadata = async ({ config, jwt, newMetadata, oneGraphSessionId, siteId, siteRoot }) => {
883
+ const upsertMergeCLISessionMetadata = async ({ jwt, newMetadata, oneGraphSessionId, siteId, siteRoot }) => {
905
884
  const { errors, metadata } = await getCLISessionMetadata({ jwt, oneGraphSessionId, siteId })
906
885
  if (errors) {
907
886
  warn(`Error fetching cli session metadata: ${JSON.stringify(errors, null, 2)}`)
908
887
  }
909
888
 
910
- const detectedMetadata = await detectLocalCLISessionMetadata({ config, siteRoot })
889
+ const detectedMetadata = await detectLocalCLISessionMetadata({ siteRoot })
911
890
 
912
891
  // @ts-ignore
913
892
  const finalMetadata = { ...metadata, ...detectedMetadata, ...newMetadata }
@@ -992,7 +971,13 @@ const persistNewOperationsDocForSession = async ({
992
971
  })
993
972
 
994
973
  if (!result || result.errors) {
995
- warn(`Unable to update session metadata with updated operations doc ${JSON.stringify(result.errors, null, 2)}`)
974
+ warn(
975
+ `Unable to update session metadata with updated operations docId="${persistedDoc.id}": ${JSON.stringify(
976
+ result && result.errors,
977
+ null,
978
+ 2,
979
+ )}`,
980
+ )
996
981
  } else if (lockfile != null) {
997
982
  // Now that we've persisted the document, lock it in the lockfile
998
983
  const currentOperationsDoc = readGraphQLOperationsSourceFile(netlifyGraphConfig)
@@ -1336,7 +1321,6 @@ const ensureCLISession = async (input) => {
1336
1321
  // If we can't access the session in the state.json or it doesn't exist, create a new one
1337
1322
  const sessionName = generateSessionName()
1338
1323
  const detectedMetadata = await detectLocalCLISessionMetadata({
1339
- config,
1340
1324
  siteRoot: site.root,
1341
1325
  })
1342
1326
  const newSessionMetadata = parentCliSessionId ? { parentCliSessionId } : {}
@@ -459,7 +459,7 @@ const generateFunctionsFile = async ({ config, netlifyGraphConfig, operationsDoc
459
459
 
460
460
  const codegenModule = await getCodegenModule({ config })
461
461
  if (!codegenModule) {
462
- error(
462
+ warn(
463
463
  `No Netlify Graph codegen module specified in netlify.toml under the [graph] header. Please specify 'codeGenerator' field and try again.`,
464
464
  )
465
465
  return