@gloww/gloww 20.0.0-beta.49 → 20.0.0-beta.51

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.
@@ -13,21 +13,41 @@ const argv = yargs
13
13
  .alias('help', 'h')
14
14
  .argv;
15
15
 
16
- let packagejsonfile = `${process.cwd()}/package.json`
17
- let distPath = `${process.cwd()}/${argv.path}`;
18
- let versionFilePath = path.join(`${process.cwd()}/${argv.path}/version.json`);
19
- const appVersion = require(packagejsonfile).version;
20
-
21
- if (argv.project) {
22
- packagejsonfile = `${process.cwd()}/projects/${argv.project}/package.json`
23
- distPath = path.join(`${process.cwd()}/${argv.path}/${argv.project}`);
24
- versionFilePath = path.join(`${process.cwd()}/${argv.path}/${argv.project}/version.json`);
25
- console.log(packagejsonfile);
26
- console.log(versionFilePath);
27
- }
28
-
29
- console.log(`packagejsonfile: ${packagejsonfile}`);
30
- var appVersionPrj = appVersion;
16
+ let packagejsonfile = `${process.cwd()}/package.json`
17
+ let distPath = path.isAbsolute(argv.path) ? argv.path : path.join(process.cwd(), argv.path);
18
+ let versionFilePath = path.join(distPath, 'version.json');
19
+ const appVersion = require(packagejsonfile).version;
20
+
21
+ if (argv.project) {
22
+ packagejsonfile = `${process.cwd()}/projects/${argv.project}/package.json`
23
+ const baseDistPath = path.isAbsolute(argv.path) ? argv.path : path.join(process.cwd(), argv.path);
24
+ distPath = path.join(baseDistPath, argv.project);
25
+ versionFilePath = path.join(distPath, 'version.json');
26
+ console.log(packagejsonfile);
27
+ console.log(versionFilePath);
28
+ }
29
+
30
+ const mainBundleEs5Regexp = /^main-es5.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
31
+ const mainBundleRegexp = /^main.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
32
+ const mainRegexp = /^main.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
33
+
34
+ function getBuildOutputPath(basePath) {
35
+ const browserPath = path.join(basePath, 'browser');
36
+ if (fs.existsSync(browserPath)) {
37
+ const browserFiles = fs.readdirSync(browserPath);
38
+ if (browserFiles.some(f => mainBundleRegexp.test(f) || mainBundleEs5Regexp.test(f) || mainRegexp.test(f))) {
39
+ return browserPath;
40
+ }
41
+ }
42
+
43
+ return basePath;
44
+ }
45
+
46
+ distPath = getBuildOutputPath(distPath);
47
+ versionFilePath = path.join(distPath, 'version.json');
48
+
49
+ console.log(`packagejsonfile: ${packagejsonfile}`);
50
+ var appVersionPrj = appVersion;
31
51
  try {
32
52
  appVersionPrj = require(packagejsonfile).version;//require('./../package.json').version;
33
53
  } catch { }
@@ -43,16 +63,11 @@ console.log(`dist Path: ${distPath}`);
43
63
  // our version.json will be in the dist folder
44
64
  console.log(`versionFilePath: ${versionFilePath}`);
45
65
 
46
- let mainHash = '';
47
- let mainBundleEs5File = '';
48
-
49
- // RegExp to find main.bundle.js, even if it doesn't include a hash in it's name (dev build)
50
- let mainBundleEs5Regexp = /^main-es5.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
51
- let mainBundleRegexp = /^main.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
52
- let mainRegexp = /^main.?([A-Za-z0-9]*)?(\.bundle)?.js$/;
53
-
54
- // read the dist folder files and find the one we're looking for
55
- readDir(distPath)
66
+ let mainHash = '';
67
+ let mainBundleEs5File = '';
68
+
69
+ // read the dist folder files and find the one we're looking for
70
+ readDir(distPath)
56
71
  .then(files => {
57
72
  mainBundleFile = files.find(f => mainBundleRegexp.test(f));
58
73
  mainBundleEs5File = files.find(f => mainBundleEs5Regexp.test(f));
@@ -2573,11 +2573,11 @@ class UserMenuComponent {
2573
2573
  });
2574
2574
  }
