V10 , script for dynamic builds

Happy new year, everyone.

It seems they've removed the script for dynamic builds (plugins) in package.json for the Angular project.

I dont know if the documentation is still "unofficial" ,the link in the support page shows nothing for this version (https://support.oneidentity.com/es-es/identity-manager/10.0%20lts/technical-documents)

But digging in, I've found:

https://docs.oneidentity.com/bundle/one-identity-manager_html5-development_10.0/page/sources/html5development/html5devdebuggingwithplugins.htm

where the flag for the dynamic builds is still there.

Needs some fixing/clarification.

Regards!

Parents
  • Even with 9.0 I ended up writing my own PowerShell script that does all the leg work, and prompts for loading of individual components (after qer/qbm), also opens in tabs rather than windows like VST... VST was just too annoying with the way it did it.

  • Hello  
    would you maybe share this script?

  • I'll see if I can.... I don't have a copy, it was for a client and therefore "their IP", but will see if I can get one as its generic and doesn't contain any customer details in it.

  • Here you go  , I've also added the IQC that I didn't have before so its ready for v10.

    -----------------------------------------------------------------------------------------------------------

    $continueList = @('Y', 'N');
    $modules = @(
        @{'id' = 'tsb'; 'title' = 'Target System Base Module'; 'command' = 'npm run build:watch tsb'},
        @{'id' = 'aad'; 'title' = 'Azure Active Directory Module'; 'command' = 'npm run build:watch aad'},
        @{'id' = 'aob'; 'title' = 'Application Governance Module'; 'command' = 'npm run build:watch aob'},
        @{'id' = 'apc'; 'title' = 'Application Management Module'; 'command' = 'npm run build:watch apc'},
        @{'id' = 'att'; 'title' = 'Attestation Module'; 'command' = 'npm run build:watch att'},
        @{'id' = 'cpl'; 'title' = 'Compliance Rules Module'; 'command' = 'npm run build:watch cpl'},
        @{'id' = 'dpr'; 'title' = 'Target System Synchronization Module'; 'command' = 'npm run build:watch dpr'},
        @{'id' = 'hds'; 'title' = 'Helpdesk Module'; 'command' = 'npm run build:watch hds'},
        @{'id' = 'iqc'; 'title' = 'Intelligent Query Chatbot'; 'command' = 'npm run build:watch iqc'},
    #    @{'id' = 'o3t'; 'title' = 'Microsoft Teams Module'; 'command' = 'npm run build:watch o3t'}, # Deprecated
        @{'id' = 'olg'; 'title' = 'OneLogin Module'; 'command' = 'npm run build:watch olg'},
        @{'id' = 'pol'; 'title' = 'Company Policies Module'; 'command' = 'npm run build:watch pol'},
        @{'id' = 'qam'; 'title' = 'Quality and Attestation Management Module'; 'command' = 'npm run build:watch qam'},
        @{'id' = 'rmb'; 'title' = 'Business Roles Module'; 'command' = 'npm run build:watch rmb'},
        @{'id' = 'rms'; 'title' = 'System Roles Module'; 'command' = 'npm run build:watch rms'},
        @{'id' = 'rps'; 'title' = 'Report Subscription Module'; 'command' = 'npm run build:watch rps'},
        @{'id' = 'sac'; 'title' = 'SAP Application Connector Module'; 'command' = 'npm run build:watch sac'}
    #    @{'id' = 'uci'; 'title' = 'Universal Cloud Interface Module'; 'command' = 'npm run build:watch uci'} # Deprecated
    );
    $portals = @(
        @{'id' = 'qbm-app-landingpage'; 'title' = 'Landing Page'; 'command' = 'npm run start qbm-app-landingpage'},
        @{'id' = 'qer-app-portal'; 'title' = 'Main Angular Portal'; 'command' = 'npm run start qer-app-portal'},
        @{'id' = 'qer-app-operationssupport'; 'title' = 'Operations Support Portal'; 'command' = 'npm run start qer-app-operationssupport'},
        @{'id' = 'qer-app-pwdportal'; 'title' = 'Password Portal'; 'command' = 'npm run start qer-app-pwdportal'}
    );
    $wtProfile = 'Windows PowerShell';
     
    $ri = $false;
    while (-not $ri)
    {
        $imxweb = Read-Host -Prompt ('Please enter the full path to the imxweb directory (include drive letter) ');
        if ((Test-Path -Path $imxweb -PathType Container) -and (Test-Path -Path ($imxweb + '\angular.json')))
        {
            $ri = $true;
        }
    }
     
    Write-Host('Cleaning Angular Cache directory first...')  -ForegroundColor Green;
    If (Test-Path -Path ($imxweb + '\.angular\*'))
    {
        Remove-Item -Path ($imxweb + '\.angular\*') -Recurse -Force;
    }
     
    Write-Host('Cleaning old distribution directory first...')  -ForegroundColor Green;
    If (Test-Path -Path ($imxweb + '\dist\*'))
    {
        Remove-Item -Path ($imxweb + '\dist\*') -Recurse -Force;
    }
     
    Write-Host('Building requried Configuration Module...')  -ForegroundColor Green;
    $al = @('-w', '0', 'new-tab', '-d', $imxweb, 'cmd.exe /Q /K npm run build:watch qbm');
    Start-Process wt -ArgumentList $al;
    Write-Host('Wait for build to complete before continuing...') -ForegroundColor Blue;
     
    $ri = $false;
    while (-not $ri)
    {
        $qer = Read-Host -Prompt ('Continue with required Identity Management Base Module build (' + ($continueList -join '/') + ')? ');
        if ($qer.ToUpper() -in $continueList)
        {
            $ri = $true;
        }
    }
     
    if ($qer.ToUpper() -eq $continueList[1].ToUpper())
    {
        Write-Host('Exiting due to required module not being built...') -ForegroundColor Red;
        exit;
    }
    else
    {
        $al = @('-w', '0', 'new-tab', '-d', $imxweb, 'cmd.exe /Q /K npm run build:watch qer');
        Start-Process wt -ArgumentList $al;
        Write-Host('Wait for build to complete before continuing...') -ForegroundColor Blue;
    }
     
    $modules | ForEach-Object {
        $ri = $false;
        while (-not $ri)
        {
            $response = Read-Host -Prompt ('Continue with ' + $_.title + ' build (' + ($continueList -join '/') + ')? ');
            if ($response.ToUpper() -in $continueList)
            {
                $ri = $true;
            }
        }
        if ($response.ToUpper() -eq $continueList[0].ToUpper())
        {
            $al = @('-w', '0', 'new-tab', '-d', $imxweb, 'cmd.exe /Q /K ' + $_.command);
            Start-Process wt -ArgumentList $al;
        }
    };
     
    Write-Host('Wait for build to complete before continuing...') -ForegroundColor Blue;
    $portals | ForEach-Object {
        $ri = $false;
        while (-not $ri)
        {
            $response = Read-Host -Prompt ('Continue with ' + $_.title + ' build (' + ($continueList -join '/') + ')? ');
            if ($response.ToUpper() -in $continueList)
            {
                $ri = $true;
            }
        }
        if ($response.ToUpper() -eq $continueList[0].ToUpper())
        {
            $al = @('-w', '0', 'new-tab', '-d', $imxweb, 'cmd.exe /Q /K ' + $_.command);
            Start-Process wt -ArgumentList $al;
            Write-Host('Only 1 portal can be built. Exiting...') -ForegroundColor Red;
            exit;
        }
    };

    -----------------------------------------------------------------------------------------------------------

    UPDATE: Fixed removed/added modules in v10

  • Hello   Thank you for this, really appreciated 100Exclamation

  • Thanks   Clap !!!

    For v10 and debugging I've been using "npm run build:watch" for the dynamic libraries such as tsb, the dynamic flag seems to have been removed in this version. It works nonetheless

  • I am having troubles getting the run/start to work for v10...

    • nvm (v1.2.2)
    • nvm install v20.19.0 (matching lowest version in supplied package.json)
    • nvm use 20.19.0
    • npm --version (10.8.2 - package.json has ^10.7.0)
    • npm install -g @angular/cli@20.2.1 --force (matching package.json)
    • cd \Downloads\Angular\IdentityManager.imx\v100\imxweb\
    • npm install (succeeds with standard audit/depreciation warnings)

    But on "npm run build:watch qbm" I get issues with "watch" module:

    ------------------------------------------- npm run build:watch qbm --------------------------------------------
    > imxweb@10.0.0 build:watch
    > ng build --watch --configuration development qbm

    Building Angular Package

    ------------------------------------------------------------------------------
    Building entry point 'qbm'
    ------------------------------------------------------------------------------
    â ą Compiling with Angular sources in full compilation mode.node:internal/fs/watchers:207
          const error = new UVException({
                        ^

    Error: UNKNOWN: unknown error, watch
        at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
    Emitted 'error' event on FSWatcher instance at:
        at FSWatcher._handleError (F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\index.js:539:18)
        at NodeFsHandler._boundHandleError (F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\handler.js:300:49)
        at F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\handler.js:149:9
        at foreach (F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\handler.js:81:9)
        at fsWatchBroadcast (F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\handler.js:148:5)
        at FSWatcher.<anonymous> (F:\Downloads\Angular\IdentityManager.imx\v100\imxweb\node_modules\chokidar\handler.js:196:17)
        at FSWatcher.emit (node:events:524:28)
        at FSWatcher._handle.onchange (node:internal/fs/watchers:213:12) {
      errno: -4094,
      syscall: 'watch',
      code: 'UNKNOWN',
      filename: null
    }

    Node.js v20.19.0
    fatal error: all goroutines are asleep - deadlock!

    goroutine 1 [chan receive]:
    github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
            github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
    main.runService.func2()
            github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x51
    main.runService(0x1)
            github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x4d8
    main.main()
            github.com/evanw/esbuild/cmd/esbuild/main.go:252 +0xb6b

    goroutine 4 [chan receive]:
    main.runService.func1()
            github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x45
    created by main.runService in goroutine 1
            github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x1db

    goroutine 5 [chan receive]:
    main.(*serviceType).sendRequest(0xc000030c90, {0x13498c0, 0xc000030ff0})
            github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x12b
    main.runService.func3()
            github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x3e
    created by main.runService in goroutine 1
            github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x30a
    ----------------------------------------------------------------------------------------------------------------

    ------------------------------------------------- npm install --------------------------------------------------
    npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    npm warn deprecated keygrip@1.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
    npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
    npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
    npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
    npm warn deprecated vis@4.21.0: Please consider using https://github.com/visjs

    > imxweb@10.0.0 postinstall
    > node scripts/install-local-packages.js && node scripts/remove-local-package-locks.js

    Env variable set to auto overwrite feeds or determined no feeds present and used local packages instead.
    Overwriting with...
    imx-modules\cadence-icon-3.1.111.tgz
    imx-modules\elemental-ui-core-20.0.76.tgz
    imx-modules\imx-api-aad.tgz
    imx-modules\imx-api-aob.tgz
    imx-modules\imx-api-apc.tgz
    imx-modules\imx-api-att.tgz
    imx-modules\imx-api-cpl.tgz
    imx-modules\imx-api-dpr.tgz
    imx-modules\imx-api-hds.tgz
    imx-modules\imx-api-iqc.tgz
    imx-modules\imx-api-olg.tgz
    imx-modules\imx-api-pol.tgz
    imx-modules\imx-api-qbm.tgz
    imx-modules\imx-api-qer.tgz
    imx-modules\imx-api-rmb.tgz
    imx-modules\imx-api-rms.tgz
    imx-modules\imx-api-rps.tgz
    imx-modules\imx-api-sac.tgz
    imx-modules\imx-api-tsb.tgz
    imx-modules\imx-api-uci.tgz
    imx-modules\imx-qbm-dbts.tgz

    Running command npm i @elemental-ui/cadence-icon@imx-modules\cadence-icon-3.1.111.tgz @elemental-ui/core@imx-modules\elemental-ui-core-20.0.76.tgz @imx-modules/imx-api-aad@imx-modules\imx-api-aad.tgz @imx-modules/imx-api-aob@imx-modules\imx-api-aob.tgz @imx-modules/imx-api-apc@imx-modules\imx-api-apc.tgz @imx-modules/imx-api-att@imx-modules\imx-api-att.tgz @imx-modules/imx-api-cpl@imx-modules\imx-api-cpl.tgz @imx-modules/imx-api-dpr@imx-modules\imx-api-dpr.tgz @imx-modules/imx-api-hds@imx-modules\imx-api-hds.tgz @imx-modules/imx-api-iqc@imx-modules\imx-api-iqc.tgz @imx-modules/imx-api-olg@imx-modules\imx-api-olg.tgz @imx-modules/imx-api-pol@imx-modules\imx-api-pol.tgz @imx-modules/imx-api-qbm@imx-modules\imx-api-qbm.tgz @imx-modules/imx-api-qer@imx-modules\imx-api-qer.tgz @imx-modules/imx-api-rmb@imx-modules\imx-api-rmb.tgz @imx-modules/imx-api-rms@imx-modules\imx-api-rms.tgz @imx-modules/imx-api-rps@imx-modules\imx-api-rps.tgz @imx-modules/imx-api-sac@imx-modules\imx-api-sac.tgz @imx-modules/imx-api-tsb@imx-modules\imx-api-tsb.tgz @imx-modules/imx-api-uci@imx-modules\imx-api-uci.tgz @imx-modules/imx-qbm-dbts@imx-modules\imx-qbm-dbts.tgz  --save=false
    Overwrite Finished
    No local packages to remove
    Removing react-server-dom-webpack to mitigate security issue

    added 1896 packages, and audited 1897 packages in 24m

    327 packages are looking for funding
      run `npm fund` for details

    30 vulnerabilities (1 low, 14 moderate, 15 high)

    To address issues that do not require attention, run:
      npm audit fix

    To address all issues (including breaking changes), run:
      npm audit fix --force

    Run `npm audit` for details.
    ----------------------------------------------------------------------------------------------------------------

    Any thoughts on getting around this?

  • I've no issues with these versions. Just to be sure you already did:
    npm cache clean --force
    rm -rf node_modules/
    npm install

  • Everything I read is that npm fixed their cache handling quite some time back and they all say a "cache clean" does nothing now (my script above, when run, will do some cleaning as well before trying to run/start).

    Also, as it was directly from a downloaded from repo (as zip) and extracted, there is no node_modules, so my install above was what populated it (i.e. all fresh downloads). I've even done a full nvm removal of nodejs and deleted the entire repo, then started again with same results.

    We do use ZScalar on our work machines, so who knows if that has stuffed something in transit...

    I know a colleague managed to get the builds running on the client before Christmas (just testing to identify any base issues prior to their upgrade in the next month or so)...problem I have, is that NodeJS/npm is so damn annoying to debug ("UNKNOWN" error is not really helpful). I'll try diagnosing node_modules\chokidar\handler.js on Tuesday to see if it can assist with identifying issue.

Reply
  • Everything I read is that npm fixed their cache handling quite some time back and they all say a "cache clean" does nothing now (my script above, when run, will do some cleaning as well before trying to run/start).

    Also, as it was directly from a downloaded from repo (as zip) and extracted, there is no node_modules, so my install above was what populated it (i.e. all fresh downloads). I've even done a full nvm removal of nodejs and deleted the entire repo, then started again with same results.

    We do use ZScalar on our work machines, so who knows if that has stuffed something in transit...

    I know a colleague managed to get the builds running on the client before Christmas (just testing to identify any base issues prior to their upgrade in the next month or so)...problem I have, is that NodeJS/npm is so damn annoying to debug ("UNKNOWN" error is not really helpful). I'll try diagnosing node_modules\chokidar\handler.js on Tuesday to see if it can assist with identifying issue.

Children