@hypequery/cli 0.0.5 → 0.0.6

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.
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  var _a, _b, _c;
38
38
  import { pathToFileURL } from 'node:url';
39
- import { access, mkdtemp, writeFile, rm } from 'node:fs/promises';
39
+ import { access, mkdtemp, writeFile, rm, mkdir } from 'node:fs/promises';
40
40
  import os from 'node:os';
41
41
  import path from 'node:path';
42
42
  import { build } from 'esbuild';
@@ -136,9 +136,29 @@ if (!globalState.__hypequeryCliTempFiles) {
136
136
  globalState.__hypequeryCliTempFiles = tempFiles;
137
137
  }
138
138
  function ensureTempDir() {
139
+ var _this = this;
139
140
  installCleanupHooks();
140
141
  if (!tempDirPromise) {
141
- tempDirPromise = mkdtemp(path.join(os.tmpdir(), 'hypequery-cli-'));
142
+ tempDirPromise = (function () { return __awaiter(_this, void 0, void 0, function () {
143
+ var projectTempRoot, _a;
144
+ return __generator(this, function (_b) {
145
+ switch (_b.label) {
146
+ case 0:
147
+ projectTempRoot = path.join(process.cwd(), '.hypequery', 'tmp');
148
+ _b.label = 1;
149
+ case 1:
150
+ _b.trys.push([1, 3, , 4]);
151
+ return [4 /*yield*/, mkdir(projectTempRoot, { recursive: true })];
152
+ case 2:
153
+ _b.sent();
154
+ return [2 /*return*/, mkdtemp(path.join(projectTempRoot, 'bundle-'))];
155
+ case 3:
156
+ _a = _b.sent();
157
+ return [2 /*return*/, mkdtemp(path.join(os.tmpdir(), 'hypequery-cli-'))];
158
+ case 4: return [2 /*return*/];
159
+ }
160
+ });
161
+ }); })();
142
162
  globalState.__hypequeryCliTempDirPromise = tempDirPromise;
143
163
  }
144
164
  return tempDirPromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Command-line interface for Hypequery",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",