aeria-sdk 0.0.78 → 0.0.80

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { left, right, isLeft, isRight, unwrapEither, error, isError, unwrapError, unsafe, } from '@aeriajs/common';
1
+ export { left, right, isLeft, isRight, unwrapEither, error, isError, unwrapError, throwIfLeft, } from '@aeriajs/common';
2
2
  export * from './auth.js';
3
3
  export * from './topLevel.js';
4
4
  export * from './constants.js';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.unsafe = exports.unwrapError = exports.isError = exports.error = exports.unwrapEither = exports.isRight = exports.isLeft = exports.right = exports.left = void 0;
17
+ exports.throwIfLeft = exports.unwrapError = exports.isError = exports.error = exports.unwrapEither = exports.isRight = exports.isLeft = exports.right = exports.left = void 0;
18
18
  var common_1 = require("@aeriajs/common");
19
19
  Object.defineProperty(exports, "left", { enumerable: true, get: function () { return common_1.left; } });
20
20
  Object.defineProperty(exports, "right", { enumerable: true, get: function () { return common_1.right; } });
@@ -24,7 +24,7 @@ Object.defineProperty(exports, "unwrapEither", { enumerable: true, get: function
24
24
  Object.defineProperty(exports, "error", { enumerable: true, get: function () { return common_1.error; } });
25
25
  Object.defineProperty(exports, "isError", { enumerable: true, get: function () { return common_1.isError; } });
26
26
  Object.defineProperty(exports, "unwrapError", { enumerable: true, get: function () { return common_1.unwrapError; } });
27
- Object.defineProperty(exports, "unsafe", { enumerable: true, get: function () { return common_1.unsafe; } });
27
+ Object.defineProperty(exports, "throwIfLeft", { enumerable: true, get: function () { return common_1.throwIfLeft; } });
28
28
  __exportStar(require("./auth.js"), exports);
29
29
  __exportStar(require("./topLevel.js"), exports);
30
30
  __exportStar(require("./constants.js"), exports);
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ export {
8
8
  error,
9
9
  isError,
10
10
  unwrapError,
11
- unsafe
11
+ throwIfLeft
12
12
  } from "@aeriajs/common";
13
13
  export * from "./auth.mjs";
14
14
  export * from "./topLevel.mjs";
package/dist/mirror.js CHANGED
@@ -14,7 +14,7 @@ const mirrorDts = (mirrorObj, config) => {
14
14
  SchemaWithId,
15
15
  MakeEndpoint,
16
16
  RequestMethod,
17
- CollectionFunctionsPaginated
17
+ CollectionFunctionsSDK
18
18
 
19
19
  } from '@aeriajs/types'
20
20
 
@@ -63,10 +63,10 @@ declare module 'aeria-sdk' {
63
63
  type Endpoints = {
64
64
  [Route in keyof MirrorRouter]: Route extends \`/\${infer Coll}/\${infer Fn}\`
65
65
  ? Coll extends keyof Collections
66
- ? Fn extends keyof CollectionFunctionsPaginated<any>
66
+ ? Fn extends keyof CollectionFunctionsSDK<any>
67
67
  ? Record<Coll, Record<
68
68
  Fn, {
69
- POST: CollectionFunctionsPaginated<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]
69
+ POST: CollectionFunctionsSDK<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]
70
70
  }
71
71
  >>
72
72
  : InferEndpoint<Route>
@@ -106,7 +106,7 @@ export const storage = getStorage(config)
106
106
  export default aeria
107
107
  \n`;
108
108
  exports.runtimeEsm = runtimeEsm;
109
- const writeMirrorFiles = async (mirror, config, filesPath = process.cwd()) => {
109
+ const writeMirrorFiles = async (mirror, config, filesPath = path.join(process.cwd(), '.aeria')) => {
110
110
  const runtimeBase = path.dirname(require.resolve('aeria-sdk'));
111
111
  await (0, promises_1.mkdir)(runtimeBase, {
112
112
  recursive: true,
package/dist/mirror.mjs CHANGED
@@ -12,7 +12,7 @@ const mirrorDts = (mirrorObj, config) => {
12
12
  SchemaWithId,
13
13
  MakeEndpoint,
14
14
  RequestMethod,
15
- CollectionFunctionsPaginated
15
+ CollectionFunctionsSDK
16
16
 
17
17
  } from '@aeriajs/types'
18
18
 
@@ -62,10 +62,10 @@ declare module 'aeria-sdk' {
62
62
  type Endpoints = {
63
63
  [Route in keyof MirrorRouter]: Route extends \`/\${infer Coll}/\${infer Fn}\`
64
64
  ? Coll extends keyof Collections
65
- ? Fn extends keyof CollectionFunctionsPaginated<any>
65
+ ? Fn extends keyof CollectionFunctionsSDK<any>
66
66
  ? Record<Coll, Record<
67
67
  Fn, {
68
- POST: CollectionFunctionsPaginated<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]
68
+ POST: CollectionFunctionsSDK<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]
69
69
  }
70
70
  >>
71
71
  : InferEndpoint<Route>
@@ -106,7 +106,7 @@ export const storage = getStorage(config)
106
106
  export default aeria
107
107
 
108
108
  `;
109
- export const writeMirrorFiles = async (mirror, config, filesPath = process.cwd()) => {
109
+ export const writeMirrorFiles = async (mirror, config, filesPath = path.join(process.cwd(), ".aeria")) => {
110
110
  const runtimeBase = path.dirname(require.resolve("aeria-sdk"));
111
111
  await mkdir(runtimeBase, {
112
112
  recursive: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeria-sdk",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -60,8 +60,8 @@
60
60
  "@aeriajs/types": "link:../types"
61
61
  },
62
62
  "peerDependencies": {
63
- "@aeriajs/common": "^0.0.55",
64
- "@aeriajs/types": "^0.0.52"
63
+ "@aeriajs/common": "^0.0.57",
64
+ "@aeriajs/types": "^0.0.54"
65
65
  },
66
66
  "scripts": {
67
67
  "test": "echo skipping",