dokku-compose 0.6.5 → 0.6.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.
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -162,6 +162,9 @@ function createRunner(opts = {}) {
|
|
|
162
162
|
},
|
|
163
163
|
async query(...args) {
|
|
164
164
|
const { stdout } = await execDokku(args);
|
|
165
|
+
if (process.env.DOKKU_COMPOSE_DEBUG && args[0]?.includes("builder-dockerfile")) {
|
|
166
|
+
console.error(`[debug] query ${args.join(" ")} => ${stdout.length} bytes`);
|
|
167
|
+
}
|
|
165
168
|
return stdout.trim();
|
|
166
169
|
},
|
|
167
170
|
async check(...args) {
|
|
@@ -187,9 +190,13 @@ function createContext(runner) {
|
|
|
187
190
|
runner,
|
|
188
191
|
query(...args) {
|
|
189
192
|
const key = args.join("\0");
|
|
190
|
-
|
|
193
|
+
const cached = cache.has(key);
|
|
194
|
+
if (!cached) {
|
|
191
195
|
cache.set(key, runner.query(...args));
|
|
192
196
|
}
|
|
197
|
+
if (process.env.DOKKU_COMPOSE_DEBUG && args[0]?.includes("builder-dockerfile")) {
|
|
198
|
+
console.error(`[debug] ctx.query(${args.join(" ")}) cached=${cached}`);
|
|
199
|
+
}
|
|
193
200
|
return cache.get(key);
|
|
194
201
|
},
|
|
195
202
|
check(...args) {
|