lincd-cli 0.2.42 → 0.2.43
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/.husky/post-merge +4 -0
- package/.husky/pre-commit +4 -0
- package/.prettierignore +4 -0
- package/.prettierrc.json +24 -0
- package/defaults/app-static/capacitor.config.ts +31 -81
- package/defaults/app-static/src/index-static.tsx +28 -0
- package/defaults/capacitor/scripts/fix-namespace.js +41 -0
- package/lib/cli-methods.js +1468 -1198
- package/lib/cli.js +98 -85
- package/lib/config-grunt.js +298 -229
- package/lib/config-webpack.js +358 -344
- package/lib/index.js +67 -29
- package/lib/interfaces.js +2 -2
- package/lib/plugins/declaration-plugin.js +209 -193
- package/lib/plugins/externalise-modules.js +167 -163
- package/lib/plugins/watch-run.js +16 -14
- package/lib/utils.js +326 -274
- package/package.json +17 -3
- package/defaults/app-static/frontend/src/index-static.tsx +0 -16
- /package/defaults/app-static/{frontend/web → web}/apple-touch-icon-144x144.png +0 -0
- /package/defaults/app-static/{frontend/web → web}/apple-touch-icon-57x57.png +0 -0
- /package/defaults/app-static/{frontend/web → web}/apple-touch-icon-72x72.png +0 -0
- /package/defaults/app-static/{frontend/web → web}/index.html +0 -0
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 80,
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"bracketSpacing": false,
|
|
5
|
+
"useTabs": false,
|
|
6
|
+
"semi": true,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"trailingComma": "all",
|
|
9
|
+
"endOfLine": "auto",
|
|
10
|
+
"overrides": [
|
|
11
|
+
{
|
|
12
|
+
"files": "*.json",
|
|
13
|
+
"options": {
|
|
14
|
+
"printWidth": 200
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"files": "*.jsonld",
|
|
19
|
+
"options": {
|
|
20
|
+
"parser": "json"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -3,9 +3,9 @@ import { CapacitorConfig } from '@capacitor/cli';
|
|
|
3
3
|
const config: CapacitorConfig = {
|
|
4
4
|
appId: 'com.mydomain.FILL_IN_YOUR_OWN',
|
|
5
5
|
appName: 'FILL_IN_YOUR_OWN',
|
|
6
|
-
webDir: '
|
|
6
|
+
webDir: 'web',
|
|
7
7
|
server: {
|
|
8
|
-
allowNavigation: ['
|
|
8
|
+
allowNavigation: ['yourdomain.com', 'sub.yourdomain.com'],
|
|
9
9
|
},
|
|
10
10
|
bundledWebRuntime: false,
|
|
11
11
|
//Add or remove plugins that you need. Here is a starter list
|
|
@@ -13,85 +13,35 @@ const config: CapacitorConfig = {
|
|
|
13
13
|
CapacitorHttp: {
|
|
14
14
|
enabled: true,
|
|
15
15
|
},
|
|
16
|
-
FirebaseMessaging: {
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
GoogleAuth: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
SplashScreen: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default config;
|
|
49
|
-
|
|
50
|
-
import {CapacitorConfig} from '@capacitor/cli';
|
|
51
|
-
|
|
52
|
-
const config: CapacitorConfig = {
|
|
53
|
-
appId: 'com.spiritualplaymates.app',
|
|
54
|
-
appName: 'Spiritual Playmates',
|
|
55
|
-
webDir: 'frontend/web',
|
|
56
|
-
server: {
|
|
57
|
-
allowNavigation: ['spiritualplaymates.com', 'app.spiritualplaymates.com', 'http://reborn-pro.local:4000'],
|
|
58
|
-
},
|
|
59
|
-
cordova: {},
|
|
60
|
-
plugins: {
|
|
61
|
-
FirebaseMessaging: {
|
|
62
|
-
presentationOptions: ['badge', 'sound', 'alert'],
|
|
63
|
-
},
|
|
64
|
-
GoogleAuth: {
|
|
65
|
-
scopes: ['profile', 'email'],
|
|
66
|
-
//self created production web client
|
|
67
|
-
clientId: '734627482469-37q563qta2jt6bmhksemmvco8si0pmai.apps.googleusercontent.com',
|
|
68
|
-
serverClientId: '580968717451-68kpj51ulab8q7drbd3sr7imodai81lp.apps.googleusercontent.com',
|
|
69
|
-
//auto generated web client
|
|
70
|
-
//clientId: '580968717451-68kpj51ulab8q7drbd3sr7imodai81lp.apps.googleusercontent.com ',
|
|
71
|
-
androidClientId: '580968717451-68kpj51ulab8q7drbd3sr7imodai81lp.apps.googleusercontent.com',
|
|
72
|
-
|
|
73
|
-
iosClientId: '580968717451-aoj80o3e8qfjlmbrgabf916mfk4t3ntr.apps.googleusercontent.com',
|
|
74
|
-
forceCodeForRefreshToken: true,
|
|
75
|
-
},
|
|
76
|
-
CapacitorHttp: {
|
|
77
|
-
enabled: true,
|
|
78
|
-
},
|
|
79
|
-
SplashScreen: {
|
|
80
|
-
launchShowDuration: 400,
|
|
81
|
-
launchAutoHide: true,
|
|
82
|
-
// launchFadeOutDuration: 500,
|
|
83
|
-
backgroundColor: '#F7E5FF',
|
|
84
|
-
androidSplashResourceName: 'splash',
|
|
85
|
-
// androidScaleType: 'CENTER',
|
|
86
|
-
showSpinner: false,
|
|
87
|
-
// androidSpinnerStyle: 'large',
|
|
88
|
-
// iosSpinnerStyle: 'small',
|
|
89
|
-
// spinnerColor: '#999999',
|
|
90
|
-
splashFullScreen: true,
|
|
91
|
-
splashImmersive: true,
|
|
92
|
-
// layoutName: 'launch_screen',
|
|
93
|
-
// useDialog: true,
|
|
94
|
-
},
|
|
16
|
+
// FirebaseMessaging: {
|
|
17
|
+
// presentationOptions: ['badge', 'sound', 'alert'],
|
|
18
|
+
// },
|
|
19
|
+
// GoogleAuth: {
|
|
20
|
+
// scopes: ['profile', 'email'],
|
|
21
|
+
// //self created production web client
|
|
22
|
+
// clientId: '...',
|
|
23
|
+
// //For these lines use the auto generated web client "Web client (auto created by Google Service)"
|
|
24
|
+
// serverClientId: '....',
|
|
25
|
+
// androidClientId: '...',
|
|
26
|
+
// iosClientId: '...',
|
|
27
|
+
// forceCodeForRefreshToken: true,
|
|
28
|
+
// },
|
|
29
|
+
// SplashScreen: {
|
|
30
|
+
// launchShowDuration: 400,
|
|
31
|
+
// launchAutoHide: true,
|
|
32
|
+
// backgroundColor: '#F7E5FF',
|
|
33
|
+
// androidSplashResourceName: 'splash',
|
|
34
|
+
// showSpinner: false,
|
|
35
|
+
// splashFullScreen: true,
|
|
36
|
+
// splashImmersive: true,
|
|
37
|
+
// // launchFadeOutDuration: 500,
|
|
38
|
+
// // androidScaleType: 'CENTER',
|
|
39
|
+
// // androidSpinnerStyle: 'large',
|
|
40
|
+
// // iosSpinnerStyle: 'small',
|
|
41
|
+
// // spinnerColor: '#999999',
|
|
42
|
+
// // layoutName: 'launch_screen',
|
|
43
|
+
// // useDialog: true,
|
|
44
|
+
// },
|
|
95
45
|
},
|
|
96
46
|
};
|
|
97
47
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import {BrowserRouter} from 'react-router-dom';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import {BackendAPIStore} from 'lincd-server/lib/shapes/BackendAPIStore';
|
|
6
|
+
import {Storage} from 'lincd/lib/utils/Storage';
|
|
7
|
+
import {AppContextProvider} from 'lincd-server-utils/lib/components/AppContext';
|
|
8
|
+
|
|
9
|
+
const root = ReactDOM.createRoot(
|
|
10
|
+
// document
|
|
11
|
+
// document.body
|
|
12
|
+
document.getElementById('root') as HTMLElement
|
|
13
|
+
);
|
|
14
|
+
//store all quads in a file on the backend named 'main'
|
|
15
|
+
// export const store = new BackendFileStore('main');
|
|
16
|
+
export const store = new BackendAPIStore();
|
|
17
|
+
Storage.setDefaultStore(store);
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
root.render(
|
|
21
|
+
<React.StrictMode>
|
|
22
|
+
<BrowserRouter>
|
|
23
|
+
<AppContextProvider isNativeApp={true}>
|
|
24
|
+
<App />
|
|
25
|
+
</AppContextProvider>
|
|
26
|
+
</BrowserRouter>
|
|
27
|
+
</React.StrictMode>
|
|
28
|
+
);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
fs = require('fs');
|
|
2
|
+
|
|
3
|
+
let file = 'android/capacitor-cordova-android-plugins/build.gradle';
|
|
4
|
+
|
|
5
|
+
//check if file exists
|
|
6
|
+
if (!fs.existsSync(file)) {
|
|
7
|
+
console.log('File does not exist.', file);
|
|
8
|
+
} else {
|
|
9
|
+
//read contents of "android/capacitor-cordova-android-plugins/build.gradle"
|
|
10
|
+
let contents = fs.readFileSync(file, 'utf8');
|
|
11
|
+
|
|
12
|
+
if (!contents.includes('namespace')) {
|
|
13
|
+
//insert text on line 19
|
|
14
|
+
contents = contents.replace(
|
|
15
|
+
/android \{/,
|
|
16
|
+
`android {
|
|
17
|
+
namespace 'capacitor.android.plugins'`,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
//write back to file
|
|
21
|
+
fs.writeFileSync(file, contents, 'utf8');
|
|
22
|
+
|
|
23
|
+
console.log('Added namespace to ' + file);
|
|
24
|
+
} else {
|
|
25
|
+
console.log('Namespace already present in ' + file);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let file2 = 'ios/App/Pods/Pods.xcodeproj/project.pbxproj';
|
|
30
|
+
if (!fs.existsSync(file2)) {
|
|
31
|
+
console.log('File does not exist.', file2);
|
|
32
|
+
} else {
|
|
33
|
+
let contents2 = fs.readFileSync(file2, 'utf8');
|
|
34
|
+
if (contents2.includes('IPHONEOS_DEPLOYMENT_TARGET = 12.0')) {
|
|
35
|
+
contents2 = contents2.replace(/IPHONEOS_DEPLOYMENT_TARGET \= 12\.0/g, `IPHONEOS_DEPLOYMENT_TARGET = 13.0`);
|
|
36
|
+
fs.writeFileSync(file2, contents2, 'utf8');
|
|
37
|
+
console.log('Fixed IOS target version for codetrix google oauth plugin');
|
|
38
|
+
} else {
|
|
39
|
+
console.log("Didn't need to fix IOS target version");
|
|
40
|
+
}
|
|
41
|
+
}
|