@applicaster/zapplicaster-cli 14.0.0-rc.9 → 15.0.0-alpha.4515904047
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/package.json +8 -14
- package/src/commands/prepareWorkspace/__tests__/appBootstrapper.test.js +3 -3
- package/src/commands/prepareWorkspace/appBootstrapper.js +18 -0
- package/src/commands/prepareWorkspace/checkWorkspaceDependencies.js +1 -1
- package/src/commands/publishPlugin/__tests__/__snapshots__/npmPublish.test.js.snap +2 -0
- package/src/commands/publishPlugin/__tests__/npmPublish.test.js +2 -1
- package/src/render/dependencies.json +0 -5
- package/src/templates/newWorkspaceTemplate/index.js +0 -12
- package/src/zapp/__tests__/zapp.test.js +3 -3
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapplicaster-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0-alpha.4515904047",
|
|
4
4
|
"description": "CLI Tool for the zapp app and Quick Brick project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": "
|
|
11
|
-
"yarn": "^
|
|
10
|
+
"node": ">= 18.0.0",
|
|
11
|
+
"yarn": "^4.0.0"
|
|
12
12
|
},
|
|
13
13
|
"bin": "./index.js",
|
|
14
14
|
"repository": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/zapp-react-dom-cli-template": "
|
|
32
|
-
"@applicaster/zapp-react-native-android-tv-cli-template": "
|
|
33
|
-
"@applicaster/zapp-react-native-cli-template": "
|
|
34
|
-
"@applicaster/zapp-react-native-tvos-cli-template": "
|
|
31
|
+
"@applicaster/zapp-react-dom-cli-template": "15.0.0-alpha.4515904047",
|
|
32
|
+
"@applicaster/zapp-react-native-android-tv-cli-template": "15.0.0-alpha.4515904047",
|
|
33
|
+
"@applicaster/zapp-react-native-cli-template": "15.0.0-alpha.4515904047",
|
|
34
|
+
"@applicaster/zapp-react-native-tvos-cli-template": "15.0.0-alpha.4515904047",
|
|
35
35
|
"axios": "^0.28.0",
|
|
36
36
|
"camelize": "^1.0.0",
|
|
37
37
|
"chalk": "^2.3.2",
|
|
@@ -55,20 +55,14 @@
|
|
|
55
55
|
"@babel/runtime": "*",
|
|
56
56
|
"@react-native-community/netinfo": "*",
|
|
57
57
|
"core-js": "*",
|
|
58
|
-
"immer": "*",
|
|
59
58
|
"react": "*",
|
|
60
|
-
"react-dom": "*",
|
|
61
59
|
"react-native": "*",
|
|
62
60
|
"react-native-fs": "*",
|
|
63
|
-
"react-native-gesture-handler": "*",
|
|
64
61
|
"react-native-linear-gradient": "*",
|
|
65
|
-
"react-native-safe-area-context": "*",
|
|
66
62
|
"react-native-svg": "*",
|
|
67
|
-
"react-native-web": "*",
|
|
68
63
|
"react-native-webview": "*",
|
|
69
64
|
"uglify-js": "*",
|
|
70
65
|
"validate-color": "*",
|
|
71
66
|
"zustand": "*"
|
|
72
|
-
}
|
|
73
|
-
"gitHead": "a473487564142c55cdb50f02505cf0b60fe75658"
|
|
67
|
+
}
|
|
74
68
|
}
|
|
@@ -85,11 +85,11 @@ const {
|
|
|
85
85
|
getPluginDependencies,
|
|
86
86
|
} = require("../../../plugins");
|
|
87
87
|
|
|
88
|
-
const mockedRenderTemplateFileCurried = jest.fn(Promise.resolve);
|
|
88
|
+
const mockedRenderTemplateFileCurried = jest.fn(() => Promise.resolve());
|
|
89
89
|
|
|
90
90
|
jest.mock("../../../render", () => ({
|
|
91
|
-
injectDependencies: jest.fn(Promise.resolve),
|
|
92
|
-
injectScripts: jest.fn(Promise.resolve),
|
|
91
|
+
injectDependencies: jest.fn(() => Promise.resolve()),
|
|
92
|
+
injectScripts: jest.fn(() => Promise.resolve()),
|
|
93
93
|
renderTemplateFile: jest.fn(() => mockedRenderTemplateFileCurried),
|
|
94
94
|
}));
|
|
95
95
|
|
|
@@ -38,6 +38,24 @@ async function patchPackages() {
|
|
|
38
38
|
existsSync(join(process.cwd(), "development-app", "patch_rn.js"))
|
|
39
39
|
) {
|
|
40
40
|
exec(`node ${process.cwd()}/development-app/patch_rn.js`);
|
|
41
|
+
} else if (
|
|
42
|
+
existsSync(
|
|
43
|
+
join(
|
|
44
|
+
process.cwd(),
|
|
45
|
+
"packages",
|
|
46
|
+
"zapp-react-dom-development-app",
|
|
47
|
+
"patch_rn.js"
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
) {
|
|
51
|
+
const pathToFile = join(
|
|
52
|
+
process.cwd(),
|
|
53
|
+
"packages",
|
|
54
|
+
"zapp-react-dom-development-app",
|
|
55
|
+
"patch_rn.js"
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
exec(`node ${pathToFile}`);
|
|
41
59
|
} else {
|
|
42
60
|
logger.log("Cannot patch packages, can't find the patch_rn.js file");
|
|
43
61
|
}
|
|
@@ -18,7 +18,7 @@ async function checkWorkspaceDependencies(configuration) {
|
|
|
18
18
|
} else {
|
|
19
19
|
if (deviceTarget === "apple_tv") {
|
|
20
20
|
logger.warn(
|
|
21
|
-
`Warning!\nWe've detected that you're running ${deviceTarget} app and your workspace package.json is requesting mobile react-native dependency.\nPlease run: yarn add react-native@npm:react-native-tvos@0.
|
|
21
|
+
`Warning!\nWe've detected that you're running ${deviceTarget} app and your workspace package.json is requesting mobile react-native dependency.\nPlease run: yarn add react-native@npm:react-native-tvos@0.77.2-1`
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`npm publish step with default options throws if the npm command fails 1`] = `[Error: Failed to publish package]`;
|
|
4
|
+
|
|
5
|
+
exports[`npm publish step with dry run flag throws if used with the yarn flag as well 1`] = `true`;
|
|
@@ -154,7 +154,8 @@ describe("npm publish step", () => {
|
|
|
154
154
|
// didn't work
|
|
155
155
|
it.skip("throws if used with the yarn flag as well", async () => {
|
|
156
156
|
const configuration = getConfig({ dryRun: true, yarn: true });
|
|
157
|
-
|
|
157
|
+
const res = await npmPublish(configuration);
|
|
158
|
+
expect(res).toMatchSnapshot();
|
|
158
159
|
});
|
|
159
160
|
});
|
|
160
161
|
|
|
@@ -61,23 +61,11 @@ const template = {
|
|
|
61
61
|
version: "^3.1.0",
|
|
62
62
|
type: "devDependencies",
|
|
63
63
|
},
|
|
64
|
-
{ name: "flow-bin", version: "^0.107.0", type: "devDependencies" },
|
|
65
64
|
{ name: "jest", version: "^23.6.0", type: "devDependencies" },
|
|
66
65
|
{ name: "jest-extended", version: "^0.6.0", type: "devDependencies" },
|
|
67
66
|
{ name: "jest-html-reporter", version: "^2.3.0", type: "devDependencies" },
|
|
68
67
|
{ name: "lerna", version: "^2.11.0", type: "devDependencies" },
|
|
69
|
-
{
|
|
70
|
-
name: "metro-react-native-babel-preset",
|
|
71
|
-
version: "^0.59",
|
|
72
|
-
type: "devDependencies",
|
|
73
|
-
},
|
|
74
68
|
{ name: "ramda", version: "0.26.1", type: "devDependencies" },
|
|
75
|
-
{
|
|
76
|
-
name: "react-addons-test-utils",
|
|
77
|
-
version: "^15.6.2",
|
|
78
|
-
type: "devDependencies",
|
|
79
|
-
},
|
|
80
|
-
{ name: "react-dom", version: "^16.4.0", type: "devDependencies" },
|
|
81
69
|
{ name: "react-test-renderer", version: "16.4.1", type: "devDependencies" },
|
|
82
70
|
{
|
|
83
71
|
name: "regenerator-runtime",
|
|
@@ -25,13 +25,13 @@ describe("when ZAPP_TOKEN is not defined", () => {
|
|
|
25
25
|
process.env = ENV;
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
it("throws an error",
|
|
29
|
-
const { getAppVersionParams } = require("../
|
|
28
|
+
it("throws an error", () => {
|
|
29
|
+
const { getAppVersionParams } = require("../");
|
|
30
30
|
|
|
31
31
|
const ERROR_MESSAGE =
|
|
32
32
|
"no $ZAPP_TOKEN defined - please add it to your environment variables";
|
|
33
33
|
|
|
34
|
-
expect(getAppVersionParams(VERSION_ID)).rejects.
|
|
34
|
+
expect(getAppVersionParams(VERSION_ID)).rejects.toThrow(ERROR_MESSAGE);
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
|