@sentry/google-cloud-serverless 9.0.0-alpha.0 → 9.0.0-alpha.2

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/build/cjs/sdk.js CHANGED
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const core = require('@sentry/core');
3
4
  const node = require('@sentry/node');
4
5
  const googleCloudGrpc = require('./integrations/google-cloud-grpc.js');
5
6
  const googleCloudHttp = require('./integrations/google-cloud-http.js');
@@ -27,21 +28,11 @@ function getDefaultIntegrations(_options) {
27
28
  */
28
29
  function init(options = {}) {
29
30
  const opts = {
30
- _metadata: {} ,
31
31
  defaultIntegrations: getDefaultIntegrations(),
32
32
  ...options,
33
33
  };
34
34
 
35
- opts._metadata.sdk = opts._metadata.sdk || {
36
- name: 'sentry.javascript.google-cloud-serverless',
37
- packages: [
38
- {
39
- name: 'npm:@sentry/google-cloud-serverless',
40
- version: node.SDK_VERSION,
41
- },
42
- ],
43
- version: node.SDK_VERSION,
44
- };
35
+ core.applySdkMetadata(opts, 'google-cloud-serverless');
45
36
 
46
37
  return node.init(opts);
47
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration, Options, SdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { SDK_VERSION, getDefaultIntegrationsWithoutPerformance, init as initNode } from '@sentry/node';\n\nimport { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc';\nimport { googleCloudHttpIntegration } from './integrations/google-cloud-http';\n\nfunction isCjs(): boolean {\n return typeof require !== 'undefined';\n}\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs()\n ? [\n googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing.\n googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing.\n ]\n : [];\n}\n\n/** Get the default integrations for the GCP SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n return [...getDefaultIntegrationsWithoutPerformance(), ...getCjsOnlyIntegrations()];\n}\n\n/**\n * @see {@link Sentry.init}\n */\nexport function init(options: NodeOptions = {}): NodeClient | undefined {\n const opts = {\n _metadata: {} as SdkMetadata,\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n opts._metadata.sdk = opts._metadata.sdk || {\n name: 'sentry.javascript.google-cloud-serverless',\n packages: [\n {\n name: 'npm:@sentry/google-cloud-serverless',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return initNode(opts);\n}\n"],"names":["googleCloudHttpIntegration","googleCloudGrpcIntegration","getDefaultIntegrationsWithoutPerformance","SDK_VERSION","initNode"],"mappings":";;;;;;AAOA,SAAS,KAAK,GAAY;AAC1B,EAAE,OAAO,OAAO,OAAQ,KAAI,WAAW;AACvC;;AAEA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK;AACd,MAAM;AACN,QAAQA,0CAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD,QAAQC,0CAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD;AACA,MAAM,EAAE;AACR;;AAEA;AACO,SAAS,sBAAsB,CAAC,QAAQ,EAA0B;AACzE,EAAE,OAAO,CAAC,GAAGC,6CAAwC,EAAE,EAAE,GAAG,sBAAsB,EAAE,CAAC;AACrF;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,GAAgB,EAAE,EAA0B;AACxE,EAAE,MAAM,OAAO;AACf,IAAI,SAAS,EAAE,EAAG;AAClB,IAAI,mBAAmB,EAAE,sBAAsB,CAAQ,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAE,IAAI,CAAC,SAAS,CAAC,GAAA,GAAM,IAAI,CAAC,SAAS,CAAC,GAAA,IAAO;AAC7C,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,QAAQ,EAAE;AACd,MAAM;AACN,QAAQ,IAAI,EAAE,qCAAqC;AACnD,QAAQ,OAAO,EAAEC,gBAAW;AAC5B,OAAO;AACP,KAAK;AACL,IAAI,OAAO,EAAEA,gBAAW;AACxB,GAAG;;AAEH,EAAE,OAAOC,SAAQ,CAAC,IAAI,CAAC;AACvB;;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration, Options } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrationsWithoutPerformance, init as initNode } from '@sentry/node';\n\nimport { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc';\nimport { googleCloudHttpIntegration } from './integrations/google-cloud-http';\n\nfunction isCjs(): boolean {\n return typeof require !== 'undefined';\n}\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs()\n ? [\n googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing.\n googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing.\n ]\n : [];\n}\n\n/** Get the default integrations for the GCP SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n return [...getDefaultIntegrationsWithoutPerformance(), ...getCjsOnlyIntegrations()];\n}\n\n/**\n * @see {@link Sentry.init}\n */\nexport function init(options: NodeOptions = {}): NodeClient | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'google-cloud-serverless');\n\n return initNode(opts);\n}\n"],"names":["googleCloudHttpIntegration","googleCloudGrpcIntegration","getDefaultIntegrationsWithoutPerformance","applySdkMetadata","initNode"],"mappings":";;;;;;;AAQA,SAAS,KAAK,GAAY;AAC1B,EAAE,OAAO,OAAO,OAAQ,KAAI,WAAW;AACvC;;AAEA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK;AACd,MAAM;AACN,QAAQA,0CAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD,QAAQC,0CAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD;AACA,MAAM,EAAE;AACR;;AAEA;AACO,SAAS,sBAAsB,CAAC,QAAQ,EAA0B;AACzE,EAAE,OAAO,CAAC,GAAGC,6CAAwC,EAAE,EAAE,GAAG,sBAAsB,EAAE,CAAC;AACrF;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,GAAgB,EAAE,EAA0B;AACxE,EAAE,MAAM,OAAO;AACf,IAAI,mBAAmB,EAAE,sBAAsB,CAAQ,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAEC,qBAAgB,CAAC,IAAI,EAAE,yBAAyB,CAAC;;AAEnD,EAAE,OAAOC,SAAQ,CAAC,IAAI,CAAC;AACvB;;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"9.0.0-alpha.0","sideEffects":false}
1
+ {"type":"module","version":"9.0.0-alpha.2","sideEffects":false}
package/build/esm/sdk.js CHANGED
@@ -1,4 +1,5 @@
1
- import { getDefaultIntegrationsWithoutPerformance, SDK_VERSION, init as init$1 } from '@sentry/node';
1
+ import { applySdkMetadata } from '@sentry/core';
2
+ import { getDefaultIntegrationsWithoutPerformance, init as init$1 } from '@sentry/node';
2
3
  import { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc.js';
3
4
  import { googleCloudHttpIntegration } from './integrations/google-cloud-http.js';
4
5
 
@@ -25,21 +26,11 @@ function getDefaultIntegrations(_options) {
25
26
  */
26
27
  function init(options = {}) {
27
28
  const opts = {
28
- _metadata: {} ,
29
29
  defaultIntegrations: getDefaultIntegrations(),
30
30
  ...options,
31
31
  };
32
32
 
33
- opts._metadata.sdk = opts._metadata.sdk || {
34
- name: 'sentry.javascript.google-cloud-serverless',
35
- packages: [
36
- {
37
- name: 'npm:@sentry/google-cloud-serverless',
38
- version: SDK_VERSION,
39
- },
40
- ],
41
- version: SDK_VERSION,
42
- };
33
+ applySdkMetadata(opts, 'google-cloud-serverless');
43
34
 
44
35
  return init$1(opts);
45
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration, Options, SdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { SDK_VERSION, getDefaultIntegrationsWithoutPerformance, init as initNode } from '@sentry/node';\n\nimport { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc';\nimport { googleCloudHttpIntegration } from './integrations/google-cloud-http';\n\nfunction isCjs(): boolean {\n return typeof require !== 'undefined';\n}\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs()\n ? [\n googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing.\n googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing.\n ]\n : [];\n}\n\n/** Get the default integrations for the GCP SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n return [...getDefaultIntegrationsWithoutPerformance(), ...getCjsOnlyIntegrations()];\n}\n\n/**\n * @see {@link Sentry.init}\n */\nexport function init(options: NodeOptions = {}): NodeClient | undefined {\n const opts = {\n _metadata: {} as SdkMetadata,\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n opts._metadata.sdk = opts._metadata.sdk || {\n name: 'sentry.javascript.google-cloud-serverless',\n packages: [\n {\n name: 'npm:@sentry/google-cloud-serverless',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return initNode(opts);\n}\n"],"names":["initNode"],"mappings":";;;;AAOA,SAAS,KAAK,GAAY;AAC1B,EAAE,OAAO,OAAO,OAAQ,KAAI,WAAW;AACvC;;AAEA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK;AACd,MAAM;AACN,QAAQ,0BAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD,QAAQ,0BAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD;AACA,MAAM,EAAE;AACR;;AAEA;AACO,SAAS,sBAAsB,CAAC,QAAQ,EAA0B;AACzE,EAAE,OAAO,CAAC,GAAG,wCAAwC,EAAE,EAAE,GAAG,sBAAsB,EAAE,CAAC;AACrF;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,GAAgB,EAAE,EAA0B;AACxE,EAAE,MAAM,OAAO;AACf,IAAI,SAAS,EAAE,EAAG;AAClB,IAAI,mBAAmB,EAAE,sBAAsB,CAAQ,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAE,IAAI,CAAC,SAAS,CAAC,GAAA,GAAM,IAAI,CAAC,SAAS,CAAC,GAAA,IAAO;AAC7C,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,QAAQ,EAAE;AACd,MAAM;AACN,QAAQ,IAAI,EAAE,qCAAqC;AACnD,QAAQ,OAAO,EAAE,WAAW;AAC5B,OAAO;AACP,KAAK;AACL,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG;;AAEH,EAAE,OAAOA,MAAQ,CAAC,IAAI,CAAC;AACvB;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration, Options } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrationsWithoutPerformance, init as initNode } from '@sentry/node';\n\nimport { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc';\nimport { googleCloudHttpIntegration } from './integrations/google-cloud-http';\n\nfunction isCjs(): boolean {\n return typeof require !== 'undefined';\n}\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs()\n ? [\n googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing.\n googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing.\n ]\n : [];\n}\n\n/** Get the default integrations for the GCP SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n return [...getDefaultIntegrationsWithoutPerformance(), ...getCjsOnlyIntegrations()];\n}\n\n/**\n * @see {@link Sentry.init}\n */\nexport function init(options: NodeOptions = {}): NodeClient | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'google-cloud-serverless');\n\n return initNode(opts);\n}\n"],"names":["initNode"],"mappings":";;;;;AAQA,SAAS,KAAK,GAAY;AAC1B,EAAE,OAAO,OAAO,OAAQ,KAAI,WAAW;AACvC;;AAEA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK;AACd,MAAM;AACN,QAAQ,0BAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD,QAAQ,0BAA0B,CAAC,EAAE,QAAQ,EAAE,IAAA,EAAM,CAAC;AACtD;AACA,MAAM,EAAE;AACR;;AAEA;AACO,SAAS,sBAAsB,CAAC,QAAQ,EAA0B;AACzE,EAAE,OAAO,CAAC,GAAG,wCAAwC,EAAE,EAAE,GAAG,sBAAsB,EAAE,CAAC;AACrF;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,GAAgB,EAAE,EAA0B;AACxE,EAAE,MAAM,OAAO;AACf,IAAI,mBAAmB,EAAE,sBAAsB,CAAQ,CAAC;AACxD,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH,EAAE,gBAAgB,CAAC,IAAI,EAAE,yBAAyB,CAAC;;AAEnD,EAAE,OAAOA,MAAQ,CAAC,IAAI,CAAC;AACvB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAe,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAmB5D,oDAAoD;AACpD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,EAAE,CAEvE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,UAAU,GAAG,SAAS,CAmBtE"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAmB5D,oDAAoD;AACpD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,EAAE,CAEvE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,UAAU,GAAG,SAAS,CAStE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/google-cloud-serverless",
3
- "version": "9.0.0-alpha.0",
3
+ "version": "9.0.0-alpha.2",
4
4
  "description": "Official Sentry SDK for Google Cloud Functions",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud-serverless",
@@ -48,8 +48,8 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@sentry/core": "9.0.0-alpha.0",
52
- "@sentry/node": "9.0.0-alpha.0",
51
+ "@sentry/core": "9.0.0-alpha.2",
52
+ "@sentry/node": "9.0.0-alpha.2",
53
53
  "@types/express": "^4.17.14"
54
54
  },
55
55
  "devDependencies": {