2575
2575
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserMenuComponent, deps: [{ token: AuthenticationService }, { token: i1$2.MatDialog }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2576
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: UserMenuComponent, isStandalone: true, selector: "gloww-user-menu", inputs: { size: "size", imageUser: "imageUser", loginpage: "loginpage" }, ngImport: i0, template: "@if (connected) {\n <div>\n <span (click)=\"toggleMenuUser()\">\n @if (imageUser) {\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" />\n }\n @if (!imageUser) {\n <i [ngClass]=\"'fal fa-user '+size\" style=\"float:left; padding-left:10px\">\n <!--[size]=\"size\"-->\n </i>\n }\n </span>\n @if (showMenuUser) {\n <div class=\"menuUser\">\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\n <li (click)=\"ChangePassword()\">\n <i class=\"fal fa-key-skeleton\"></i>Change Password\n </li>\n @if (oAuthProviders && oAuthProviders.length) {\n <li (click)=\"Configuration()\">\n <i class=\"fal fa-tools\"></i>Configuration\n </li>\n }\n <li (click)=\"Logout()\">\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\n </li>\n </ul>\n </div>\n }\n </div>\n}\n@if (!connected && loginpage) {\n <div>\n <span style=\"height:40px;float:left; padding-left:20px\" [routerLink]=\"loginpage\">Connexion</span>\n </div>\n}\n", styles: [".menuUser{position:relative}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
2576
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: UserMenuComponent, isStandalone: true, selector: "gloww-user-menu", inputs: { size: "size", imageUser: "imageUser", loginpage: "loginpage" }, ngImport: i0, template: "@if (connected) {\n <div>\n <span (click)=\"toggleMenuUser()\">\n @if (imageUser) {\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" />\n }\n @if (!imageUser) {\n <i [ngClass]=\"'fal fa-user '+size\" style=\"float:left; padding-left:10px\">\n <!--[size]=\"size\"-->\n </i>\n }\n </span>\n @if (showMenuUser) {\n <div class=\"menuUser\">\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\n <li (click)=\"ChangePassword()\">\n <i class=\"fal fa-key-skeleton\"></i>Change Password\n </li>\n @if (oAuthProviders && oAuthProviders.length) {\n <li (click)=\"Configuration()\">\n <i class=\"fal fa-tools\"></i>Configuration\n </li>\n }\n <li (click)=\"Logout()\">\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\n </li>\n </ul>\n </div>\n }\n </div>\n}\n@if (!connected && loginpage) {\n <div>\n <span class=\"user-menu-disabled user-menu-link\" [routerLink]=\"loginpage\" title=\"Connexion\">\n <i [ngClass]=\"'fal fa-user '+size\"></i>\n </span>\n </div>\n}\n@if (!connected && !loginpage) {\n <div>\n <span class=\"user-menu-disabled\" title=\"Utilisateur non connect\u00E9\">\n <i [ngClass]=\"'fal fa-user '+size\"></i>\n </span>\n </div>\n}\n", styles: [".menuUser{position:relative}.user-menu-disabled{float:left;padding-left:10px;color:#b0b0b0;cursor:default;opacity:.65}.user-menu-link{cursor:pointer}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
2577
2577
  }
2578
2578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserMenuComponent, decorators: [{
2579
2579
  type: Component,
2580
- args: [{ selector: 'gloww-user-menu', imports: [NgClass, RouterLink], template: "@if (connected) {\n <div>\n <span (click)=\"toggleMenuUser()\">\n @if (imageUser) {\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" />\n }\n @if (!imageUser) {\n <i [ngClass]=\"'fal fa-user '+size\" style=\"float:left; padding-left:10px\">\n <!--[size]=\"size\"-->\n </i>\n }\n </span>\n @if (showMenuUser) {\n <div class=\"menuUser\">\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\n <li (click)=\"ChangePassword()\">\n <i class=\"fal fa-key-skeleton\"></i>Change Password\n </li>\n @if (oAuthProviders && oAuthProviders.length) {\n <li (click)=\"Configuration()\">\n <i class=\"fal fa-tools\"></i>Configuration\n </li>\n }\n <li (click)=\"Logout()\">\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\n </li>\n </ul>\n </div>\n }\n </div>\n}\n@if (!connected && loginpage) {\n <div>\n <span style=\"height:40px;float:left; padding-left:20px\" [routerLink]=\"loginpage\">Connexion</span>\n </div>\n}\n", styles: [".menuUser{position:relative}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"] }]
2580
+ args: [{ selector: 'gloww-user-menu', imports: [NgClass, RouterLink], template: "@if (connected) {\n <div>\n <span (click)=\"toggleMenuUser()\">\n @if (imageUser) {\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" />\n }\n @if (!imageUser) {\n <i [ngClass]=\"'fal fa-user '+size\" style=\"float:left; padding-left:10px\">\n <!--[size]=\"size\"-->\n </i>\n }\n </span>\n @if (showMenuUser) {\n <div class=\"menuUser\">\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\n <li (click)=\"ChangePassword()\">\n <i class=\"fal fa-key-skeleton\"></i>Change Password\n </li>\n @if (oAuthProviders && oAuthProviders.length) {\n <li (click)=\"Configuration()\">\n <i class=\"fal fa-tools\"></i>Configuration\n </li>\n }\n <li (click)=\"Logout()\">\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\n </li>\n </ul>\n </div>\n }\n </div>\n}\n@if (!connected && loginpage) {\n <div>\n <span class=\"user-menu-disabled user-menu-link\" [routerLink]=\"loginpage\" title=\"Connexion\">\n <i [ngClass]=\"'fal fa-user '+size\"></i>\n </span>\n </div>\n}\n@if (!connected && !loginpage) {\n <div>\n <span class=\"user-menu-disabled\" title=\"Utilisateur non connect\u00E9\">\n <i [ngClass]=\"'fal fa-user '+size\"></i>\n </span>\n </div>\n}\n", styles: [".menuUser{position:relative}.user-menu-disabled{float:left;padding-left:10px;color:#b0b0b0;cursor:default;opacity:.65}.user-menu-link{cursor:pointer}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"] }]
2581
2581
  }], ctorParameters: () => [{ type: AuthenticationService }, { type: i1$2.MatDialog }, { type: i2.Router }], propDecorators: { size: [{
2582
2582
  type: Input
2583
2583
  }], imageUser: [{