@aprovan/patchwork-compiler 0.1.2-dev.6bd527d → 0.1.2-dev.f456953
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 +15 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1574,7 +1574,7 @@ async function initEsbuild() {
|
|
|
1574
1574
|
});
|
|
1575
1575
|
esbuildInitialized = true;
|
|
1576
1576
|
} catch (error) {
|
|
1577
|
-
if (error instanceof Error && error.message.includes("
|
|
1577
|
+
if (error instanceof Error && error.message.includes("initialize")) {
|
|
1578
1578
|
esbuildInitialized = true;
|
|
1579
1579
|
} else {
|
|
1580
1580
|
throw error;
|
|
@@ -1882,11 +1882,13 @@ var VirtualFS = class {
|
|
|
1882
1882
|
return this.backend.readFile(path, encoding);
|
|
1883
1883
|
}
|
|
1884
1884
|
async writeFile(path, content) {
|
|
1885
|
+
await this.ensureParentDir(path);
|
|
1885
1886
|
const existed = await this.backend.exists(path);
|
|
1886
1887
|
await this.backend.writeFile(path, content);
|
|
1887
1888
|
this.recordChange(path, existed ? "update" : "create");
|
|
1888
1889
|
}
|
|
1889
1890
|
async applyRemoteFile(path, content) {
|
|
1891
|
+
await this.ensureParentDir(path);
|
|
1890
1892
|
await this.backend.writeFile(path, content);
|
|
1891
1893
|
}
|
|
1892
1894
|
async applyRemoteDelete(path) {
|
|
@@ -1958,6 +1960,11 @@ var VirtualFS = class {
|
|
|
1958
1960
|
listener(record);
|
|
1959
1961
|
}
|
|
1960
1962
|
}
|
|
1963
|
+
async ensureParentDir(path) {
|
|
1964
|
+
const dir = dirname2(path);
|
|
1965
|
+
if (!dir) return;
|
|
1966
|
+
await this.backend.mkdir(dir, { recursive: true });
|
|
1967
|
+
}
|
|
1961
1968
|
};
|
|
1962
1969
|
|
|
1963
1970
|
// src/vfs/sync/differ.ts
|
|
@@ -2734,6 +2741,13 @@ var VFSStore = class {
|
|
|
2734
2741
|
)
|
|
2735
2742
|
);
|
|
2736
2743
|
}
|
|
2744
|
+
watch(path, callback) {
|
|
2745
|
+
if (this.provider.watch) {
|
|
2746
|
+
return this.provider.watch(this.remotePath(path), callback);
|
|
2747
|
+
}
|
|
2748
|
+
return () => {
|
|
2749
|
+
};
|
|
2750
|
+
}
|
|
2737
2751
|
async sync() {
|
|
2738
2752
|
if (!this.syncEngine) {
|
|
2739
2753
|
return { pushed: 0, pulled: 0, conflicts: [] };
|