next-sanity 4.1.4 → 4.1.5

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.
package/dist/index.cjs CHANGED
@@ -3,23 +3,24 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var sanityClient = require('@sanity/client');
6
+ var client = require('@sanity/client');
7
7
  var groq = require('groq');
8
8
  function _interopDefaultCompat(e) {
9
9
  return e && typeof e === 'object' && 'default' in e ? e : {
10
10
  default: e
11
11
  };
12
12
  }
13
- var sanityClient__default = /*#__PURE__*/_interopDefaultCompat(sanityClient);
14
13
  var groq__default = /*#__PURE__*/_interopDefaultCompat(groq);
15
- function createClient(config) {
16
- return sanityClient__default.default(config);
17
- }
14
+ Object.defineProperty(exports, 'createClient', {
15
+ enumerable: true,
16
+ get: function () {
17
+ return client.createClient;
18
+ }
19
+ });
18
20
  Object.defineProperty(exports, 'groq', {
19
21
  enumerable: true,
20
22
  get: function () {
21
23
  return groq__default.default;
22
24
  }
23
25
  });
24
- exports.createClient = createClient;
25
26
  //# sourceMappingURL=index.cjs.map
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import cjs from './index.cjs';
2
2
 
3
- export const groq = cjs.groq;
4
3
  export const createClient = cjs.createClient;
4
+ export const groq = cjs.groq;
5
5
 
6
6
  export default cjs.default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/client.ts"],"sourcesContent":["import type {ClientConfig, SanityClient} from '@sanity/client'\nimport sanityClient from '@sanity/client'\n\n/** @public */\nexport function createClient(config: ClientConfig): SanityClient {\n return sanityClient(config)\n}\n"],"names":["createClient","config","sanityClient"],"mappings":";;;;;;;;;;;;;;AAIO,SAASA,aAAaC,MAAoC,EAAA;EAC/D,OAAOC,qBAAAA,CAAAA,QAAaD,MAAM,CAAA;AAC5B;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import {ClientConfig} from '@sanity/client'
2
+ import {createClient} from '@sanity/client'
2
3
  import {default as groq} from 'groq'
3
4
  import {SanityClient} from '@sanity/client'
4
5
 
5
6
  export {ClientConfig}
6
7
 
7
- /** @public */
8
- export declare function createClient(config: ClientConfig): SanityClient
8
+ export {createClient}
9
9
 
10
10
  export {groq}
11
11
 
package/dist/index.js CHANGED
@@ -1,7 +1,3 @@
1
- import sanityClient from '@sanity/client';
1
+ export { createClient } from '@sanity/client';
2
2
  export { default as groq } from 'groq';
3
- function createClient(config) {
4
- return sanityClient(config);
5
- }
6
- export { createClient };
7
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/client.ts"],"sourcesContent":["import type {ClientConfig, SanityClient} from '@sanity/client'\nimport sanityClient from '@sanity/client'\n\n/** @public */\nexport function createClient(config: ClientConfig): SanityClient {\n return sanityClient(config)\n}\n"],"names":["createClient","config","sanityClient"],"mappings":";;AAIO,SAASA,aAAaC,MAAoC,EAAA;EAC/D,OAAOC,aAAaD,MAAM,CAAA;AAC5B;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-sanity",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "description": "Sanity.io toolkit for Next.js",
5
5
  "keywords": [
6
6
  "sanity",
package/src/client.ts CHANGED
@@ -1,7 +1,2 @@
1
- import type {ClientConfig, SanityClient} from '@sanity/client'
2
- import sanityClient from '@sanity/client'
3
-
4
1
  /** @public */
5
- export function createClient(config: ClientConfig): SanityClient {
6
- return sanityClient(config)
7
- }
2
+ export {type ClientConfig, createClient} from '@sanity/client'