@opentelemetry/opentelemetry-browser-detector 0.52.1 → 0.54.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAGL,QAAQ,GAET,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,SAAS,CAAC;AAE5D;;GAEG;AACH;IAAA;IAgCA,CAAC;IA/BO,gCAAM,GAAZ,UAAa,MAAgC;;;;gBACrC,SAAS,GAAG,OAAO,SAAS,KAAK,WAAW,CAAC;gBACnD,IAAI,CAAC,SAAS,EAAE;oBACd,sBAAO,QAAQ,CAAC,KAAK,EAAE,EAAC;iBACzB;gBACK,eAAe,GAAuB,oBAAoB,EAAE,CAAC;gBACnE,sBAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,EAAC;;;KAC7D;IACD;;;;;;OAMG;IACK,gDAAsB,GAA9B,UACE,eAAmC,EACnC,OAAiC;QAEjC,IACE,CAAC,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC;YAC/C,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAC7C;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;SACtC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAhCD,IAgCC;AAED,8CAA8C;AAC9C,SAAS,oBAAoB;IAC3B,IAAM,cAAc,GAAuB,EAAE,CAAC;IAC9C,IAAM,aAAa,GAA+B,SAAiB;SAChE,aAAa,CAAC;IACjB,IAAI,aAAa,EAAE;QACjB,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC;QACrE,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAClE,UAAA,CAAC,IAAI,OAAG,CAAC,CAAC,KAAK,SAAI,CAAC,CAAC,OAAS,EAAzB,CAAyB,CAC/B,CAAC;QACF,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC;KAClE;SAAM;QACL,cAAc,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC;KACrE;IACD,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { ResourceAttributes } from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): ResourceAttributes {\n const browserAttribs: ResourceAttributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
1
+ {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAc,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAGL,QAAQ,GAET,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,SAAS,CAAC;AAE5D;;GAEG;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C,GAAG,SAAS,CAAC,SAAS,CAAC;KACrE;IACD,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
@@ -1,2 +1,2 @@
1
- export * from './BrowserDetector';
1
+ export { browserDetector } from './BrowserDetector';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export * from './BrowserDetector';
16
+ export { browserDetector } from './BrowserDetector';
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './BrowserDetector';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { browserDetector } from './BrowserDetector';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // this is autogenerated file, see scripts/version-update.js
17
- export var VERSION = '0.52.1';
17
+ export var VERSION = '0.54.0';
18
18
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.52.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAGL,QAAQ,GAET,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,SAAS,CAAC;AAE5D;;GAEG;AACH,MAAM,eAAe;IACnB,KAAK,CAAC,MAAM,CAAC,MAAgC;QAC3C,MAAM,SAAS,GAAG,OAAO,SAAS,KAAK,WAAW,CAAC;QACnD,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB,oBAAoB,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,CAAC,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC;YAC/C,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAC7C;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;SACtC;IACH,CAAC;CACF;AAED,8CAA8C;AAC9C,SAAS,oBAAoB;IAC3B,MAAM,cAAc,GAAuB,EAAE,CAAC;IAC9C,MAAM,aAAa,GAA+B,SAAiB;SAChE,aAAa,CAAC;IACjB,IAAI,aAAa,EAAE;QACjB,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC;QACrE,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAClE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAC/B,CAAC;QACF,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC;KAClE;SAAM;QACL,cAAc,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC;KACrE;IACD,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { ResourceAttributes } from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): ResourceAttributes {\n const browserAttribs: ResourceAttributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
1
+ {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,IAAI,EAAE,MAAM,oBAA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,GAAG,aAAa,CAAC,MAAM,CAAC;KAClE;SAAM;QACL,cAAc,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC;KACrE;IACD,cAAc,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
@@ -1,2 +1,2 @@
1
- export * from './BrowserDetector';
1
+ export { browserDetector } from './BrowserDetector';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export * from './BrowserDetector';
16
+ export { browserDetector } from './BrowserDetector';
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './BrowserDetector';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { browserDetector } from './BrowserDetector';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // this is autogenerated file, see scripts/version-update.js
17
- export const VERSION = '0.52.1';
17
+ export const VERSION = '0.54.0';
18
18
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.52.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAC1C,wDAKkC;AAElC,mCAA4D;AAE5D;;GAEG;AACH,MAAM,eAAe;IACnB,KAAK,CAAC,MAAM,CAAC,MAAgC;QAC3C,MAAM,SAAS,GAAG,OAAO,SAAS,KAAK,WAAW,CAAC;QACnD,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,oBAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB,oBAAoB,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,CAAC,eAAe,CAAC,0BAAkB,CAAC,UAAU,CAAC;YAC/C,CAAC,eAAe,CAAC,0BAAkB,CAAC,QAAQ,CAAC,EAC7C;YACA,UAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,oBAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,oBAAQ,CAAC,eAAe,CAAC,CAAC;SACtC;IACH,CAAC;CACF;AAED,8CAA8C;AAC9C,SAAS,oBAAoB;IAC3B,MAAM,cAAc,GAAuB,EAAE,CAAC;IAC9C,MAAM,aAAa,GAA+B,SAAiB;SAChE,aAAa,CAAC;IACjB,IAAI,aAAa,EAAE;QACjB,cAAc,CAAC,0BAAkB,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC;QACrE,cAAc,CAAC,0BAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAClE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAC/B,CAAC;QACF,cAAc,CAAC,0BAAkB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC;KAClE;SAAM;QACL,cAAc,CAAC,0BAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC;KACrE;IACD,cAAc,CAAC,0BAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { ResourceAttributes } from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): ResourceAttributes {\n const browserAttribs: ResourceAttributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
1
+ {"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../src/BrowserDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAsD;AACtD,wDAKkC;AAClC,mCAA4D;AAE5D;;GAEG;AACH,MAAM,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CAAC,0BAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC;IACjE,OAAO,cAAc,CAAC;AACxB,CAAC;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport {\n Detector,\n IResource,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { BROWSER_ATTRIBUTES, UserAgentData } from './types';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n async detect(config?: ResourceDetectionConfig): Promise<IResource> {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: Attributes = getBrowserAttributes();\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates browser resource attribute map from browser variables\n *\n * @param browserResource The un-sanitized resource attributes from browser as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: Attributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n !browserResource[BROWSER_ATTRIBUTES.USER_AGENT] &&\n !browserResource[BROWSER_ATTRIBUTES.PLATFORM]\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource(browserResource);\n }\n }\n}\n\n// Add Browser related attributes to resources\nfunction getBrowserAttributes(): Attributes {\n const browserAttribs: Attributes = {};\n const userAgentData: UserAgentData | undefined = (navigator as any)\n .userAgentData;\n if (userAgentData) {\n browserAttribs[BROWSER_ATTRIBUTES.PLATFORM] = userAgentData.platform;\n browserAttribs[BROWSER_ATTRIBUTES.BRANDS] = userAgentData.brands.map(\n b => `${b.brand} ${b.version}`\n );\n browserAttribs[BROWSER_ATTRIBUTES.MOBILE] = userAgentData.mobile;\n } else {\n browserAttribs[BROWSER_ATTRIBUTES.USER_AGENT] = navigator.userAgent;\n }\n browserAttribs[BROWSER_ATTRIBUTES.LANGUAGE] = navigator.language;\n return browserAttribs;\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
@@ -1,2 +1,2 @@
1
- export * from './BrowserDetector';
1
+ export { browserDetector } from './BrowserDetector';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -14,16 +14,8 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
17
  Object.defineProperty(exports, "__esModule", { value: true });
28
- __exportStar(require("./BrowserDetector"), exports);
18
+ exports.browserDetector = void 0;
19
+ var BrowserDetector_1 = require("./BrowserDetector");
20
+ Object.defineProperty(exports, "browserDetector", { enumerable: true, get: function () { return BrowserDetector_1.browserDetector; } });
29
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,oDAAkC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './BrowserDetector';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAoD;AAA3C,kHAAA,eAAe,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { browserDetector } from './BrowserDetector';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.52.1';
20
+ exports.VERSION = '0.54.0';
21
21
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.52.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/opentelemetry-browser-detector",
3
- "version": "0.52.1",
3
+ "version": "0.54.0",
4
4
  "description": "OpenTelemetry Resource Detector for Browser",
5
5
  "main": "build/src/index.js",
6
6
  "module": "build/esm/index.js",
@@ -13,11 +13,10 @@
13
13
  "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
14
14
  "lint": "eslint . --ext .ts",
15
15
  "lint:fix": "eslint . --ext .ts --fix",
16
- "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
16
+ "test": "nyc mocha 'test/**/*.test.ts'",
17
17
  "test:browser": "karma start --single-run",
18
18
  "tdd": "npm run test -- --watch-extensions ts --watch",
19
19
  "tdd:browser": "karma start",
20
- "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
21
20
  "version": "node ../../../scripts/version-update.js",
22
21
  "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
23
22
  "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
@@ -54,39 +53,36 @@
54
53
  "access": "public"
55
54
  },
56
55
  "devDependencies": {
57
- "@babel/core": "7.24.7",
58
- "@babel/preset-env": "7.24.7",
56
+ "@babel/core": "7.25.2",
57
+ "@babel/preset-env": "7.25.4",
59
58
  "@opentelemetry/api": "1.9.0",
60
- "@types/mocha": "10.0.6",
59
+ "@types/mocha": "10.0.8",
61
60
  "@types/node": "18.6.5",
62
61
  "@types/sinon": "17.0.3",
63
- "babel-plugin-istanbul": "6.1.1",
64
- "codecov": "3.8.3",
62
+ "babel-plugin-istanbul": "7.0.0",
65
63
  "cross-var": "1.1.0",
66
- "karma": "6.4.3",
64
+ "karma": "6.4.4",
67
65
  "karma-chrome-launcher": "3.1.0",
68
66
  "karma-coverage": "2.2.1",
69
67
  "karma-mocha": "2.0.1",
70
68
  "karma-spec-reporter": "0.0.36",
71
69
  "karma-webpack": "5.0.1",
72
70
  "lerna": "6.6.2",
73
- "mocha": "10.2.0",
71
+ "mocha": "10.7.3",
74
72
  "nyc": "15.1.0",
75
73
  "sinon": "15.1.2",
76
74
  "ts-loader": "9.5.1",
77
- "ts-mocha": "10.0.0",
78
75
  "typescript": "4.4.4",
79
- "webpack": "5.89.0",
76
+ "webpack": "5.94.0",
80
77
  "webpack-cli": "5.1.4",
81
78
  "webpack-merge": "5.10.0"
82
79
  },
83
80
  "peerDependencies": {
84
- "@opentelemetry/api": "^1.0.0"
81
+ "@opentelemetry/api": "^1.3.0"
85
82
  },
86
83
  "dependencies": {
87
- "@opentelemetry/resources": "1.25.1",
88
- "@opentelemetry/semantic-conventions": "1.25.1"
84
+ "@opentelemetry/resources": "1.27.0"
89
85
  },
90
86
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/browser-detector",
91
- "gitHead": "0608f405573901e54db01e44c533009cf28be262"
87
+ "gitHead": "eb3ca4fb07ee31c62093f5fcec56575573c902ce"
92
88
  }