aeria-sdk 0.0.16 → 0.0.18

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/mirror.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { InstanceConfig } from './types';
2
2
  export declare const runtimeCjs: (config: InstanceConfig) => string;
3
3
  export declare const runtimeEsm: (config: InstanceConfig) => string;
4
- export declare const writeMirrorFiles: (mirror: any, config: InstanceConfig) => Promise<void>;
4
+ export declare const writeMirrorFiles: (mirror: any, config: InstanceConfig, filesPath?: string) => Promise<void>;
5
5
  export declare const mirrorRemotely: (config: InstanceConfig) => Promise<void>;
package/dist/mirror.js CHANGED
@@ -90,12 +90,12 @@ export const aeria = Aeria(config)
90
90
  export const storage = getStorage(config)
91
91
  \n`;
92
92
  exports.runtimeEsm = runtimeEsm;
93
- const writeMirrorFiles = async (mirror, config) => {
93
+ const writeMirrorFiles = async (mirror, config, filesPath = process.cwd()) => {
94
94
  const runtimeBase = path_1.default.dirname(require.resolve('aeria-sdk'));
95
95
  await (0, promises_1.mkdir)(runtimeBase, {
96
96
  recursive: true,
97
97
  });
98
- await (0, promises_1.writeFile)(path_1.default.join(process.cwd(), 'aeria-sdk.d.ts'), mirrorDts(mirror));
98
+ await (0, promises_1.writeFile)(path_1.default.join(filesPath, 'aeria-sdk.d.ts'), mirrorDts(mirror));
99
99
  await (0, promises_1.writeFile)(path_1.default.join(runtimeBase, 'runtime.js'), (0, exports.runtimeCjs)(config));
100
100
  await (0, promises_1.writeFile)(path_1.default.join(runtimeBase, 'runtime.mjs'), (0, exports.runtimeEsm)(config));
101
101
  };
package/dist/mirror.mjs CHANGED
@@ -139,10 +139,12 @@ export var runtimeEsm = function(config) {
139
139
  };
140
140
  export var writeMirrorFiles = function() {
141
141
  var _ref = _async_to_generator(function(mirror, config) {
142
- var runtimeBase;
142
+ var filesPath, runtimeBase;
143
+ var _arguments = arguments;
143
144
  return _ts_generator(this, function(_state) {
144
145
  switch(_state.label){
145
146
  case 0:
147
+ filesPath = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : process.cwd();
146
148
  runtimeBase = path.dirname(require.resolve("aeria-sdk"));
147
149
  return [
148
150
  4,
@@ -154,7 +156,7 @@ export var writeMirrorFiles = function() {
154
156
  _state.sent();
155
157
  return [
156
158
  4,
157
- writeFile(path.join(process.cwd(), "aeria-sdk.d.ts"), mirrorDts(mirror))
159
+ writeFile(path.join(filesPath, "aeria-sdk.d.ts"), mirrorDts(mirror))
158
160
  ];
159
161
  case 2:
160
162
  _state.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeria-sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "@aeriajs/common": "^0.0.0",
52
+ "@aeriajs/common": "^0.0.1",
53
53
  "@aeriajs/types": "^0.0.0"
54
54
  },
55
55
  "scripts": {