netlify-onegraph-internal
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -74,7 +74,7 @@ import { DocumentNode, FragmentDefinitionNode, GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from "graphql"; | ||
export declare const generateSubscriptionFunctionTypeDefinition: (schema: GraphQLSchema, fn: ParsedFunction, fragments: Record<string, ParsedFragment>) => string; | ||
export declare const generateSubscriptionFunction: (schema: any, fn: any, fragments: any, netlifyGraphConfig: NetlifyGraphConfig) => string; | ||
export declare const generateSubscriptionFunction: (schema: GraphQLSchema, fn: ParsedFunction, fragments: never[], netlifyGraphConfig: NetlifyGraphConfig) => string; | ||
export declare const queryToFunctionDefinition: (fullSchema: GraphQLSchema, parsedDoc: DocumentNode, persistedQuery: ExtractedFunction, enabledFragments: Record<string, ParsedFragment>) => ParsedFunction | undefined; | ||
export declare const fragmentToParsedFragmentDefinition: (fullSchema: GraphQLSchema, persistedQuery: ExtractedFragment) => ParsedFragment | undefined; | ||
export declare const generateJavaScriptClient: (netlifyGraphConfig: NetlifyGraphConfig, schema: GraphQLSchema, operationsDoc: string, enabledFunctions: ParsedFunction[]) => string; | ||
export declare const generateProductionJavaScriptClient: (netlifyGraphConfig: NetlifyGraphConfig, schema: GraphQLSchema, operationsDoc: string, enabledFunctions: PersistedFunction[], schemaId: any) => string; | ||
export declare const generateProductionJavaScriptClient: (netlifyGraphConfig: NetlifyGraphConfig, schema: GraphQLSchema, operationsDoc: string, enabledFunctions: PersistedFunction[], schemaId: string) => string; | ||
export declare const generateFragmentTypeScriptDefinition: (netlifyGraphConfig: NetlifyGraphConfig, schema: GraphQLSchema, fragment: ParsedFragment) => string; | ||
@@ -81,0 +81,0 @@ export declare const generateTypeScriptDefinitions: (netlifyGraphConfig: NetlifyGraphConfig, schema: GraphQLSchema, enabledFunctions: ParsedFunction[], enabledFragments: Record<string, ParsedFragment>) => string; |
@@ -107,11 +107,18 @@ "use strict"; | ||
exports.defaultExampleOperationsDoc = "query ExampleQuery @netlify(doc: \"An example query to start with.\") {\n __typename\n}"; | ||
var lruCacheImplementation = "// Basic LRU cache implementation\nconst makeLRUCache = (max) => {\n return { max: max, cache: new Map() };\n};\n\nconst getFromCache = (lru, key) => {\n const item = lru.cache.get(key);\n if (item) {\n lru.cache.delete(key);\n lru.cache.set(key, item);\n }\n return item;\n};\n\nconst setInCache = (lru, key, value) => {\n if (lru.cache.has(key)) {\n lru.cache.delete(key);\n }\n if (lru.cache.size == lru.max) {\n lru.cache.delete(lru.first());\n }\n lru.cache.set(key, value);\n};\n\n// Cache the results of the Netlify Graph API for conditional requests\nconst cache = makeLRUCache(100);\n\nconst calculateCacheKey = (payload) => {\n return JSON.stringify(payload);\n};"; | ||
var generatedNetlifyGraphDynamicClient = function (netlifyGraphConfig) { | ||
return out(netlifyGraphConfig, ["node"], "const httpFetch = (siteId, options) => {\n const reqBody = options.body || null\n const userHeaders = options.headers || {}\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n 'Content-Length': reqBody.length,\n }\n\n const timeoutMs = 30_000\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n }\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + siteId\n\n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.write(reqBody)\n req.end()\n })\n}\n") + "\n" + out(netlifyGraphConfig, ["browser"], "const httpFetch = (siteId, options) => {\n const reqBody = options.body || null;\n const userHeaders = options.headers || {};\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n body: reqBody\n };\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + siteId;\n\n return fetch(url, reqOptions).then(response => response.text());\n}") + "\n\nconst fetchNetlifyGraph = function fetchNetlifyGraph(input) {\n const query = input.query;\n const docId = input.doc_id;\n const operationName = input.operationName;\n const variables = input.variables;\n\n const options = input.options || {};\n const accessToken = options.accessToken;\n const siteId = options.siteId || process.env.SITE_ID;\n\n const payload = {\n query: query,\n doc_id: docId,\n variables: variables,\n operationName: operationName,\n };\n\n const response = httpFetch(\n siteId,\n {\n method: 'POST',\n headers: {\n Authorization: accessToken ? \"Bearer \" + accessToken : '',\n },\n body: JSON.stringify(payload),\n },\n );\n\n return response.then(result => JSON.parse(result));\n}\n"; | ||
return lruCacheImplementation + "\n\n" + out(netlifyGraphConfig, ["node"], "const httpFetch = (siteId, options) => {\n const reqBody = options.body || null\n const userHeaders = options.headers || {}\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n 'Content-Length': reqBody.length,\n }\n\n const timeoutMs = 30_000\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n }\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + siteId\n\n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.write(reqBody)\n req.end()\n })\n}\n") + "\n" + out(netlifyGraphConfig, ["browser"], "const httpFetch = (siteId, options) => {\n const reqBody = options.body || null;\n const userHeaders = options.headers || {};\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n body: reqBody\n };\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + siteId;\n\n return fetch(url, reqOptions).then(response => response.text());\n}") + "\n\nconst fetchNetlifyGraph = function fetchNetlifyGraph(input) {\n const query = input.query;\n const docId = input.doc_id;\n const operationName = input.operationName;\n const variables = input.variables;\n\n const options = input.options || {};\n const accessToken = options.accessToken;\n const siteId = options.siteId || process.env.SITE_ID;\n\n const payload = {\n query: query,\n doc_id: docId,\n variables: variables,\n operationName: operationName,\n };\n\n let cachedOrLiveValue = new Promise((resolve) => {\n const cacheKey = calculateCacheKey(payload);\n\n // Check the cache for a previous result\n const cachedResultPair = getFromCache(cache, cacheKey);\n\n let conditionalHeaders = {};\n let cachedResultValue;\n\n if (cachedResultPair) {\n const [etag, previousResult] = cachedResultPair;\n conditionalHeaders = {\n 'If-None-Match': etag,\n };\n cachedResultValue = previousResult;\n }\n\n const response = httpFetch(siteId, {\n method: 'POST',\n headers: {\n ...conditionalHeaders,\n Authorization: accessToken ? 'Bearer ' + accessToken : '',\n },\n body: JSON.stringify(payload),\n });\n\n response.then((result) => {\n // Check response headers for a 304 Not Modified\n if (result.status === 304) {\n // Return the cached result\n resolve(cachedResultValue);\n }\n else if (result.status === 200) {\n // Update the cache with the new etag and result\n const etag = result.headers.get('ng-etag');\n const resultJson = result.json();\n resultJson.then((json) => {\n if (etag) {\n // Make a not of the new etag for the given payload\n setInCache(cache, cacheKey, [etag, json])\n };\n resolve(json);\n });\n } else {\n return result.json().then((json) => {\n resolve(json);\n });\n }\n });\n });\n\n return cachedOrLiveValue\n}\n"; | ||
}; | ||
var generatedNetlifyGraphPersistedClient = function (netlifyGraphConfig, schemaId) { | ||
return out(netlifyGraphConfig, ["node"], "const httpGet = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json'\n };\n const timeoutMs = 30_000\n const reqOptions = {\n method: 'GET',\n headers: fullHeaders,\n timeout: timeoutMs,\n };\n\n if (!input.docId) {\n throw new Error('docId is required for GET requests: ' + input.operationName);\n }\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const encodedVariables = encodeURIComponent(input.variables || \"null\");\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId + '&doc_id=' + input.docId + (input.operationName ? ('&operationName=' + input.operationName) : '') + (schemaId ? ('&schemaId=' + schemaId) : '') + '&variables=' + encodedVariables;\n \n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.end()\n })\n}\n\nconst httpPost = (input) => {\n const reqBody = input.body || null\n const userHeaders = input.headers || {}\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n 'Content-Length': reqBody.length,\n }\n\n const timeoutMs = 30_000\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n }\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId +\n (schemaId ? ('&schemaId=' + schemaId) : '');\n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.write(reqBody)\n req.end()\n })\n}") + "\n\n" + out(netlifyGraphConfig, ["browser"], "const httpGet = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'GET',\n headers: fullHeaders,\n timeout: timeoutMs,\n };\n\n const encodedVariables = encodeURIComponent(\n JSON.stringify(input.variables || null)\n );\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const url =\n 'https://serve.onegraph.com/graphql?app_id=' +\n input.siteId +\n '&doc_id=' +\n input.docId +\n (input.operationName ? '&operationName=' + input.operationName : '') +\n (schemaId ? ('&schemaId=' + schemaId) : '') +\n '&variables=' +\n encodedVariables;\n\n return fetch(url, reqOptions).then((response) => response.text());\n};\n\nconst httpPost = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const reqBody = JSON.stringify({\n doc_id: input.docId,\n query: input.query,\n operationName: input.operationName,\n variables: input.variables,\n });\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'POST',\n headers: fullHeaders,\n timeout: timeoutMs,\n body: reqBody,\n };\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId +\n (schemaId ? ('&schemaId=' + schemaId) : '');\n\n return fetch(url, reqOptions).then((response) => response.text());\n};") + "\n\nconst fetchNetlifyGraph = function fetchNetlifyGraph(input) {\n const docId = input.doc_id;\n const operationName = input.operationName;\n const variables = input.variables;\n\n const options = input.options || {};\n const accessToken = options.accessToken;\n const siteId = options.siteId || process.env.SITE_ID;\n\n const httpMethod = input.fetchStrategy === 'GET' ? httpGet : httpPost;\n\n const response = httpMethod({\n siteId: siteId,\n docId: docId,\n query: input.query,\n headers: {\n Authorization: accessToken ? 'Bearer ' + accessToken : '',\n },\n variables: variables,\n operationName: operationName,\n });\n\n return response.then((result) => JSON.parse(result));\n};\n"; | ||
return lruCacheImplementation + "\n\n" + out(netlifyGraphConfig, ["node"], "const httpGet = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json'\n };\n const timeoutMs = 30_000\n const reqOptions = {\n method: 'GET',\n headers: fullHeaders,\n timeout: timeoutMs,\n };\n\n if (!input.docId) {\n throw new Error('docId is required for GET requests: ' + input.operationName);\n }\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const encodedVariables = encodeURIComponent(input.variables || \"null\");\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId + '&doc_id=' + input.docId + (input.operationName ? ('&operationName=' + input.operationName) : '') + (schemaId ? ('&schemaId=' + schemaId) : '') + '&variables=' + encodedVariables;\n \n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.end()\n })\n}\n\nconst httpPost = (input) => {\n const reqBody = input.body || null\n const userHeaders = input.headers || {}\n const headers = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n 'Content-Length': reqBody.length,\n }\n\n const timeoutMs = 30_000\n\n const reqOptions = {\n method: 'POST',\n headers: headers,\n timeout: timeoutMs,\n }\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId +\n (schemaId ? ('&schemaId=' + schemaId) : '');\n const respBody = []\n\n return new Promise((resolve, reject) => {\n const req = https.request(url, reqOptions, (res) => {\n if (res.statusCode && (res.statusCode < 200 || res.statusCode > 299)) {\n return reject(\n new Error(\n \"Netlify Graph return non-OK HTTP status code\" + res.statusCode,\n ),\n )\n }\n\n res.on('data', (chunk) => respBody.push(chunk))\n\n res.on('end', () => {\n const resString = buffer.Buffer.concat(respBody).toString()\n resolve(resString)\n })\n })\n\n req.on('error', (error) => {\n console.error('Error making request to Netlify Graph:', error)\n })\n\n req.on('timeout', () => {\n req.destroy()\n reject(new Error('Request to Netlify Graph timed out'))\n })\n\n req.write(reqBody)\n req.end()\n })\n}") + "\n\n" + out(netlifyGraphConfig, ["browser"], "const httpGet = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'GET',\n headers: fullHeaders,\n timeout: timeoutMs,\n };\n\n const encodedVariables = encodeURIComponent(\n JSON.stringify(input.variables || null)\n );\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const url =\n 'https://serve.onegraph.com/graphql?app_id=' +\n input.siteId +\n '&doc_id=' +\n input.docId +\n (input.operationName ? '&operationName=' + input.operationName : '') +\n (schemaId ? ('&schemaId=' + schemaId) : '') +\n '&variables=' +\n encodedVariables;\n\n return fetch(url, reqOptions).then((response) => response.text());\n};\n\nconst httpPost = (input) => {\n const userHeaders = input.headers || {};\n const fullHeaders = {\n ...userHeaders,\n 'Content-Type': 'application/json',\n };\n\n const reqBody = JSON.stringify({\n doc_id: input.docId,\n query: input.query,\n operationName: input.operationName,\n variables: input.variables,\n });\n\n const timeoutMs = 30_000;\n\n const reqOptions = {\n method: 'POST',\n headers: fullHeaders,\n timeout: timeoutMs,\n body: reqBody,\n };\n\n const schemaId = input.schemaId || " + (schemaId ? "\"" + schemaId + "\"" : "undefined") + ";\n\n const url = 'https://serve.onegraph.com/graphql?app_id=' + input.siteId +\n (schemaId ? ('&schemaId=' + schemaId) : '');\n\n return fetch(url, reqOptions).then((response) => response.text());\n};") + "\n\nconst fetchNetlifyGraph = function fetchNetlifyGraph(input) {\n const docId = input.doc_id;\n const operationName = input.operationName;\n const variables = input.variables;\n\n const options = input.options || {};\n const accessToken = options.accessToken;\n const siteId = options.siteId || process.env.SITE_ID;\n\n const httpMethod = input.fetchStrategy === 'GET' ? httpGet : httpPost;\n\n let response;\n\n if (input.fetchStrategy === 'GET') {\n response = httpMethod({\n siteId: siteId,\n docId: docId,\n query: input.query,\n headers: {\n Authorization: accessToken ? 'Bearer ' + accessToken : '',\n },\n variables: variables,\n operationName: operationName,\n }).then((result) => JSON.parse(result));\n } else {\n let cachedOrLiveValue = new Promise((resolve) => {\n const cacheKey = calculateCacheKey(payload);\n\n // Check the cache for a previous result\n const cachedResultPair = getFromCache(cache, cacheKey);\n\n let conditionalHeaders = {};\n let cachedResultValue;\n\n if (cachedResultPair) {\n const [etag, previousResult] = cachedResultPair;\n conditionalHeaders = {\n 'If-None-Match': etag,\n };\n cachedResultValue = previousResult;\n }\n\n const persistedResponse = httpMethod({\n siteId: siteId,\n docId: docId,\n query: input.query,\n headers: {\n ...conditionalHeaders,\n Authorization: accessToken ? 'Bearer ' + accessToken : '',\n },\n variables: variables,\n operationName: operationName,\n });\n\n persistedResponse.then((result) => {\n // Check response headers for a 304 Not Modified\n if (result.status === 304) {\n // Return the cached result\n resolve(cachedResultValue);\n }\n else if (result.status === 200) {\n // Update the cache with the new etag and result\n const etag = result.headers.get('ng-etag');\n const resultJson = result.json();\n resultJson.then((json) => {\n if (etag) {\n // Make a not of the new etag for the given payload\n setInCache(cache, cacheKey, [etag, json])\n };\n resolve(json);\n });\n } else {\n return result.json().then((json) => {\n resolve(json);\n });\n }\n });\n };\n\n response = cachedOrLiveValue;\n }\n\n return response;\n};\n"; | ||
}; | ||
var subscriptionParserReturnName = function (fn) { return fn.operationName + "Event"; }; | ||
var subscriptionParserName = function (fn) { return "parseAndVerify" + fn.operationName + "Event"; }; | ||
var subscriptionFunctionName = function (fn) { return "subscribeTo" + fn.operationName; }; | ||
var subscriptionParserReturnName = function (fn) { | ||
return fn.operationName + "Event"; | ||
}; | ||
var subscriptionParserName = function (fn) { | ||
return "parseAndVerify" + fn.operationName + "Event"; | ||
}; | ||
var subscriptionFunctionName = function (fn) { | ||
return "subscribeTo" + fn.operationName; | ||
}; | ||
var out = function (netlifyGraphConfig, envs, value) { | ||
@@ -429,3 +436,3 @@ if (!envs.includes(netlifyGraphConfig.runtimeTargetEnv)) { | ||
.join(",\n "); | ||
var source = "/* eslint-disable */\n// GENERATED VIA NETLIFY AUTOMATED DEV TOOLS, EDIT WITH CAUTION!\n\nexport type NetlifyGraphFunctionOptions = {\n /**\n * The accessToken to use for the request\n */\n accessToken?: string;\n /**\n * The siteId to use for the request\n * @default process.env.SITE_ID\n */\n siteId?: string;\n}\n\nexport type WebhookEvent = {\n body: string;\n headers: Record<string, string | null | undefined>;\n};\n\nexport type GraphQLError = {\n \"path\": Array<string | number>,\n \"message\": string,\n \"extensions\": Record<string, unknown>\n};\n\n" + fragmentDecls.join("\n\n") + "\n\n" + functionDecls.join("\n\n") + "\n\nexport interface Functions {\n " + (exportedFunctionsObjectProperties === "" | ||
var source = "/* eslint-disable */\n// @ts-nocheck\n// GENERATED VIA NETLIFY AUTOMATED DEV TOOLS, EDIT WITH CAUTION!\n\nexport type NetlifyGraphFunctionOptions = {\n /**\n * The accessToken to use for the request\n */\n accessToken?: string;\n /**\n * The siteId to use for the request\n * @default process.env.SITE_ID\n */\n siteId?: string;\n}\n\nexport type WebhookEvent = {\n body: string;\n headers: Record<string, string | null | undefined>;\n};\n\nexport type GraphQLError = {\n \"path\": Array<string | number>,\n \"message\": string,\n \"extensions\": Record<string, unknown>\n};\n\n" + fragmentDecls.join("\n\n") + "\n\n" + functionDecls.join("\n\n") + "\n\nexport interface Functions {\n " + (exportedFunctionsObjectProperties === "" | ||
? "Record<string, never>" | ||
@@ -432,0 +439,0 @@ : exportedFunctionsObjectProperties) + "\n}\n\nexport const functions: Functions;\n\nexport default functions;\n"; |
{ | ||
"name": "netlify-onegraph-internal", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "Internal tools for use by Netlify", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
422303
5436
13