codify-plugin-test 0.0.53-beta19 → 0.0.53-beta20
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/test-utils.d.ts +2 -2
- package/dist/test-utils.js +5 -5
- package/dist/test-utils.js.map +1 -1
- package/package.json +1 -1
- package/src/test-utils.ts +4 -4
package/dist/test-utils.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { IpcMessageV2 } from 'codify-schemas';
|
|
|
2
2
|
import { ChildProcess } from 'node:child_process';
|
|
3
3
|
export declare const TestUtils: {
|
|
4
4
|
sendMessageAndAwaitResponse(process: ChildProcess, message: IpcMessageV2): Promise<any>;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
ensureHomebrewInstalledOnMacOs(pluginPath: string): Promise<void>;
|
|
6
|
+
ensureXcodeInstalledOnMacOs(pluginPath: string): Promise<void>;
|
|
7
7
|
getShell(): "bash" | "zsh";
|
|
8
8
|
/**
|
|
9
9
|
* Get the primary shell rc file path
|
package/dist/test-utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
|
-
import { IpcMessageSchema, MessageStatus, SpawnStatus } from 'codify-schemas';
|
|
2
|
+
import { IpcMessageSchema, MessageStatus, ResourceOs, SpawnStatus } from 'codify-schemas';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { PluginTester } from './plugin-tester.js';
|
|
@@ -29,16 +29,16 @@ export const TestUtils = {
|
|
|
29
29
|
process.send(message);
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
async
|
|
32
|
+
async ensureHomebrewInstalledOnMacOs(pluginPath) {
|
|
33
33
|
const homebrewQuery = await testSpawn('which homebrew');
|
|
34
34
|
if (homebrewQuery.status !== SpawnStatus.SUCCESS) {
|
|
35
|
-
await PluginTester.install(pluginPath, [{ type: 'homebrew' }]);
|
|
35
|
+
await PluginTester.install(pluginPath, [{ type: 'homebrew', os: [ResourceOs.MACOS] }]);
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
async
|
|
38
|
+
async ensureXcodeInstalledOnMacOs(pluginPath) {
|
|
39
39
|
const xcodeQuery = await testSpawn('xcodebuild -version');
|
|
40
40
|
if (xcodeQuery.status !== SpawnStatus.SUCCESS) {
|
|
41
|
-
await PluginTester.install(pluginPath, [{ type: 'xcode' }]);
|
|
41
|
+
await PluginTester.install(pluginPath, [{ type: 'xcode-tools', os: [ResourceOs.MACOS] }]);
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
getShell() {
|
package/dist/test-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAgB,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC;IAC1B,MAAM,EAAE,IAAI;CACb,CAAC,CAAC;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,2BAA2B,CAAC,OAAqB,EAAE,OAAqB;QACtE,OAAO,IAAI,OAAO,CAAC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,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,qBAAqB,CAAC,OAAe;QACnC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QAEnC,OAAO,KAAK,KAAK,MAAM;YACrB,CAAC,CAAC,eAAe,OAAO,GAAG;YAC3B,CAAC,CAAC,cAAc,OAAO,GAAG,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,SAAiB;QACpC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QAEnC,gDAAgD;QAChD,6CAA6C;QAC7C,OAAO,KAAK,KAAK,MAAM;YACrB,CAAC,CAAC,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE;YACtD,CAAC,CAAC,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,EAAE,CAAC,QAAQ,EAAE,KAAK,QAAQ,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC;IACnC,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
package/src/test-utils.ts
CHANGED
|
@@ -35,17 +35,17 @@ export const TestUtils = {
|
|
|
35
35
|
});
|
|
36
36
|
},
|
|
37
37
|
|
|
38
|
-
async
|
|
38
|
+
async ensureHomebrewInstalledOnMacOs(pluginPath: string) {
|
|
39
39
|
const homebrewQuery = await testSpawn('which homebrew');
|
|
40
40
|
if (homebrewQuery.status !== SpawnStatus.SUCCESS) {
|
|
41
|
-
await PluginTester.install(pluginPath, [{ type: 'homebrew' }])
|
|
41
|
+
await PluginTester.install(pluginPath, [{ type: 'homebrew', os: [ResourceOs.MACOS] }])
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
|
|
45
|
-
async
|
|
45
|
+
async ensureXcodeInstalledOnMacOs(pluginPath: string) {
|
|
46
46
|
const xcodeQuery = await testSpawn('xcodebuild -version');
|
|
47
47
|
if (xcodeQuery.status !== SpawnStatus.SUCCESS) {
|
|
48
|
-
await PluginTester.install(pluginPath, [{ type: 'xcode'
|
|
48
|
+
await PluginTester.install(pluginPath, [{ type: 'xcode-tools', os: [ResourceOs.MACOS] }])
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
|