gatsby 4.4.0-next.1 → 4.4.0

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.
@@ -417,6 +417,13 @@ export declare const onPreBuild = true;
417
417
  /**
418
418
  * The last extension point called after all other parts of the build process
419
419
  * are complete.
420
+ *
421
+ * @example
422
+ * exports.onPostBuild = ({ reporter, basePath, pathPrefix }) => {
423
+ * reporter.info(
424
+ * `Site was built with basePath: ${basePath} & pathPrefix: ${pathPrefix}`
425
+ * );
426
+ * };
420
427
  */
421
428
  export declare const onPostBuild = true;
422
429
  /**
@@ -457,6 +457,13 @@ const onPreBuild = true;
457
457
  /**
458
458
  * The last extension point called after all other parts of the build process
459
459
  * are complete.
460
+ *
461
+ * @example
462
+ * exports.onPostBuild = ({ reporter, basePath, pathPrefix }) => {
463
+ * reporter.info(
464
+ * `Site was built with basePath: ${basePath} & pathPrefix: ${pathPrefix}`
465
+ * );
466
+ * };
460
467
  */
461
468
 
462
469
  exports.onPreBuild = onPreBuild;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/api-node-docs.ts"],"names":["resolvableExtensions","createPages","createPagesStatefully","sourceNodes","onCreateNode","unstable_shouldOnCreateNode","onCreatePage","setFieldsOnGraphQLNodeType","createSchemaCustomization","createResolvers","preprocessSource","onCreateBabelConfig","onCreateWebpackConfig","onPreInit","onPluginInit","onPreBootstrap","onPostBootstrap","onPreBuild","onPostBuild","onPreExtractQueries","onCreateDevServer","pluginOptionsSchema"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAG,IAA7B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,2BAA2B,GAAG,IAApC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,0BAA0B,GAAG,IAAnC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,yBAAyB,GAAG,IAAlC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,eAAe,GAAG,IAAxB;AAEP;AACA;AACA;AACA;;;AACO,MAAMC,gBAAgB,GAAG,IAAzB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;;;AACO,MAAMC,SAAS,GAAG,IAAlB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;;;AACO,MAAMC,cAAc,GAAG,IAAvB;AAEP;AACA;AACA;;;AACO,MAAMC,eAAe,GAAG,IAAxB;AAEP;AACA;AACA;;;AACO,MAAMC,UAAU,GAAG,IAAnB;AAEP;AACA;AACA;AACA;;;AACO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,iBAAiB,GAAG,IAA1B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B","sourcesContent":["/**\n * Lets plugins implementing support for other compile-to-js add to the list\n * of \"resolvable\" file extensions. Gatsby supports `.js` and `.jsx` by default.\n * @returns {Array<string>} array of extensions\n */\nexport const resolvableExtensions = true\n\n/**\n * Create pages dynamically. This extension point is called only after the initial\n * sourcing and transformation of nodes plus creation of the GraphQL schema are\n * complete so you can query your data in order to create pages.\n *\n * You can also fetch data from remote or local sources to create pages.\n *\n * See also [the documentation for the action `createPage`](/docs/actions/#createPage).\n *\n * @param {object} $0 See the [documentation for `Node API Helpers` for more details](/docs/node-api-helpers)\n * @param {Actions} $0.actions See the [list of documented actions](/docs/actions)\n * @param {function} $0.actions.createPage [Documentation for this action](/docs/actions/#createPage)\n * @param {function} $0.graphql: Query GraphQL API. See [examples here](/docs/creating-and-modifying-pages/#creating-pages-in-gatsby-nodejs)\n * @param {GatsbyReporter} $0.reporter Log issues. See [GatsbyReporter documentation](/docs/node-api-helpers/#GatsbyReporter) for more details\n * @returns {Promise<void>} No return value required, but the caller will `await` any promise that's returned\n *\n * @example\n * const path = require(`path`)\n *\n * exports.createPages = ({ graphql, actions }) => {\n * const { createPage } = actions\n * const blogPostTemplate = path.resolve(`src/templates/blog-post.js`)\n * // Query for markdown nodes to use in creating pages.\n * // You can query for whatever data you want to create pages for e.g.\n * // products, portfolio items, landing pages, etc.\n * // Variables can be added as the second function parameter\n * return graphql(`\n * query loadPagesQuery ($limit: Int!) {\n * allMarkdownRemark(limit: $limit) {\n * edges {\n * node {\n * frontmatter {\n * slug\n * }\n * }\n * }\n * }\n * }\n * `, { limit: 1000 }).then(result => {\n * if (result.errors) {\n * throw result.errors\n * }\n *\n * // Create blog post pages.\n * result.data.allMarkdownRemark.edges.forEach(edge => {\n * createPage({\n * // Path for this page — required\n * path: `${edge.node.frontmatter.slug}`,\n * component: blogPostTemplate,\n * context: {\n * // Add optional context data to be inserted\n * // as props into the page component.\n * //\n * // The context data can also be used as\n * // arguments to the page GraphQL query.\n * //\n * // The page \"path\" is always available as a GraphQL\n * // argument.\n * },\n * })\n * })\n * })\n * }\n */\n\nexport const createPages = true\n\n/**\n * Like `createPages` but for plugins who want to manage creating and removing\n * pages themselves in response to changes in data *not* managed by Gatsby.\n * Plugins implementing `createPages` will get called regularly to recompute\n * page information as Gatsby's data changes but those implementing\n * `createPagesStatefully` will not.\n *\n * An example of a plugin that uses this extension point is the plugin\n * [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-page-creator)\n * which monitors the `src/pages` directory for the adding and removal of JS\n * pages. As its source of truth, files in the pages directory, is not known by\n * Gatsby, it needs to keep its own state about its world to know when to\n * add and remove pages.\n */\nexport const createPagesStatefully = true\n\n/**\n * Extension point to tell plugins to source nodes. This API is called during\n * the Gatsby bootstrap sequence. Source plugins use this hook to create nodes.\n * This API is called exactly once per plugin (and once for your site's\n * `gatsby-config.js` file). If you define this hook in `gatsby-node.js` it\n * will be called exactly once after all of your source plugins have finished\n * creating nodes.\n *\n * The [Creating a Source\n * Plugin](/docs/how-to/plugins-and-themes/creating-a-source-plugin/) tutorial\n * demonstrates a way a plugin or site might use this API.\n *\n * See also the documentation for [`createNode`](/docs/actions/#createNode).\n * @example\n * exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {\n * const { createNode } = actions\n *\n * // Data can come from anywhere, but for now create it manually\n * const myData = {\n * key: 123,\n * foo: `The foo field of my node`,\n * bar: `Baz`\n * }\n *\n * const nodeContent = JSON.stringify(myData)\n *\n * const nodeMeta = {\n * id: createNodeId(`my-data-${myData.key}`),\n * parent: null,\n * children: [],\n * internal: {\n * type: `MyNodeType`,\n * mediaType: `text/html`,\n * content: nodeContent,\n * contentDigest: createContentDigest(myData)\n * }\n * }\n *\n * const node = Object.assign({}, myData, nodeMeta)\n * createNode(node)\n * }\n */\nexport const sourceNodes = true\n\n/**\n * Called when a new node is created. Plugins wishing to extend or\n * transform nodes created by other plugins should implement this API.\n *\n * See also the documentation for [`createNode`](/docs/actions/#createNode)\n * and [`createNodeField`](/docs/actions/#createNodeField)\n *\n * The [Creating a Source\n * Plugin](/docs/how-to/plugins-and-themes/creating-a-source-plugin/) tutorial\n * demonstrates a way a plugin or site might use this API.\n *\n * @example\n * exports.onCreateNode = ({ node, actions }) => {\n * const { createNode, createNodeField } = actions\n * // Transform the new node here and create a new node or\n * // create a new node field.\n * }\n */\nexport const onCreateNode = true\n\n/**\n * Called before scheduling a `onCreateNode` callback for a plugin. If it returns falsy\n * then Gatsby will not schedule the `onCreateNode` callback for this node for this plugin.\n * Note: this API does not receive the regular `api` that other callbacks get as first arg.\n *\n * @gatsbyVersion 2.24.80\n * @example\n * exports.unstable_shouldOnCreateNode = ({node}, pluginOptions) => node.internal.type === 'Image'\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_shouldOnCreateNode = true\n\n/**\n * Called when a new page is created. This extension API is useful\n * for programmatically manipulating pages created by other plugins e.g.\n * if you want paths without trailing slashes.\n *\n * There is a mechanism in Gatsby to prevent calling onCreatePage for pages\n * created by the same gatsby-node.js to avoid infinite loops/callback.\n *\n * See the guide [Creating and Modifying Pages](/docs/creating-and-modifying-pages/)\n * for more on this API.\n */\nexport const onCreatePage = true\n\n/**\n * Called during the creation of the GraphQL schema. Allows plugins\n * to add new fields to the types created from data nodes. It will be called\n * separately for each type.\n *\n * This function should return an object in the shape of\n * [GraphQLFieldConfigMap](https://graphql.org/graphql-js/type/#graphqlobjecttype)\n * which will be appended to fields inferred by Gatsby from data nodes.\n *\n * *Note:* Import GraphQL types from `gatsby/graphql` and don't add the `graphql`\n * package to your project/plugin dependencies to avoid `Schema must\n * contain unique named types but contains multiple types named` errors.\n * `gatsby/graphql` exports all builtin GraphQL types as well as the `GraphQLJSON`\n * type.\n *\n * Many transformer plugins use this to add fields that take arguments.\n *\n * * [`gatsby-transformer-remark`](/plugins/gatsby-transformer-remark/)\n * adds an \"excerpt\" field where the user when writing their query can specify\n * how many characters to prune the markdown source to.\n * * [`gatsby-transformer-sharp`](/plugins/gatsby-transformer-sharp/) exposes\n * many image transformation options as GraphQL fields.\n *\n * @param {object} $0\n * @param {object} $0.type Object containing `name` and `nodes`\n * @example\n * import { GraphQLString } from \"gatsby/graphql\"\n *\n * exports.setFieldsOnGraphQLNodeType = ({ type }) => {\n * if (type.name === `File`) {\n * return {\n * newField: {\n * type: GraphQLString,\n * args: {\n * myArgument: {\n * type: GraphQLString,\n * }\n * },\n * resolve: (source, fieldArgs) => {\n * return `Id of this node is ${source.id}.\n * Field was called with argument: ${fieldArgs.myArgument}`\n * }\n * }\n * }\n * }\n *\n * // by default return empty object\n * return {}\n * }\n */\nexport const setFieldsOnGraphQLNodeType = true\n\n/**\n * Customize Gatsby's GraphQL schema by creating type definitions, field\n * extensions or adding third-party schemas.\n *\n * The [`createTypes`](/docs/actions/#createTypes),\n * [`createFieldExtension`](/docs/actions/#createFieldExtension) and\n * [`addThirdPartySchema`](/docs/actions/#addThirdPartySchema) actions\n * are only available in this API. For details on their usage please refer to\n * the actions documentation.\n *\n * This API runs immediately before schema generation. For modifications of the\n * generated schema, e.g. to customize added third-party types, use the\n * [`createResolvers`](/docs/node-apis/#createResolvers) API.\n *\n * @gatsbyVersion 2.12.0\n * @param {object} $0\n * @param {object} $0.actions\n * @param {object} $0.actions.createTypes\n * @param {object} $0.actions.createFieldExtension\n * @param {object} $0.actions.addThirdPartySchema\n * @example\n * exports.createSchemaCustomization = ({ actions }) => {\n * const { createTypes, createFieldExtension } = actions\n *\n * createFieldExtension({\n * name: 'shout',\n * extend: () => ({\n * resolve(source, args, context, info) {\n * return String(source[info.fieldName]).toUpperCase()\n * }\n * })\n * })\n *\n * const typeDefs = `\n * type MarkdownRemark implements Node @dontInfer {\n * frontmatter: Frontmatter\n * }\n * type Frontmatter {\n * title: String!\n * tagline: String @shout\n * date: Date @dateformat\n * image: File @fileByRelativePath\n * }\n * `\n * createTypes(typeDefs)\n * }\n */\nexport const createSchemaCustomization = true\n\n/**\n * Add custom field resolvers to the GraphQL schema.\n *\n * Allows adding new fields to types by providing field configs, or adding resolver\n * functions to existing fields.\n *\n * Things to note:\n * * Overriding field types is disallowed, instead use the `createTypes`\n * action. In case of types added from third-party schemas, where this is not\n * possible, overriding field types is allowed.\n * * New fields will not be available on `filter` and `sort` input types. Extend\n * types defined with `createTypes` if you need this.\n * * In field configs, types can be referenced as strings.\n * * When extending a field with an existing field resolver, the original\n * resolver function is available from `info.originalResolver`.\n * * The `createResolvers` API is called as the last step in schema generation.\n * Thus, an intermediate schema is made available on the `intermediateSchema` property.\n * In resolver functions themselves, it is recommended to access the final\n * built schema from `info.schema`.\n * * Gatsby's data layer, including all internal query capabilities, is\n * exposed on [`context.nodeModel`](/docs/node-model/). The node store can be\n * queried directly with `findOne`, `getNodeById` and `getNodesByIds`,\n * while more advanced queries can be composed with `findAll`.\n * * It is possible to add fields to the root `Query` type.\n * * When using the first resolver argument (`source` in the example below,\n * often also called `parent` or `root`), take care of the fact that field\n * resolvers can be called more than once in a query, e.g. when the field is\n * present both in the input filter and in the selection set. This means that\n * foreign-key fields on `source` can be either resolved or not-resolved.\n *\n * For fuller examples, see [`using-type-definitions`](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-type-definitions).\n *\n * @gatsbyVersion 2.2.0\n * @param {object} $0\n * @param {GraphQLSchema} $0.intermediateSchema Current GraphQL schema\n * @param {function} $0.createResolvers Add custom resolvers to GraphQL field configs\n * @param {object} $1\n * @param {object} $1.resolvers An object map of GraphQL type names to custom resolver functions\n * @param {object} $1.options Optional createResolvers options\n * @param {object} $1.options.ignoreNonexistentTypes Silences the warning when trying to add resolvers for types that don't exist. Useful for optional extensions.\n * @example\n * exports.createResolvers = ({ createResolvers }) => {\n * const resolvers = {\n * Author: {\n * fullName: {\n * resolve: (source, args, context, info) => {\n * return source.firstName + source.lastName\n * }\n * },\n * },\n * Query: {\n * allRecentPosts: {\n * type: [`BlogPost`],\n * resolve: async (source, args, context, info) => {\n * const { entries } = await context.nodeModel.findAll({ type: `BlogPost` })\n * return entries.filter(\n * post => post.publishedAt > Date.UTC(2018, 0, 1)\n * )\n * }\n * }\n * }\n * }\n * createResolvers(resolvers)\n * }\n */\nexport const createResolvers = true\n\n/**\n * Ask compile-to-js plugins to process source to JavaScript so the query\n * runner can extract out GraphQL queries for running.\n */\nexport const preprocessSource = true\n\n/**\n * Let plugins extend/mutate the site's Babel configuration by calling\n * [`setBabelPlugin`](/docs/actions/#setBabelPlugin) or\n * [`setBabelPreset`](/docs/actions/#setBabelPreset).\n * @param {object} $0\n * @param {string} $0.stage The current build stage. One of 'develop', 'develop-html',\n * 'build-javascript', or 'build-html'\n * @param {object} $0.actions\n * @param {object} options The Babel configuration\n * @example\n * exports.onCreateBabelConfig = ({ actions }) => {\n * actions.setBabelPlugin({\n * name: `babel-plugin-that-i-like`,\n * options: {}\n * })\n * }\n */\nexport const onCreateBabelConfig = true\n\n/**\n * Let plugins extend/mutate the site's webpack configuration.\n *\n * See also the documentation for [`setWebpackConfig`](/docs/actions/#setWebpackConfig).\n *\n * @param {object} $0\n * @param {string} $0.stage The current build stage. One of 'develop', 'develop-html',\n * 'build-javascript', or 'build-html'\n * @param {function} $0.getConfig Returns the current webpack config\n * @param {object} $0.rules A set of preconfigured webpack config rules\n * @param {object} $0.loaders A set of preconfigured webpack config loaders\n * @param {object} $0.plugins A set of preconfigured webpack config plugins\n * @param {object} $0.actions\n * @example\n * exports.onCreateWebpackConfig = ({\n * stage, getConfig, rules, loaders, actions\n * }) => {\n * actions.setWebpackConfig({\n * module: {\n * rules: [\n * {\n * test: 'my-css',\n * use: [loaders.style(), loaders.css()]\n * },\n * ],\n * },\n * });\n * }\n */\nexport const onCreateWebpackConfig = true\n\n/**\n * The first API called during Gatsby execution, runs as soon as plugins are loaded, before cache initialization and bootstrap preparation.\n */\nexport const onPreInit = true\n\n/**\n * Lifecycle executed in each process (one time per process). Used to store actions etc for later use.\n *\n * @example\n * let createJobV2\n * exports.onPluginInit = ({ actions }) => {\n * // store job creation action to use it later\n * createJobV2 = actions.createJobV2\n * }\n * @gatsbyVersion 3.9.0\n */\nexport const onPluginInit = true\n\n/**\n * Called once Gatsby has initialized itself and is ready to bootstrap your site.\n */\nexport const onPreBootstrap = true\n\n/**\n * Called at the end of the bootstrap process after all other extension APIs have been called.\n */\nexport const onPostBootstrap = true\n\n/**\n * The first extension point called during the build process. Called after the bootstrap has completed but before the build steps start.\n */\nexport const onPreBuild = true\n\n/**\n * The last extension point called after all other parts of the build process\n * are complete.\n */\nexport const onPostBuild = true\n\n/**\n * Run before GraphQL queries/fragments are extracted from JavaScript files. Useful for plugins\n * to add more JavaScript files with queries/fragments e.g. from node_modules.\n *\n * See gatsby-transformer-sharp and gatsby-source-contentful for examples.\n */\nexport const onPreExtractQueries = true\n\n/**\n * Run when the `gatsby develop` server is started. It can be used for adding proxies and Express middleware\n * to the server.\n * @param {object} $0\n * @param {Express} $0.app The [Express app](https://expressjs.com/en/4x/api.html#app) used to run the dev server\n * @example\n * exports.onCreateDevServer = ({ app }) => {\n * app.get('/hello', function (req, res) {\n * res.send('hello world')\n * })\n * }\n */\nexport const onCreateDevServer = true\n\n/**\n * Run during the bootstrap phase. Plugins can use this to define a schema for their options using\n * [Joi](https://joi.dev) to validate the options users pass to the plugin.\n * @gatsbyVersion 2.25.0\n * @param {object} $0\n * @param {Joi} $0.Joi The instance of [Joi](https://joi.dev) to define the schema\n * @example\n * exports.pluginOptionsSchema = ({ Joi }) => {\n * return Joi.object({\n * // Validate that the anonymize option is defined by the user and is a boolean\n * anonymize: Joi.boolean().required(),\n * })\n * }\n */\nexport const pluginOptionsSchema = true\n"],"file":"api-node-docs.js"}
