patch-project 0.1.26 → 0.1.27-canary-20250221-ef26fed
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/build/cli/dir.d.ts +2 -3
- package/build/cli/dir.js +27 -4
- package/build/cli/dir.js.map +1 -1
- package/package.json +7 -9
package/build/cli/dir.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
1
|
export declare function directoryExistsAsync(file: string): Promise<boolean>;
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
2
|
+
export declare function ensureDirectoryAsync(path: string): Promise<void>;
|
|
3
|
+
export declare function moveAsync(src: string, dest: string): Promise<void>;
|
package/build/cli/dir.js
CHANGED
|
@@ -4,12 +4,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.moveAsync = exports.ensureDirectoryAsync = exports.directoryExistsAsync = void 0;
|
|
7
|
-
const
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
8
9
|
async function directoryExistsAsync(file) {
|
|
9
|
-
return (await
|
|
10
|
+
return (await fs_1.default.promises.stat(file).catch(() => null))?.isDirectory() ?? false;
|
|
10
11
|
}
|
|
11
12
|
exports.directoryExistsAsync = directoryExistsAsync;
|
|
12
|
-
|
|
13
|
+
async function ensureDirectoryAsync(path) {
|
|
14
|
+
await fs_1.default.promises.mkdir(path, { recursive: true });
|
|
15
|
+
}
|
|
13
16
|
exports.ensureDirectoryAsync = ensureDirectoryAsync;
|
|
14
|
-
|
|
17
|
+
async function moveAsync(src, dest) {
|
|
18
|
+
// First, remove target, so there are no conflicts (explicit overwrite)
|
|
19
|
+
await fs_1.default.promises.rm(dest, { force: true, recursive: true });
|
|
20
|
+
// Then, make sure that the target parent directory exists
|
|
21
|
+
await fs_1.default.promises.mkdir(path_1.default.dirname(dest), { recursive: true });
|
|
22
|
+
try {
|
|
23
|
+
// Then, rename the file to move it to the destination
|
|
24
|
+
await fs_1.default.promises.rename(src, dest);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (error.code === 'EXDEV') {
|
|
28
|
+
// If the file is on a different device/disk, copy it instead and delete the original
|
|
29
|
+
await fs_1.default.promises.cp(src, dest, { errorOnExist: true, recursive: true });
|
|
30
|
+
await fs_1.default.promises.rm(src, { recursive: true, force: true });
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.moveAsync = moveAsync;
|
|
15
38
|
//# sourceMappingURL=dir.js.map
|
package/build/cli/dir.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.js","sourceRoot":"","sources":["../../src/cli/dir.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"dir.js","sourceRoot":"","sources":["../../src/cli/dir.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAEjB,KAAK,UAAU,oBAAoB,CAAC,IAAY;IACrD,OAAO,CAAC,MAAM,YAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,KAAK,CAAC;AAClF,CAAC;AAFD,oDAEC;AAEM,KAAK,UAAU,oBAAoB,CAAC,IAAY;IACrD,MAAM,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC;AAFD,oDAEC;AAEM,KAAK,UAAU,SAAS,CAAC,GAAW,EAAE,IAAY;IACvD,uEAAuE;IACvE,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,0DAA0D;IAC1D,MAAM,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,IAAI;QACF,sDAAsD;QACtD,MAAM,YAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;KACrC;IAAC,OAAO,KAAU,EAAE;QACnB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;YAC1B,qFAAqF;YACrF,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACzE,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;SAC7D;aAAM;YACL,MAAM,KAAK,CAAC;SACb;KACF;AACH,CAAC;AAjBD,8BAiBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patch-project",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27-canary-20250221-ef26fed",
|
|
4
4
|
"description": "An Expo config-plugin and tool to support patch-based CNG",
|
|
5
5
|
"main": "build/withPatchPlugin.js",
|
|
6
6
|
"types": "build/withPatchPlugin.d.ts",
|
|
@@ -42,24 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/expo/expo/tree/main/packages/patch-project#readme",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"expo-module-scripts": "
|
|
45
|
+
"expo-module-scripts": "4.0.5-canary-20250221-ef26fed",
|
|
46
46
|
"memfs": "^3.2.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@expo/config": "
|
|
50
|
-
"@expo/config-plugins": "
|
|
51
|
-
"@expo/env": "
|
|
49
|
+
"@expo/config": "11.0.0-canary-20250221-ef26fed",
|
|
50
|
+
"@expo/config-plugins": "9.0.16-canary-20250221-ef26fed",
|
|
51
|
+
"@expo/env": "1.0.1-canary-20250221-ef26fed",
|
|
52
52
|
"@expo/spawn-async": "^1.7.2",
|
|
53
53
|
"arg": "5.0.2",
|
|
54
54
|
"chalk": "^4.0.0",
|
|
55
55
|
"debug": "^4.3.1",
|
|
56
|
-
"fs-extra": "^9.1.0",
|
|
57
56
|
"getenv": "^1.0.0",
|
|
58
57
|
"glob": "^10.4.1",
|
|
59
58
|
"resolve-from": "^5.0.0"
|
|
60
59
|
},
|
|
61
60
|
"peerDependencies": {
|
|
62
|
-
"expo": "
|
|
63
|
-
}
|
|
64
|
-
"gitHead": "7080126694798ca950d5dc3ef33483a17fa401bb"
|
|
61
|
+
"expo": "53.0.0-canary-20250221-ef26fed"
|
|
62
|
+
}
|
|
65
63
|
}
|