@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 1.35 kB
Source Map (JSON)
{"version":3,"file":"Angular.mjs","sources":["../../../../src/Platform/detection/Angular.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { documentExists, processExists, windowExists } from './helpers';\n// Tested with @angular/core 16.0.0\nexport function angularWebDetect() {\n const angularVersionSetInDocument = Boolean(documentExists() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean(windowExists() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nexport function angularSSRDetect() {\n return ((processExists() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACO,SAAS,gBAAgB,GAAG;AACnC,IAAI,MAAM,2BAA2B,GAAG,OAAO,CAAC,cAAc,EAAE,IAAI,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;AAC5G,IAAI,MAAM,yBAAyB,GAAG,OAAO,CAAC,YAAY,EAAE,IAAI,OAAO,MAAM,CAAC,EAAE,KAAK,WAAW,CAAC,CAAC;AAClG,IAAI,OAAO,2BAA2B,IAAI,yBAAyB,CAAC;AACpE,CAAC;AACM,SAAS,gBAAgB,GAAG;AACnC,IAAI,QAAQ,CAAC,aAAa,EAAE;AAC5B,QAAQ,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;AACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,UAAU,CAAC,KAAK,CAAC;AAC3D,QAAQ,KAAK,EAAE;AACf;;;;"}