1
+ {"version":3,"sources":["../../src/utils/api-node-docs.ts"],"names":["resolvableExtensions","createPages","createPagesStatefully","sourceNodes","onCreateNode","unstable_shouldOnCreateNode","onCreatePage","setFieldsOnGraphQLNodeType","createSchemaCustomization","createResolvers","preprocessSource","onCreateBabelConfig","onCreateWebpackConfig","onPreInit","onPluginInit","onPreBootstrap","onPostBootstrap","onPreBuild","onPostBuild","onPreExtractQueries","onCreateDevServer","pluginOptionsSchema"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAG,IAA7B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,2BAA2B,GAAG,IAApC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,0BAA0B,GAAG,IAAnC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,yBAAyB,GAAG,IAAlC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,eAAe,GAAG,IAAxB;AAEP;AACA;AACA;AACA;;;AACO,MAAMC,gBAAgB,GAAG,IAAzB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;;;AACO,MAAMC,SAAS,GAAG,IAAlB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,YAAY,GAAG,IAArB;AAEP;AACA;AACA;;;AACO,MAAMC,cAAc,GAAG,IAAvB;AAEP;AACA;AACA;;;AACO,MAAMC,eAAe,GAAG,IAAxB;AAEP;AACA;AACA;;;AACO,MAAMC,UAAU,GAAG,IAAnB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,WAAW,GAAG,IAApB;AAEP;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,iBAAiB,GAAG,IAA1B;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMC,mBAAmB,GAAG,IAA5B","sourcesContent":["/**\n * Lets plugins implementing support for other compile-to-js add to the list\n * of \"resolvable\" file extensions. Gatsby supports `.js` and `.jsx` by default.\n * @returns {Array<string>} array of extensions\n */\nexport const resolvableExtensions = true\n\n/**\n * Create pages dynamically. This extension point is called only after the initial\n * sourcing and transformation of nodes plus creation of the GraphQL schema are\n * complete so you can query your data in order to create pages.\n *\n * You can also fetch data from remote or local sources to create pages.\n *\n * See also [the documentation for the action `createPage`](/docs/actions/#createPage).\n *\n * @param {object} $0 See the [documentation for `Node API Helpers` for more details](/docs/node-api-helpers)\n * @param {Actions} $0.actions See the [list of documented actions](/docs/actions)\n * @param {function} $0.actions.createPage [Documentation for this action](/docs/actions/#createPage)\n * @param {function} $0.graphql: Query GraphQL API. See [examples here](/docs/creating-and-modifying-pages/#creating-pages-in-gatsby-nodejs)\n * @param {GatsbyReporter} $0.reporter Log issues. See [GatsbyReporter documentation](/docs/node-api-helpers/#GatsbyReporter) for more details\n * @returns {Promise<void>} No return value required, but the caller will `await` any promise that's returned\n *\n * @example\n * const path = require(`path`)\n *\n * exports.createPages = ({ graphql, actions }) => {\n * const { createPage } = actions\n * const blogPostTemplate = path.resolve(`src/templates/blog-post.js`)\n * // Query for markdown nodes to use in creating pages.\n * // You can query for whatever data you want to create pages for e.g.\n * // products, portfolio items, landing pages, etc.\n * // Variables can be added as the second function parameter\n * return graphql(`\n * query loadPagesQuery ($limit: Int!) {\n * allMarkdownRemark(limit: $limit) {\n * edges {\n * node {\n * frontmatter {\n * slug\n * }\n * }\n * }\n * }\n * }\n * `, { limit: 1000 }).then(result => {\n * if (result.errors) {\n * throw result.errors\n * }\n *\n * // Create blog post pages.\n * result.data.allMarkdownRemark.edges.forEach(edge => {\n * createPage({\n * // Path for this page — required\n * path: `${edge.node.frontmatter.slug}`,\n * component: blogPostTemplate,\n * context: {\n * // Add optional context data to be inserted\n * // as props into the page component.\n * //\n * // The context data can also be used as\n * // arguments to the page GraphQL query.\n * //\n * // The page \"path\" is always available as a GraphQL\n * // argument.\n * },\n * })\n * })\n * })\n * }\n */\n\nexport const createPages = true\n\n/**\n * Like `createPages` but for plugins who want to manage creating and removing\n * pages themselves in response to changes in data *not* managed by Gatsby.\n * Plugins implementing `createPages` will get called regularly to recompute\n * page information as Gatsby's data changes but those implementing\n * `createPagesStatefully` will not.\n *\n * An example of a plugin that uses this extension point is the plugin\n * [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-page-creator)\n * which monitors the `src/pages` directory for the adding and removal of JS\n * pages. As its source of truth, files in the pages directory, is not known by\n * Gatsby, it needs to keep its own state about its world to know when to\n * add and remove pages.\n */\nexport const createPagesStatefully = true\n\n/**\n * Extension point to tell plugins to source nodes. This API is called during\n * the Gatsby bootstrap sequence. Source plugins use this hook to create nodes.\n * This API is called exactly once per plugin (and once for your site's\n * `gatsby-config.js` file). If you define this hook in `gatsby-node.js` it\n * will be called exactly once after all of your source plugins have finished\n * creating nodes.\n *\n * The [Creating a Source\n * Plugin](/docs/how-to/plugins-and-themes/creating-a-source-plugin/) tutorial\n * demonstrates a way a plugin or site might use this API.\n *\n * See also the documentation for [`createNode`](/docs/actions/#createNode).\n * @example\n * exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {\n * const { createNode } = actions\n *\n * // Data can come from anywhere, but for now create it manually\n * const myData = {\n * key: 123,\n * foo: `The foo field of my node`,\n * bar: `Baz`\n * }\n *\n * const nodeContent = JSON.stringify(myData)\n *\n * const nodeMeta = {\n * id: createNodeId(`my-data-${myData.key}`),\n * parent: null,\n * children: [],\n * internal: {\n * type: `MyNodeType`,\n * mediaType: `text/html`,\n * content: nodeContent,\n * contentDigest: createContentDigest(myData)\n * }\n * }\n *\n * const node = Object.assign({}, myData, nodeMeta)\n * createNode(node)\n * }\n */\nexport const sourceNodes = true\n\n/**\n * Called when a new node is created. Plugins wishing to extend or\n * transform nodes created by other plugins should implement this API.\n *\n * See also the documentation for [`createNode`](/docs/actions/#createNode)\n * and [`createNodeField`](/docs/actions/#createNodeField)\n *\n * The [Creating a Source\n * Plugin](/docs/how-to/plugins-and-themes/creating-a-source-plugin/) tutorial\n * demonstrates a way a plugin or site might use this API.\n *\n * @example\n * exports.onCreateNode = ({ node, actions }) => {\n * const { createNode, createNodeField } = actions\n * // Transform the new node here and create a new node or\n * // create a new node field.\n * }\n */\nexport const onCreateNode = true\n\n/**\n * Called before scheduling a `onCreateNode` callback for a plugin. If it returns falsy\n * then Gatsby will not schedule the `onCreateNode` callback for this node for this plugin.\n * Note: this API does not receive the regular `api` that other callbacks get as first arg.\n *\n * @gatsbyVersion 2.24.80\n * @example\n * exports.unstable_shouldOnCreateNode = ({node}, pluginOptions) => node.internal.type === 'Image'\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_shouldOnCreateNode = true\n\n/**\n * Called when a new page is created. This extension API is useful\n * for programmatically manipulating pages created by other plugins e.g.\n * if you want paths without trailing slashes.\n *\n * There is a mechanism in Gatsby to prevent calling onCreatePage for pages\n * created by the same gatsby-node.js to avoid infinite loops/callback.\n *\n * See the guide [Creating and Modifying Pages](/docs/creating-and-modifying-pages/)\n * for more on this API.\n */\nexport const onCreatePage = true\n\n/**\n * Called during the creation of the GraphQL schema. Allows plugins\n * to add new fields to the types created from data nodes. It will be called\n * separately for each type.\n *\n * This function should return an object in the shape of\n * [GraphQLFieldConfigMap](https://graphql.org/graphql-js/type/#graphqlobjecttype)\n * which will be appended to fields inferred by Gatsby from data nodes.\n *\n * *Note:* Import GraphQL types from `gatsby/graphql` and don't add the `graphql`\n * package to your project/plugin dependencies to avoid `Schema must\n * contain unique named types but contains multiple types named` errors.\n * `gatsby/graphql` exports all builtin GraphQL types as well as the `GraphQLJSON`\n * type.\n *\n * Many transformer plugins use this to add fields that take arguments.\n *\n * * [`gatsby-transformer-remark`](/plugins/gatsby-transformer-remark/)\n * adds an \"excerpt\" field where the user when writing their query can specify\n * how many characters to prune the markdown source to.\n * * [`gatsby-transformer-sharp`](/plugins/gatsby-transformer-sharp/) exposes\n * many image transformation options as GraphQL fields.\n *\n * @param {object} $0\n * @param {object} $0.type Object containing `name` and `nodes`\n * @example\n * import { GraphQLString } from \"gatsby/graphql\"\n *\n * exports.setFieldsOnGraphQLNodeType = ({ type }) => {\n * if (type.name === `File`) {\n * return {\n * newField: {\n * type: GraphQLString,\n * args: {\n * myArgument: {\n * type: GraphQLString,\n * }\n * },\n * resolve: (source, fieldArgs) => {\n * return `Id of this node is ${source.id}.\n * Field was called with argument: ${fieldArgs.myArgument}`\n * }\n * }\n * }\n * }\n *\n * // by default return empty object\n * return {}\n * }\n */\nexport const setFieldsOnGraphQLNodeType = true\n\n/**\n * Customize Gatsby's GraphQL schema by creating type definitions, field\n * extensions or adding third-party schemas.\n *\n * The [`createTypes`](/docs/actions/#createTypes),\n * [`createFieldExtension`](/docs/actions/#createFieldExtension) and\n * [`addThirdPartySchema`](/docs/actions/#addThirdPartySchema) actions\n * are only available in this API. For details on their usage please refer to\n * the actions documentation.\n *\n * This API runs immediately before schema generation. For modifications of the\n * generated schema, e.g. to customize added third-party types, use the\n * [`createResolvers`](/docs/node-apis/#createResolvers) API.\n *\n * @gatsbyVersion 2.12.0\n * @param {object} $0\n * @param {object} $0.actions\n * @param {object} $0.actions.createTypes\n * @param {object} $0.actions.createFieldExtension\n * @param {object} $0.actions.addThirdPartySchema\n * @example\n * exports.createSchemaCustomization = ({ actions }) => {\n * const { createTypes, createFieldExtension } = actions\n *\n * createFieldExtension({\n * name: 'shout',\n * extend: () => ({\n * resolve(source, args, context, info) {\n * return String(source[info.fieldName]).toUpperCase()\n * }\n * })\n * })\n *\n * const typeDefs = `\n * type MarkdownRemark implements Node @dontInfer {\n * frontmatter: Frontmatter\n * }\n * type Frontmatter {\n * title: String!\n * tagline: String @shout\n * date: Date @dateformat\n * image: File @fileByRelativePath\n * }\n * `\n * createTypes(typeDefs)\n * }\n */\nexport const createSchemaCustomization = true\n\n/**\n * Add custom field resolvers to the GraphQL schema.\n *\n * Allows adding new fields to types by providing field configs, or adding resolver\n * functions to existing fields.\n *\n * Things to note:\n * * Overriding field types is disallowed, instead use the `createTypes`\n * action. In case of types added from third-party schemas, where this is not\n * possible, overriding field types is allowed.\n * * New fields will not be available on `filter` and `sort` input types. Extend\n * types defined with `createTypes` if you need this.\n * * In field configs, types can be referenced as strings.\n * * When extending a field with an existing field resolver, the original\n * resolver function is available from `info.originalResolver`.\n * * The `createResolvers` API is called as the last step in schema generation.\n * Thus, an intermediate schema is made available on the `intermediateSchema` property.\n * In resolver functions themselves, it is recommended to access the final\n * built schema from `info.schema`.\n * * Gatsby's data layer, including all internal query capabilities, is\n * exposed on [`context.nodeModel`](/docs/node-model/). The node store can be\n * queried directly with `findOne`, `getNodeById` and `getNodesByIds`,\n * while more advanced queries can be composed with `findAll`.\n * * It is possible to add fields to the root `Query` type.\n * * When using the first resolver argument (`source` in the example below,\n * often also called `parent` or `root`), take care of the fact that field\n * resolvers can be called more than once in a query, e.g. when the field is\n * present both in the input filter and in the selection set. This means that\n * foreign-key fields on `source` can be either resolved or not-resolved.\n *\n * For fuller examples, see [`using-type-definitions`](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-type-definitions).\n *\n * @gatsbyVersion 2.2.0\n * @param {object} $0\n * @param {GraphQLSchema} $0.intermediateSchema Current GraphQL schema\n * @param {function} $0.createResolvers Add custom resolvers to GraphQL field configs\n * @param {object} $1\n * @param {object} $1.resolvers An object map of GraphQL type names to custom resolver functions\n * @param {object} $1.options Optional createResolvers options\n * @param {object} $1.options.ignoreNonexistentTypes Silences the warning when trying to add resolvers for types that don't exist. Useful for optional extensions.\n * @example\n * exports.createResolvers = ({ createResolvers }) => {\n * const resolvers = {\n * Author: {\n * fullName: {\n * resolve: (source, args, context, info) => {\n * return source.firstName + source.lastName\n * }\n * },\n * },\n * Query: {\n * allRecentPosts: {\n * type: [`BlogPost`],\n * resolve: async (source, args, context, info) => {\n * const { entries } = await context.nodeModel.findAll({ type: `BlogPost` })\n * return entries.filter(\n * post => post.publishedAt > Date.UTC(2018, 0, 1)\n * )\n * }\n * }\n * }\n * }\n * createResolvers(resolvers)\n * }\n */\nexport const createResolvers = true\n\n/**\n * Ask compile-to-js plugins to process source to JavaScript so the query\n * runner can extract out GraphQL queries for running.\n */\nexport const preprocessSource = true\n\n/**\n * Let plugins extend/mutate the site's Babel configuration by calling\n * [`setBabelPlugin`](/docs/actions/#setBabelPlugin) or\n * [`setBabelPreset`](/docs/actions/#setBabelPreset).\n * @param {object} $0\n * @param {string} $0.stage The current build stage. One of 'develop', 'develop-html',\n * 'build-javascript', or 'build-html'\n * @param {object} $0.actions\n * @param {object} options The Babel configuration\n * @example\n * exports.onCreateBabelConfig = ({ actions }) => {\n * actions.setBabelPlugin({\n * name: `babel-plugin-that-i-like`,\n * options: {}\n * })\n * }\n */\nexport const onCreateBabelConfig = true\n\n/**\n * Let plugins extend/mutate the site's webpack configuration.\n *\n * See also the documentation for [`setWebpackConfig`](/docs/actions/#setWebpackConfig).\n *\n * @param {object} $0\n * @param {string} $0.stage The current build stage. One of 'develop', 'develop-html',\n * 'build-javascript', or 'build-html'\n * @param {function} $0.getConfig Returns the current webpack config\n * @param {object} $0.rules A set of preconfigured webpack config rules\n * @param {object} $0.loaders A set of preconfigured webpack config loaders\n * @param {object} $0.plugins A set of preconfigured webpack config plugins\n * @param {object} $0.actions\n * @example\n * exports.onCreateWebpackConfig = ({\n * stage, getConfig, rules, loaders, actions\n * }) => {\n * actions.setWebpackConfig({\n * module: {\n * rules: [\n * {\n * test: 'my-css',\n * use: [loaders.style(), loaders.css()]\n * },\n * ],\n * },\n * });\n * }\n */\nexport const onCreateWebpackConfig = true\n\n/**\n * The first API called during Gatsby execution, runs as soon as plugins are loaded, before cache initialization and bootstrap preparation.\n */\nexport const onPreInit = true\n\n/**\n * Lifecycle executed in each process (one time per process). Used to store actions etc for later use.\n *\n * @example\n * let createJobV2\n * exports.onPluginInit = ({ actions }) => {\n * // store job creation action to use it later\n * createJobV2 = actions.createJobV2\n * }\n * @gatsbyVersion 3.9.0\n */\nexport const onPluginInit = true\n\n/**\n * Called once Gatsby has initialized itself and is ready to bootstrap your site.\n */\nexport const onPreBootstrap = true\n\n/**\n * Called at the end of the bootstrap process after all other extension APIs have been called.\n */\nexport const onPostBootstrap = true\n\n/**\n * The first extension point called during the build process. Called after the bootstrap has completed but before the build steps start.\n */\nexport const onPreBuild = true\n\n/**\n * The last extension point called after all other parts of the build process\n * are complete.\n *\n * @example\n * exports.onPostBuild = ({ reporter, basePath, pathPrefix }) => {\n * reporter.info(\n * `Site was built with basePath: ${basePath} & pathPrefix: ${pathPrefix}`\n * );\n * };\n */\nexport const onPostBuild = true\n\n/**\n * Run before GraphQL queries/fragments are extracted from JavaScript files. Useful for plugins\n * to add more JavaScript files with queries/fragments e.g. from node_modules.\n *\n * See gatsby-transformer-sharp and gatsby-source-contentful for examples.\n */\nexport const onPreExtractQueries = true\n\n/**\n * Run when the `gatsby develop` server is started. It can be used for adding proxies and Express middleware\n * to the server.\n * @param {object} $0\n * @param {Express} $0.app The [Express app](https://expressjs.com/en/4x/api.html#app) used to run the dev server\n * @example\n * exports.onCreateDevServer = ({ app }) => {\n * app.get('/hello', function (req, res) {\n * res.send('hello world')\n * })\n * }\n */\nexport const onCreateDevServer = true\n\n/**\n * Run during the bootstrap phase. Plugins can use this to define a schema for their options using\n * [Joi](https://joi.dev) to validate the options users pass to the plugin.\n * @gatsbyVersion 2.25.0\n * @param {object} $0\n * @param {Joi} $0.Joi The instance of [Joi](https://joi.dev) to define the schema\n * @example\n * exports.pluginOptionsSchema = ({ Joi }) => {\n * return Joi.object({\n * // Validate that the anonymize option is defined by the user and is a boolean\n * anonymize: Joi.boolean().required(),\n * })\n * }\n */\nexport const pluginOptionsSchema = true\n"],"file":"api-node-docs.js"}
@@ -303,11 +303,23 @@ module.exports.createNodeId = true;
303
303
  module.exports.tracing = true;
304
304
  /**
305
305
  * Use to prefix resources URLs. `pathPrefix` will be either empty string or
306
- * path that starts with slash and doesn't end with slash. Check
307
- * [Adding a Path Prefix](https://www.gatsbyjs.org/docs/path-prefix/)
306
+ * path that starts with slash and doesn't end with slash. `pathPrefix` also
307
+ * becomes <assetPrefix>/<pathPrefix> when you pass both `assetPrefix` and
308
+ * `pathPrefix` in your `gatsby-config.js`.
309
+ *
310
+ * See [Adding a Path Prefix](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)
308
311
  * page for details about path prefixing.
309
312
  * @type {string}
310
313
  */
311
314
 
312
315
  module.exports.pathPrefix = true;
316
+ /**
317
+ * This is the same as `pathPrefix` passed in `gatsby-config.js`.
318
+ * It's an empty string if you don't pass `pathPrefix`.
319
+ * When using assetPrefix, you can use this instead of pathPrefix to recieve the string you set in `gatsby-config.js`.
320
+ * It won't include the `assetPrefix`.
321
+ * @type {string}
322
+ */
323
+
324
+ module.exports.basePath = true;
313
325
  //# sourceMappingURL=api-node-helpers-docs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/api-node-helpers-docs.js"],"names":["GatsbyReporter","info","warn","error","panic","panicOnBuild","verbose","activityTimer","GatsbyCache","get","set","del","GatsbyTracing","tracer","parentSpan","startSpan","module","exports","getCache","cache","createContentDigest","actions","loadNodeContent","store","emitter","getNodes","getNode","getNodesByType","reporter","getNodeAndSavePathDependency","createNodeId","tracing","pathPrefix"],"mappings":";;AAAA;;AAEA;AACA,MAAMA,cAAc,GAAG;AACrB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACEC,EAAAA,IAAI,EAAE,IAnBe;;AAqBrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,IAAI,EAAE,IA1Be;;AA4BrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,KAAK,EAAE,IAjCc;;AAmCrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,KAAK,EAAE,IAxCc;;AA0CrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,YAAY,EAAE,IA/CO;;AAiDrB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,OAAO,EAAE,IAxDY;;AA0DrB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,aAAa,EAAE;AA3EM,CAAvB;AA8EA;;AACA,MAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE,IARa;;AAUlB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE,IAlBa;;AAoBlB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE;AA3Ba,CAApB;AA8BA;;AACA,MAAMC,aAAa,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,MAAM,EAAE,IAPY;;AASpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,UAAU,EAAE,IAfQ;;AAiBpB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,SAAS,EAAE;AA1CS,CAAtB;AA6CA;AACA;AACA;AACA;AACA;AACA;;AACAC,MAAM,CAACC,OAAP,CAAeC,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;;AACAF,MAAM,CAACC,OAAP,CAAeE,KAAf,GAAuB,IAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,MAAM,CAACC,OAAP,CAAeG,mBAAf,GAAqC,IAArC;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAJ,MAAM,CAACC,OAAP,CAAeI,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAL,MAAM,CAACC,OAAP,CAAeK,eAAf,GAAiC,IAAjC;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAN,MAAM,CAACC,OAAP,CAAeM,KAAf,GAAuB,IAAvB;AAEA;AACA;AACA;AACA;AACA;;AACAP,MAAM,CAACC,OAAP,CAAeO,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAR,MAAM,CAACC,OAAP,CAAeQ,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAT,MAAM,CAACC,OAAP,CAAeS,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAV,MAAM,CAACC,OAAP,CAAeU,cAAf,GAAgC,IAAhC;AAEA;AACA;AACA;AACA;;AACAX,MAAM,CAACC,OAAP,CAAeW,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAZ,MAAM,CAACC,OAAP,CAAeY,4BAAf,GAA8C,IAA9C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAb,MAAM,CAACC,OAAP,CAAea,YAAf,GAA8B,IAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAd,MAAM,CAACC,OAAP,CAAec,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAf,MAAM,CAACC,OAAP,CAAee,UAAf,GAA4B,IAA5B","sourcesContent":["/* eslint-disable no-unused-vars */\n\n/***/\nconst GatsbyReporter = {\n /**\n * @callback GatsbyReporterFn\n * @param {string} message Message to display\n * @returns {void}\n */\n\n /**\n * @callback GatsbyReporterFnWithError\n * @param {string} message Message to display\n * @param {Error}[error] Optional error object\n * @returns {void}\n */\n\n /**\n * @type {GatsbyReporterFn}\n * @example\n * reporter.info(`text`)\n */\n info: true,\n\n /**\n * @type {GatsbyReporterFn}\n * @example\n * reporter.warn(`text`)\n */\n warn: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.error(`text`, new Error('something'))\n */\n error: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.panic(`text`, new Error('something'))\n */\n panic: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.panicOnBuild(`text`, new Error('something'))\n */\n panicOnBuild: true,\n\n /**\n * Note that this method only works if the --verbose option has\n * been passed to the CLI\n * @type {GatsbyReporterFn}\n * @example\n * reporter.verbose(`text`)\n */\n verbose: true,\n\n /**\n * @callback GatsbyReporterActivityTimerFn\n * @param {string} message Timer message to display\n * @returns {ITimerReporter}\n */\n\n /**\n * Creates a new activity timer with the provided message.\n * Check the full [return type definition here](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/src/reporter/reporter-timer.ts#L19).\n * @type {GatsbyReporterActivityTimerFn}\n * @example\n * const activity = reporter.activityTimer(`Timer text`)\n *\n * activity.start()\n * activity.setStatus(`status text`)\n * activity.end()\n */\n activityTimer: true,\n};\n\n/***/\nconst GatsbyCache = {\n /**\n * Retrieve cached value\n * @param {string} key Cache key\n * @returns {Promise<any>} Promise resolving to cached value\n * @example\n * const value = await cache.get(`unique-key`)\n */\n get: true,\n\n /**\n * Cache value\n * @param {string} key Cache key\n * @param {any} value Value to be cached\n * @returns {Promise<any>} Promise resolving to cached value\n * @example\n * await cache.set(`unique-key`, value)\n */\n set: true,\n\n /**\n * Deletes cached value\n * @param {string} key Cache key\n * @returns {Promise<void>} Promise resolving once key is deleted from cache\n * @example\n * await cache.del(`unique-key`)\n */\n del: true,\n};\n\n/***/\nconst GatsbyTracing = {\n /**\n * Global tracer instance. Check\n * [opentracing Tracer documentation](https://opentracing-javascript.surge.sh/classes/tracer.html)\n * for more details.\n * @type {Opentracing.Tracer}\n */\n tracer: true,\n\n /**\n * Tracer span representing API run. Check\n * [opentracing Span documentation](https://opentracing-javascript.surge.sh/classes/span.html)\n * for more details.\n * @type {Opentracing.Span}\n */\n parentSpan: true,\n\n /**\n * @callback GatsbyTracing.StartSpan\n * @param {string} spanName name of the span\n * @returns {Opentracing.Span}\n */\n\n /**\n * Start a tracing span. The span will be created as a child of the currently\n * running API span. This is a convenience wrapper for\n * ```js\n * tracing.tracer.startSpan(`span-name`, { childOf: tracing.parentSpan}).\n * ```\n * @type {GatsbyTracing.StartSpan}\n * @example\n * exports.sourceNodes = async ({ actions, tracing }) => {\n * const span = tracing.startSpan(`foo`)\n *\n * // Perform any span operations. E.g. add a tag to your span\n * span.setTag(`bar`, `baz`)\n *\n * // Rest of your plugin code\n *\n * span.finish()\n * }\n */\n startSpan: true,\n};\n\n/**\n * Get cache instance by name - this should only be used by plugins that\n * accept subplugins.\n * @param {string} id id of the node\n * @returns {GatsbyCache} See [`cache`](#cache) section for reference.\n */\nmodule.exports.getCache = true;\n\n/**\n * Key-value store used to persist results of time/memory/cpu intensive\n * tasks. All functions are async and return promises.\n * @type {GatsbyCache}\n */\nmodule.exports.cache = true;\n\n/**\n * Create a stable content digest from a string or object, you can use the\n * result of this function to set the `internal.contentDigest` field\n * on nodes. Gatsby uses the value of this field to invalidate stale data\n * when your content changes.\n * @param {(string|object)} input\n * @returns {string} Hash string\n * @example\n * const node = {\n * ...nodeData,\n * internal: {\n * type: `TypeOfNode`,\n * contentDigest: createContentDigest(nodeData)\n * }\n * }\n */\nmodule.exports.createContentDigest = true;\n\n/**\n * Collection of functions used to programmatically modify Gatsby’s internal state.\n *\n * See [`actions`](/docs/actions/) reference.\n * @type {Actions}\n */\nmodule.exports.actions = true;\n\n/**\n * Get content for a node from the plugin that created it.\n * @param {Node} node\n * @returns {Promise<string>}\n * @example\n * module.exports = async function onCreateNode(\n * { node, loadNodeContent, actions, createNodeId }\n * ) {\n * if (node.internal.mediaType === 'text/markdown') {\n * const { createNode, createParentChildLink } = actions\n * const textContent = await loadNodeContent(node)\n * // process textContent and create child nodes\n * }\n * }\n */\nmodule.exports.loadNodeContent = true;\n\n/**\n * Internal redux state used for application state. Do not use, unless you\n * absolutely must. Store is considered a private API and can change with\n * any version.\n * @type {Redux.Store}\n */\nmodule.exports.store = true;\n\n/**\n * Internal event emitter / listener. Do not use, unless you absolutely\n * must. Emitter is considered a private API and can change with any version.\n * @type {Emitter}\n */\nmodule.exports.emitter = true;\n\n/**\n * Get array of all nodes.\n * @returns {Node[]} Array of nodes.\n * @example\n * const allNodes = getNodes()\n */\nmodule.exports.getNodes = true;\n\n/**\n * Get single node by given ID.\n * Don't use this in graphql resolvers - see\n * [`getNodeAndSavePathDependency`](#getNodeAndSavePathDependency).\n * @param {string} ID id of the node.\n * @returns {Node} Single node instance.\n * @example\n * const node = getNode(id)\n */\nmodule.exports.getNode = true;\n\n/**\n * Get array of nodes of given type.\n * @param {string} Type of nodes\n * @returns {Node[]} Array of nodes.\n * @example\n * const markdownNodes = getNodesByType(`MarkdownRemark`)\n */\nmodule.exports.getNodesByType = true;\n\n/**\n * Set of utilities to output information to user\n * @type {GatsbyReporter}\n */\nmodule.exports.reporter = true;\n\n/**\n * Get single node by given ID and create dependency for given path.\n * This should be used instead of `getNode` in graphql resolvers to enable\n * tracking dependencies for query results. If it's not used Gatsby will\n * not rerun query if node changes leading to stale query results. See\n * [Page -> Node Dependency Tracking](/docs/page-node-dependencies/)\n * for more details.\n * @param {string} ID id of the node.\n * @param {string} path of the node.\n * @returns {Node} Single node instance.\n */\nmodule.exports.getNodeAndSavePathDependency = true;\n\n/**\n * Utility function useful to generate globally unique and stable node IDs.\n * It will generate different IDs for different plugins if they use same\n * input.\n *\n * @param {string} input\n * @returns {string} UUIDv5 ID string\n * @example\n * const node = {\n * id: createNodeId(`${backendData.type}${backendData.id}`),\n * ...restOfNodeData\n * }\n */\nmodule.exports.createNodeId = true;\n\n/**\n * Set of utilities that allow adding more detailed tracing for plugins.\n * Check\n * [Performance tracing](https://www.gatsbyjs.org/docs/performance-tracing)\n * page for more details.\n * @type {GatsbyTracing}\n */\nmodule.exports.tracing = true;\n\n/**\n * Use to prefix resources URLs. `pathPrefix` will be either empty string or\n * path that starts with slash and doesn't end with slash. Check\n * [Adding a Path Prefix](https://www.gatsbyjs.org/docs/path-prefix/)\n * page for details about path prefixing.\n * @type {string}\n */\nmodule.exports.pathPrefix = true;\n"],"file":"api-node-helpers-docs.js"}
1
+ {"version":3,"sources":["../../src/utils/api-node-helpers-docs.js"],"names":["GatsbyReporter","info","warn","error","panic","panicOnBuild","verbose","activityTimer","GatsbyCache","get","set","del","GatsbyTracing","tracer","parentSpan","startSpan","module","exports","getCache","cache","createContentDigest","actions","loadNodeContent","store","emitter","getNodes","getNode","getNodesByType","reporter","getNodeAndSavePathDependency","createNodeId","tracing","pathPrefix","basePath"],"mappings":";;AAAA;;AAEA;AACA,MAAMA,cAAc,GAAG;AACrB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACEC,EAAAA,IAAI,EAAE,IAnBe;;AAqBrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,IAAI,EAAE,IA1Be;;AA4BrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,KAAK,EAAE,IAjCc;;AAmCrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,KAAK,EAAE,IAxCc;;AA0CrB;AACF;AACA;AACA;AACA;AACEC,EAAAA,YAAY,EAAE,IA/CO;;AAiDrB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,OAAO,EAAE,IAxDY;;AA0DrB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,aAAa,EAAE;AA3EM,CAAvB;AA8EA;;AACA,MAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE,IARa;;AAUlB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE,IAlBa;;AAoBlB;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,GAAG,EAAE;AA3Ba,CAApB;AA8BA;;AACA,MAAMC,aAAa,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,MAAM,EAAE,IAPY;;AASpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,UAAU,EAAE,IAfQ;;AAiBpB;AACF;AACA;AACA;AACA;;AAEE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,SAAS,EAAE;AA1CS,CAAtB;AA6CA;AACA;AACA;AACA;AACA;AACA;;AACAC,MAAM,CAACC,OAAP,CAAeC,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;;AACAF,MAAM,CAACC,OAAP,CAAeE,KAAf,GAAuB,IAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,MAAM,CAACC,OAAP,CAAeG,mBAAf,GAAqC,IAArC;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAJ,MAAM,CAACC,OAAP,CAAeI,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAL,MAAM,CAACC,OAAP,CAAeK,eAAf,GAAiC,IAAjC;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAN,MAAM,CAACC,OAAP,CAAeM,KAAf,GAAuB,IAAvB;AAEA;AACA;AACA;AACA;AACA;;AACAP,MAAM,CAACC,OAAP,CAAeO,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAR,MAAM,CAACC,OAAP,CAAeQ,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAT,MAAM,CAACC,OAAP,CAAeS,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAV,MAAM,CAACC,OAAP,CAAeU,cAAf,GAAgC,IAAhC;AAEA;AACA;AACA;AACA;;AACAX,MAAM,CAACC,OAAP,CAAeW,QAAf,GAA0B,IAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAZ,MAAM,CAACC,OAAP,CAAeY,4BAAf,GAA8C,IAA9C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAb,MAAM,CAACC,OAAP,CAAea,YAAf,GAA8B,IAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAd,MAAM,CAACC,OAAP,CAAec,OAAf,GAAyB,IAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAf,MAAM,CAACC,OAAP,CAAee,UAAf,GAA4B,IAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAhB,MAAM,CAACC,OAAP,CAAegB,QAAf,GAA0B,IAA1B","sourcesContent":["/* eslint-disable no-unused-vars */\n\n/***/\nconst GatsbyReporter = {\n /**\n * @callback GatsbyReporterFn\n * @param {string} message Message to display\n * @returns {void}\n */\n\n /**\n * @callback GatsbyReporterFnWithError\n * @param {string} message Message to display\n * @param {Error}[error] Optional error object\n * @returns {void}\n */\n\n /**\n * @type {GatsbyReporterFn}\n * @example\n * reporter.info(`text`)\n */\n info: true,\n\n /**\n * @type {GatsbyReporterFn}\n * @example\n * reporter.warn(`text`)\n */\n warn: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.error(`text`, new Error('something'))\n */\n error: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.panic(`text`, new Error('something'))\n */\n panic: true,\n\n /**\n * @type {GatsbyReporterFnWithError}\n * @example\n * reporter.panicOnBuild(`text`, new Error('something'))\n */\n panicOnBuild: true,\n\n /**\n * Note that this method only works if the --verbose option has\n * been passed to the CLI\n * @type {GatsbyReporterFn}\n * @example\n * reporter.verbose(`text`)\n */\n verbose: true,\n\n /**\n * @callback GatsbyReporterActivityTimerFn\n * @param {string} message Timer message to display\n * @returns {ITimerReporter}\n */\n\n /**\n * Creates a new activity timer with the provided message.\n * Check the full [return type definition here](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/src/reporter/reporter-timer.ts#L19).\n * @type {GatsbyReporterActivityTimerFn}\n * @example\n * const activity = reporter.activityTimer(`Timer text`)\n *\n * activity.start()\n * activity.setStatus(`status text`)\n * activity.end()\n */\n activityTimer: true,\n};\n\n/***/\nconst GatsbyCache = {\n /**\n * Retrieve cached value\n * @param {string} key Cache key\n * @returns {Promise<any>} Promise resolving to cached value\n * @example\n * const value = await cache.get(`unique-key`)\n */\n get: true,\n\n /**\n * Cache value\n * @param {string} key Cache key\n * @param {any} value Value to be cached\n * @returns {Promise<any>} Promise resolving to cached value\n * @example\n * await cache.set(`unique-key`, value)\n */\n set: true,\n\n /**\n * Deletes cached value\n * @param {string} key Cache key\n * @returns {Promise<void>} Promise resolving once key is deleted from cache\n * @example\n * await cache.del(`unique-key`)\n */\n del: true,\n};\n\n/***/\nconst GatsbyTracing = {\n /**\n * Global tracer instance. Check\n * [opentracing Tracer documentation](https://opentracing-javascript.surge.sh/classes/tracer.html)\n * for more details.\n * @type {Opentracing.Tracer}\n */\n tracer: true,\n\n /**\n * Tracer span representing API run. Check\n * [opentracing Span documentation](https://opentracing-javascript.surge.sh/classes/span.html)\n * for more details.\n * @type {Opentracing.Span}\n */\n parentSpan: true,\n\n /**\n * @callback GatsbyTracing.StartSpan\n * @param {string} spanName name of the span\n * @returns {Opentracing.Span}\n */\n\n /**\n * Start a tracing span. The span will be created as a child of the currently\n * running API span. This is a convenience wrapper for\n * ```js\n * tracing.tracer.startSpan(`span-name`, { childOf: tracing.parentSpan}).\n * ```\n * @type {GatsbyTracing.StartSpan}\n * @example\n * exports.sourceNodes = async ({ actions, tracing }) => {\n * const span = tracing.startSpan(`foo`)\n *\n * // Perform any span operations. E.g. add a tag to your span\n * span.setTag(`bar`, `baz`)\n *\n * // Rest of your plugin code\n *\n * span.finish()\n * }\n */\n startSpan: true,\n};\n\n/**\n * Get cache instance by name - this should only be used by plugins that\n * accept subplugins.\n * @param {string} id id of the node\n * @returns {GatsbyCache} See [`cache`](#cache) section for reference.\n */\nmodule.exports.getCache = true;\n\n/**\n * Key-value store used to persist results of time/memory/cpu intensive\n * tasks. All functions are async and return promises.\n * @type {GatsbyCache}\n */\nmodule.exports.cache = true;\n\n/**\n * Create a stable content digest from a string or object, you can use the\n * result of this function to set the `internal.contentDigest` field\n * on nodes. Gatsby uses the value of this field to invalidate stale data\n * when your content changes.\n * @param {(string|object)} input\n * @returns {string} Hash string\n * @example\n * const node = {\n * ...nodeData,\n * internal: {\n * type: `TypeOfNode`,\n * contentDigest: createContentDigest(nodeData)\n * }\n * }\n */\nmodule.exports.createContentDigest = true;\n\n/**\n * Collection of functions used to programmatically modify Gatsby’s internal state.\n *\n * See [`actions`](/docs/actions/) reference.\n * @type {Actions}\n */\nmodule.exports.actions = true;\n\n/**\n * Get content for a node from the plugin that created it.\n * @param {Node} node\n * @returns {Promise<string>}\n * @example\n * module.exports = async function onCreateNode(\n * { node, loadNodeContent, actions, createNodeId }\n * ) {\n * if (node.internal.mediaType === 'text/markdown') {\n * const { createNode, createParentChildLink } = actions\n * const textContent = await loadNodeContent(node)\n * // process textContent and create child nodes\n * }\n * }\n */\nmodule.exports.loadNodeContent = true;\n\n/**\n * Internal redux state used for application state. Do not use, unless you\n * absolutely must. Store is considered a private API and can change with\n * any version.\n * @type {Redux.Store}\n */\nmodule.exports.store = true;\n\n/**\n * Internal event emitter / listener. Do not use, unless you absolutely\n * must. Emitter is considered a private API and can change with any version.\n * @type {Emitter}\n */\nmodule.exports.emitter = true;\n\n/**\n * Get array of all nodes.\n * @returns {Node[]} Array of nodes.\n * @example\n * const allNodes = getNodes()\n */\nmodule.exports.getNodes = true;\n\n/**\n * Get single node by given ID.\n * Don't use this in graphql resolvers - see\n * [`getNodeAndSavePathDependency`](#getNodeAndSavePathDependency).\n * @param {string} ID id of the node.\n * @returns {Node} Single node instance.\n * @example\n * const node = getNode(id)\n */\nmodule.exports.getNode = true;\n\n/**\n * Get array of nodes of given type.\n * @param {string} Type of nodes\n * @returns {Node[]} Array of nodes.\n * @example\n * const markdownNodes = getNodesByType(`MarkdownRemark`)\n */\nmodule.exports.getNodesByType = true;\n\n/**\n * Set of utilities to output information to user\n * @type {GatsbyReporter}\n */\nmodule.exports.reporter = true;\n\n/**\n * Get single node by given ID and create dependency for given path.\n * This should be used instead of `getNode` in graphql resolvers to enable\n * tracking dependencies for query results. If it's not used Gatsby will\n * not rerun query if node changes leading to stale query results. See\n * [Page -> Node Dependency Tracking](/docs/page-node-dependencies/)\n * for more details.\n * @param {string} ID id of the node.\n * @param {string} path of the node.\n * @returns {Node} Single node instance.\n */\nmodule.exports.getNodeAndSavePathDependency = true;\n\n/**\n * Utility function useful to generate globally unique and stable node IDs.\n * It will generate different IDs for different plugins if they use same\n * input.\n *\n * @param {string} input\n * @returns {string} UUIDv5 ID string\n * @example\n * const node = {\n * id: createNodeId(`${backendData.type}${backendData.id}`),\n * ...restOfNodeData\n * }\n */\nmodule.exports.createNodeId = true;\n\n/**\n * Set of utilities that allow adding more detailed tracing for plugins.\n * Check\n * [Performance tracing](https://www.gatsbyjs.org/docs/performance-tracing)\n * page for more details.\n * @type {GatsbyTracing}\n */\nmodule.exports.tracing = true;\n\n/**\n * Use to prefix resources URLs. `pathPrefix` will be either empty string or\n * path that starts with slash and doesn't end with slash. `pathPrefix` also\n * becomes <assetPrefix>/<pathPrefix> when you pass both `assetPrefix` and\n * `pathPrefix` in your `gatsby-config.js`.\n *\n * See [Adding a Path Prefix](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)\n * page for details about path prefixing.\n * @type {string}\n */\nmodule.exports.pathPrefix = true;\n\n/**\n * This is the same as `pathPrefix` passed in `gatsby-config.js`.\n * It's an empty string if you don't pass `pathPrefix`.\n * When using assetPrefix, you can use this instead of pathPrefix to recieve the string you set in `gatsby-config.js`.\n * It won't include the `assetPrefix`.\n * @type {string}\n */\nmodule.exports.basePath = true;\n"],"file":"api-node-helpers-docs.js"}
package/index.d.ts CHANGED
@@ -946,12 +946,23 @@ export interface ParentSpanPluginArgs extends NodePluginArgs {
946
946
  export interface NodePluginArgs {
947
947
  /**
948
948
  * Use to prefix resources URLs. `pathPrefix` will be either empty string or
949
- * path that starts with slash and doesn't end with slash. Check
950
- * [Adding a Path Prefix](https://www.gatsbyjs.org/docs/path-prefix/)
949
+ * path that starts with slash and doesn't end with slash. `pathPrefix` also
950
+ * becomes <assetPrefix>/<pathPrefix> when you pass both `assetPrefix` and
951
+ * `pathPrefix` in your `gatsby-config.js`.
952
+ *
953
+ * See [Adding a Path Prefix](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)
951
954
  * page for details about path prefixing.
952
955
  */
953
956
  pathPrefix: string
954
957
 
958
+ /**
959
+ * This is the same as `pathPrefix` passed in `gatsby-config.js`.
960
+ * It's an empty string if you don't pass `pathPrefix`.
961
+ * When using assetPrefix, you can use this instead of pathPrefix to recieve the string you set in `gatsby-config.js`.
962
+ * It won't include the `assetPrefix`.
963
+ */
964
+ basePath: string
965
+
955
966
  /**
956
967
  * Collection of functions used to programmatically modify Gatsby’s internal state.
957
968
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby",
3
3
  "description": "Blazing fast modern site generator for React",
4
- "version": "4.4.0-next.1",
4
+ "version": "4.4.0",
5
5
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
6
6
  "bin": {
7
7
  "gatsby": "./cli.js"
@@ -34,8 +34,8 @@
34
34
  "babel-plugin-add-module-exports": "^1.0.4",
35
35
  "babel-plugin-dynamic-import-node": "^2.3.3",
36
36
  "babel-plugin-lodash": "^3.3.4",
37
- "babel-plugin-remove-graphql-queries": "^4.4.0-next.1",
38
- "babel-preset-gatsby": "^2.4.0-next.1",
37
+ "babel-plugin-remove-graphql-queries": "^4.4.0",
38
+ "babel-preset-gatsby": "^2.4.0",
39
39
  "better-opn": "^2.1.1",
40
40
  "bluebird": "^3.7.2",
41
41
  "body-parser": "^1.19.0",
@@ -77,17 +77,17 @@
77
77
  "find-cache-dir": "^3.3.2",
78
78
  "fs-exists-cached": "1.0.0",
79
79
  "fs-extra": "^10.0.0",
80
- "gatsby-cli": "^4.4.0-next.1",
81
- "gatsby-core-utils": "^3.4.0-next.1",
82
- "gatsby-graphiql-explorer": "^2.4.0-next.0",
83
- "gatsby-legacy-polyfills": "^2.4.0-next.1",
84
- "gatsby-link": "^4.4.0-next.0",
85
- "gatsby-plugin-page-creator": "^4.4.0-next.1",
86
- "gatsby-plugin-typescript": "^4.4.0-next.1",
87
- "gatsby-plugin-utils": "^2.4.0-next.1",
88
- "gatsby-react-router-scroll": "^5.4.0-next.0",
89
- "gatsby-telemetry": "^3.4.0-next.1",
90
- "gatsby-worker": "^1.4.0-next.1",
80
+ "gatsby-cli": "^4.4.0",
81
+ "gatsby-core-utils": "^3.4.0",
82
+ "gatsby-graphiql-explorer": "^2.4.0",
83
+ "gatsby-legacy-polyfills": "^2.4.0",
84
+ "gatsby-link": "^4.4.0",
85
+ "gatsby-plugin-page-creator": "^4.4.0",
86
+ "gatsby-plugin-typescript": "^4.4.0",
87
+ "gatsby-plugin-utils": "^2.4.0",
88
+ "gatsby-react-router-scroll": "^5.4.0",
89
+ "gatsby-telemetry": "^3.4.0",
90
+ "gatsby-worker": "^1.4.0",
91
91
  "glob": "^7.2.0",
92
92
  "got": "^11.8.2",
93
93
  "graphql": "^15.7.2",
@@ -174,7 +174,7 @@
174
174
  "@types/string-similarity": "^4.0.0",
175
175
  "@types/tmp": "^0.2.0",
176
176
  "@types/webpack-virtual-modules": "^0.1.1",
177
- "babel-preset-gatsby-package": "^2.4.0-next.0",
177
+ "babel-preset-gatsby-package": "^2.4.0",
178
178
  "copyfiles": "^2.3.0",
179
179
  "cross-env": "^7.0.3",
180
180
  "documentation": "^13.1.0",
@@ -258,5 +258,5 @@
258
258
  "yargs": {
259
259
  "boolean-negation": false
260
260
  },
261
- "gitHead": "6b28b69d8383ccdb951c81283a77e19d2f14ddb9"
261
+ "gitHead": "c09587abec36640b8d236455bc28bd430c7e112e"
262
262
  }