@wavemaker/angular-codegen 11.11.0-rc.6106 → 11.11.0-rc.6112
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/angular-app/angular.json +0 -2
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +40 -40
- package/angular-app/package-lock.json +40 -40
- package/angular-app/package.json +5 -5
- package/angular-app/src/assets/styles/css/wm-style.css +1 -1
- package/build-angular-app.js +11 -7
- package/dependencies/pipe-provider.cjs.js +11987 -10502
- package/dependencies/transpilation-web.cjs.js +5984 -5242
- package/download-packages.js +99 -31
- package/npm-shrinkwrap.json +23 -23
- package/package-lock.json +23 -23
- package/package.json +2 -2
- package/src/gen-app-override-css.js +1 -1
- package/src/project-meta.js +1 -1
- package/src/wm-utils.js +1 -1
- package/templates/app.config.ts.hbs +5 -5
package/build-angular-app.js
CHANGED
|
@@ -148,10 +148,11 @@ const buildAngularApp = async (args) => {
|
|
|
148
148
|
if (!fs.existsSync(SUCCESS_FILE)) {
|
|
149
149
|
// Check if another process is already installing
|
|
150
150
|
if (fs.existsSync(LOCK_FILE)) {
|
|
151
|
-
console.log(
|
|
151
|
+
console.log(`Waiting for another build to complete npm install... for package ${PACKAGE_NAME}`);
|
|
152
152
|
await waitForLock(LOCK_FILE, 20 * 60 * 1000); // Wait for 20 minutes (timeout in milliseconds)
|
|
153
153
|
} else {
|
|
154
154
|
// Acquire the lock
|
|
155
|
+
fs.mkdirSync(TARBALL_DOWNLOAD_PATH, { recursive: true });
|
|
155
156
|
fs.writeFileSync(LOCK_FILE, "PROGRESS");
|
|
156
157
|
await processAngularAppPackage(TARBALL_DOWNLOAD_PATH, TARBALL_DOWNLOAD_PATH, PACKAGE_NAME, true);
|
|
157
158
|
fs.writeFileSync(SUCCESS_FILE, "SUCCESS");
|
|
@@ -166,11 +167,13 @@ const buildAngularApp = async (args) => {
|
|
|
166
167
|
}
|
|
167
168
|
} catch (err) {
|
|
168
169
|
deleteFiles([SUCCESS_FILE, LOCK_FILE])
|
|
169
|
-
console.log(MSG_NG_RUNTIME_LOG +
|
|
170
|
+
console.log(MSG_NG_RUNTIME_LOG + `Something went wrong - for package ${PACKAGE_NAME}`, err);
|
|
170
171
|
process.exit(err.code || err.pid);
|
|
171
172
|
} finally {
|
|
172
173
|
//cleanup : in windows / optimizeUIBuild is false, we need to delete the temp downloaded package
|
|
173
|
-
|
|
174
|
+
if (args.optimizeUIBuild) {
|
|
175
|
+
deleteFiles([path.join(TARBALL_DOWNLOAD_PATH, 'package'), path.join(TARBALL_DOWNLOAD_PATH, ANGULAR_APP_TARBALL_NAME), LOCK_FILE])
|
|
176
|
+
}
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
let ngBuildParams = updateDeployUrl(args);
|
|
@@ -308,9 +311,10 @@ const copyRecursiveSync = (src, dest) => {
|
|
|
308
311
|
* Install the app-runtime-wm-build if package not yet installed.
|
|
309
312
|
* Based on the platform type copy the bundle script into '/src/main/webapp'
|
|
310
313
|
* @param {*} sourceDir
|
|
314
|
+
* @param {*} baseDir
|
|
311
315
|
* @returns
|
|
312
316
|
*/
|
|
313
|
-
const buildAppInWMMode = (sourceDir, baseDir) => {
|
|
317
|
+
const buildAppInWMMode = async (sourceDir, baseDir) => {
|
|
314
318
|
|
|
315
319
|
/**
|
|
316
320
|
* Download app-runtime-wm-build package and install if it doesn't exist
|
|
@@ -325,7 +329,7 @@ const buildAppInWMMode = (sourceDir, baseDir) => {
|
|
|
325
329
|
};
|
|
326
330
|
|
|
327
331
|
appRuntimeWMBuildPackageInfo.baseDir = baseDir;
|
|
328
|
-
const PATH_WAVEMAKER_APP_RUNTIME_WM_BUILD = downloadNPMPackage(appRuntimeWMBuildPackageInfo);
|
|
332
|
+
const PATH_WAVEMAKER_APP_RUNTIME_WM_BUILD = await downloadNPMPackage(appRuntimeWMBuildPackageInfo);
|
|
329
333
|
|
|
330
334
|
const FILE_PATH_WAVEMAKER_APP_RUNTIME_WM_BUILD = PATH_WAVEMAKER_APP_RUNTIME_WM_BUILD + '/node_modules/' + appRuntimeWMBuildPackageInfo.scope + '/' + appRuntimeWMBuildPackageInfo.name + '/';
|
|
331
335
|
|
|
@@ -456,7 +460,7 @@ const initBuild = async (buildConfigObj) => {
|
|
|
456
460
|
const sourceDir = buildConfigObj.appSrc;
|
|
457
461
|
let appTarget = buildConfigObj.appTarget;
|
|
458
462
|
|
|
459
|
-
let baseDir = buildConfigObj.optimizeUIBuild ? undefined : appTarget.split('/').slice(0, 2).join('/') + '/';
|
|
463
|
+
let baseDir = buildConfigObj.optimizeUIBuild ? undefined : appTarget.split('/').slice(0, -2).join('/') + '/';
|
|
460
464
|
if (buildConfigObj.generateOverrideCSS) {
|
|
461
465
|
const { generateOverrideCSS } = require(CODEGEN_INSTALLATION + 'src/gen-app-override-css.js');
|
|
462
466
|
await generateOverrideCSS(buildConfigObj, sourceDir, baseDir);
|
|
@@ -469,7 +473,7 @@ const initBuild = async (buildConfigObj) => {
|
|
|
469
473
|
console.log('Angular app generation mode');
|
|
470
474
|
await generateAngularApp(sourceDir, getNgBuildParams(), CODEGEN_INSTALLATION, appTarget, baseDir);
|
|
471
475
|
} else if (buildType === BUILD_TYPE.WM) {
|
|
472
|
-
buildAppInWMMode(sourceDir, baseDir);
|
|
476
|
+
await buildAppInWMMode(sourceDir, baseDir);
|
|
473
477
|
} else if (buildType === BUILD_TYPE.ANGULAR) {
|
|
474
478
|
if(!isWebComponentBuild) {
|
|
475
479
|
await generateAngularApp(sourceDir, getNgBuildParams(), CODEGEN_INSTALLATION, appTarget, baseDir);
|